diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid10.c | 2 | ||||
-rw-r--r-- | drivers/md/raid5.c | 25 |
2 files changed, 14 insertions, 13 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 5938fa96292..faf3d891297 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -886,7 +886,7 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
886 | */ | 886 | */ |
887 | raid10_find_phys(conf, r10_bio); | 887 | raid10_find_phys(conf, r10_bio); |
888 | retry_write: | 888 | retry_write: |
889 | blocked_rdev = 0; | 889 | blocked_rdev = NULL; |
890 | rcu_read_lock(); | 890 | rcu_read_lock(); |
891 | for (i = 0; i < conf->copies; i++) { | 891 | for (i = 0; i < conf->copies; i++) { |
892 | int d = r10_bio->devs[i].devnum; | 892 | int d = r10_bio->devs[i].devnum; |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 087eee0cb80..ee0ea918308 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -2369,8 +2369,8 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh, | |||
2369 | 2369 | ||
2370 | /* complete a check operation */ | 2370 | /* complete a check operation */ |
2371 | if (test_and_clear_bit(STRIPE_OP_CHECK, &sh->ops.complete)) { | 2371 | if (test_and_clear_bit(STRIPE_OP_CHECK, &sh->ops.complete)) { |
2372 | clear_bit(STRIPE_OP_CHECK, &sh->ops.ack); | 2372 | clear_bit(STRIPE_OP_CHECK, &sh->ops.ack); |
2373 | clear_bit(STRIPE_OP_CHECK, &sh->ops.pending); | 2373 | clear_bit(STRIPE_OP_CHECK, &sh->ops.pending); |
2374 | if (s->failed == 0) { | 2374 | if (s->failed == 0) { |
2375 | if (sh->ops.zero_sum_result == 0) | 2375 | if (sh->ops.zero_sum_result == 0) |
2376 | /* parity is correct (on disc, | 2376 | /* parity is correct (on disc, |
@@ -2400,16 +2400,6 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh, | |||
2400 | canceled_check = 1; /* STRIPE_INSYNC is not set */ | 2400 | canceled_check = 1; /* STRIPE_INSYNC is not set */ |
2401 | } | 2401 | } |
2402 | 2402 | ||
2403 | /* check if we can clear a parity disk reconstruct */ | ||
2404 | if (test_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.complete) && | ||
2405 | test_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending)) { | ||
2406 | |||
2407 | clear_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending); | ||
2408 | clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.complete); | ||
2409 | clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.ack); | ||
2410 | clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending); | ||
2411 | } | ||
2412 | |||
2413 | /* start a new check operation if there are no failures, the stripe is | 2403 | /* start a new check operation if there are no failures, the stripe is |
2414 | * not insync, and a repair is not in flight | 2404 | * not insync, and a repair is not in flight |
2415 | */ | 2405 | */ |
@@ -2424,6 +2414,17 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh, | |||
2424 | } | 2414 | } |
2425 | } | 2415 | } |
2426 | 2416 | ||
2417 | /* check if we can clear a parity disk reconstruct */ | ||
2418 | if (test_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.complete) && | ||
2419 | test_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending)) { | ||
2420 | |||
2421 | clear_bit(STRIPE_OP_MOD_REPAIR_PD, &sh->ops.pending); | ||
2422 | clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.complete); | ||
2423 | clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.ack); | ||
2424 | clear_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending); | ||
2425 | } | ||
2426 | |||
2427 | |||
2427 | /* Wait for check parity and compute block operations to complete | 2428 | /* Wait for check parity and compute block operations to complete |
2428 | * before write-back. If a failure occurred while the check operation | 2429 | * before write-back. If a failure occurred while the check operation |
2429 | * was in flight we need to cycle this stripe through handle_stripe | 2430 | * was in flight we need to cycle this stripe through handle_stripe |