diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2018-01-13 04:07:02 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 18:08:21 +0300 |
commit | 44ac474def527a9c595a88400f4717dacae03b8a (patch) | |
tree | bde3b88d6fa242c6667007f3c8a6e7afd705a064 /crypto/poly1305_generic.c | |
parent | 0198e5b707cfeb5defbd1b71b1ec6e71580d7db9 (diff) | |
download | linux-44ac474def527a9c595a88400f4717dacae03b8a.tar.xz |
Btrfs: do not cache rbio pages if using raid6 recover
Since raid6 recover tries all possible combinations of failed stripes,
- when raid6 rebuild algorithm is used, i.e. raid6_datap_recov() and
raid6_2data_recov(), it may change the in-memory content of failed
stripes, if such a raid bio is cached, a later raid write rmw or recover
can steal @stripe_pages from it instead of reading from disks, such that
it carries the wrong content to do write rmw or recovery and ends up
with corruption or recovery failures.
- when raid5 rebuild algorithm is used, i.e. xor, raid bio can be cached
because the only failed stripe which contains @rbio->bio_pages gets
modified, others remain the same so that their in-memory content is
consistent with their on-disk content.
This adds a check to skip caching rbio if using raid6 recover.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'crypto/poly1305_generic.c')
0 files changed, 0 insertions, 0 deletions