There are no limits on thin-pool activation now.
Revert code that is no longer needed.
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);
} 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;
/* 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;
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);