Skip to content

btrfs-progs: check: avoid false alerts for --check-data-csum on RAID56

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: avoid checking wrong RAID5/6 P/Q datakernel-shared/disk-io.c kernel-shared/volumes.c+13 -41 reply
2/2btrfs-progs: tests/fsck: add test case for data csum check on raid5tests/fsck-tests/056-raid56-false-alerts/test.sh+31 -01 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] btrfs-progs: check: avoid false alerts for --check-data-csum on RAID56

There is a long existing bug that btrfs-progs doesn't really support rebuilding its data using RAID56 P/Q.

This means any read with mirror_num > 1 for RAID56 won't work, and will just return the P/Q raw data directly.

The RAID56 ability in btrfs-progs is only for data write.

This will cause tons of false alerts for "btrfs check --check-data-csum", making it useless as an offline to verify RAID56 data.

The proper fix will need way more code modification (btrfs-fuse supports that, so I believe it's possible).

But for now, let's just disable mirror_num > 1 read repair for progs.

Qu Wenruo (2):
btrfs-progs: avoid checking wrong RAID5/6 P/Q data
btrfs-progs: tests/fsck: add test case for data csum check on raid5

 kernel-shared/disk-io.c                       |  7 +++++
 kernel-shared/volumes.c                       | 10 +++---
 .../056-raid56-false-alerts/test.sh           | 31 +++++++++++++++++++
 3 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100755 tests/fsck-tests/056-raid56-false-alerts/test.sh
Signature · 1 line
2.35.1