From 16060b101bdb541376fdfd7c0e6cac8cf73c0271 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 14 Oct 2012 19:43:25 +0200 Subject: [PATCH] thin: lvextend will fail is autoextend is 0% Since extending by 0% will not increase the size of pool, return failure. --- WHATS_NEW | 1 + tools/lvresize.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index a170bfede..d60cad5a8 100644 --- 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. diff --git a/tools/lvresize.c b/tools/lvresize.c index 18e5917fd..4c9580d12 100644 --- a/tools/lvresize.c +++ b/tools/lvresize.c @@ -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",