Skip to content

Commit 68aa101

Browse files
damien-lemoalcmaiolino
authored andcommitted
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>
1 parent 6a82a69 commit 68aa101

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

fs/xfs/xfs_zone_info.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,14 @@ xfs_zoned_show_stats(
9090
seq_printf(m, "\tRT GC required: %d\n",
9191
xfs_zoned_need_gc(mp));
9292

93+
seq_printf(m, "\ttotal number of zones: %u\n",
94+
mp->m_sb.sb_rgcount);
9395
seq_printf(m, "\tfree zones: %d\n", atomic_read(&zi->zi_nr_free_zones));
94-
seq_puts(m, "\topen zones:\n");
96+
9597
spin_lock(&zi->zi_open_zones_lock);
98+
seq_printf(m, "\tnumber of open zones: %u / %u\n",
99+
zi->zi_nr_open_zones, mp->m_max_open_zones);
100+
seq_puts(m, "\topen zones:\n");
96101
list_for_each_entry(oz, &zi->zi_open_zones, oz_entry)
97102
xfs_show_open_zone(m, oz);
98103
if (zi->zi_open_gc_zone) {

0 commit comments

Comments
 (0)