Commit d4946518 authored by Ben Hutchings's avatar Ben Hutchings Committed by Willy Tarreau

md/raid6: Fix misapplied backport in 2.6.32.64

Upstream commit 9c4bdf69 ("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: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 7185a719
...@@ -3091,8 +3091,6 @@ static void handle_stripe5(struct stripe_head *sh) ...@@ -3091,8 +3091,6 @@ static void handle_stripe5(struct stripe_head *sh)
set_bit(R5_Wantwrite, &dev->flags); set_bit(R5_Wantwrite, &dev->flags);
if (prexor) if (prexor)
continue; continue;
if (s.failed > 1)
continue;
if (!test_bit(R5_Insync, &dev->flags) || if (!test_bit(R5_Insync, &dev->flags) ||
(i == sh->pd_idx && s.failed == 0)) (i == sh->pd_idx && s.failed == 0))
set_bit(STRIPE_INSYNC, &sh->state); set_bit(STRIPE_INSYNC, &sh->state);
...@@ -3380,6 +3378,8 @@ static void handle_stripe6(struct stripe_head *sh) ...@@ -3380,6 +3378,8 @@ static void handle_stripe6(struct stripe_head *sh)
pr_debug("Writing block %d\n", i); pr_debug("Writing block %d\n", i);
BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); BUG_ON(!test_bit(R5_UPTODATE, &dev->flags));
set_bit(R5_Wantwrite, &dev->flags); set_bit(R5_Wantwrite, &dev->flags);
if (s.failed > 1)
continue;
if (!test_bit(R5_Insync, &dev->flags) || if (!test_bit(R5_Insync, &dev->flags) ||
((i == sh->pd_idx || i == qd_idx) && ((i == sh->pd_idx || i == qd_idx) &&
s.failed == 0)) s.failed == 0))
......
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