aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 425958a76b84..f0f0585c107e 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2645,6 +2645,7 @@ static void handle_stripe5(struct stripe_head *sh)
2645 struct r5dev *dev; 2645 struct r5dev *dev;
2646 unsigned long pending = 0; 2646 unsigned long pending = 0;
2647 mdk_rdev_t *blocked_rdev = NULL; 2647 mdk_rdev_t *blocked_rdev = NULL;
2648 int prexor;
2648 2649
2649 memset(&s, 0, sizeof(s)); 2650 memset(&s, 0, sizeof(s));
2650 pr_debug("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d " 2651 pr_debug("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d "
@@ -2774,9 +2775,11 @@ static void handle_stripe5(struct stripe_head *sh)
2774 /* leave prexor set until postxor is done, allows us to distinguish 2775 /* leave prexor set until postxor is done, allows us to distinguish
2775 * a rmw from a rcw during biodrain 2776 * a rmw from a rcw during biodrain
2776 */ 2777 */
2778 prexor = 0;
2777 if (test_bit(STRIPE_OP_PREXOR, &sh->ops.complete) && 2779 if (test_bit(STRIPE_OP_PREXOR, &sh->ops.complete) &&
2778 test_bit(STRIPE_OP_POSTXOR, &sh->ops.complete)) { 2780 test_bit(STRIPE_OP_POSTXOR, &sh->ops.complete)) {
2779 2781
2782 prexor = 1;
2780 clear_bit(STRIPE_OP_PREXOR, &sh->ops.complete); 2783 clear_bit(STRIPE_OP_PREXOR, &sh->ops.complete);
2781 clear_bit(STRIPE_OP_PREXOR, &sh->ops.ack); 2784 clear_bit(STRIPE_OP_PREXOR, &sh->ops.ack);
2782 clear_bit(STRIPE_OP_PREXOR, &sh->ops.pending); 2785 clear_bit(STRIPE_OP_PREXOR, &sh->ops.pending);
@@ -2810,6 +2813,8 @@ static void handle_stripe5(struct stripe_head *sh)
2810 if (!test_and_set_bit( 2813 if (!test_and_set_bit(
2811 STRIPE_OP_IO, &sh->ops.pending)) 2814 STRIPE_OP_IO, &sh->ops.pending))
2812 sh->ops.count++; 2815 sh->ops.count++;
2816 if (prexor)
2817 continue;
2813 if (!test_bit(R5_Insync, &dev->flags) || 2818 if (!test_bit(R5_Insync, &dev->flags) ||
2814 (i == sh->pd_idx && s.failed == 0)) 2819 (i == sh->pd_idx && s.failed == 0))
2815 set_bit(STRIPE_INSYNC, &sh->state); 2820 set_bit(STRIPE_INSYNC, &sh->state);