xfs: Fix xqmstats offsets in /proc/fs/xfs/xqmstat
authorCarlos Maiolino <cmaiolino@redhat.com>
Thu, 18 Oct 2018 06:21:34 +0000 (17:21 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 18 Oct 2018 06:21:34 +0000 (17:21 +1100)
The addition of FIBT, RMAP and REFCOUNT changed the offsets into
__xfssats structure.

This caused xqmstat_proc_show() to display garbage data via
/proc/fs/xfs/xqmstat, once it relies on the offsets marked via macros.

Fix it.

Fixes: eff6f640 xfs: add rmap btree stats infrastructure
Fixes: 3215d322 xfs: support the XFS_BTNUM_FINOBT free inode btree type
Fixes: ef3d6e98 xfs: introduce refcount btree definitions
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_stats.c

index 4e4423153071c788bb278d3856e3ff346cb915f8..740ac96748481ff0dbaacd69c4b2bcd8cee6a495 100644 (file)
@@ -119,7 +119,7 @@ static int xqmstat_proc_show(struct seq_file *m, void *v)
        int j;
 
        seq_printf(m, "qm");
-       for (j = XFSSTAT_END_IBT_V2; j < XFSSTAT_END_XQMSTAT; j++)
+       for (j = XFSSTAT_END_REFCOUNT; j < XFSSTAT_END_XQMSTAT; j++)
                seq_printf(m, " %u", counter_val(xfsstats.xs_stats, j));
        seq_putc(m, '\n');
        return 0;