From 54a85628042892bf852015dcff008b8e678d01cd Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 27 Jun 2024 12:39:12 -0500 Subject: [PATCH] lvmlockd: after restart use existing dlm global lockspace If lvmlockd is killed and restarted, let it adopt the existing global lockspace. --- daemons/lvmlockd/lvmlockd-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c index ee1dbadab..5653fe7df 100644 --- a/daemons/lvmlockd/lvmlockd-core.c +++ b/daemons/lvmlockd/lvmlockd-core.c @@ -2521,6 +2521,11 @@ static void *lockspace_thread_main(void *arg_in) } pthread_mutex_unlock(&ls->mutex); + if (ls->lm_type == LD_LM_DLM && !strcmp(gl_lsname_dlm, ls->name)) { + log_debug("dlm global lockspace adopt_ok"); + adopt_ok = 1; + } + log_debug("S %s lm_add_lockspace %s wait %d adopt_only %d adopt_ok %d", ls->name, lm_str(ls->lm_type), wait_flag, adopt_only, adopt_ok);