From: Damien Le Moal Date: Mon, 16 Mar 2026 11:40:19 +0000 (+0900) Subject: xfs: display more zone related information in mountstats X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68aa101bf2046aa8365333a3768cece07975ca5f;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Hans Holmberg Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino --- diff --git a/fs/xfs/xfs_zone_info.c b/fs/xfs/xfs_zone_info.c index 53eabbc3334c0..a2af440116544 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) {