]> sourceware.org Git - lvm2.git/commitdiff
lv_rename: actual fix for snapshot
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 9 Sep 2014 18:15:51 +0000 (20:15 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 9 Sep 2014 18:15:51 +0000 (20:15 +0200)
By my rebasing mistake it's been eliminated from previous patch set.

lib/metadata/lv_manip.c

index cc7b6dace0340e7bd6573281fb1f8763d06f66b6..8c1bd83a70073d3116ed0064ab479db510180124 100644 (file)
@@ -3966,6 +3966,7 @@ int lv_rename_update(struct cmd_context *cmd, struct logical_volume *lv,
                log_error("Failed to allocate space for new name.");
                return 0;
        }
+
        /* rename sub LVs */
        if (!for_each_sub_lv(lv, _rename_cb, (void *) &lv_names))
                return_0;
@@ -3973,6 +3974,9 @@ int lv_rename_update(struct cmd_context *cmd, struct logical_volume *lv,
        /* rename main LV */
        lv->name = lv_names.new;
 
+       if (lv_is_cow(lv))
+               lv = origin_from_cow(lv);
+
        if (update_mda && !lv_update_and_reload(lv))
                return_0;
 
This page took 0.046255 seconds and 5 git commands to generate.