This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dlm: master - dlm_controld: fix skipping lock spaces


Gitweb:        http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=8a6e8d42451575cb3e9570987e8e25ed2d870b89
Commit:        8a6e8d42451575cb3e9570987e8e25ed2d870b89
Parent:        b99cddf769890627cf36bc3745d1b72da434f5e3
Author:        Lars Marowsky-Bree <lmb@suse.de>
AuthorDate:    Mon Aug 10 21:44:44 2009 +0200
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Mon Aug 10 17:33:59 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 <lmb@suse.de>
Signed-off-by: David Teigland <teigland@redhat.com>
---
 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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]