xfs: export zone stats in /proc/*/mountstats
authorHans Holmberg <hans.holmberg@wdc.com>
Sat, 30 Nov 2024 04:53:49 +0000 (05:53 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 3 Mar 2025 15:17:10 +0000 (08:17 -0700)
commit5443041b9c6308db91f58eaf401d8f7f81874b74
tree30dc28e7b33ba91924f016876624f869c1795d3d
parent099bf44f9c90184d5a0439d00ed2d965d786dfea
xfs: export zone stats in /proc/*/mountstats

Add the per-zone life time hint and the used block distribution
for fully written zones, grouping reclaimable zones in fixed-percentage
buckets spanning 0..9%, 10..19% and full zones as 100% used as well as a
few statistics about the zone allocator and open and reclaimable zones
in /proc/*/mountstats.

This gives good insight into data fragmentation and data placement
success rate.

Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
Co-developed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
fs/xfs/Makefile
fs/xfs/xfs_super.c
fs/xfs/xfs_zone_alloc.h
fs/xfs/xfs_zone_info.c [new file with mode: 0644]