Skip to content

btrfs: scrub: finish the switch to scrub_stripe and cleanup the old code

Qu Wenruo linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6btrfs: scrub: use scrub_stripe to implement RAID56 P/Q scrubfs/btrfs/scrub.c fs/btrfs/scrub.h+212 -100 replies
2/6btrfs: scrub: remove scrub_parity structurefs/btrfs/fs.h fs/btrfs/scrub.c fs/btrfs/scrub.h+10 -5250 replies
3/6btrfs: scrub: remove the old writeback infrastructurefs/btrfs/scrub.c fs/btrfs/scrub.h+3 -2190 replies
4/6btrfs: scrub: remove the old scrub recheck codefs/btrfs/block-group.c fs/btrfs/block-group.h fs/btrfs/scrub.c +1 more+14 -10090 replies
5/6btrfs: scrub: remove scrub_block and scrub_sector structuresfs/btrfs/scrub.c fs/btrfs/scrub.h+0 -5740 replies
6/6btrfs: scrub: remove scrub_bio structurefs/btrfs/scrub.c fs/btrfs/scrub.h+6 -2440 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] btrfs: scrub: finish the switch to scrub_stripe and cleanup the old code

This series is based on my previous patchset "v7 btrfs: scrub: use a more reader friendly code to implement scrub_simple_mirror()", the whole series can be fetched from github:

https://github.com/adam900710/linux/tree/scrub_stripe

After the mentioned patchset, only one path, scrub_raid56_parity(), is still using the old facility.

[PATCH SPLIT]

This series would firstly migrate the only path to the new scrub_stripe based solution.
The change should only affect RAID56, thus zoned mode should not be affected.

Then the remaining 5 patches to remove all the remaining code. I have tried my best to split the cleanup, starting from RAID56 specific code, to writeback, then approach the core scrub_bio facility.

If the split is not preferred, it should still be possible to fold all the last 5 patches into one big cleanup.

[CODE SIZE REDUCTION]

The number of deletion should explain itself, and even with my previous patchset included, it is still a big win:

 9 files changed, 1488 insertions(+), 2931 deletions(-)

Still a net reduce of almost 1500 lines.

Qu Wenruo (6):
btrfs: scrub: use scrub_stripe to implement RAID56 P/Q scrub
btrfs: scrub: remove scrub_parity structure
btrfs: scrub: remove the old writeback infrastructure
btrfs: scrub: remove the old scrub recheck code
btrfs: scrub: remove scrub_block and scrub_sector structures
btrfs: scrub: remove scrub_bio structure

 fs/btrfs/block-group.c |   11 -
 fs/btrfs/block-group.h |    8 -
 fs/btrfs/fs.h          |    1 -
 fs/btrfs/scrub.c       | 2740 ++++------------------------------------
 4 files changed, 212 insertions(+), 2548 deletions(-)
Signature · 1 line
2.39.2