OSDN Git Service

btrfs: scrub: use btrfs_path::reada for extent tree readahead
authorQu Wenruo <wqu@suse.com>
Tue, 14 Dec 2021 13:01:44 +0000 (21:01 +0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:26 +0000 (14:18 +0100)
commitdcf62b204c06ac22a988c8563b20e479d206befc
tree6bcab9eec8268bbbbc6dd8818414543a59eb20c9
parent2522dbe86b54ff07eb0819a20534c0d33c5414cd
btrfs: scrub: use btrfs_path::reada for extent tree readahead

For scrub, we trigger two readaheads for two trees, extent tree to get
where to scrub, and csum tree to get the data checksum.

For csum tree we already trigger readahead in
btrfs_lookup_csums_range(), by setting path->reada.
But for extent tree we don't have any path based readahead.

Add the readahead for extent tree as well, so we can later remove the
btrfs_reada_add() based readahead.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c