]> sourceware.org Git - lvm2.git/commitdiff
thin: lvextend will fail is autoextend is 0%
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 14 Oct 2012 17:43:25 +0000 (19:43 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Sun, 14 Oct 2012 21:17:30 +0000 (23:17 +0200)
Since extending by 0% will not increase the size of pool,
return failure.

WHATS_NEW
tools/lvresize.c

index a170bfede6f2ecca3f017d0377b7aef95525cf82..d60cad5a8887322040ee632cf7af73a949d44495 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.98 -
 =================================
+  Using autoextend percent 0 for thin pool fails 'lvextend --use-policies'.
   Introduce blkdeactivate script.
   Implement devices/global_filter (affects lvmetad).
   Make vgscan --cache an alias to pvscan --cache.
index 18e5917fd6ae3d143cea4bb070098aa73280337c..4c9580d129fbee546076e2828c3ed1db0d9de115 100644 (file)
@@ -293,6 +293,8 @@ static int _adjust_policy_params(struct cmd_context *cmd,
                policy_amount =
                        find_config_tree_int(cmd, "activation/thin_pool_autoextend_percent",
                                             DEFAULT_THIN_POOL_AUTOEXTEND_PERCENT);
+               if (!policy_amount && policy_threshold < PERCENT_100)
+                        return 0;
        } else {
                policy_threshold =
                        find_config_tree_int(cmd, "activation/snapshot_autoextend_threshold",
This page took 0.041154 seconds and 5 git commands to generate.