]> sourceware.org Git - lvm2.git/commitdiff
Fix dev_manager_transient to access -real device not snapshot-origin. (brassow)
authorAlasdair Kergon <agk@redhat.com>
Tue, 17 Aug 2010 01:51:12 +0000 (01:51 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 17 Aug 2010 01:51:12 +0000 (01:51 +0000)
Another reminder why cloning functions impedes maintenance.

WHATS_NEW
lib/activate/dev_manager.c

index d622e8d48b1db95bcbdcf7af063ad994f55d1f8c..6ac2f2205d54080367c19aa13fafc6e6f1fc63bc 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.73 - 
 ================================
+  Fix dev_manager_transient to access -real device not snapshot-origin.
   Monitor origin -real device below snapshot instead of overlay device.
   Don't really change monitoring status when in test mode.
   Fix some exit statuses when starting/stopping monitoring fails.
index e30a62e91b0538110755da02924e2e510b134582..f091f743b96596f2eee3c683dc159e73af0d6bb2 100644 (file)
@@ -548,6 +548,7 @@ static int _percent(struct dev_manager *dm, const char *name, const char *dlid,
        return 0;
 }
 
+/* FIXME Merge with the percent function */
 int dev_manager_transient(struct dev_manager *dm, struct logical_volume *lv)
 {
        int r = 0;
@@ -558,10 +559,11 @@ int dev_manager_transient(struct dev_manager *dm, struct logical_volume *lv)
        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)))
This page took 0.039047 seconds and 5 git commands to generate.