cluster: RHEL6 - Revert "dlm_controld: fix save_plocks initialization"

David Teigland teigland at fedoraproject.org
Fri Aug 13 20:15:44 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9edfc44b223d8919467e02352600bfb874993b09
Commit:        9edfc44b223d8919467e02352600bfb874993b09
Parent:        85eb67286e00b4fd6e58d2c5f86ff67c5d58c0c5
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Fri Aug 13 12:17:56 2010 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Fri Aug 13 15:15:37 2010 -0500

Revert "dlm_controld: fix save_plocks initialization"

This bug description and fix were incorrect.  dlm_controld
should only begin saving plocks after the point in time where
the ckpt_node writes the checkpoint.  plock messages prior to
that will be reflected in the checkpointed state.  dlm_controld
should ignore plock messages prior to the point in time where
the ckpt_node writes the checkpoint.

This reverts commit f63677d0128c4a30d36ccf91adf37840ce08e629.
---
 group/dlm_controld/cpg.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 899d23e..2e5a1bb 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -1137,9 +1137,9 @@ static void receive_plocks_stored(struct lockspace *ls, struct dlm_header *hd,
 		return;
 	}
 
+	process_saved_plocks(ls);
 	ls->need_plocks = 0;
 	ls->save_plocks = 0;
-	process_saved_plocks(ls);
 }
 
 static void send_info(struct lockspace *ls, struct change *cg, int type,
@@ -1284,10 +1284,6 @@ static void prepare_plocks(struct lockspace *ls)
 		}
 		ls->plock_ckpt_node = our_nodeid;
 		ls->need_plocks = 0;
-		if (ls->save_plocks) {
-			ls->save_plocks = 0;
-			process_saved_plocks(ls);
-		}
 		return;
 	}
 
@@ -1300,10 +1296,7 @@ static void prepare_plocks(struct lockspace *ls)
 
 	if (!ls->plock_ckpt_node) {
 		ls->need_plocks = 0;
-		if (ls->save_plocks) {
-			ls->save_plocks = 0;
-			process_saved_plocks(ls);
-		}
+		ls->save_plocks = 0;
 		return;
 	}
 
@@ -1311,8 +1304,10 @@ static void prepare_plocks(struct lockspace *ls)
 	   existing plock state in the ckpt to the time that we read that state
 	   from the ckpt. */
 
-	if (ls->need_plocks)
+	if (ls->need_plocks) {
+		ls->save_plocks = 1;
 		return;
+	}
 
 	if (ls->plock_ckpt_node != our_nodeid)
 		return;
@@ -1794,7 +1789,6 @@ int dlm_join_lockspace(struct lockspace *ls)
 	ls->cpg_fd = fd;
 	ls->kernel_stopped = 1;
 	ls->need_plocks = 1;
-	ls->save_plocks = 1;
 	ls->joining = 1;
 
 	memset(&name, 0, sizeof(name));


More information about the cluster-commits mailing list