Commit 7b6bc1f8 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] md: fix BUG in raid6 resync code.

From: NeilBrown <neilb@cse.unsw.edu.au>

This condtion on this loop is primarily to avoid the loop if it doesn't
appear to be needed.  However it optimises a little too much and there is a
case where it skips the loop when it is really needed.  This patch fixes
it.

This is the raid6 version of the recent raid5 resync bugfix.
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 057e4132
......@@ -1157,7 +1157,7 @@ static void handle_stripe(struct stripe_head *sh)
* parity, or to satisfy requests
* or to load a block that is being partially written.
*/
if (to_read || non_overwrite || (syncing && (uptodate+failed < disks))) {
if (to_read || non_overwrite || (syncing && (uptodate < disks))) {
for (i=disks; i--;) {
dev = &sh->dev[i];
if (!test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment