From dcf62b204c06ac22a988c8563b20e479d206befc Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Tue, 14 Dec 2021 21:01:44 +0800 Subject: 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/scrub.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/btrfs') 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 -- cgit v1.2.3