xfs: advertise realtime quota support in the xqm stat files
authorDarrick J. Wong <djwong@kernel.org>
Mon, 4 Nov 2024 04:19:40 +0000 (20:19 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:45 +0000 (13:38 -0800)
Add a fifth column to this (really old) stat file to advertise that the
kernel supports quota for realtime volumes.  This will be used by
fstests to detect kernel support.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_stats.c

index ed97d72..ffb5272 100644 (file)
@@ -115,10 +115,11 @@ void xfs_stats_clearall(struct xfsstats __percpu *stats)
 
 static int xqm_proc_show(struct seq_file *m, void *v)
 {
-       /* maximum; incore; ratio free to inuse; freelist */
-       seq_printf(m, "%d\t%d\t%d\t%u\n",
+       /* maximum; incore; ratio free to inuse; freelist; rtquota */
+       seq_printf(m, "%d\t%d\t%d\t%u\t%s\n",
                   0, counter_val(xfsstats.xs_stats, XFSSTAT_END_XQMSTAT),
-                  0, counter_val(xfsstats.xs_stats, XFSSTAT_END_XQMSTAT + 1));
+                  0, counter_val(xfsstats.xs_stats, XFSSTAT_END_XQMSTAT + 1),
+                  IS_ENABLED(CONFIG_XFS_RT) ? "rtquota" : "quota");
        return 0;
 }