aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/sysfs.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-03-11 15:38:47 +0800
committerDavid Sterba <dsterba@suse.com>2022-05-16 17:17:31 +0200
commit9ae53bf9097c8649ce7c49484888608fb15fdfea (patch)
tree23146c41c233d7646eeab1dbbdcda25f13dbfbf9 /fs/btrfs/sysfs.h
parentbtrfs: scrub: use scrub_simple_mirror() to handle RAID56 data stripe scrub (diff)
downloadlinux-dev-9ae53bf9097c8649ce7c49484888608fb15fdfea.tar.xz
linux-dev-9ae53bf9097c8649ce7c49484888608fb15fdfea.zip
btrfs: scrub: refactor scrub_raid56_parity()
Currently scrub_raid56_parity() has a large double loop, handling the following things at the same time: - Iterate each data stripe - Iterate each extent item in one data stripe Refactor this by: - Introduce a new helper to handle data stripe iteration The new helper is scrub_raid56_data_stripe_for_parity(), which only has one while() loop handling the extent items inside the data stripe. The code is still mostly the same as the old code. - Call cond_resched() for each extent Previously we only call cond_resched() under a complex if () check. I see no special reason to do that, and for other scrub functions, like scrub_simple_mirror() we're already doing the same cond_resched() after scrubbing one extent. - Add more comments Please note that, this patch is only to address the double loop, there are incoming patches to do extra cleanup. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/sysfs.h')
0 files changed, 0 insertions, 0 deletions