summaryrefslogtreecommitdiffstats
path: root/tools/vgchange.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2011-10-28 20:28:00 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2011-10-28 20:28:00 +0000
commita1d5aaf725ad8de72f605abea6614ba8938c5beb (patch)
treef018288aff5fa78b043e7b2a4af8dddb2c59c8c9 /tools/vgchange.c
parent2721175d557b506515a9fc439f4a89a717e7a1d5 (diff)
downloadlvm2-a1d5aaf725ad8de72f605abea6614ba8938c5beb.tar.gz
lvm2-a1d5aaf725ad8de72f605abea6614ba8938c5beb.tar.xz
lvm2-a1d5aaf725ad8de72f605abea6614ba8938c5beb.zip
Thin pool activation change
To ensure we properly handle LV cluster locking - explicitely do not allow to change the availability of the thin pool that is in use for some thin LV. As soon as the thin volume is created the only way to activate pool is via implicit dependency. Ignore thinpool open count for lv/vgchange operations.
Diffstat (limited to 'tools/vgchange.c')
-rw-r--r--tools/vgchange.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c
index fd4e4208..8cb0e230 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -100,6 +100,10 @@ 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);