]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: scrub raid56 stripes in the right way
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Tue, 1 Apr 2014 10:01:43 +0000 (18:01 +0800)
committerChris Mason <clm@fb.com>
Mon, 7 Apr 2014 16:08:49 +0000 (09:08 -0700)
commit212a9bff651eb3b0c39d2ab3fb2936a8eeaf9840
treea5a7b6a08703e71047193c41dd3b243ff09c0fea
parent47ae92c044d9742adb94bb178f8da5a38489ae6a
Btrfs: scrub raid56 stripes in the right way

Steps to reproduce:
 # mkfs.btrfs -f /dev/sda[8-11] -m raid5 -d raid5
 # mount /dev/sda8 /mnt
 # btrfs scrub start -BR /mnt
 # echo $? <--unverified errors make return value be 3

This is because we don't setup right mapping between physical
and logical address for raid56, which makes checksum mismatch.
But we will find everthing is fine later when rechecking using
btrfs_map_block().

This patch fixed the problem by settuping right mappings and
we only verify data stripes' checksums.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/scrub.c