]> www.infradead.org Git - nvme.git/commit
btrfs: use btrfs_read_extent_buffer() in do_walk_down()
authorJosef Bacik <josef@toxicpanda.com>
Tue, 7 May 2024 18:12:04 +0000 (14:12 -0400)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:24 +0000 (15:33 +0200)
commit3fdf5798fa379c36d068090d026d18dd6dfc5b6c
tree001b38e4ea1803a1ce594c5d6eba53b43eb269c0
parent133b3da83539bd04e97e24cbc8693a1cdca4b5ec
btrfs: use btrfs_read_extent_buffer() in do_walk_down()

Currently if our extent buffer isn't uptodate we will drop the lock,
free it, and then call read_tree_block() for the bytenr.  This is
inefficient, we already have the extent buffer, we can simply call
btrfs_read_extent_buffer().

Merge these two cases down into one if statement, if we are not uptodate
we can drop the lock, trigger readahead, and do the read using
btrfs_read_extent_buffer(), and carry on.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c