]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: advertise realtime quota support in the xqm stat files
authorDarrick J. Wong <djwong@kernel.org>
Mon, 23 Sep 2024 20:20:38 +0000 (13:20 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 9 Oct 2024 13:55:43 +0000 (15:55 +0200)
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>
fs/xfs/xfs_stats.c

index ed97d72caa665295a5e17d223615373c69cdea3b..7f0704236c1002631a246e9259192421893435a7 100644 (file)
@@ -115,10 +115,16 @@ 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%u\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),
+#ifdef CONFIG_XFS_RT
+                  1
+#else
+                  0
+#endif
+                  );
        return 0;
 }