mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-18 04:15:32 +00:00
780355d225
Print the total zone_unusable size in the summary for 'fi usage' for a filesystem in zoned mode. It's a sum of all the zone_unusable values from 'fi df'. Per-device stats are not implemented and would need more complicated calculations from raw data, kernel does not export that (but it could). As of 5.12, the zone_unusable is stored only in memory so we'd have to map raw block device zones to the block groups and the live extents in the associated block groups to get the exact numbers. Example: # btrfs fi usage /mnt Overall: Device size: 2.00GiB Device allocated: 768.00MiB Device unallocated: 1.25GiB Device missing: 0.00B Device zone unusable: 320.00KiB Used: 128.00KiB Free (estimated): 1.50GiB (min: 1.50GiB) Free (statfs, df): 1.50GiB Data ratio: 1.00 Metadata ratio: 1.00 Global reserve: 3.25MiB (used: 32.00KiB) Multiple profiles: no Data,single: Size:256.00MiB, Used:0.00B (0.00%) /dev/nullb0 256.00MiB Metadata,single: Size:256.00MiB, Used:112.00KiB (0.04%) /dev/nullb0 256.00MiB System,single: Size:256.00MiB, Used:16.00KiB (0.01%) /dev/nullb0 256.00MiB Unallocated: /dev/nullb0 1.25GiB # btrfs fi df Data, single: total=256.00MiB, used=0.00B, zone_unusable=0.00B System, single: total=256.00MiB, used=16.00KiB, zone_unusable=160.00KiB Metadata, single: total=256.00MiB, used=112.00KiB, zone_unusable=160.00KiB GlobalReserve, single: total=3.25MiB, used=32.00KiB Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
balance.c | ||
commands.h | ||
device.c | ||
filesystem-du.c | ||
filesystem-usage.c | ||
filesystem-usage.h | ||
filesystem.c | ||
inspect-dump-super.c | ||
inspect-dump-tree.c | ||
inspect-tree-stats.c | ||
inspect.c | ||
property.c | ||
qgroup.c | ||
quota.c | ||
receive-dump.c | ||
receive-dump.h | ||
receive.c | ||
replace.c | ||
rescue-chunk-recover.c | ||
rescue-super-recover.c | ||
rescue.c | ||
rescue.h | ||
restore.c | ||
scrub.c | ||
send.c | ||
subvolume.c |