diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-05 13:35:25 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-05 13:35:25 -0400 |
commit | 5be6f7f174146d91039a27ebb2f1b4ac599172b3 (patch) | |
tree | 2933d1e9e5cb50c4ca93f6e8c7e133d65a614461 /fs/btrfs/disk-io.c | |
parent | 7fcde0e3298c00ee18e2ae7f01c67f99133ef7be (diff) |
Btrfs: dirindex optimizations
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index de9ee3aa0aa..5230554380d 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -311,6 +311,7 @@ struct btrfs_root *open_ctree(struct super_block *sb) | |||
311 | fs_info->extent_root = extent_root; | 311 | fs_info->extent_root = extent_root; |
312 | fs_info->inode_root = inode_root; | 312 | fs_info->inode_root = inode_root; |
313 | fs_info->last_inode_alloc = 0; | 313 | fs_info->last_inode_alloc = 0; |
314 | fs_info->highest_inode = 0; | ||
314 | fs_info->sb = sb; | 315 | fs_info->sb = sb; |
315 | fs_info->btree_inode = new_inode(sb); | 316 | fs_info->btree_inode = new_inode(sb); |
316 | fs_info->btree_inode->i_ino = 1; | 317 | fs_info->btree_inode->i_ino = 1; |
@@ -360,12 +361,15 @@ printk("failed2\n"); | |||
360 | 361 | ||
361 | ret = find_and_setup_root(sb->s_blocksize, tree_root, fs_info, | 362 | ret = find_and_setup_root(sb->s_blocksize, tree_root, fs_info, |
362 | BTRFS_FS_TREE_OBJECTID, root); | 363 | BTRFS_FS_TREE_OBJECTID, root); |
363 | mutex_unlock(&fs_info->fs_mutex); | ||
364 | BUG_ON(ret); | 364 | BUG_ON(ret); |
365 | root->commit_root = root->node; | 365 | root->commit_root = root->node; |
366 | get_bh(root->node); | 366 | get_bh(root->node); |
367 | root->ref_cows = 1; | 367 | root->ref_cows = 1; |
368 | root->fs_info->generation = root->root_key.offset + 1; | 368 | root->fs_info->generation = root->root_key.offset + 1; |
369 | ret = btrfs_find_highest_inode(root, &root->fs_info->last_inode_alloc); | ||
370 | if (ret == 0) | ||
371 | fs_info->highest_inode = fs_info->last_inode_alloc; | ||
372 | mutex_unlock(&fs_info->fs_mutex); | ||
369 | return root; | 373 | return root; |
370 | } | 374 | } |
371 | 375 | ||