[PATCH 1/3] votequorum: drop NODESTATE_LEAVING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx>

this is another leftover from cman compatibility layer

Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx>
---
 exec/votequorum.c             |    9 ++-------
 include/corosync/votequorum.h |    1 -
 test/testvotequorum1.c        |    3 ---
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/exec/votequorum.c b/exec/votequorum.c
index 5433e81..98451ab 100644
--- a/exec/votequorum.c
+++ b/exec/votequorum.c
@@ -146,8 +146,7 @@ static int votequorum_exec_send_reconfigure(uint8_t param, unsigned int nodeid,
 typedef enum {
 	NODESTATE_JOINING=1,
 	NODESTATE_MEMBER,
-	NODESTATE_DEAD,
-	NODESTATE_LEAVING
+	NODESTATE_DEAD
 } nodestate_t;
 
 struct cluster_node {
@@ -1225,7 +1224,6 @@ static void votequorum_confchg_fn (
 	const struct memb_ring_id *ring_id)
 {
 	int i;
-	int leaving = 0;
 	struct cluster_node *node;
 
 	ENTER();
@@ -1238,9 +1236,6 @@ static void votequorum_confchg_fn (
 		for (i = 0; i< left_list_entries; i++) {
 			node = find_node_by_nodeid(left_list[i]);
 			if (node) {
-				if (node->state == NODESTATE_LEAVING) {
-					leaving = 1;
-				}
 				node->state = NODESTATE_DEAD;
 				node->flags |= NODE_FLAGS_BEENDOWN;
 			}
@@ -1271,7 +1266,7 @@ static void votequorum_confchg_fn (
 	}
 
 	if (left_list_entries) {
-		recalculate_quorum(leaving, leaving);
+		recalculate_quorum(0, 0);
 	}
 
 	memcpy(&quorum_ringid, ring_id, sizeof(*ring_id));
diff --git a/include/corosync/votequorum.h b/include/corosync/votequorum.h
index 9292ca1..db227ae 100644
--- a/include/corosync/votequorum.h
+++ b/include/corosync/votequorum.h
@@ -58,7 +58,6 @@ typedef uint64_t votequorum_handle_t;
 #define NODESTATE_JOINING    1
 #define NODESTATE_MEMBER     2
 #define NODESTATE_DEAD       3
-#define NODESTATE_LEAVING    4
 
 /** @} */
 
diff --git a/test/testvotequorum1.c b/test/testvotequorum1.c
index cb0f929..caab9a4 100644
--- a/test/testvotequorum1.c
+++ b/test/testvotequorum1.c
@@ -57,9 +57,6 @@ static const char *node_state(int state)
 	case NODESTATE_DEAD:
 		return "Dead";
 		break;
-	case NODESTATE_LEAVING:
-		return "Leaving";
-		break;
 	default:
 		return "UNKNOWN";
 		break;
-- 
1.7.7.6

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux