]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: raid56: switch scrub path to use a single function
authorQu Wenruo <wqu@suse.com>
Tue, 1 Nov 2022 11:16:11 +0000 (19:16 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:49 +0000 (18:00 +0100)
commit6bfd0133bee27737db415c530617cb015274d21f
treeb7fd3c263e218fd2e39cf82c1932bc1ffb290994
parentcb3450b7d7d0af6ed6ff60e174129938914083ab
btrfs: raid56: switch scrub path to use a single function

This switch involves the following changes:

- Make finish_parity_scrub() only to submit the write bios
  It will no longer call rbio_orig_end_io(), and now it will
  return error.

- Add a new helper, recover_scrub_rbio(), to handle recovery
  It's just doing extra scrub related checks, and then call
  recover_sectors().

- Rename raid56_parity_scrub_stripe() to scrub_rbio()
- Rename scrub_parity_work() to scrub_rbio_work_locked()
  To follow the existing naming scheme.

- Delete unused functions
  Including:
  * finish_rmw()
  * raid_write_end_io()
  * raid56_bio_end_io()
  * __raid_recover_end_io()

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