]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
md/raid10: Don't call bitmap_cond_end_sync when we are doing recovery.
authorNeilBrown <neilb@suse.de>
Wed, 25 Feb 2009 02:18:47 +0000 (13:18 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Mar 2009 00:32:09 +0000 (17:32 -0700)
commit17872fe9e5c0e854598e92aa5861edae61ef8fdf
tree9b73fcf7c74483c6559d3ea2c66b1f041fc1bb10
parent42a52b79eae73b159e0ecbcf9111b306399aa4d2
md/raid10: Don't call bitmap_cond_end_sync when we are doing recovery.

commit 78200d45cde2a79c0d0ae0407883bb264caa3c18 upstream.

For raid1/4/5/6, resync (fixing inconsistencies between devices) is
very similar to recovery (rebuilding a failed device onto a spare).
The both walk through the device addresses in order.

For raid10 it can be quite different.  resync follows the 'array'
address, and makes sure all copies are the same.  Recover walks
through 'device' addresses and recreates each missing block.

The 'bitmap_cond_end_sync' function allows the write-intent-bitmap
(When present) to be updated to reflect a partially completed resync.
It makes assumptions which mean that it does not work correctly for
raid10 recovery at all.

In particularly, it can cause bitmap-directed recovery of a raid10 to
not recovery some of the blocks that need to be recovered.

So move the call to bitmap_cond_end_sync into the resync path, rather
than being in the common "resync or recovery" path.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/raid10.c