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

David Teigland teigland at fedoraproject.org
Fri Aug 13 20:19:48 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0c4f1f6b3d8622932af804a86cfe5d72401c253f
Commit:        0c4f1f6b3d8622932af804a86cfe5d72401c253f
Parent:        9c9a67d281402ad0611233da958a68c6a9ec6e5c
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Fri Aug 13 15:19:07 2010 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Fri Aug 13 15:19:07 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 a85ea6fa4321504535ef8b6f60a914e094b5ede7.
---
 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