]> sourceware.org Git - lvm2.git/commitdiff
lvconvert more test for thin external origin
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 6 Oct 2014 11:15:31 +0000 (13:15 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 6 Oct 2014 13:21:36 +0000 (15:21 +0200)
Some LV types were not properly disallowed to be used as external origin.

WHATS_NEW
tools/lvconvert.c

index 5fc42d6697296064560b2c1d26f6c49a04082554..6b768eab8eade5ab3b72fc3645f7a503cfef9ba9 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.112 - 
 =====================================
+  Fix detection of unsupported thin external lvconversions.
   Fix detection of unsupported cache and thin pool lvconversions.
   Fix detection of unsupported lvconversion of cache to snapshot.
   Improve code for creation of cache and cache pool volumes.
index 36fafbeaf73f8e788bf8dfa78c43db4ef58ddacc..070c5e4652c5a9b2e901c6a3cfd30ecd59889dc8 100644 (file)
@@ -2664,8 +2664,13 @@ static int _lvconvert_thin(struct cmd_context *cmd,
                return 0;
        }
 
-       if (lv_is_pool(lv)) {
-               log_error("Can't use pool %s as external origin.",
+       if (lv_is_cache_type(lv) ||
+           lv_is_cow(lv) ||
+           lv_is_pool(lv) ||
+           lv_is_thin_pool_data(lv) ||
+           lv_is_thin_pool_metadata(lv)) {
+               log_error("Can't use %s %s as external origin.",
+                         first_seg(lv)->segtype->name,
                          display_lvname(lv));
                return 0;
        }
This page took 0.050219 seconds and 5 git commands to generate.