Skip to contentSkip to conversation

master - lvconvert: fix return value when zeroing fails

PATCH Zdenek Kabelac 1 participant 1 message Oct 14, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=76a9a86fd359681a598a6509eb90940c3a10f1f3
Commit:        76a9a86fd359681a598a6509eb90940c3a10f1f3
Parent:        bd21736e8b082319e1a9a29e75badd906ee277f6
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Oct 14 11:54:49 2019 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Oct 14 15:13:33 2019 +0200

lvconvert: fix return value when zeroing fails

Use correct error return code for fail path.

---
 WHATS_NEW         |    1 +
 tools/lvconvert.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
index 767973c..d530d9f 100644
@@ -1,5 +1,6 @@
 Version 2.03.06 - 
 ================================
+  Fix cmd return when zering of cachevol fails.
   Extend lvs to show all VDO properties.
   Preserve VDO write policy with vdopool.
   Increase default vdo bio threads to 4.
tools/lvconvert.c +1 -1
index 60ab956..caef5d5 100644
@@ -5565,7 +5565,7 @@ static int _lvconvert_writecache_attach_single(struct cmd_context *cmd,
 
 	if (!_writecache_zero(cmd, lv_fast)) {
 		log_error("LV %s could not be zeroed.", display_lvname(lv_fast));
-		return 0;
+		return ECMD_FAILED;
 	}
 
 	/*