OSDN Git Service

btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure
authorQu Wenruo <wqu@suse.com>
Mon, 20 Mar 2023 02:12:58 +0000 (10:12 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:24 +0000 (18:01 +0200)
commite02ee89baa66c40e1002cf8b09141fce7265e0f5
treedc5adc775ec5c48dafc5a07deddedf51014a298b
parent54765392a1b9533235c718e5956ebd97379fb200
btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure

Switch scrub_simple_mirror() to the new scrub_stripe infrastructure.

Since scrub_simple_mirror() is the core part of scrub (only RAID56
P/Q stripes don't utilize it), we can get rid of a big chunk of code,
mostly scrub_extent(), scrub_sectors() and directly called functions.

There is a functionality change:

- Scrub speed throttle now only affects read on the scrubbing device
  Writes (for repair and replace), and reads from other mirrors won't
  be limited by the set limits.

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