diff options
author | Josef Bacik <josef@redhat.com> | 2011-06-28 20:18:59 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-08-01 05:31:42 (GMT) |
commit | b4aff1f874f679320c03e3d97b60fc7babfd4623 (patch) | |
tree | 7d70626056dd81bbdb194171d89f35cd390a5a78 /scripts/kconfig/mconf.c | |
parent | 9d108d25487bf958f8093409a4c0bee6169edba6 (diff) | |
download | linux-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 'scripts/kconfig/mconf.c')
0 files changed, 0 insertions, 0 deletions