1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

thin: send messages to active pool

If the thin pool is known to be active, messages can be passed
to the pool even when the created thin volume is not going to be
activated.

So we do not need to stack large list of message and validate
and catch creation errors earlier in this case.

Replace the test for valid activation combination with simpler list of
deactivation combinations.
This commit is contained in:
Zdenek Kabelac 2013-07-15 11:27:57 +02:00
parent 5658ec2bdc
commit 42881c8877
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.99 -
===================================
Send thin messages also for active thin pool and inactive thin volume.
Add activation/auto_set_activation_skip to control activation skip flagging.
Add 's(k)ip activation' bit to lvs -o lv_attr to indicate skip flag attached.
Add --ignoreactivationskip to lvcreate/vgchange/lvchange to ignore skip flag.

View File

@ -5548,18 +5548,17 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, struct l
}
}
if (seg_is_thin_volume(lp) &&
((lp->activate == CHANGE_AY) ||
(lp->activate == CHANGE_AE) ||
(lp->activate == CHANGE_ALY))) {
if (seg_is_thin_volume(lp)) {
/* Ensure all stacked messages are submitted */
if (!(lvl = find_lv_in_vg(vg, lp->pool))) {
log_error("Unable to find existing pool LV %s in VG %s.",
lp->pool, vg->name);
return NULL;
}
if (!update_pool_lv(lvl->lv, 1))
return_NULL;
if (lv_is_active(lvl->lv) ||
((lp->activate != CHANGE_AN) && (lp->activate != CHANGE_ALN)))
if (!update_pool_lv(lvl->lv, 1))
return_NULL;
}
if (vg_is_clustered(vg) && segtype_is_raid(lp->segtype)) {