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: gfs2-utils: master - gfs_controld: wait for dlm registration
Date: Tue, 10 Mar 2009 20:57:00 -0000	[thread overview]
Message-ID: <20090310205733.84CC51202D2@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=4d9ddb037da27f04ba0dd7760e11f84b81c190eb
Commit:        4d9ddb037da27f04ba0dd7760e11f84b81c190eb
Parent:        ec9ec0451669c081bde50ad41280b94aa2e0c11b
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Tue Mar 10 15:30:40 2009 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Tue Mar 10 15:53:30 2009 -0500

gfs_controld: wait for dlm registration

The dlm registration result generally comes back right away, but to cover
all cases we need to record that it happens and wait to mount until it's
complete.

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

diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c
index ed02931..f15e3e5 100644
--- a/group/gfs_controld/cpg-new.c
+++ b/group/gfs_controld/cpg-new.c
@@ -680,8 +680,14 @@ void process_dlmcontrol(int ci)
 		node->dlm_notify_result = result;
 
 	} else if (type == DLMC_RESULT_REGISTER) {
-		log_group(mg, "process_dlmcontrol register nodeid %d result %d",
-			  nodeid, result);
+		if (result) {
+			/* shouldn't happen */
+			log_error("process_dlmcontrol register %d", result);
+		} else
+			log_group(mg, "process_dlmcontrol register %d", result);
+
+		mg->dlm_registered = 1;
+
 	} else {
 		log_group(mg, "process_dlmcontrol unknown type %d", type);
 	}
@@ -752,6 +758,11 @@ static int check_dlm_notify_done(struct mountgroup *mg)
 
 static int wait_conditions_done(struct mountgroup *mg)
 {
+	if (!mg->dlm_registered) {
+		log_group(mg, "wait_conditions need dlm register");
+		return 0;
+	}
+
 	if (mg->first_recovery_needed) {
 		log_group(mg, "wait_conditions skip for first_recovery_needed");
 		return 1;
diff --git a/group/gfs_controld/gfs_daemon.h b/group/gfs_controld/gfs_daemon.h
index 913325c..08f42c3 100644
--- a/group/gfs_controld/gfs_daemon.h
+++ b/group/gfs_controld/gfs_daemon.h
@@ -143,6 +143,7 @@ struct mountgroup {
 	struct list_head        changes;
 	struct list_head        node_history;
 	struct list_head	journals;
+	int			dlm_registered;
 	int			dlm_notify_nodeid;
 	int			first_done_uevent;
 	int			first_recovery_needed;


                 reply	other threads:[~2009-03-10 20:57 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=20090310205733.84CC51202D2@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).