Commit a25d8c32 authored by Song Liu's avatar Song Liu

Revert "Don't jump to compute_result state from check_result state"

This reverts commit 4f4fd7c5.

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Nigel Croxon <ncroxon@redhat.com>
Cc: Xiao Ni <xni@redhat.com>
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
parent c42d3240
...@@ -4227,15 +4227,26 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh, ...@@ -4227,15 +4227,26 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
case check_state_check_result: case check_state_check_result:
sh->check_state = check_state_idle; sh->check_state = check_state_idle;
if (s->failed > 1)
break;
/* handle a successful check operation, if parity is correct /* handle a successful check operation, if parity is correct
* we are done. Otherwise update the mismatch count and repair * we are done. Otherwise update the mismatch count and repair
* parity if !MD_RECOVERY_CHECK * parity if !MD_RECOVERY_CHECK
*/ */
if (sh->ops.zero_sum_result == 0) { if (sh->ops.zero_sum_result == 0) {
/* Any parity checked was correct */ /* both parities are correct */
if (!s->failed)
set_bit(STRIPE_INSYNC, &sh->state); set_bit(STRIPE_INSYNC, &sh->state);
else {
/* in contrast to the raid5 case we can validate
* parity, but still have a failure to write
* back
*/
sh->check_state = check_state_compute_result;
/* Returning at this point means that we may go
* off and bring p and/or q uptodate again so
* we make sure to check zero_sum_result again
* to verify if p or q need writeback
*/
}
} else { } else {
atomic64_add(STRIPE_SECTORS, &conf->mddev->resync_mismatches); atomic64_add(STRIPE_SECTORS, &conf->mddev->resync_mismatches);
if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) {
......
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