summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-05 19:35:25 +0200
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-05 19:35:25 +0200
commit5be6f7f174146d91039a27ebb2f1b4ac599172b3 (patch)
tree2933d1e9e5cb50c4ca93f6e8c7e133d65a614461 /fs/btrfs/super.c
parentBtrfs: finish off inode indexing in dirs, add overflows (diff)
downloadlinux-5be6f7f174146d91039a27ebb2f1b4ac599172b3.tar.xz
linux-5be6f7f174146d91039a27ebb2f1b4ac599172b3.zip
Btrfs: dirindex optimizations
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 4fd2b168b2c4..d4ee78046b86 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -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)