master - thin: fix volume_list support
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0794a10f91557d58e865faff4c60aef6336ecf22 Commit: 0794a10f91557d58e865faff4c60aef6336ecf22 Parent: 1ee5e18a7b446bc08d99a5638fc4463e459b34d3 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Aug 26 12:10:29 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Aug 26 14:10:18 2014 +0200
thin: fix volume_list support
Fixing problem, when user sets volume_list and excludes thin pools from activation. In this case pool return 'success' for skipped activation.
We need to really check the volume it is actually active to properly to remove queued pool messages. Otherwise the lvm2 and kernel metadata started to go async since lvm2 believed, messages were submitted.
Add also better check for threshold when create a new thin volume. In this case we require local activation of thin pool so we are able to check pool fullness.
--- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 10 +-------- lib/metadata/thin_manip.c | 50 +++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 48 insertions(+), 13 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.110 - ================================== + Fix manipulation with thin-pools which are excluded via volume_list. Support lv/vgremove -ff to remove thin vols from broken/inactive thin pools. Fix typo breaking configure --with-lvm1=shared. Modify lvresize code to handle raid/mirrors and physical extents.
lib/metadata/lv_manip.c +1 -9
@@ -6816,15 +6816,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,return NULL ; } -if (lv_is_active_locally (lvl->lv) && - !pool_below_threshold (first_seg (lvl->lv))) { -log_error ("Cannot create thin volume. Pool \"%s/%s\" " -"is filled over the autoextend threshold." , - lvl->lv->vg->name, lvl->lv->name); -return NULL ; - } - -if ((lv_is_active (lvl->lv) ||is_change_activating (lp->activate)) && +if ((pool_is_active (lvl->lv) ||is_change_activating (lp->activate)) && !update_pool_lv (lvl->lv,1 )) return_NULL;
lib/metadata/thin_manip.c +46 -4
79 lines not on this page · raw message