Add blocks in errored state to garage stats

This commit is contained in:
Alex 2022-03-28 15:47:23 +02:00
parent 42dde54126
commit 913f7754bb
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE
2 changed files with 11 additions and 0 deletions

View file

@ -265,6 +265,11 @@ impl BlockManager {
self.resync_queue.len() self.resync_queue.len()
} }
/// Get number of blocks that have an error
pub fn resync_errors_len(&self) -> usize {
self.resync_errors.len()
}
/// Get number of items in the refcount table /// Get number of items in the refcount table
pub fn rc_len(&self) -> usize { pub fn rc_len(&self) -> usize {
self.rc.rc.len() self.rc.rc.len()

View file

@ -728,6 +728,12 @@ impl AdminRpcHandler {
self.garage.block_manager.resync_queue_len() self.garage.block_manager.resync_queue_len()
) )
.unwrap(); .unwrap();
writeln!(
&mut ret,
" blocks with resync errors: {}",
self.garage.block_manager.resync_errors_len()
)
.unwrap();
ret ret
} }