From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - lvmlockd: cleanup after sanlock_rem_lockspace error
Date: Tue, 4 Jan 2022 20:57:44 +0000 (GMT) [thread overview]
Message-ID: <20220104205744.236513858C2C@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=42a16aa6f34d801bfea169b4f6d1fef5d89961f6
Commit: 42a16aa6f34d801bfea169b4f6d1fef5d89961f6
Parent: 04fbffb116eaf5fb1b10785df92966d0083b270f
Author: David Teigland <teigland@redhat.com>
AuthorDate: Tue Jan 4 14:47:31 2022 -0600
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Tue Jan 4 14:53:47 2022 -0600
lvmlockd: cleanup after sanlock_rem_lockspace error
When storage is lost under a sanlock VG, and kill_vg/drop_vg
are used, sanlock_rem_lockspace() may return an error, but
the cleanup steps should still be performed. Without the
cleanup, gl_lsname_sanlock was not cleared. This caused
future lock requests to fail with ENOLS, but the NO_GL_LS
flag was not set due to gl_lsname_sanlock being set.
This caused lockd_global(sh) in lvm commands to fail when
they could succeed.
Fix from guozhonghua216
---
daemons/lvmlockd/lvmlockd-sanlock.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c
index e595eeffd..3f078ea41 100644
--- a/daemons/lvmlockd/lvmlockd-sanlock.c
+++ b/daemons/lvmlockd/lvmlockd-sanlock.c
@@ -1576,10 +1576,8 @@ int lm_rem_lockspace_sanlock(struct lockspace *ls, int free_vg)
goto out;
rv = sanlock_rem_lockspace(&lms->ss, 0);
- if (rv < 0) {
+ if (rv < 0)
log_error("S %s rem_lockspace_san error %d", ls->name, rv);
- return rv;
- }
if (free_vg) {
/*
reply other threads:[~2022-01-04 20:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220104205744.236513858C2C@sourceware.org \
--to=teigland@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.