]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
md/raid6: Fix misapplied backport in 2.6.32.64
authorBen Hutchings <ben@decadent.org.uk>
Sun, 7 Dec 2014 20:00:27 +0000 (20:00 +0000)
committerWilly Tarreau <w@1wt.eu>
Sat, 13 Dec 2014 14:16:18 +0000 (15:16 +0100)
Upstream commit 9c4bdf697c39 ("md/raid6: avoid data corruption during
recovery of double-degraded RAID6") changes handle_stripe(), but we
have separate functions for RAID5 and RAID6 and need to apply the
change to handle_stripe6().  When cherry-picked, the change was
wrongly applied to handle_stripe5().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/md/raid5.c

index 013e598ed6bebc50b28f2919681e0941ab1cbc35..4d70eef223545a438f5da3e29db83aff67dd9294 100644 (file)
@@ -3091,8 +3091,6 @@ static void handle_stripe5(struct stripe_head *sh)
                                set_bit(R5_Wantwrite, &dev->flags);
                                if (prexor)
                                        continue;
-                               if (s.failed > 1)
-                                       continue;
                                if (!test_bit(R5_Insync, &dev->flags) ||
                                    (i == sh->pd_idx && s.failed == 0))
                                        set_bit(STRIPE_INSYNC, &sh->state);
@@ -3380,6 +3378,8 @@ static void handle_stripe6(struct stripe_head *sh)
                                pr_debug("Writing block %d\n", i);
                                BUG_ON(!test_bit(R5_UPTODATE, &dev->flags));
                                set_bit(R5_Wantwrite, &dev->flags);
+                               if (s.failed > 1)
+                                       continue;
                                if (!test_bit(R5_Insync, &dev->flags) ||
                                    ((i == sh->pd_idx || i == qd_idx) &&
                                      s.failed == 0))