Skip to content

Commit

Permalink
Expose used information from the blockdev
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Aug 20, 2021
1 parent 16b4800 commit 9a676e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engine/strat_engine/backstore/blockdev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ impl StratBlockDev {
self.used.available()
}

/// The number of Sectors on this device which have been allocated.
pub fn used(&self) -> Sectors {
self.used.used()
}

/// The total size of the Stratis block device.
pub fn total_size(&self) -> BlockdevSize {
let size = self.used.size();
Expand Down

0 comments on commit 9a676e9

Please sign in to comment.