[XFS] Fix broken inode cluster setup.
authorDavid Chinner <dgc@sgi.com>
Fri, 23 Nov 2007 05:30:23 +0000 (16:30 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Mon, 10 Dec 2007 02:46:59 +0000 (13:46 +1100)
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.

Fix it up by comparing the agino # of the inode we just looked up to the
index of the cluster we are looking for.

Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com>
SGI-PV: 972915
SGI-Modid: xfs-linux-melb:xfs-kern:30033a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_iget.c

index 488836e204a3493f968a9e473ce1b00eca67823d..fb69ef180b275f9d0300dc5faa23483e7936f5e7 100644 (file)
@@ -267,7 +267,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;
        }
 
This page took 0.028351 seconds and 5 git commands to generate.