aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2014-12-03 17:42:40 -0500
committerDave Chinner <david@fromorbit.com>2014-12-03 17:42:40 -0500
commitcdc9cec7c0ff521edf8c0e9c9432bf8fdccfc702 (patch)
treeacd304dac9fdf77f3bdcfaf3bb903a2f0689d4e7 /fs
parent4db431f57be2d32f35f46023b0c0d9f8b6e06e26 (diff)
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')
-rw-r--r--fs/xfs/xfs_icache.c2
-rw-r--r--fs/xfs/xfs_super.c1
2 files changed, 2 insertions, 1 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(
65 return NULL; 65 return NULL;
66 } 66 }
67 67
68 XFS_STATS_INC(vn_active);
68 ASSERT(atomic_read(&ip->i_pincount) == 0); 69 ASSERT(atomic_read(&ip->i_pincount) == 0);
69 ASSERT(!spin_is_locked(&ip->i_flags_lock)); 70 ASSERT(!spin_is_locked(&ip->i_flags_lock));
70 ASSERT(!xfs_isiflocked(ip)); 71 ASSERT(!xfs_isiflocked(ip));
@@ -130,6 +131,7 @@ xfs_inode_free(
130 /* asserts to verify all state is correct here */ 131 /* asserts to verify all state is correct here */
131 ASSERT(atomic_read(&ip->i_pincount) == 0); 132 ASSERT(atomic_read(&ip->i_pincount) == 0);
132 ASSERT(!xfs_isiflocked(ip)); 133 ASSERT(!xfs_isiflocked(ip));
134 XFS_STATS_DEC(vn_active);
133 135
134 call_rcu(&VFS_I(ip)->i_rcu, xfs_inode_free_callback); 136 call_rcu(&VFS_I(ip)->i_rcu, xfs_inode_free_callback);
135} 137}
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index a0f58d933261..45fa5b570eb5 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1008,7 +1008,6 @@ xfs_fs_evict_inode(
1008 clear_inode(inode); 1008 clear_inode(inode);
1009 XFS_STATS_INC(vn_rele); 1009 XFS_STATS_INC(vn_rele);
1010 XFS_STATS_INC(vn_remove); 1010 XFS_STATS_INC(vn_remove);
1011 XFS_STATS_DEC(vn_active);
1012 1011
1013 xfs_inactive(ip); 1012 xfs_inactive(ip);
1014} 1013}