summaryrefslogtreecommitdiff
path: root/cmds-check.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-check.c')
-rw-r--r--cmds-check.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/cmds-check.c b/cmds-check.c
index 7a973e32..dd33d9b2 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -2190,8 +2190,7 @@ static int walk_down_tree(struct btrfs_root *root, struct btrfs_path *path,
if (!next || !btrfs_buffer_uptodate(next, ptr_gen)) {
free_extent_buffer(next);
reada_walk_down(root, cur, path->slots[*level]);
- next = read_tree_block(root->fs_info, bytenr,
- fs_info->nodesize, ptr_gen);
+ next = read_tree_block(root->fs_info, bytenr, ptr_gen);
if (!extent_buffer_uptodate(next)) {
struct btrfs_key node_key;
@@ -2304,8 +2303,7 @@ static int walk_down_tree_v2(struct btrfs_root *root, struct btrfs_path *path,
if (!next || !btrfs_buffer_uptodate(next, ptr_gen)) {
free_extent_buffer(next);
reada_walk_down(root, cur, path->slots[*level]);
- next = read_tree_block(fs_info, bytenr,
- fs_info->nodesize, ptr_gen);
+ next = read_tree_block(fs_info, bytenr, ptr_gen);
if (!extent_buffer_uptodate(next)) {
struct btrfs_key node_key;
@@ -7683,7 +7681,7 @@ static int run_next_block(struct btrfs_root *root,
}
/* fixme, get the real parent transid */
- buf = read_tree_block(root->fs_info, bytenr, size, gen);
+ buf = read_tree_block(root->fs_info, bytenr, gen);
if (!extent_buffer_uptodate(buf)) {
record_bad_block_io(root->fs_info,
extent_cache, bytenr, size);
@@ -9796,8 +9794,7 @@ static int deal_root_from_list(struct list_head *list,
rec = list_entry(list->next,
struct root_item_record, list);
last = 0;
- buf = read_tree_block(root->fs_info,
- rec->bytenr, rec->level_size, 0);
+ buf = read_tree_block(root->fs_info, rec->bytenr, 0);
if (!extent_buffer_uptodate(buf)) {
free_extent_buffer(buf);
ret = -EIO;
@@ -10441,7 +10438,7 @@ static int query_tree_block_level(struct btrfs_fs_info *fs_info, u64 bytenr)
btrfs_release_path(&path);
/* Get level from tree block as an alternative source */
- eb = read_tree_block(fs_info, bytenr, fs_info->nodesize, transid);
+ eb = read_tree_block(fs_info, bytenr, transid);
if (!extent_buffer_uptodate(eb)) {
free_extent_buffer(eb);
return -EIO;
@@ -10494,7 +10491,7 @@ static int check_tree_block_backref(struct btrfs_fs_info *fs_info, u64 root_id,
}
/* Read out the tree block to get item/node key */
- eb = read_tree_block(fs_info, bytenr, root->fs_info->nodesize, 0);
+ eb = read_tree_block(fs_info, bytenr, 0);
if (!extent_buffer_uptodate(eb)) {
err |= REFERENCER_MISSING;
free_extent_buffer(eb);
@@ -10595,7 +10592,7 @@ static int check_shared_block_backref(struct btrfs_fs_info *fs_info,
int found_parent = 0;
int i;
- eb = read_tree_block(fs_info, parent, fs_info->nodesize, 0);
+ eb = read_tree_block(fs_info, parent, 0);
if (!extent_buffer_uptodate(eb))
goto out;
@@ -10748,7 +10745,7 @@ static int check_shared_data_backref(struct btrfs_fs_info *fs_info,
int found_parent = 0;
int i;
- eb = read_tree_block(fs_info, parent, fs_info->nodesize, 0);
+ eb = read_tree_block(fs_info, parent, 0);
if (!extent_buffer_uptodate(eb))
goto out;
@@ -11510,8 +11507,7 @@ static int traverse_tree_block(struct btrfs_root *root,
* As a btrfs tree has most 8 levels (0..7), so it's quite safe
* to call the function itself.
*/
- eb = read_tree_block(root->fs_info, blocknr,
- root->fs_info->nodesize, 0);
+ eb = read_tree_block(root->fs_info, blocknr, 0);
if (extent_buffer_uptodate(eb)) {
ret = traverse_tree_block(root, eb);
err |= ret;
@@ -11695,7 +11691,7 @@ static int pin_down_tree_blocks(struct btrfs_fs_info *fs_info,
* in, but for now this doesn't actually use the root so
* just pass in extent_root.
*/
- tmp = read_tree_block(fs_info, bytenr, fs_info->nodesize, 0);
+ tmp = read_tree_block(fs_info, bytenr, 0);
if (!extent_buffer_uptodate(tmp)) {
fprintf(stderr, "Error reading root block\n");
return -EIO;
@@ -11714,8 +11710,7 @@ static int pin_down_tree_blocks(struct btrfs_fs_info *fs_info,
continue;
}
- tmp = read_tree_block(fs_info, bytenr,
- fs_info->nodesize, 0);
+ tmp = read_tree_block(fs_info, bytenr, 0);
if (!extent_buffer_uptodate(tmp)) {
fprintf(stderr, "Error reading tree block\n");
return -EIO;