]> sourceware.org Git - lvm2.git/commitdiff
lvcreate: fix activation of cached LV
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 5 Mar 2018 11:54:39 +0000 (12:54 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 6 Mar 2018 14:39:27 +0000 (15:39 +0100)
Since LV for caching can be already a stacked LV, proper activation
needs to use lock holding LV.

WHATS_NEW
tools/lvcreate.c

index 49b995e29a698ea52aa4dc3f9d2b471e858e7ff3..3ed3e5a20661c8468c12864b1cd3dc9996456789 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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.
index 7f86a37312285c9dd221a014bab445c6427fc6ee..e901968d70e2abb9fbab57bc1bdc2ca80e06d312 100644 (file)
@@ -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)) {
This page took 0.04326 seconds and 5 git commands to generate.