]> 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)
commite2bca077d273d854d0633a63eb5ec40251db4bcf
treea5a7b6a08703e71047193c41dd3b243ff09c0fea
parentccf746a9100a886b4da9876a49470f45a2c7b185
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