cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/cman-kernel/src cnxman.c
@ 2007-11-01 10:44 pcaulfield
  0 siblings, 0 replies; 8+ messages in thread
From: pcaulfield @ 2007-11-01 10:44 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	pcaulfield at sourceware.org	2007-11-01 10:44:25

Modified files:
	cman-kernel/src: cnxman.c 

Log message:
	When checking for old messages, compare against the last ACKed message rather
	than the last seen message (which could be a NOACK message). otherwise we end
	up throwing awa messages if they arrive out of order.
	
	bz#299061

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/cnxman.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.42.2.29&r2=1.42.2.30

--- cluster/cman-kernel/src/Attic/cnxman.c	2007/03/30 07:50:49	1.42.2.29
+++ cluster/cman-kernel/src/Attic/cnxman.c	2007/11/01 10:44:25	1.42.2.30
@@ -868,7 +868,7 @@
 	 * resend for someone else's benefit */
 	if (!(flags & MSG_NOACK) &&
 	    rem_node && rem_node->last_seq_recv &&
-	    (short)((short)le16_to_cpu(header->seq) - (short)rem_node->last_seq_recv) <= 0) {
+	    (short)((short)le16_to_cpu(header->seq) - (short)rem_node->last_ackneeded_seq_recv) <= 0) {
 		P_COMMS("Discarding message -  seq = %d, last_seen = %d\n",
 			header->seq, rem_node->last_seq_recv);
 		/* Still need to ACK it though, in case it was the ACK that got
@@ -3284,7 +3284,7 @@
 {
 	struct cl_barrier *barrier = (struct cl_barrier *) arg;
 
-	/* Ignore any futher messages, they are too late. */
+	/* Ignore any further messages, they are too late. */
 	barrier->phase = 0;
 
 	/* and cause it to timeout */



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Cluster-devel] cluster/cman-kernel/src cnxman.c
@ 2007-11-14 16:10 pcaulfield
  0 siblings, 0 replies; 8+ messages in thread
From: pcaulfield @ 2007-11-14 16:10 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL46
Changes by:	pcaulfield at sourceware.org	2007-11-14 16:10:14

Modified files:
	cman-kernel/src: cnxman.c 

Log message:
	When checking for old messages, compare against the last ACKed message rather
	than the last seen message (which could be a NOACK message). otherwise we end
	up throwing away messages if they arrive out of order.
	bz#373671

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/cnxman.c.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.42.2.29&r2=1.42.2.29.2.1

--- cluster/cman-kernel/src/Attic/cnxman.c	2007/03/30 07:50:49	1.42.2.29
+++ cluster/cman-kernel/src/Attic/cnxman.c	2007/11/14 16:10:13	1.42.2.29.2.1
@@ -868,7 +868,7 @@
 	 * resend for someone else's benefit */
 	if (!(flags & MSG_NOACK) &&
 	    rem_node && rem_node->last_seq_recv &&
-	    (short)((short)le16_to_cpu(header->seq) - (short)rem_node->last_seq_recv) <= 0) {
+	    (short)((short)le16_to_cpu(header->seq) - (short)rem_node->last_ackneeded_seq_recv) <= 0) {
 		P_COMMS("Discarding message -  seq = %d, last_seen = %d\n",
 			header->seq, rem_node->last_seq_recv);
 		/* Still need to ACK it though, in case it was the ACK that got
@@ -3284,7 +3284,7 @@
 {
 	struct cl_barrier *barrier = (struct cl_barrier *) arg;
 
-	/* Ignore any futher messages, they are too late. */
+	/* Ignore any further messages, they are too late. */
 	barrier->phase = 0;
 
 	/* and cause it to timeout */



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Cluster-devel] cluster/cman-kernel/src cnxman.c
@ 2007-04-02  8:03 pcaulfield
  0 siblings, 0 replies; 8+ messages in thread
From: pcaulfield @ 2007-04-02  8:03 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL45
Changes by:	pcaulfield at sourceware.org	2007-04-02 09:03:13

Modified files:
	cman-kernel/src: cnxman.c 

Log message:
	Flags need to be byte-swapped
	bz#234410

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/cnxman.c.diff?cvsroot=cluster&only_with_tag=RHEL45&r1=1.42.2.28&r2=1.42.2.28.2.1

--- cluster/cman-kernel/src/Attic/cnxman.c	2007/02/27 10:37:14	1.42.2.28
+++ cluster/cman-kernel/src/Attic/cnxman.c	2007/04/02 08:03:13	1.42.2.28.2.1
@@ -2732,7 +2732,7 @@
 	ackmsg.header.tgtport = 0;	/* Protocol port */
 	ackmsg.header.srcport = 0;
 	ackmsg.header.seq = 0;
-	ackmsg.header.flags = MSG_NOACK;
+	ackmsg.header.flags = cpu_to_le32(MSG_NOACK);
 	ackmsg.header.cluster = cpu_to_le16(cluster_id);
 	ackmsg.header.srcid = us ? cpu_to_le32(us->node_id) : 0;
 	ackmsg.header.ack = seq; /* already in LE order */



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Cluster-devel] cluster/cman-kernel/src cnxman.c
@ 2007-03-30  7:50 pcaulfield
  0 siblings, 0 replies; 8+ messages in thread
From: pcaulfield @ 2007-03-30  7:50 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	pcaulfield at sourceware.org	2007-03-30 08:50:50

Modified files:
	cman-kernel/src: cnxman.c 

Log message:
	ack header flags need to be byteswapped or things go horribly wrong
	on BE machines.
	
	bz#234410

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/cnxman.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.42.2.28&r2=1.42.2.29

--- cluster/cman-kernel/src/Attic/cnxman.c	2007/02/27 10:37:14	1.42.2.28
+++ cluster/cman-kernel/src/Attic/cnxman.c	2007/03/30 07:50:49	1.42.2.29
@@ -2732,7 +2732,7 @@
 	ackmsg.header.tgtport = 0;	/* Protocol port */
 	ackmsg.header.srcport = 0;
 	ackmsg.header.seq = 0;
-	ackmsg.header.flags = MSG_NOACK;
+	ackmsg.header.flags = cpu_to_le32(MSG_NOACK);
 	ackmsg.header.cluster = cpu_to_le16(cluster_id);
 	ackmsg.header.srcid = us ? cpu_to_le32(us->node_id) : 0;
 	ackmsg.header.ack = seq; /* already in LE order */



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Cluster-devel] cluster/cman-kernel/src cnxman.c
@ 2007-02-27 10:38 pcaulfield
  0 siblings, 0 replies; 8+ messages in thread
From: pcaulfield @ 2007-02-27 10:38 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	pcaulfield at sourceware.org	2007-02-27 10:38:04

Modified files:
	cman-kernel/src: cnxman.c 

Log message:
	Stop cman_tool from trying to restart us while we are shutting things down.
	bz#229797

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/cnxman.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.42.2.12.4.1.2.15&r2=1.42.2.12.4.1.2.16

--- cluster/cman-kernel/src/Attic/cnxman.c	2007/02/07 15:25:04	1.42.2.12.4.1.2.15
+++ cluster/cman-kernel/src/Attic/cnxman.c	2007/02/27 10:38:04	1.42.2.12.4.1.2.16
@@ -162,6 +162,7 @@
 #define ACK_TIMEOUT   1
 #define RESEND_NEEDED 2
 #define TIDY_BARRIERS 3
+#define IN_SHUTDOWN   4
 
 /* A queue of messages waiting to be sent. If kcl_sendmsg is called outside of
  * process context then the messages get put in here */
@@ -417,6 +418,7 @@
 	}
 	P_COMMS("closing down\n");
 
+	set_bit(IN_SHUTDOWN, &mainloop_flags);
 	quit_threads = 1;	/* force other thread to die too */
 
 	/* Wait for membership thread to finish, that way any
@@ -440,6 +442,7 @@
 	kfree(iobuf);
 
 	complete(&cluster_thread_comp);
+	clear_bit(IN_SHUTDOWN, &mainloop_flags);
 	return 0;
 }
 
@@ -1034,6 +1037,10 @@
 	if (master_sock && protocol == CLPROTO_MASTER)
 		return -EBUSY;
 
+	/* We are shutting down - please be patient */
+	if (protocol == CLPROTO_MASTER && test_bit(IN_SHUTDOWN, &mainloop_flags))
+		return -EBUSY;
+
 	/* cnxman not running and a client was requested */
 	if (!atomic_read(&cnxman_running) && protocol != CLPROTO_MASTER)
 		return -ENETDOWN;



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Cluster-devel] cluster/cman-kernel/src cnxman.c
@ 2007-02-27 10:37 pcaulfield
  0 siblings, 0 replies; 8+ messages in thread
From: pcaulfield @ 2007-02-27 10:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	pcaulfield at sourceware.org	2007-02-27 10:37:14

Modified files:
	cman-kernel/src: cnxman.c 

Log message:
	Stop cman_tool from trying to restart us while we are shutting things down.
	bz#229797

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/cnxman.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.42.2.27&r2=1.42.2.28

--- cluster/cman-kernel/src/Attic/cnxman.c	2007/01/19 10:23:14	1.42.2.27
+++ cluster/cman-kernel/src/Attic/cnxman.c	2007/02/27 10:37:14	1.42.2.28
@@ -162,6 +162,7 @@
 #define ACK_TIMEOUT   1
 #define RESEND_NEEDED 2
 #define TIDY_BARRIERS 3
+#define IN_SHUTDOWN   4
 
 /* A queue of messages waiting to be sent. If kcl_sendmsg is called outside of
  * process context then the messages get put in here */
@@ -417,6 +418,7 @@
 	}
 	P_COMMS("closing down\n");
 
+	set_bit(IN_SHUTDOWN, &mainloop_flags);
 	quit_threads = 1;	/* force other thread to die too */
 
 	/* Wait for membership thread to finish, that way any
@@ -440,6 +442,7 @@
 	kfree(iobuf);
 
 	complete(&cluster_thread_comp);
+	clear_bit(IN_SHUTDOWN, &mainloop_flags);
 	return 0;
 }
 
@@ -1033,6 +1036,10 @@
 	if (master_sock && protocol == CLPROTO_MASTER)
 		return -EBUSY;
 
+	/* We are shutting down - please be patient */
+	if (protocol == CLPROTO_MASTER && test_bit(IN_SHUTDOWN, &mainloop_flags))
+		return -EBUSY;
+
 	/* cnxman not running and a client was requested */
 	if (!atomic_read(&cnxman_running) && protocol != CLPROTO_MASTER)
 		return -ENETDOWN;



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Cluster-devel] cluster/cman-kernel/src cnxman.c
@ 2007-01-19 10:24 pcaulfield
  0 siblings, 0 replies; 8+ messages in thread
From: pcaulfield @ 2007-01-19 10:24 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	pcaulfield at sourceware.org	2007-01-19 10:24:46

Modified files:
	cman-kernel/src: cnxman.c 

Log message:
	Tell SM when the quorum device comes or goes.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/cnxman.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.42.2.12.4.1.2.13&r2=1.42.2.12.4.1.2.14

--- cluster/cman-kernel/src/Attic/cnxman.c	2006/12/18 11:37:53	1.42.2.12.4.1.2.13
+++ cluster/cman-kernel/src/Attic/cnxman.c	2007/01/19 10:24:46	1.42.2.12.4.1.2.14
@@ -4180,12 +4180,14 @@
 		if (quorum_device->state == NODESTATE_DEAD) {
 			quorum_device->state = NODESTATE_MEMBER;
 			recalculate_quorum(0);
+			sm_member_update(cluster_is_quorate);
 		}
 	}
 	else {
 		if (quorum_device->state == NODESTATE_MEMBER) {
 			quorum_device->state = NODESTATE_DEAD;
 			recalculate_quorum(0);
+			sm_member_update(cluster_is_quorate);
 		}
 	}
 



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Cluster-devel] cluster/cman-kernel/src cnxman.c
@ 2007-01-19 10:23 pcaulfield
  0 siblings, 0 replies; 8+ messages in thread
From: pcaulfield @ 2007-01-19 10:23 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	pcaulfield at sourceware.org	2007-01-19 10:23:14

Modified files:
	cman-kernel/src: cnxman.c 

Log message:
	Tell SM when the quorum device comes or goes.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/cnxman.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.42.2.26&r2=1.42.2.27

--- cluster/cman-kernel/src/Attic/cnxman.c	2006/12/18 13:37:55	1.42.2.26
+++ cluster/cman-kernel/src/Attic/cnxman.c	2007/01/19 10:23:14	1.42.2.27
@@ -4179,12 +4179,14 @@
 		if (quorum_device->state == NODESTATE_DEAD) {
 			quorum_device->state = NODESTATE_MEMBER;
 			recalculate_quorum(0);
+			sm_member_update(cluster_is_quorate);
 		}
 	}
 	else {
 		if (quorum_device->state == NODESTATE_MEMBER) {
 			quorum_device->state = NODESTATE_DEAD;
 			recalculate_quorum(0);
+			sm_member_update(cluster_is_quorate);
 		}
 	}
 



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-11-14 16:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-01 10:44 [Cluster-devel] cluster/cman-kernel/src cnxman.c pcaulfield
  -- strict thread matches above, loose matches on Subject: below --
2007-11-14 16:10 pcaulfield
2007-04-02  8:03 pcaulfield
2007-03-30  7:50 pcaulfield
2007-02-27 10:38 pcaulfield
2007-02-27 10:37 pcaulfield
2007-01-19 10:24 pcaulfield
2007-01-19 10:23 pcaulfield

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 NNTP newsgroup(s).