Skip to content

Commit

Permalink
md/raid6: Fix misapplied backport in 2.6.32.64
Browse files Browse the repository at this point in the history
Upstream commit 9c4bdf6 ("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>
  • Loading branch information
Ben Hutchings authored and Willy Tarreau committed Dec 13, 2014
1 parent 7185a71 commit d494651
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit d494651

Please sign in to comment.