Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf7a44168d743ca97863b7f34ed42a45fd7b5ab0
Commit:     cf7a44168d743ca97863b7f34ed42a45fd7b5ab0
Parent:     d7f3d291a0e1330f341fdf1128b2d12fff7932ee
Author:     NeilBrown <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:30:55 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:43:03 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/md/raid1.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 0bcefad..16775a0 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)
                                        j = 0;
                                if (j >= 0)
                                        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;
                                        rdev_dec_pending(conf->mirrors[i].rdev, 
mddev);
                                } else {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to