summaryrefslogtreecommitdiff
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-12-14 21:01:44 +0800
committerDavid Sterba <dsterba@suse.com>2022-01-07 14:18:26 +0100
commitdcf62b204c06ac22a988c8563b20e479d206befc (patch)
tree6bcab9eec8268bbbbc6dd8818414543a59eb20c9 /fs/btrfs/scrub.c
parent2522dbe86b54ff07eb0819a20534c0d33c5414cd (diff)
downloadlwn-dcf62b204c06ac22a988c8563b20e479d206befc.tar.gz
lwn-dcf62b204c06ac22a988c8563b20e479d206befc.zip
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>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r--fs/btrfs/scrub.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 92fd2be6cd65..ad10a5e70e73 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3240,6 +3240,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
*/
path->search_commit_root = 1;
path->skip_locking = 1;
+ path->reada = READA_FORWARD;
/*
* trigger the readahead for extent tree csum tree and wait for