diff options
author | David Sterba <dsterba@suse.com> | 2017-08-25 16:20:16 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-08 16:15:05 +0200 |
commit | 1fa9653dc809ca05c21a2127c9faf15f04bd8ef8 (patch) | |
tree | 7ce07efb7cd0bde856650aacf9bf9156c75c6d26 /image | |
parent | 5d8b645f6f2a5aa6d2b01b2023faeb92000c4d67 (diff) |
btrfs-progs: drop local blocksize variables if they're nodesize
Prep work so we can drop the blocksize argument from several functions.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'image')
-rw-r--r-- | image/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/image/main.c b/image/main.c index 80588e81..4911100d 100644 --- a/image/main.c +++ b/image/main.c @@ -919,7 +919,6 @@ static int flush_pending(struct metadump_struct *md, int done) { struct async_work *async = NULL; struct extent_buffer *eb; - u64 blocksize = md->root->fs_info->nodesize; u64 start = 0; u64 size; size_t offset; @@ -972,7 +971,9 @@ static int flush_pending(struct metadump_struct *md, int done) } while (!md->data && size > 0) { - u64 this_read = min(blocksize, size); + u64 this_read = min((u64)md->root->fs_info->nodesize, + size); + eb = read_tree_block(md->root->fs_info, start, this_read, 0); if (!extent_buffer_uptodate(eb)) { |