Skip to contentSkip to conversation

master - debug: add missing internal error message

PATCH Zdenek Kabelac 1 participant 1 message Jun 23, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a7c7d53543c37e9a3366b88399d4f7c8be2ddf58
Commit:        a7c7d53543c37e9a3366b88399d4f7c8be2ddf58
Parent:        1bdcd156fdbd007bc6c31ec4077d8215baf5a0af
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jun 23 14:41:10 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Jun 23 18:44:01 2017 +0200

debug: add missing internal error message

Do not just 'return_0' log error would need to be shown.

---
 lib/metadata/raid_manip.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
lib/metadata/raid_manip.c +5 -2
index 6bd0fb2..74fafa3 100644
@@ -6090,8 +6090,11 @@ static int _region_size_change_requested(struct logical_volume *lv, int yes, con
 		return_0;
 
 	/* CLI validation provides the check but be caucious... */
-	if (!lv_is_raid(lv) || !seg || seg_is_any_raid0(seg))
-		return_0;
+	if (!lv_is_raid(lv) || !seg || seg_is_any_raid0(seg)) {
+		log_error(INTERNAL_ERROR "Cannot change region size of %s.",
+			  display_lvname(lv));
+		return 0;
+	}
 
 	if (region_size == seg->region_size) {
 		log_error("Region size is already %s on %s LV %s.",