All of lore.kernel.org
 help / color / mirror / Atom feed
* master - resize: continue change for getting vdo status before resize
@ 2019-10-04 15:33 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2019-10-04 15:33 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6a9a4b45341cc62b103bf167e96bbdb5f542476e
Commit:        6a9a4b45341cc62b103bf167e96bbdb5f542476e
Parent:        cb5f0bdba988c826b8edee06e139cff62eeffeb8
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Wed Oct 2 14:50:12 2019 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Oct 4 17:31:55 2019 +0200

resize: continue change for getting vdo status before resize

Continue commit a98b77c16455ee97f5bd4b89536a3ae4efd8e009.
There needs to be error reported when status can't be obtained.
---
 lib/metadata/lv_manip.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 47ff167..ebdb0cb 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4852,7 +4852,7 @@ static int _lvresize_adjust_policy(const struct logical_volume *lv,
 
 	if (lv_is_thin_pool(lv)) {
 		if (!lv_thin_pool_percent(lv, 1, &percent))
-			return_0;
+			goto_bad;
 
 		/* Resize below the minimal usable value */
 		min_threshold = pool_metadata_min_threshold(first_seg(lv)) / DM_PERCENT_1;
@@ -4860,13 +4860,14 @@ static int _lvresize_adjust_policy(const struct logical_volume *lv,
 					      min_threshold : policy_threshold, policy_amount);
 
 		if (!lv_thin_pool_percent(lv, 0, &percent))
-			return_0;
+			goto_bad;
 	} else if (lv_is_vdo_pool(lv)) {
 		if (!lv_vdo_pool_percent(lv, &percent))
-			return_0;
+			goto_bad;
 	} else if (!lv_snapshot_percent(lv, &percent))
-			return_0;
+			goto_bad;
 	else if (!lv_is_active(lv)) {
+	bad:
 		log_error("Can't read state of locally inactive LV %s.",
 			  display_lvname(lv));
 		return 0;



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-04 15:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 15:33 master - resize: continue change for getting vdo status before resize Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.