Commit 7476dfda authored by David Sterba's avatar David Sterba

btrfs: sink blocksize parameter to tree_block_processed

Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
parent a83fffb7
...@@ -2855,9 +2855,10 @@ static void update_processed_blocks(struct reloc_control *rc, ...@@ -2855,9 +2855,10 @@ static void update_processed_blocks(struct reloc_control *rc,
} }
} }
static int tree_block_processed(u64 bytenr, u32 blocksize, static int tree_block_processed(u64 bytenr, struct reloc_control *rc)
struct reloc_control *rc)
{ {
u32 blocksize = rc->extent_root->nodesize;
if (test_range_bit(&rc->processed_blocks, bytenr, if (test_range_bit(&rc->processed_blocks, bytenr,
bytenr + blocksize - 1, EXTENT_DIRTY, 1, NULL)) bytenr + blocksize - 1, EXTENT_DIRTY, 1, NULL))
return 1; return 1;
...@@ -3352,7 +3353,7 @@ static int __add_tree_block(struct reloc_control *rc, ...@@ -3352,7 +3353,7 @@ static int __add_tree_block(struct reloc_control *rc,
bool skinny = btrfs_fs_incompat(rc->extent_root->fs_info, bool skinny = btrfs_fs_incompat(rc->extent_root->fs_info,
SKINNY_METADATA); SKINNY_METADATA);
if (tree_block_processed(bytenr, blocksize, rc)) if (tree_block_processed(bytenr, rc))
return 0; return 0;
if (tree_search(blocks, bytenr)) if (tree_search(blocks, bytenr))
...@@ -3610,7 +3611,7 @@ static int find_data_references(struct reloc_control *rc, ...@@ -3610,7 +3611,7 @@ static int find_data_references(struct reloc_control *rc,
if (added) if (added)
goto next; goto next;
if (!tree_block_processed(leaf->start, leaf->len, rc)) { if (!tree_block_processed(leaf->start, rc)) {
block = kmalloc(sizeof(*block), GFP_NOFS); block = kmalloc(sizeof(*block), GFP_NOFS);
if (!block) { if (!block) {
err = -ENOMEM; err = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment