From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5193 invoked by alias); 10 Aug 2009 22:43:17 -0000 Received: (qmail 5186 invoked by alias); 10 Aug 2009 22:43:16 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-2.0 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 bastion2.fedora.phx.redhat.com Subject: cluster: STABLE3 - dlm_controld: fix skipping lock spaces To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE3 X-Git-Reftype: branch X-Git-Oldrev: 64936eeb02eac9e7f17d686b32c5a664663fc196 X-Git-Newrev: 9985ba482e1092436b426630ea073cbbae47cc45 From: David Teigland Message-Id: <20090810224248.1AB8C1201F1@lists.fedorahosted.org> Date: Mon, 10 Aug 2009 22:43: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-q3/txt/msg00177.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9985ba482e1092436b426630ea073cbbae47cc45 Commit: 9985ba482e1092436b426630ea073cbbae47cc45 Parent: 64936eeb02eac9e7f17d686b32c5a664663fc196 Author: Lars Marowsky-Bree AuthorDate: Mon Aug 10 21:44:44 2009 +0200 Committer: David Teigland CommitterDate: Mon Aug 10 16:25:24 2009 -0500 dlm_controld: fix skipping lock spaces With several lock spaces, there was a chance that poll_fencing, poll_quorum, or poll_fs were reset after the earlier lock spaces had been iterated over by process_lockspace_changes(). This would cause the earlier lock spaces to not be recovered, since process_lockspace_changes() would not be called again from the main loop. This fixes bugzilla.novell.com #528425. Signed-off-by: Lars Marowsky-Bree Signed-off-by: David Teigland --- group/dlm_controld/cpg.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c index 9e26028..1704986 100644 --- a/group/dlm_controld/cpg.c +++ b/group/dlm_controld/cpg.c @@ -651,26 +651,23 @@ static int wait_conditions_done(struct lockspace *ls) just the latest change */ if (!check_fencing_done(ls)) { - poll_fencing = 1; + poll_fencing++; return 0; } - poll_fencing = 0; /* even though fencing also waits for quorum, checking fencing isn't sufficient because we don't want to start new lockspaces in an inquorate cluster */ if (!check_quorum_done(ls)) { - poll_quorum = 1; + poll_quorum++; return 0; } - poll_quorum = 0; if (!check_fs_done(ls)) { - poll_fs = 1; + poll_fs++; return 0; } - poll_fs = 0; return 1; } @@ -1166,6 +1163,9 @@ void process_lockspace_changes(void) { struct lockspace *ls, *safe; + poll_fencing = 0; + poll_quorum = 0; + poll_fs = 0; list_for_each_entry_safe(ls, safe, &lockspaces, list) { if (!list_empty(&ls->changes)) apply_changes(ls);