aboutsummaryrefslogtreecommitdiff
path: root/src/block
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-13 15:43:22 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-13 15:43:22 +0100
commitd6040e32a610a792d1e5365a7643eb99fbb5a217 (patch)
treeb5196885ae750852ad848edda714d48f4819e4b6 /src/block
parentd7f90cabb0517a50a6c3dd702852770240566bfc (diff)
downloadgarage-d6040e32a610a792d1e5365a7643eb99fbb5a217.tar.gz
garage-d6040e32a610a792d1e5365a7643eb99fbb5a217.zip
cli: prettier table in garage stats
Diffstat (limited to 'src/block')
-rw-r--r--src/block/manager.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs
index 26e15bf5..c23d7a59 100644
--- a/src/block/manager.rs
+++ b/src/block/manager.rs
@@ -318,6 +318,11 @@ impl BlockManager {
Ok(self.rc.rc.len()?)
}
+ /// Get number of items in the refcount table
+ pub fn rc_fast_len(&self) -> Result<Option<usize>, Error> {
+ Ok(self.rc.rc.fast_len()?)
+ }
+
/// Send command to start/stop/manager scrub worker
pub async fn send_scrub_command(&self, cmd: ScrubWorkerCommand) {
let _ = self.tx_scrub_command.send(cmd).await;