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]

gfs2-utils: master - gfs_controld: cpg_finalize


Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=3bdbc3376282937d35c4333d7c64d77ddeb7b418
Commit:        3bdbc3376282937d35c4333d7c64d77ddeb7b418
Parent:        ccca8b92ed7ec7196ce0ae5ae2499bcc523ed7f5
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Fri Feb 27 13:41:12 2009 -0600
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Fri Feb 27 13:42:40 2009 -0600

gfs_controld: cpg_finalize

Call cpg_finalize on all our cpg handles when shutting down.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 group/gfs_controld/cpg-new.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c
index 9d8d5dd..ed02931 100644
--- a/group/gfs_controld/cpg-new.c
+++ b/group/gfs_controld/cpg-new.c
@@ -3236,12 +3236,15 @@ int setup_cpg(void)
 
 void close_cpg(void)
 {
+	struct mountgroup *mg;
 	cpg_error_t error;
 	struct cpg_name name;
 	int i = 0;
 
-	if (!cpg_handle_daemon || cluster_down)
+	if (!cpg_handle_daemon)
 		return;
+	if (cluster_down)
+		goto fin;
 
 	memset(&name, 0, sizeof(name));
 	sprintf(name.value, "gfs:controld");
@@ -3257,6 +3260,12 @@ void close_cpg(void)
 	}
 	if (error != CPG_OK)
 		log_error("daemon cpg_leave error %d", error);
+ fin:
+	list_for_each_entry(mg, &mountgroups, list) {
+		if (mg->cpg_handle)
+			cpg_finalize(mg->cpg_handle);
+	}
+	cpg_finalize(cpg_handle_daemon);
 }
 
 int setup_dlmcontrol(void)


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