]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: dev-replace: make sure target is identical to source when raid56 rebuild fails
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 2 Mar 2018 23:10:41 +0000 (16:10 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:43 +0000 (15:09 +0200)
commit295d25633aff572e13c463af9de0e5ce0d91c0d2
tree206e7dcaba8efee859c5c87ca952b7ee10fdbb1d
parent8f696c2d8617e64f8a5b22e99354d8aabbbdfc1d
Btrfs: dev-replace: make sure target is identical to source when raid56 rebuild fails

In the last step of scrub_handle_error_block, we try to combine good
copies on all possible mirrors, this works fine for raid1 and raid10,
but not for raid56 as it's doing parity rebuild.

If parity rebuild doesn't get back with correct data which matches its
checksum, in case of replace we'd rather write what is stored in the
source device than the data calculuated from parity.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c