This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dlm: master - dlm_controld: cpg_finalize


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]