aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-07-27 21:39:25 -0400
committerNeilBrown <neilb@suse.de>2011-07-27 21:39:25 -0400
commite684e41db3bad44f1262341300b827c0d94ae220 (patch)
treea3ff2ec212d4f69a06a64b3a6841895b8cf85673 /drivers/md
parent1a0b7cd82657a590f163b090bd9123a3a6b9aae4 (diff)
md/raid10: simplify read error handling during recovery.
If a read error is detected during recovery the code currently fails the read device. This isn't really necessary. recovery_request_write will signal a write error to end_sync_write and it will record a write error on the destination device which will record a bad block there or kick it from the array. So just remove this call to do md_error. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid10.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index e54ff3274eda..6022e2aaf3aa 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1418,13 +1418,12 @@ static void end_sync_read(struct bio *bio, int error)
1418 1418
1419 if (test_bit(BIO_UPTODATE, &bio->bi_flags)) 1419 if (test_bit(BIO_UPTODATE, &bio->bi_flags))
1420 set_bit(R10BIO_Uptodate, &r10_bio->state); 1420 set_bit(R10BIO_Uptodate, &r10_bio->state);
1421 else { 1421 else
1422 /* The write handler will notice the lack of
1423 * R10BIO_Uptodate and record any errors etc
1424 */
1422 atomic_add(r10_bio->sectors, 1425 atomic_add(r10_bio->sectors,
1423 &conf->mirrors[d].rdev->corrected_errors); 1426 &conf->mirrors[d].rdev->corrected_errors);
1424 if (!test_bit(MD_RECOVERY_SYNC, &conf->mddev->recovery))
1425 md_error(r10_bio->mddev,
1426 conf->mirrors[d].rdev);
1427 }
1428 1427
1429 /* for reconstruct, we always reschedule after a read. 1428 /* for reconstruct, we always reschedule after a read.
1430 * for resync, only after all reads 1429 * for resync, only after all reads