All of lore.kernel.org
 help / color / mirror / Atom feed
* main - lvmlockd: return error from vgcreate init_vg_sanlock
@ 2022-04-08 16:34 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2022-04-08 16:34 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d14245c72425b99c3bc33a533da46962d010871a
Commit:        d14245c72425b99c3bc33a533da46962d010871a
Parent:        99f9bb28c9bf9cc5bda14674a3827ec5164b2872
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Fri Apr 8 11:28:53 2022 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Fri Apr 8 11:34:04 2022 -0500

lvmlockd: return error from vgcreate init_vg_sanlock

in vgcreate for shared sanlock vg, if sanlock_write_resource
returns an unexpected error, then make init_vg_sanlock fail
which will cause the vgcreate to fail.
---
 daemons/lvmlockd/lvmlockd-sanlock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c
index 3f078ea41..3f3ee14f3 100644
--- a/daemons/lvmlockd/lvmlockd-sanlock.c
+++ b/daemons/lvmlockd/lvmlockd-sanlock.c
@@ -684,10 +684,10 @@ int lm_init_vg_sanlock(char *ls_name, char *vg_name, uint32_t flags, char *vg_ar
 			break;
 		}
 
-		if (rv) {
+		if (rv < 0) {
 			log_error("clear lv resource area %llu error %d",
 				  (unsigned long long)offset, rv);
-			break;
+			return rv;
 		}
 		offset += align_size;
 	}


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

only message in thread, other threads:[~2022-04-08 16:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-08 16:34 main - lvmlockd: return error from vgcreate init_vg_sanlock David Teigland

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.