]> sourceware.org Git - lvm2.git/commitdiff
Thin works only with exclusive activation
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 28 Oct 2011 20:29:06 +0000 (20:29 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 28 Oct 2011 20:29:06 +0000 (20:29 +0000)
Enforce exclusive activation with thin targets.

tools/lvchange.c
tools/vgchange.c

index 09377ab18db4db0332e785457367b832548b367b..c58a9e38098bbef73dd444725fd90d81bddb73aa 100644 (file)
@@ -135,7 +135,9 @@ static int lvchange_availability(struct cmd_context *cmd,
                if (!deactivate_lv(cmd, lv))
                        return_0;
        } else {
-               if (lv_is_origin(lv) || (activate == CHANGE_AE)) {
+               if ((activate == CHANGE_AE) ||
+                   lv_is_origin(lv) ||
+                   lv_is_thin_type(lv)) {
                        log_verbose("Activating logical volume \"%s\" "
                                    "exclusively", lv->name);
                        if (!activate_lv_excl(cmd, lv))
index 8cb0e230fd114f096a33edea90819ce62165c070..39d58f1460a17a13f06405808fbd7e995acfbe05 100644 (file)
@@ -149,10 +149,10 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
                                stack;
                                continue;
                        }
-               } else if (lv_is_origin(lv) ||
-                          lv_is_thin_pool(lv) ||
-                          lv_is_thin_volume(lv) ||
-                          (activate == CHANGE_AE)) {
+               } else if ((activate == CHANGE_AE) ||
+                          lv_is_origin(lv) ||
+                          lv_is_thin_type(lv)) {
+                       /* FIXME: duplicated test code with lvchange */
                        if (!activate_lv_excl(cmd, lv)) {
                                stack;
                                continue;
This page took 0.032029 seconds and 5 git commands to generate.