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

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=96643d0de820ef72c6e93736bcd5a01b72ff5d89
Commit:        96643d0de820ef72c6e93736bcd5a01b72ff5d89
Parent:        017303d85ab16c30464c43e4ca9041445cc40be4
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:30:40 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 0bcaab2..c4dc2be 100644
--- a/group/gfs_controld/gfs_daemon.h
+++ b/group/gfs_controld/gfs_daemon.h
@@ -158,6 +158,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:54 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=20090310205429.F36761202D2@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).