From 7da384592667b55040afdd25a6136e6198e875ef Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 9 Jan 2012 12:31:52 +0000 Subject: [PATCH] Check for error code in _adjust_policy_params If error is detected in _adjust_policy_params, break further command processing. --- WHATS_NEW | 1 + tools/lvresize.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index f03bd0f0b..cd3ce8fe3 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.89 - ================================== + Add check for error in _adjust_policy_params() (lvextend --use-policies). Supports rounding of percentage (%LV, %VG...) for LV resize upward. Use dmeventd_lvm2_command in dmeventd plugins snapshot, raid, mirror. Add helper dmeventd_lvm2_command() into libdevmapper-event-lvm2 library. diff --git a/tools/lvresize.c b/tools/lvresize.c index e867deffc..170a342bb 100644 --- a/tools/lvresize.c +++ b/tools/lvresize.c @@ -421,7 +421,8 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg, log_error("Policy-based resize is supported only for snapshot and thin pool volumes."); return ECMD_FAILED; } - _adjust_policy_params(cmd, lv, lp); + if (!_adjust_policy_params(cmd, lv, lp)) + return ECMD_FAILED; } if (!lv_is_visible(lv)) {