From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13101 invoked by alias); 10 Mar 2009 20:57:52 -0000 Received: (qmail 13021 invoked by alias); 10 Mar 2009 20:57:52 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion.fedora.phx.redhat.com Subject: gfs2-utils: master - gfs_controld: wait for dlm registration To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: gfs2-utils.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: ec9ec0451669c081bde50ad41280b94aa2e0c11b X-Git-Newrev: 4d9ddb037da27f04ba0dd7760e11f84b81c190eb From: David Teigland Message-Id: <20090310205733.84CC51202D2@lists.fedorahosted.org> Date: Tue, 10 Mar 2009 20:57:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00735.txt.bz2 Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=4d9ddb037da27f04ba0dd7760e11f84b81c190eb Commit: 4d9ddb037da27f04ba0dd7760e11f84b81c190eb Parent: ec9ec0451669c081bde50ad41280b94aa2e0c11b Author: David Teigland AuthorDate: Tue Mar 10 15:30:40 2009 -0500 Committer: David Teigland 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 --- 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;