]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: wire up the show_stats super operation
authorChristoph Hellwig <hch@lst.de>
Sun, 17 Nov 2024 05:24:19 +0000 (06:24 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 3 Feb 2025 04:49:16 +0000 (05:49 +0100)
The show_stats option allows a file system to dump plain text statistic
on a per-mount basis into /proc/*/mountstats.  Wire up a no-op version
which will grow useful information for zoned file systems later.

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

index 01166e519413e7adb7b84bcb6367c7d680faa474..134859a3719d6ccb72c30fb6c4aa4cee557cde9b 100644 (file)
@@ -1257,6 +1257,14 @@ xfs_fs_shutdown(
        xfs_force_shutdown(XFS_M(sb), SHUTDOWN_DEVICE_REMOVED);
 }
 
+static int
+xfs_fs_show_stats(
+       struct seq_file         *m,
+       struct dentry           *root)
+{
+       return 0;
+}
+
 static const struct super_operations xfs_super_operations = {
        .alloc_inode            = xfs_fs_alloc_inode,
        .destroy_inode          = xfs_fs_destroy_inode,
@@ -1271,6 +1279,7 @@ static const struct super_operations xfs_super_operations = {
        .nr_cached_objects      = xfs_fs_nr_cached_objects,
        .free_cached_objects    = xfs_fs_free_cached_objects,
        .shutdown               = xfs_fs_shutdown,
+       .show_stats             = xfs_fs_show_stats,
 };
 
 static int