[Top] [All Lists]

Re: [PATCH] xfs: active inodes stat is broken

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: active inodes stat is broken
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Tue, 02 Dec 2014 07:52:17 -0600
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1417473270-17467-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1417473270-17467-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 12/01/14 16:34, Dave Chinner wrote:
From: Dave Chinner<dchinner@xxxxxxxxxx>

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@xxxxxxxxxx>
  fs/xfs/xfs_icache.c | 3 +++
  fs/xfs/xfs_super.c  | 1 -
  2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 92ca910..8bc3d78 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -128,6 +128,7 @@ xfs_inode_free(
        /* asserts to verify all state is correct here */
        ASSERT(atomic_read(&ip->i_pincount) == 0);
+       XFS_STATS_DEC(vn_active);

        call_rcu(&VFS_I(ip)->i_rcu, xfs_inode_free_callback);

Would the inode allocated and freed in xfs_recover_inode_owner_change()
cause this the count to go negative?


<Prev in Thread] Current Thread [Next in Thread>