]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
Btrfs: fix scrub to repair raid6 corruption
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 2 Jan 2018 20:36:42 +0000 (13:36 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:20 +0000 (16:08 +0100)
commit762221f095e3932669093466aaf4b85ed9ad2ac1
treeeb3dedff5465c36ab5c4df36bb0b0acd01093ad2
parent6528b99d3d20795ff947d9b3fd736affe901acef
Btrfs: fix scrub to repair raid6 corruption

The raid6 corruption is that,
suppose that all disks can be read without problems and if the content
that was read out doesn't match its checksum, currently for raid6
btrfs at most retries twice,

- the 1st retry is to rebuild with all other stripes, it'll eventually
  be a raid5 xor rebuild,
- if the 1st fails, the 2nd retry will deliberately fail parity p so
  that it will do raid6 style rebuild,

however, the chances are that another non-parity stripe content also
has something corrupted, so that the above retries are not able to
return correct content.

We've fixed normal reads to rebuild raid6 correctly with more retries
in Patch "Btrfs: make raid6 rebuild retry more"[1], this is to fix
scrub to do the exactly same rebuild process.

[1]: https://patchwork.kernel.org/patch/10091755/

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