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

[Cluster-devel] Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-55-g59ba19a



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=59ba19aa6b41cad189af153e27469056206e782d

The branch, RHEL4 has been updated
       via  59ba19aa6b41cad189af153e27469056206e782d (commit)
      from  4a882ef9601cece3e5383dc22965902ed462f7e2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 59ba19aa6b41cad189af153e27469056206e782d
Author: Christine Caulfield <ccaulfie redhat com>
Date:   Tue May 13 16:37:11 2008 +0100

    Make every 100 Hello messages require an ACK. This keeps the ackneeded sequence
    numbers close to the actual sequence numbers, so that the comparisions don't
    fail if there has been no cman messages sent for a while.
    
    bz#444751
    
    Signed-off-by: Christine Caulfield <ccaulfie redhat com>

-----------------------------------------------------------------------

Summary of changes:
 cman-kernel/src/membership.c |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/cman-kernel/src/membership.c b/cman-kernel/src/membership.c
index 7166f56..d1712ce 100644
--- a/cman-kernel/src/membership.c
+++ b/cman-kernel/src/membership.c
@@ -76,6 +76,7 @@ static int sizeof_members_array;	/* Can dynamically increase (vmalloc
 static struct cluster_node **members_by_nodeid;
 
 #define MEMBER_INCREMENT_SIZE 10
+#define NON_ACKABLE_HELLO_COUNT 100
 
 static int votes = 1;		/* Votes this node has */
 static int expected_votes = 1;	/* Total expected votes in the cluster */
@@ -127,7 +128,7 @@ static int send_cluster_view(unsigned char cmd, struct sockaddr_cl *saddr,
 			     unsigned int flags, unsigned int flags2);
 static int send_joinreq(struct sockaddr_cl *addr, int addr_len);
 static int send_startack(struct sockaddr_cl *addr, int addr_len);
-static int send_hello(void);
+static int send_hello(int ackable);
 static int send_master_hello(void);
 static int send_newcluster(void);
 static int end_transition(void);
@@ -315,7 +316,7 @@ static int hello_kthread(void *unused)
 		set_task_state(current, TASK_RUNNING);
 
 		if (node_state != REJECTED && node_state != LEFT_CLUSTER)
-			send_hello();
+			send_hello(1);
 	}
 	if (timer_pending(&hello_timer))
 		del_timer(&hello_timer);
@@ -597,7 +598,7 @@ static void form_cluster(void)
 		set_nodeid(us, 1);
 	recalculate_quorum(0);
 	sm_member_update(cluster_is_quorate);
-	send_hello();
+	send_hello(0);
 	kernel_thread(hello_kthread, NULL, 0);
 }
 
@@ -821,19 +822,29 @@ static int send_newcluster()
 			   MSG_NOACK);
 }
 
-static int send_hello()
+static int send_hello(int ackable)
 {
 	struct cl_mem_hello_msg hello_msg;
 	int status;
+	static int last_ackable = 0;
+	int flags;
 
 	hello_msg.cmd = CLUSTER_MEM_HELLO;
 	hello_msg.members = cpu_to_le16(cluster_members);
 	hello_msg.flags = cluster_is_quorate ? HELLO_FLAG_QUORATE : 0;
 	hello_msg.generation = cpu_to_le32(cluster_generation);
 
+	/* Every so often we need request an ACK for a HELLO message
+	   to keep the messaging system sane */
+	if (ackable && !(++last_ackable % NON_ACKABLE_HELLO_COUNT)) {
+		flags = MSG_ALLINT;
+	}
+	else {
+		flags = MSG_NOACK | MSG_ALLINT;
+	}
 	status = kcl_sendmsg(mem_socket, &hello_msg,
 			     sizeof(struct cl_mem_hello_msg),
-			     NULL, 0, MSG_NOACK | MSG_ALLINT);
+			     NULL, 0, flags);
 
 	last_hello = jiffies;
 
@@ -2623,7 +2634,7 @@ static int do_process_newcluster(struct msghdr *msg, char *buf, int len)
 	}
 
 	if (node_state == MEMBER)
-		send_hello();
+		send_hello(0);
 
 	return 0;
 }


hooks/post-receive
--
Cluster Project


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