xfs
[Top] [All Lists]

[PATCH] xfs: add mssing inode cache attempts counter increment

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: [PATCH] xfs: add mssing inode cache attempts counter increment
From: Lucas Stach <dev@xxxxxxxxxx>
Date: Thu, 27 Aug 2015 21:04:21 +0200
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Increasing the inode cache attempt counter was apparently dropped while
refactoring the cache code and so stayed at the initial 0 value. Add the
increment back to make the runtime stats more useful.

Signed-off-by: Lucas Stach <dev@xxxxxxxxxx>
---
 fs/xfs/xfs_icache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 76a9f27..0a326bd 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -412,6 +412,8 @@ xfs_iget(
        if (!ino || XFS_INO_TO_AGNO(mp, ino) >= mp->m_sb.sb_agcount)
                return -EINVAL;
 
+       XFS_STATS_INC(xs_ig_attempts);
+
        /* get the perag structure and ensure that it's inode capable */
        pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ino));
        agino = XFS_INO_TO_AGINO(mp, ino);
-- 
2.4.3

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