summaryrefslogtreecommitdiff
path: root/arch/m32r
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-06-28 20:18:59 (GMT)
committerAl Viro <viro@zeniv.linux.org.uk>2011-08-01 05:31:42 (GMT)
commitb4aff1f874f679320c03e3d97b60fc7babfd4623 (patch)
tree7d70626056dd81bbdb194171d89f35cd390a5a78 /arch/m32r
parent9d108d25487bf958f8093409a4c0bee6169edba6 (diff)
downloadlinux-b4aff1f874f679320c03e3d97b60fc7babfd4623.tar.xz
Btrfs: load the key from the dir item in readdir into a fake dentry
In btrfs we have 2 indexes for inodes. One is for readdir, it's in this nice sequential order and works out brilliantly for readdir. However if you use ls, it usually stat's each file it gets from readdir. This is where the second index comes in, which is based on a hash of the name of the file. So then the lookup has to lookup this index, and then lookup the inode. The index lookup is going to be in random order (since its based on the name hash), which gives us less than stellar performance. Since we know the inode location from the readdir index, I create a dummy dentry and copy the location key into dentry->d_fsdata. Then on lookup if we have d_fsdata we use that location to lookup the inode, avoiding looking up the other directory index. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/m32r')
0 files changed, 0 insertions, 0 deletions