summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-10 12:13:29 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-10 12:13:29 -0400
commit1b4ca380ed92eac7b8897c812e21ca92ccc346c4 (patch)
treef60f9520bdf3c99196d1e6a31c920242a29e9884 /disk-io.c
parent43f6ab83bf23a9833355b9970ddc600e445f2805 (diff)
drop the inode map tree
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/disk-io.c b/disk-io.c
index d30f63ac..448482fb 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -89,7 +89,6 @@ struct btrfs_buffer *read_tree_block(struct btrfs_root *root, u64 blocknr)
loff_t offset = blocknr * root->blocksize;
struct btrfs_buffer *buf;
int ret;
-
buf = radix_tree_lookup(&root->fs_info->cache_radix, blocknr);
if (buf) {
buf->count++;
@@ -169,14 +168,7 @@ static int commit_tree_roots(struct btrfs_trans_handle *trans,
u64 old_extent_block;
struct btrfs_root *tree_root = fs_info->tree_root;
struct btrfs_root *extent_root = fs_info->extent_root;
- struct btrfs_root *inode_root = fs_info->inode_root;
- btrfs_set_root_blocknr(&inode_root->root_item,
- inode_root->node->blocknr);
- ret = btrfs_update_root(trans, tree_root,
- &inode_root->root_key,
- &inode_root->root_item);
- BUG_ON(ret);
while(1) {
old_extent_block = btrfs_root_blocknr(&extent_root->root_item);
if (old_extent_block == extent_root->node->blocknr)
@@ -281,7 +273,6 @@ struct btrfs_root *open_ctree_fd(int fp, struct btrfs_super_block *super)
struct btrfs_root *root = malloc(sizeof(struct btrfs_root));
struct btrfs_root *extent_root = malloc(sizeof(struct btrfs_root));
struct btrfs_root *tree_root = malloc(sizeof(struct btrfs_root));
- struct btrfs_root *inode_root = malloc(sizeof(struct btrfs_root));
struct btrfs_fs_info *fs_info = malloc(sizeof(*fs_info));
int ret;
@@ -295,7 +286,6 @@ struct btrfs_root *open_ctree_fd(int fp, struct btrfs_super_block *super)
fs_info->fs_root = root;
fs_info->tree_root = tree_root;
fs_info->extent_root = extent_root;
- fs_info->inode_root = inode_root;
fs_info->last_inode_alloc = 0;
fs_info->last_inode_alloc_dirid = 0;
fs_info->disk_super = super;
@@ -309,7 +299,6 @@ struct btrfs_root *open_ctree_fd(int fp, struct btrfs_super_block *super)
return NULL;
}
BUG_ON(ret < 0);
-
__setup_root(super, tree_root, fs_info, BTRFS_ROOT_TREE_OBJECTID, fp);
tree_root->node = read_tree_block(tree_root, btrfs_super_root(super));
BUG_ON(!tree_root->node);
@@ -319,10 +308,6 @@ struct btrfs_root *open_ctree_fd(int fp, struct btrfs_super_block *super)
BUG_ON(ret);
ret = find_and_setup_root(super, tree_root, fs_info,
- BTRFS_INODE_MAP_OBJECTID, inode_root, fp);
- BUG_ON(ret);
-
- ret = find_and_setup_root(super, tree_root, fs_info,
BTRFS_FS_TREE_OBJECTID, root, fp);
BUG_ON(ret);
@@ -379,9 +364,6 @@ int close_ctree(struct btrfs_root *root, struct btrfs_super_block *s)
if (root->fs_info->extent_root->node)
btrfs_block_release(root->fs_info->extent_root,
root->fs_info->extent_root->node);
- if (root->fs_info->inode_root->node)
- btrfs_block_release(root->fs_info->inode_root,
- root->fs_info->inode_root->node);
if (root->fs_info->tree_root->node)
btrfs_block_release(root->fs_info->tree_root,
root->fs_info->tree_root->node);