]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: scrub: cleanup the non-RAID56 branches in scrub_stripe()
authorQu Wenruo <wqu@suse.com>
Fri, 11 Mar 2022 07:38:45 +0000 (15:38 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:17:30 +0000 (17:17 +0200)
commitb190755a770d8a2a172ea6077186e77f8302f82c
treee762667581436f7ba0e4dbcf7cca7a21640e77dd
parentdc4beb31b5968c120e6f06d6be81d75f27286434
btrfs: scrub: cleanup the non-RAID56 branches in scrub_stripe()

Since we have moved all other profiles handling into their own
functions, now the main body of scrub_stripe() is just handling RAID56
profiles.

There is no need to address other profiles in the main loop of
scrub_stripe(), so we can remove those dead branches.

Since we're here, also slightly change the timing of initialization of
variables like @offset, @increment and @logical.

Especially for @logical, we don't really need to initialize it for
btrfs_extent_root()/btrfs_csum_root(), we can use bg->start for that
purpose.

Now those variables are only initialize for RAID56 branches.

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