Btrfs: dirindex optimizations
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
committed by
David Woodhouse
parent
7fcde0e329
commit
5be6f7f174
@ -482,6 +482,11 @@ static int btrfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
item = leaf->items + slot;
|
||||
if (btrfs_disk_key_objectid(&item->key) != key.objectid)
|
||||
break;
|
||||
if (btrfs_disk_key_offset(&item->key) >
|
||||
root->fs_info->highest_inode) {
|
||||
printk("stopping at highest inode %Lu\n", root->fs_info->highest_inode);
|
||||
break;
|
||||
}
|
||||
if (btrfs_disk_key_type(&item->key) != BTRFS_DIR_INDEX_KEY)
|
||||
continue;
|
||||
if (btrfs_disk_key_offset(&item->key) < filp->f_pos)
|
||||
|
Reference in New Issue
Block a user