dlm: master - dlm_controld: avoid mismatching messages with old cgs
David Teigland
teigland at fedoraproject.org
Tue Feb 5 22:22:43 UTC 2013
Gitweb: http://git.fedorahosted.org/git/?p=dlm.git;a=commitdiff;h=956ddcebf026e2c2b560c808984293502054ff16
Commit: 956ddcebf026e2c2b560c808984293502054ff16
Parent: 6368f44ec16c9ce8a61c2304729930cbae55388d
Author: David Teigland <teigland at redhat.com>
AuthorDate: Thu Jan 31 12:03:28 2013 -0600
Committer: David Teigland <teigland at redhat.com>
CommitterDate: Thu Jan 31 12:47:52 2013 -0600
dlm_controld: avoid mismatching messages with old cgs
Only match start messages with cg's that are newer than
previously matched cg's for the node.
(copying fix from cluster.git
2a68bd042a771483b8f78b70654694a3c1ea15ae)
Signed-off-by: David Teigland <teigland at redhat.com>
---
dlm_controld/cpg.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlm_controld/cpg.c b/dlm_controld/cpg.c
index f2582a8..b299c6f 100644
--- a/dlm_controld/cpg.c
+++ b/dlm_controld/cpg.c
@@ -41,6 +41,8 @@ struct node {
int lockspace_member;
int lockspace_fail_reason;
+ uint32_t last_match_seq;
+
uint64_t start_time;
int check_fs;
@@ -819,6 +821,12 @@ static int match_change(struct lockspace *ls, struct change *cg,
return 0;
}
+ if (node->last_match_seq > cg->seq) {
+ log_group(ls, "match_change %d:%u skip cg %u last matched cg %u",
+ hd->nodeid, seq, cg->seq, node->last_match_seq);
+ return 0;
+ }
+
/* verify this is the right change by matching the counts
and the nodeids of the current members */
@@ -850,6 +858,8 @@ static int match_change(struct lockspace *ls, struct change *cg,
if (members_mismatch)
return 0;
+ node->last_match_seq = cg->seq;
+
log_group(ls, "match_change %d:%u matches cg %u", hd->nodeid, seq,
cg->seq);
return 1;
More information about the cluster-commits
mailing list