mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-03 17:47:44 +03:00
Thin revert code for exclusive pool activation
There are no limits on thin-pool activation now. Revert code that is no longer needed.
This commit is contained in:
parent
32227d4720
commit
56a076fb9e
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user