public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: David Teigland <teigland@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - dlm_controld: finalize ckpt handle
Date: Fri, 27 Feb 2009 19:58:00 -0000	[thread overview]
Message-ID: <20090227195736.40E48120154@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4553dd7afb243f4a3943bb26226b43111a2e7b05
Commit:        4553dd7afb243f4a3943bb26226b43111a2e7b05
Parent:        6c2304bf9a67deadab50c67904d22debcbde6250
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Fri Feb 27 13:53:55 2009 -0600
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Fri Feb 27 13:53:55 2009 -0600

dlm_controld: finalize ckpt handle

when shutting down

Signed-off-by: David Teigland <teigland@redhat.com>
---
 group/dlm_controld/dlm_daemon.h |    1 +
 group/dlm_controld/main.c       |    4 +++-
 group/dlm_controld/plock.c      |    9 +++++++++
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/group/dlm_controld/dlm_daemon.h b/group/dlm_controld/dlm_daemon.h
index 8173192..60c48cd 100644
--- a/group/dlm_controld/dlm_daemon.h
+++ b/group/dlm_controld/dlm_daemon.h
@@ -292,6 +292,7 @@ void process_netlink(int ci);
 
 /* plock.c */
 int setup_plocks(void);
+void close_plocks(void);
 void process_plocks(int ci);
 int limit_plocks(void);
 void receive_plock(struct lockspace *ls, struct dlm_header *hd, int len);
diff --git a/group/dlm_controld/main.c b/group/dlm_controld/main.c
index afc8022..cace8d1 100644
--- a/group/dlm_controld/main.c
+++ b/group/dlm_controld/main.c
@@ -1016,8 +1016,10 @@ static void loop(void)
  out:
 	if (cfgd_groupd_compat)
 		close_groupd();
-	if (group_mode == GROUP_LIBCPG)
+	if (group_mode == GROUP_LIBCPG) {
 		close_cpg();
+		close_plocks();
+	}
 	clear_configfs();
 	close_logging();
 	close_ccs();
diff --git a/group/dlm_controld/plock.c b/group/dlm_controld/plock.c
index 9a8215b..2acfe62 100644
--- a/group/dlm_controld/plock.c
+++ b/group/dlm_controld/plock.c
@@ -186,6 +186,15 @@ int setup_plocks(void)
 	return plock_device_fd;
 }
 
+void close_plocks(void)
+{
+	if (system_ckpt_handle)
+		saCkptFinalize(system_ckpt_handle);
+	if (plock_device_fd > 0)
+		close(plock_device_fd);
+
+}
+
 static uint32_t mg_to_ls_id(uint32_t fsid)
 {
 	struct lockspace *ls;


                 reply	other threads:[~2009-02-27 19:58 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=20090227195736.40E48120154@lists.fedorahosted.org \
    --to=teigland@fedoraproject.org \
    --cc=cluster-cvs-relay@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 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).