]> sourceware.org Git - lvm2.git/commitdiff
snapshot: update merging fix
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 23 Jul 2013 13:15:04 +0000 (15:15 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 23 Jul 2013 13:15:04 +0000 (15:15 +0200)
Activation is needed only for clustered VG.
For non-clustered VG skip activation, since deactivate_lv()
is called without problems (no testing for lock presence).

(updates f6ded62291682e40c7976d27e48915d9d1538940)

lib/metadata/snapshot_manip.c

index ab28890a2885264d4b59625950c4c0fba87439f1..325a4e8c3de25186a88d2983ed3ce72964bb3b1f 100644 (file)
@@ -298,10 +298,12 @@ int vg_remove_snapshot(struct logical_volume *cow)
                }
 
                /*
-                * For merged snapshot we activate cow so it can clean
-                * left table entries and deactivate_lv() follows shortly.
+                * For merged snapshot and clustered VG activate cow LV so
+                * the following call to deactivate_lv() can clean-up table
+                * entries. For this clustered lock need to be held.
                 */
-               if (merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
+               if (vg_is_clustered(cow->vg) &&
+                   merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
                        log_error("Failed to activate %s.", cow->name);
                        return 0;
                }
This page took 0.043721 seconds and 5 git commands to generate.