提交 a7430847 编写于 作者: D David Chinner 提交者: Lachlan McIlroy

[XFS] Fix broken inode cluster setup.

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: NTorsten Kaiser <just.for.lkml@googlemail.com>

SGI-PV: 972915
SGI-Modid: xfs-linux-melb:xfs-kern:30033a
Signed-off-by: NDavid Chinner <dgc@sgi.com>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
上级 77be55a5
...@@ -267,7 +267,7 @@ xfs_iget_core( ...@@ -267,7 +267,7 @@ xfs_iget_core(
icl = NULL; icl = NULL;
if (radix_tree_gang_lookup(&pag->pag_ici_root, (void**)&iq, if (radix_tree_gang_lookup(&pag->pag_ici_root, (void**)&iq,
first_index, 1)) { 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; icl = iq->i_cluster;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册