xfs
[Top] [All Lists]

[patch] Fix broken inode clustering

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [patch] Fix broken inode clustering
From: David Chinner <dgc@xxxxxxx>
Date: Thu, 8 Nov 2007 11:38:48 +1100
Cc: xfs-dev <xfs-dev@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
The radix tree based inode caches did away with the inode cluster hashes,
replacing them with a bunch of masking and gang lookups on the radix tree.

This masking got broken when moving the code to per-ag radix trees and
indexing by agino # rather than straight inode number. The result is
clustered inode writeback does not cluster and things can go extremely
slowly when there are lots of inodes to write.

The following patch fixes this up by comparing agino # of the inode
found to the index of the cluster we are looking for.

Signed-off-by: Dave Chinner <dgc@xxxxxxx>
Tested-by: Torsten Kaiser <just.for.lkml@xxxxxxxxxxxxxx>

---
 fs/xfs/xfs_iget.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c        2007-11-02 13:44:46.000000000 
+1100
+++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c     2007-11-07 13:08:42.534440675 +1100
@@ -248,7 +248,7 @@ finish_inode:
        icl = NULL;
        if (radix_tree_gang_lookup(&pag->pag_ici_root, (void**)&iq,
                                                        first_index, 1)) {
-               if ((iq->i_ino & mask) == first_index)
+               if ((XFS_INO_TO_AGINO(mp, iq->i_ino) & mask) == first_index)
                        icl = iq->i_cluster;
        }
 


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