Skip to contentSkip to conversation

xfs: add mssing inode cache attempts counter increment

PATCH In review Lucas Stach 2 participants 2 messages Aug 27, 2015 – Aug 31, 2015 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: add mssing inode cache attempts counter increment

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.

---
 fs/xfs/xfs_icache.c | 2 ++
 1 file changed, 2 insertions(+)
fs/xfs/xfs_icache.c +2 -0
index 76a9f27..0a326bd 100644
@@ -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);
Signature · 6 lines
2.4.3

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Lucas Stach

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.

---

Heh, this goes back to:

bf90424 [XFS] Combine the XFS and Linux inodes

... from 2008. :)

Quoted 23 lines
 fs/xfs/xfs_icache.c | 2 ++
 1 file changed, 2 insertions(+)
fs/xfs/xfs_icache.c +2 -0
index 76a9f27..0a326bd 100644
@@ -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);
Signature · 6 lines
2.4.3

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs