master - lvcreate: fix activation of cached LV
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=23de09aeb87ec10bd1a553ea8868e2f946117232 Commit: 23de09aeb87ec10bd1a553ea8868e2f946117232 Parent: b2f1254c14b7b86789e542be14041252a652eec2 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Mar 5 12:54:39 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Mar 6 15:39:27 2018 +0100
lvcreate: fix activation of cached LV
Since LV for caching can be already a stacked LV, proper activation needs to use lock holding LV.
--- WHATS_NEW | 1 + tools/lvcreate.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.178 - ===================================== + Activate correct lock holding LV when it is cached. Do not modify archived metadata when removing striped raid. Fix memleak on error path when obtaining lv_raid_data_offset. Fix compatibility size test of extended external origin.
tools/lvcreate.c +2 -0
@@ -1222,6 +1222,8 @@ static int _determine_cache_argument(struct volume_group *vg, return_0;/* FIXME */ /* Put origin into resulting activation state first */ + lv = (struct logical_volume *)lv_lock_holder (lv); +if (is_change_activating (lp->activate)) {if ((lp->activate ==CHANGE_AAY ) && !lv_passes_auto_activation_filter (cmd, lv)) {