btrfs: scrub: introduce dedicated helper to scrub simple-stripe based range
authorQu Wenruo <wqu@suse.com>
Fri, 11 Mar 2022 07:38:44 +0000 (15:38 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:17:30 +0000 (17:17 +0200)
commit8557635ed2b04bd54c26b203a3ae43c0e5d6f5af
treeacea1fd80b6f4bf3e57934109b8f085e1f3fb39f
parent09022b14fafc86904f237b0463877d5d36f8cc17
btrfs: scrub: introduce dedicated helper to scrub simple-stripe based range

The new entrance will iterate through each data stripe which belongs to
the target device.

And since inside each data stripe, RAID0 is just SINGLE, while RAID10 is
just RAID1, we can reuse scrub_simple_mirror() to do the scrub properly.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c