btrfs: scrub: introduce helper to queue a stripe for scrub
authorQu Wenruo <wqu@suse.com>
Mon, 20 Mar 2023 02:12:57 +0000 (10:12 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:24 +0000 (18:01 +0200)
commit54765392a1b9533235c718e5956ebd97379fb200
tree8c89120485edf55b9d2e862c729a217c764613a1
parent0096580713ffc061a579bd8be0661120079e3beb
btrfs: scrub: introduce helper to queue a stripe for scrub

The new helper, queue_scrub_stripe(), would try to queue a stripe for
scrub.  If all stripes are already in use, we will submit all the
existing ones and wait for them to finish.

Currently we would queue up to 8 stripes, to enlarge the blocksize to
512KiB to improve the performance. Sectors repaired on zoned need to be
relocated instead of in-place fix.

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
fs/btrfs/scrub.h