All of lore.kernel.org
 help / color / mirror / Atom feed
* master - raid: report error when specified devices are not contained
@ 2017-06-21 10:36 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2017-06-21 10:36 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=61980bcf0624790bfdc07d371fd510d1c4079fb5
Commit:        61980bcf0624790bfdc07d371fd510d1c4079fb5
Parent:        31d153ced07dda004cff3a67a6e9a740b52253fd
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Wed Jun 21 11:45:20 2017 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Jun 21 12:35:17 2017 +0200

raid: report error when specified devices are not contained

lvm2 always return non-zero error code when action cannot happen.
---
 lib/metadata/raid_manip.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index ab89bdf..31fb0f7 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -6660,9 +6660,9 @@ static int _lv_raid_rebuild_or_replace(struct logical_volume *lv,
 	}
 
 	if (!match_count) {
-		log_print_unless_silent("%s does not contain devices specified to %s.",
-					display_lvname(lv), action_str);
-		return 1;
+		log_error("Logical volume %s does not contain devices specified to %s.",
+			  display_lvname(lv), action_str);
+		return 0;
 	} else if (match_count == raid_seg->area_count) {
 		log_error("Unable to %s all PVs from %s at once.",
 			  action_str, display_lvname(lv));



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

only message in thread, other threads:[~2017-06-21 10:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 10:36 master - raid: report error when specified devices are not contained 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.