btrfs: introduce dedicated helper to scrub simple-stripe based range
authorQu Wenruo <wqu@suse.com>
Fri, 7 Jan 2022 02:34:29 +0000 (10:34 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 Feb 2022 16:02:09 +0000 (17:02 +0100)
commita1cae3f2b8a77bf51b481cef21ddb60b71635429
tree1dfcdabf84b368c6b09b70f3a7696dca1a17e44f
parent6e30b6ef85bc25cb4631a6ffdb5eb7776bf687f3
btrfs: 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