dlm: master - dlm_controld: fix plock signature in stored message
David Teigland
teigland at fedoraproject.org
Fri Aug 13 17:02:02 UTC 2010
Gitweb: http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=9ad6aa0dadde3997e0fe8018af06db99fe13ba82
Commit: 9ad6aa0dadde3997e0fe8018af06db99fe13ba82
Parent: a83d1f5eeb9c01a346be32b8effb78553ccb7984
Author: David Teigland <teigland at redhat.com>
AuthorDate: Fri Aug 13 12:00:58 2010 -0500
Committer: David Teigland <teigland at redhat.com>
CommitterDate: Fri Aug 13 12:00:58 2010 -0500
dlm_controld: fix plock signature in stored message
When confchg's change the ckpt_node between plock checkpoints
being written, and the plocks_stored message being received,
the plocks_stored message is resent by the new ckpt_node that
didn't write the checkpoint.
The new ckpt_node needs to save the plock checkpoint signature
that was sent in the first plocks_stored message from the
checkpoint writer, and reuse it when sending the new
plocks_stored method. Otherwise the plock signature in the
stored message will be invalid.
bz 623816
Signed-off-by: David Teigland <teigland at redhat.com>
---
group/dlm_controld/cpg.c | 8 +++++++-
group/dlm_controld/dlm_daemon.h | 1 +
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index a9cc61e..899d23e 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -1099,6 +1099,8 @@ static void receive_plocks_stored(struct lockspace *ls, struct dlm_header *hd,
"need_plocks %d", hd->nodeid, hd->msgdata, hd->flags,
hd->msgdata2, ls->need_plocks);
+ ls->last_plock_sig = hd->msgdata2;
+
if (!ls->need_plocks)
return;
@@ -1329,8 +1331,12 @@ static void prepare_plocks(struct lockspace *ls)
the previous stored message. They will read the ckpt from the
previous ckpt_node upon receiving the stored message from us. */
- if (nodes_added(ls))
+ if (nodes_added(ls)) {
store_plocks(ls, &sig);
+ ls->last_plock_sig = sig;
+ } else {
+ sig = ls->last_plock_sig;
+ }
send_plocks_stored(ls, sig);
}
diff --git a/group/dlm_controld/dlm_daemon.h b/group/dlm_controld/dlm_daemon.h
index 0b0e9f2..71e3bf4 100644
--- a/group/dlm_controld/dlm_daemon.h
+++ b/group/dlm_controld/dlm_daemon.h
@@ -216,6 +216,7 @@ struct lockspace {
uint64_t checkpoint_r_num_last;
uint32_t checkpoint_r_count;
uint32_t checkpoint_p_count;
+ uint32_t last_plock_sig;
/* deadlock stuff */
More information about the cluster-commits
mailing list