[lvm-devel] [PATCH 2 of 3] Handle failures of mirror devices while under snapshot origin (bug 613829)
Jonathan Brassow
jbrassow at redhat.com
Sun Aug 15 22:29:25 UTC 2010
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.
Signed-off-by: Jonathan Brassow <jbrassow at redhat.com>
Index: LVM2/lib/activate/dev_manager.c
===================================================================
--- LVM2.orig/lib/activate/dev_manager.c
+++ 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)))
More information about the lvm-devel
mailing list