From: NeilBrown Date: Fri, 6 Jan 2006 08:20:25 +0000 (-0800) Subject: [PATCH] md: support check-without-repair of raid10 arrays X-Git-Tag: v2.6.16-rc1~936^2~37 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=18f08819f42b647783e4f6ea99141623881bf182;p=linux-2.6-omap-h63xx.git [PATCH] md: support check-without-repair of raid10 arrays Also keep count on the number of errors found. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 8f58a447d9f..1fa70c34b7d 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -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