From: Christoph Hellwig Date: Sun, 17 Nov 2024 05:24:19 +0000 (+0100) Subject: xfs: wire up the show_stats super operation X-Git-Tag: v6.15-rc1~149^2~7^2~5^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=099bf44f9c90184d5a0439d00ed2d965d786dfea;p=thirdparty%2Fkernel%2Flinux.git xfs: wire up the show_stats super operation 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 Reviewed-by: "Darrick J. Wong" --- diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 6ae2a39377915..ec71e9db5e62b 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1258,6 +1258,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, @@ -1272,6 +1280,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