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 /ctree.c | |
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 'ctree.c')
-rw-r--r-- | ctree.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -979,7 +979,6 @@ void reada_for_search(struct btrfs_root *root, struct btrfs_path *path, int direction = path->reada; struct extent_buffer *eb; u32 nr; - u32 blocksize; u32 nscan = 0; if (level != 1) @@ -990,8 +989,7 @@ void reada_for_search(struct btrfs_root *root, struct btrfs_path *path, node = path->nodes[level]; search = btrfs_node_blockptr(node, slot); - blocksize = fs_info->nodesize; - eb = btrfs_find_tree_block(fs_info, search, blocksize); + eb = btrfs_find_tree_block(fs_info, search, fs_info->nodesize); if (eb) { free_extent_buffer(eb); return; @@ -1021,9 +1019,9 @@ void reada_for_search(struct btrfs_root *root, struct btrfs_path *path, if ((search >= lowest_read && search <= highest_read) || (search < lowest_read && lowest_read - search <= 32768) || (search > highest_read && search - highest_read <= 32768)) { - readahead_tree_block(fs_info, search, blocksize, + readahead_tree_block(fs_info, search, fs_info->nodesize, btrfs_node_ptr_generation(node, nr)); - nread += blocksize; + nread += fs_info->nodesize; } nscan++; if (path->reada < 2 && (nread > SZ_256K || nscan > 32)) |