diff options
author | Bill O'Donnell <billodo@redhat.com> | 2015-10-12 03:21:22 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-10-12 03:21:22 -0400 |
commit | ff6d6af2351caea7db681f4539d0d893e400557a (patch) | |
tree | 2e3d1d4a57a478183edf6e55a0c257a36a9fee04 /fs/xfs/xfs_super.c | |
parent | 225e4635580ce9fb12f8a2dc88473161cd64dbf6 (diff) |
xfs: per-filesystem stats counter implementation
This patch modifies the stats counting macros and the callers
to those macros to properly increment, decrement, and add-to
the xfs stats counts. The counts for global and per-fs stats
are correctly advanced, and cleared by writing a "1" to the
corresponding clear file.
global counts: /sys/fs/xfs/stats/stats
per-fs counts: /sys/fs/xfs/sda*/stats/stats
global clear: /sys/fs/xfs/stats/stats_clear
per-fs clear: /sys/fs/xfs/sda*/stats/stats_clear
[dchinner: cleaned up macro variables, removed CONFIG_FS_PROC around
stats structures and macros. ]
Signed-off-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 9d11d3ea8030..368c55adee9d 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -922,7 +922,7 @@ xfs_fs_destroy_inode( | |||
922 | 922 | ||
923 | trace_xfs_destroy_inode(ip); | 923 | trace_xfs_destroy_inode(ip); |
924 | 924 | ||
925 | XFS_STATS_INC(vn_reclaim); | 925 | XFS_STATS_INC(ip->i_mount, vn_reclaim); |
926 | 926 | ||
927 | ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); | 927 | ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); |
928 | 928 | ||
@@ -983,8 +983,8 @@ xfs_fs_evict_inode( | |||
983 | 983 | ||
984 | truncate_inode_pages_final(&inode->i_data); | 984 | truncate_inode_pages_final(&inode->i_data); |
985 | clear_inode(inode); | 985 | clear_inode(inode); |
986 | XFS_STATS_INC(vn_rele); | 986 | XFS_STATS_INC(ip->i_mount, vn_rele); |
987 | XFS_STATS_INC(vn_remove); | 987 | XFS_STATS_INC(ip->i_mount, vn_remove); |
988 | 988 | ||
989 | xfs_inactive(ip); | 989 | xfs_inactive(ip); |
990 | } | 990 | } |