aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2014-12-07 20:00:27 +0000
committerStefan Bader <stefan.bader@canonical.com>2014-12-15 15:00:59 +0100
commitb2b287cd25690984ed583ff17518a2fb16fe93cd (patch)
tree5ba7f72608d4856d1f7b497374f571c6bf9d7b3d
parent39f505a73908eef27ecf553392b164e913a994c7 (diff)
downloadlinux-2.6.32.y-drm33.z-b2b287cd25690984ed583ff17518a2fb16fe93cd.tar.gz
md/raid6: Fix misapplied backport in 2.6.32.64
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> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
-rw-r--r--drivers/md/raid5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 013e598ed6beb..4d70eef223545 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -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))