diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-11-05 16:45:20 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-12-08 15:54:07 +0100 |
commit | 3fbaf25817f7013fad3ccf76279f0bd5719a5205 (patch) | |
tree | f781b57b4ccf79b2f863dd6ca715bc8602f3a33b /fs/btrfs/reada.c | |
parent | btrfs: pass the root owner and level around for readahead (diff) | |
download | linux-3fbaf25817f7013fad3ccf76279f0bd5719a5205.tar.xz linux-3fbaf25817f7013fad3ccf76279f0bd5719a5205.zip |
btrfs: pass the owner_root and level to alloc_extent_buffer
Now that we've plumbed all of the callers to have the owner root and the
level, plumb it down into alloc_extent_buffer().
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/reada.c')
-rw-r--r-- | fs/btrfs/reada.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index b1bea0d59e13..20fd4aa48a8c 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c @@ -656,12 +656,13 @@ static int reada_pick_zone(struct btrfs_device *dev) } static int reada_tree_block_flagged(struct btrfs_fs_info *fs_info, u64 bytenr, - int mirror_num, struct extent_buffer **eb) + u64 owner_root, int level, int mirror_num, + struct extent_buffer **eb) { struct extent_buffer *buf = NULL; int ret; - buf = btrfs_find_create_tree_block(fs_info, bytenr); + buf = btrfs_find_create_tree_block(fs_info, bytenr, owner_root, level); if (IS_ERR(buf)) return 0; @@ -749,7 +750,8 @@ static int reada_start_machine_dev(struct btrfs_device *dev) logical = re->logical; atomic_inc(&dev->reada_in_flight); - ret = reada_tree_block_flagged(fs_info, logical, mirror_num, &eb); + ret = reada_tree_block_flagged(fs_info, logical, re->owner_root, + re->level, mirror_num, &eb); if (ret) __readahead_hook(fs_info, re, NULL, ret); else if (eb) |