summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/disk-io.c b/disk-io.c
index df262f6b..1ea2ac90 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -299,8 +299,7 @@ int read_whole_eb(struct btrfs_fs_info *info, struct extent_buffer *eb, int mirr
return 0;
}
-struct extent_buffer* read_tree_block(
- struct btrfs_fs_info *fs_info, u64 bytenr, u32 blocksize,
+struct extent_buffer* read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr,
u64 parent_transid)
{
int ret;
@@ -308,6 +307,7 @@ struct extent_buffer* read_tree_block(
u64 best_transid = 0;
u32 sectorsize = fs_info->sectorsize;
u32 nodesize = fs_info->nodesize;
+ u32 blocksize = fs_info->nodesize;
int mirror_num = 0;
int good_mirror = 0;
int num_copies;
@@ -625,8 +625,7 @@ static int find_and_setup_root(struct btrfs_root *tree_root,
generation = btrfs_root_generation(&root->root_item);
root->node = read_tree_block(fs_info,
- btrfs_root_bytenr(&root->root_item),
- fs_info->nodesize, generation);
+ btrfs_root_bytenr(&root->root_item), generation);
if (!extent_buffer_uptodate(root->node))
return -EIO;
@@ -652,7 +651,6 @@ static int find_and_setup_log_root(struct btrfs_root *tree_root,
BTRFS_TREE_LOG_OBJECTID);
log_root->node = read_tree_block(fs_info, blocknr,
- fs_info->nodesize,
btrfs_super_generation(disk_super) + 1);
fs_info->log_root_tree = log_root;
@@ -739,8 +737,7 @@ out:
}
generation = btrfs_root_generation(&root->root_item);
root->node = read_tree_block(fs_info,
- btrfs_root_bytenr(&root->root_item),
- fs_info->nodesize, generation);
+ btrfs_root_bytenr(&root->root_item), generation);
if (!extent_buffer_uptodate(root->node)) {
free(root);
return ERR_PTR(-EIO);
@@ -997,8 +994,7 @@ int btrfs_setup_all_roots(struct btrfs_fs_info *fs_info, u64 root_tree_bytenr,
generation = btrfs_backup_tree_root_gen(backup);
}
- root->node = read_tree_block(fs_info, root_tree_bytenr, fs_info->nodesize,
- generation);
+ root->node = read_tree_block(fs_info, root_tree_bytenr, generation);
if (!extent_buffer_uptodate(root->node)) {
fprintf(stderr, "Couldn't read tree root\n");
return -EIO;
@@ -1184,7 +1180,6 @@ int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info,
fs_info->chunk_root->node = read_tree_block(fs_info,
chunk_root_bytenr,
- fs_info->nodesize,
generation);
if (!extent_buffer_uptodate(fs_info->chunk_root->node)) {
if (fs_info->ignore_chunk_tree_error) {