Btrfs: dirindex optimizations

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2007-04-05 13:35:25 -04:00
committed by David Woodhouse
parent 7fcde0e329
commit 5be6f7f174
5 changed files with 50 additions and 17 deletions

View File

@ -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)