]> sourceware.org Git - lvm2.git/commitdiff
Thin revert code for exclusive pool activation
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 7 Nov 2011 10:58:13 +0000 (10:58 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 7 Nov 2011 10:58:13 +0000 (10:58 +0000)
There are no limits on thin-pool activation now.
Revert code that is no longer needed.

lib/activate/activate.c
lib/metadata/lv_manip.c
tools/lvresize.c
tools/vgchange.c

index a96e78113f4ea2e6559e4d34e1af1e06b237e7a9..2b44b19264d4d59599234e75b271a95d7159f5f4 100644 (file)
@@ -782,7 +782,7 @@ int lvs_in_vg_opened(const struct volume_group *vg)
                return 0;
 
        dm_list_iterate_items(lvl, &vg->lvs)
-               if (lv_is_visible(lvl->lv) && !lv_is_used_thin_pool(lvl->lv))
+               if (lv_is_visible(lvl->lv))
                        count += (_lv_open_count(vg->cmd, lvl->lv) > 0);
 
        log_debug("Counted %d open LVs in VG %s", count, vg->name);
index a8c0b9e480276cf7f12e659ae86be3b907b72f13..d4b349426dd756d5af3cf5400dcb71b4b9b83cd6 100644 (file)
@@ -4184,19 +4184,6 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, struct l
        } else if (seg_is_thin_volume(lp)) {
                pool_lv = first_seg(lv)->pool_lv;
 
-               /* Ensure unused thin pool is not active */
-               if (!lv_is_used_thin_pool(pool_lv) &&
-                   !deactivate_lv(cmd, pool_lv)) {
-                       log_error("Failed to deactivate unused pool %s.",
-                                 pool_lv->name);
-                       goto revert_new_lv;
-               }
-
-               /*
-                * From now the thin pool de/activation is made
-                * only via implicit thin volume dependency.
-                */
-
                if (!(first_seg(lv)->device_id =
                      get_free_pool_device_id(first_seg(pool_lv)))) {
                        stack;
index aebed44522fe4ce79ab31a44402bd5be2f001081..aafef6f629803dace7e555b91185e3bba192a4d2 100644 (file)
@@ -755,10 +755,6 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
        /* If snapshot, must suspend all associated devices */
        if (lv_is_cow(lv))
                lock_lv = origin_from_cow(lv);
-       else if (lv_is_used_thin_pool(lv))
-               // FIXME: what to pick here - maybe an active thin?
-               // but it still seems to be racy in cluster
-               lock_lv = lv;
        else
                lock_lv = lv;
 
index 39d58f1460a17a13f06405808fbd7e995acfbe05..6332117e1f392db443b371e1e76d9c90fdd37901 100644 (file)
@@ -100,10 +100,6 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
                if (!lv_is_visible(lv))
                        continue;
 
-               /* Never manipulate with thin pools in use */
-               if (lv_is_used_thin_pool(lv))
-                       continue;
-
                /* If LV is sparse, activate origin instead */
                if (lv_is_cow(lv) && lv_is_virtual_origin(origin_from_cow(lv)))
                        lv = origin_from_cow(lv);
This page took 0.041423 seconds and 5 git commands to generate.