public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* master - cman: replace high_nodeid with votes in transition message
@ 2008-11-10 11:32 Christine Caulfield
  0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2008-11-10 11:32 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c9a9dd8d880708539acd36e753e578a5c3a40478
Commit:        c9a9dd8d880708539acd36e753e578a5c3a40478
Parent:        1145ef937c6b5e6a34e039c8f865f6a2086db15c
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Mon Nov 10 11:28:40 2008 +0000
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Mon Nov 10 11:28:40 2008 +0000

cman: replace high_nodeid with votes in transition message

This is for forward-compatibility with future quorum service. high_nodeid
was never used so I've use that slot for votes and incremented the minor
number so we know what's going on.

This patch is already in STABLE2

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 cman/daemon/cnxman-private.h |    4 ++--
 cman/daemon/commands.c       |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cman/daemon/cnxman-private.h b/cman/daemon/cnxman-private.h
index 3666b10..002480d 100644
--- a/cman/daemon/cnxman-private.h
+++ b/cman/daemon/cnxman-private.h
@@ -3,7 +3,7 @@
 
 /* Protocol Version triplet */
 #define CNXMAN_MAJOR_VERSION 6
-#define CNXMAN_MINOR_VERSION 1
+#define CNXMAN_MINOR_VERSION 2
 #define CNXMAN_PATCH_VERSION 0
 
 struct cman_timer
@@ -46,7 +46,7 @@ struct cl_transmsg {
 	unsigned char cmd;
 	unsigned char first_trans;
 	uint16_t cluster_id;
-	int high_nodeid;
+	int votes;
 	int expected_votes;
 
 	unsigned int   major_version;	/* Not backwards compatible */
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 384a5d1..a9570cf 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1644,7 +1644,7 @@ void send_transition_msg(int last_memb_count, int first_trans)
 	P_MEMB("sending TRANSITION message. cluster_name = %s\n", cluster_name);
 	msg->cmd = CLUSTER_MSG_TRANSITION;
 	msg->first_trans = first_trans;
-	msg->high_nodeid = get_highest_nodeid();
+	msg->votes = us->votes;
 	msg->expected_votes = us->expected_votes;
 	msg->cluster_id = cluster_id;
 	msg->major_version = CNXMAN_MAJOR_VERSION;
@@ -1694,7 +1694,7 @@ static void byteswap_internal_message(char *data)
 	case CLUSTER_MSG_TRANSITION:
 		transmsg = (struct cl_transmsg *)data;
 		transmsg->cluster_id = swab16(transmsg->cluster_id);
-		transmsg->high_nodeid = swab32(transmsg->high_nodeid);
+		transmsg->votes = swab32(transmsg->votes);
 		transmsg->expected_votes = swab32(transmsg->expected_votes);
 		transmsg->major_version = swab32(transmsg->major_version);
 		transmsg->minor_version = swab32(transmsg->minor_version);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-10 11:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-10 11:32 master - cman: replace high_nodeid with votes in transition message Christine Caulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).