aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-10-17 02:30:55 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:43:03 -0400
commitcf7a44168d743ca97863b7f34ed42a45fd7b5ab0 (patch)
tree884f5094a46be4da9f30292c9a5a417f100d5d5f /drivers/md/raid1.c
parentd7f3d291a0e1330f341fdf1128b2d12fff7932ee (diff)
md: make sure read errors are auto-corrected during a 'check' resync in raid1
Whenever a read error is found, we should attempt to overwrite with correct data to 'fix' it. However when do a 'check' pass (which compares data blocks that are successfully read, but doesn't normally overwrite) we don't do that. We should. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 0bcefad82413..16775a0df7f6 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1214,7 +1214,8 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
1214 j = 0; 1214 j = 0;
1215 if (j >= 0) 1215 if (j >= 0)
1216 mddev->resync_mismatches += r1_bio->sectors; 1216 mddev->resync_mismatches += r1_bio->sectors;
1217 if (j < 0 || test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) { 1217 if (j < 0 || (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)
1218 && test_bit(BIO_UPTODATE, &sbio->bi_flags))) {
1218 sbio->bi_end_io = NULL; 1219 sbio->bi_end_io = NULL;
1219 rdev_dec_pending(conf->mirrors[i].rdev, mddev); 1220 rdev_dec_pending(conf->mirrors[i].rdev, mddev);
1220 } else { 1221 } else {