public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* dlm: master - dlm_controld: cpg_finalize
@ 2009-02-27 19:38 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-02-27 19:38 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=9ac73055b409083064562e25a692276ea87f1f31
Commit: 9ac73055b409083064562e25a692276ea87f1f31
Parent: 89d27a9531368b3898bc0d2c79b61d2659e0bf9f
Author: David Teigland <teigland@redhat.com>
AuthorDate: Fri Feb 27 13:33:19 2009 -0600
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Fri Feb 27 13:35:21 2009 -0600
dlm_controld: cpg_finalize
Call cpg_finalize on all our cpg handles when shutting down.
Signed-off-by: David Teigland <teigland@redhat.com>
---
group/dlm_controld/cpg.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 41a9677..1231ec9 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -2051,12 +2051,15 @@ int setup_cpg(void)
void close_cpg(void)
{
+ struct lockspace *ls;
cpg_error_t error;
struct cpg_name name;
int i = 0;
- if (!daemon_cpg_handle || cluster_down)
+ if (!daemon_cpg_handle)
return;
+ if (cluster_down)
+ goto fin;
memset(&name, 0, sizeof(name));
sprintf(name.value, "dlm:controld");
@@ -2072,6 +2075,12 @@ void close_cpg(void)
}
if (error != CPG_OK)
log_error("daemon cpg_leave error %d", error);
+ fin:
+ list_for_each_entry(ls, &lockspaces, list) {
+ if (ls->cpg_handle)
+ cpg_finalize(ls->cpg_handle);
+ }
+ cpg_finalize(daemon_cpg_handle);
}
/* fs_controld has seen nodedown for nodeid; it's now ok for dlm to do
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-27 19:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-27 19:38 dlm: master - dlm_controld: cpg_finalize David Teigland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).