]> git.hungrycats.org Git - linux/commitdiff
[PATCH] md: fix BUG in raid6 resync code.
authorAndrew Morton <akpm@osdl.org>
Wed, 9 Jun 2004 01:17:47 +0000 (18:17 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 9 Jun 2004 01:17:47 +0000 (18:17 -0700)
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: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid6main.c

index 06071c35cce52bff6c2c65895994052adeaa6308..714dfb2e17d253966685867f8ba961ae568be0f8 100644 (file)
@@ -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) &&