|
@@ -1214,7 +1214,8 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
|
|
j = 0;
|
|
j = 0;
|
|
if (j >= 0)
|
|
if (j >= 0)
|
|
mddev->resync_mismatches += r1_bio->sectors;
|
|
mddev->resync_mismatches += r1_bio->sectors;
|
|
- if (j < 0 || test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) {
|
|
|
|
|
|
+ if (j < 0 || (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)
|
|
|
|
+ && test_bit(BIO_UPTODATE, &sbio->bi_flags))) {
|
|
sbio->bi_end_io = NULL;
|
|
sbio->bi_end_io = NULL;
|
|
rdev_dec_pending(conf->mirrors[i].rdev, mddev);
|
|
rdev_dec_pending(conf->mirrors[i].rdev, mddev);
|
|
} else {
|
|
} else {
|