summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2026-03-16 14:40:19 +0300
committerCarlos Maiolino <cem@kernel.org>2026-03-18 12:08:07 +0300
commit68aa101bf2046aa8365333a3768cece07975ca5f (patch)
tree08d675770714346e7106e38f57a5de4299d3b200
parent6a82a691b08070ad03b237d7db89aa0bfef389e2 (diff)
downloadlinux-68aa101bf2046aa8365333a3768cece07975ca5f.tar.xz
xfs: display more zone related information in mountstats
Modify xfs_zoned_show_stats() to add to the information displayed with /proc/self/mountstats the total number of zones (RT groups) and the number of open zones together with the maximum number of open zones. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r--fs/xfs/xfs_zone_info.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/xfs_zone_info.c b/fs/xfs/xfs_zone_info.c
index 53eabbc3334c..a2af44011654 100644
--- a/fs/xfs/xfs_zone_info.c
+++ b/fs/xfs/xfs_zone_info.c
@@ -90,9 +90,14 @@ xfs_zoned_show_stats(
seq_printf(m, "\tRT GC required: %d\n",
xfs_zoned_need_gc(mp));
+ seq_printf(m, "\ttotal number of zones: %u\n",
+ mp->m_sb.sb_rgcount);
seq_printf(m, "\tfree zones: %d\n", atomic_read(&zi->zi_nr_free_zones));
- seq_puts(m, "\topen zones:\n");
+
spin_lock(&zi->zi_open_zones_lock);
+ seq_printf(m, "\tnumber of open zones: %u / %u\n",
+ zi->zi_nr_open_zones, mp->m_max_open_zones);
+ seq_puts(m, "\topen zones:\n");
list_for_each_entry(oz, &zi->zi_open_zones, oz_entry)
xfs_show_open_zone(m, oz);
if (zi->zi_open_gc_zone) {