Skip to content

Commit dcf62b2

Browse files
adam900710kdave
authored andcommitted
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 <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 2522dbe commit dcf62b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/btrfs/scrub.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,6 +3240,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
32403240
*/
32413241
path->search_commit_root = 1;
32423242
path->skip_locking = 1;
3243+
path->reada = READA_FORWARD;
32433244

32443245
/*
32453246
* trigger the readahead for extent tree csum tree and wait for

0 commit comments

Comments
 (0)