Skip to contentSkip to conversation

Handle failures of mirror devices while under snapshot origin (bug 613829)

PATCH New Jonathan Brassow 2 participants 2 messages Aug 15, 2010 – Aug 16, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Handle failures of mirror devices while under snapshot origin (bug 613829)

The code that was evaluating the mirror status line for failure was not taking into account that a mirror might be under a snapshot origin. This patch causes it to look at <lv>-real if necessary.

lib/activate/dev_manager.c +2 -1
Index: LVM2/lib/activate/dev_manager.c
===================================================================
@@ -558,10 +558,11 @@ int dev_manager_transient(struct dev_man
 	char *type = NULL;
 	char *params = NULL;
 	char *dlid = NULL;
+	char *suffix = lv_is_origin(lv) ? "real" : NULL;
 	const struct dm_list *segh = &lv->segments;
 	struct lv_segment *seg = NULL;
 
-	if (!(dlid = build_dm_uuid(dm->mem, lv->lvid.s, NULL)))
+	if (!(dlid = build_dm_uuid(dm->mem, lv->lvid.s, suffix)))
 		return_0;
 
 	if (!(dmt = _setup_task(0, dlid, NULL, DM_DEVICE_STATUS, 0, 0)))
#1 lore raw

PATCH 1/1 Handle failures of mirror devices while under snapshot origin (bug 613829)

Quoted 4 lines · Jon Brassow

The code that was evaluating the mirror status line for failure was not taking into account that a mirror might be under a snapshot origin. This patch causes it to look at <lv>-real if necessary.

Ack.

Alasdair