Skip to contentSkip to conversation

dm-raid1-handle-recovery-read-failures.patch

PATCH In review Jonathan Brassow 1 participant 1 message May 21, 2007 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 8/10 dm-raid1-handle-recovery-read-failures.patch

brassow

drivers/md/dm-raid1.c +3 -1
Index: 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)",