diff options
author | 2014-12-04 09:42:40 +1100 | |
---|---|---|
committer | 2014-12-04 09:42:40 +1100 | |
commit | cdc9cec7c0ff521edf8c0e9c9432bf8fdccfc702 (patch) | |
tree | acd304dac9fdf77f3bdcfaf3bb903a2f0689d4e7 /fs/xfs/xfs_icache.c | |
parent | xfs: cleanup xfs_bmse_merge returns (diff) | |
download | linux-cdc9cec7c0ff521edf8c0e9c9432bf8fdccfc702.tar.gz linux-cdc9cec7c0ff521edf8c0e9c9432bf8fdccfc702.tar.bz2 linux-cdc9cec7c0ff521edf8c0e9c9432bf8fdccfc702.zip |
xfs: active inodes stat is broken
vn_active only ever gets decremented, so it has a very large
negative number. Make it track the inode count we currently have
allocated properly so we can easily track the size of the inode
cache via tools like PCP.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_icache.c')
-rw-r--r-- | fs/xfs/xfs_icache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index b45f7b27b5df..f7a742eb0aaa 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -65,6 +65,7 @@ xfs_inode_alloc( return NULL; } + XFS_STATS_INC(vn_active); ASSERT(atomic_read(&ip->i_pincount) == 0); ASSERT(!spin_is_locked(&ip->i_flags_lock)); ASSERT(!xfs_isiflocked(ip)); @@ -130,6 +131,7 @@ xfs_inode_free( /* asserts to verify all state is correct here */ ASSERT(atomic_read(&ip->i_pincount) == 0); ASSERT(!xfs_isiflocked(ip)); + XFS_STATS_DEC(vn_active); call_rcu(&VFS_I(ip)->i_rcu, xfs_inode_free_callback); } |