[dm-devel] [2.6.22-rc1-mm1 PATCH 8/10] dm-raid1-handle-recovery-read-failures.patch

Jonathan Brassow jbrassow at redhat.com
Mon May 21 22:08:00 UTC 2007


 brassow

Index: linux-2.6.22-rc1-mm1/drivers/md/dm-raid1.c
===================================================================
--- linux-2.6.22-rc1-mm1.orig/drivers/md/dm-raid1.c
+++ linux-2.6.22-rc1-mm1/drivers/md/dm-raid1.c
@@ -674,9 +674,11 @@ static void recovery_complete(int read_e
 	struct mirror_set *ms = reg->rh->ms;
 	int m, bit = 0;
 
-	if (read_err)
+	if (read_err) {
 		/* Read error means the failure of default mirror. */
 		DMERR_LIMIT("Unable to read primary mirror during recovery");
+		fail_mirror(ms->default_mirror);
+	}
 
 	if (write_err) {
 		DMERR_LIMIT("Write error during recovery (error = 0x%x)",





More information about the dm-devel mailing list