btrfs: zoned: show statistics for zoned filesystems
Provide statistics for zoned filesystems. These statistics include, the
number of active block-groups, how many of them are reclaimable or unused,
if the filesystem needs to be reclaimed, the currently assigned relocation
and treelog block-groups if they're present and a list of active zones.
Example:
active block-groups: 4
reclaimable: 0
unused: 2
need reclaim: false
data relocation block-group:
4294967296
active zones:
start:
1610612736, wp: 344064 used: 16384, reserved: 0, unusable: 327680
start:
1879048192, wp:
34963456 used: 131072, reserved: 0, unusable:
34832384
start:
4026531840, wp: 0 used: 0, reserved: 0, unusable: 0
start:
4294967296, wp: 0 used: 0, reserved: 0, unusable: 0
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>