Explorar el Código

[PATCH] md: support check-without-repair of raid10 arrays

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>
NeilBrown hace 19 años
padre
commit
18f08819f4
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      drivers/md/raid10.c

+ 4 - 0
drivers/md/raid10.c

@@ -1206,6 +1206,10 @@ static void sync_request_write(mddev_t *mddev, r10bio_t *r10_bio)
 				break;
 				break;
 		if (j == vcnt)
 		if (j == vcnt)
 			continue;
 			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
 		/* Ok, we need to write this bio
 		 * First we need to fixup bv_offset, bv_len and
 		 * First we need to fixup bv_offset, bv_len and
 		 * bi_vecs, as the read request might have corrupted these
 		 * bi_vecs, as the read request might have corrupted these