diff options
author | David Sterba <dsterba@suse.cz> | 2014-06-15 03:34:59 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-12-12 18:07:22 +0100 |
commit | 7476dfdaade5b373db4679555706546bd5b4bd6c (patch) | |
tree | 91c671d86299a974b863639160affd471e624c5e | |
parent | a83fffb75d09cd3d44167b7fb9c1ab9e2269445f (diff) | |
download | linux-7476dfdaade5b373db4679555706546bd5b4bd6c.tar.gz linux-7476dfdaade5b373db4679555706546bd5b4bd6c.tar.bz2 linux-7476dfdaade5b373db4679555706546bd5b4bd6c.zip |
btrfs: sink blocksize parameter to tree_block_processed
Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r-- | fs/btrfs/relocation.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index cb5d4462ebb4..d83085381bcc 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2855,9 +2855,10 @@ static void update_processed_blocks(struct reloc_control *rc, } } -static int tree_block_processed(u64 bytenr, u32 blocksize, - struct reloc_control *rc) +static int tree_block_processed(u64 bytenr, struct reloc_control *rc) { + u32 blocksize = rc->extent_root->nodesize; + if (test_range_bit(&rc->processed_blocks, bytenr, bytenr + blocksize - 1, EXTENT_DIRTY, 1, NULL)) return 1; @@ -3352,7 +3353,7 @@ static int __add_tree_block(struct reloc_control *rc, bool skinny = btrfs_fs_incompat(rc->extent_root->fs_info, SKINNY_METADATA); - if (tree_block_processed(bytenr, blocksize, rc)) + if (tree_block_processed(bytenr, rc)) return 0; if (tree_search(blocks, bytenr)) @@ -3610,7 +3611,7 @@ static int find_data_references(struct reloc_control *rc, if (added) goto next; - if (!tree_block_processed(leaf->start, leaf->len, rc)) { + if (!tree_block_processed(leaf->start, rc)) { block = kmalloc(sizeof(*block), GFP_NOFS); if (!block) { err = -ENOMEM; |