pub struct DiskFloor {
pub percent: u8,
pub bytes: u64,
}Expand description
How much must stay free, as a percentage of the filesystem and as an absolute byte count; the larger of the two is the floor.
Fields§
§percent: u8Percent of f_blocks that must remain available. 0 disables the
percentage term.
bytes: u64Bytes that must remain available. 0 disables the absolute term.
Implementations§
Source§impl DiskFloor
impl DiskFloor
Sourcepub fn parse(spec: &str) -> Result<DiskFloor, String>
pub fn parse(spec: &str) -> Result<DiskFloor, String>
--disk-floor’s grammar. A comma-separated list of terms, each
either a percentage (5%) or a byte count with a unit (2GiB, 500M,
1T, 4096); the larger of the two kinds wins at measurement time. A
term of one kind replaces the default of that kind, so --disk-floor 10% keeps the 2 GiB absolute floor and --disk-floor 0%,512MiB is a
pure byte floor. 0 on both is refused by name: a gate that can never
refuse is not a gate, and an operator who wants none should not have
one that merely looks like one.