[PATCH] md: support check-without-repair of raid10 arrays
authorNeilBrown <neilb@suse.de>
Fri, 6 Jan 2006 08:20:25 +0000 (00:20 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:34:04 +0000 (08:34 -0800)
Also keep count on the number of errors found.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid10.c

index 8f58a447d9f0379404c6819a58fb3f0e5976d4ca..1fa70c34b7d2bc6b4d3d11d19bf67b12925d6194 100644 (file)
@@ -1206,6 +1206,10 @@ static void sync_request_write(mddev_t *mddev, r10bio_t *r10_bio)
                                break;
                if (j == vcnt)
                        continue;
+               mddev->resync_mismatches += r10_bio->sectors;
+               if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery))
+                       /* Don't fix anything. */
+                       continue;
                /* Ok, we need to write this bio
                 * First we need to fixup bv_offset, bv_len and
                 * bi_vecs, as the read request might have corrupted these