[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-30-g625364c



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=625364c99277445b97bbb3120736c358b802fb0f

The branch, RHEL4 has been updated
       via  625364c99277445b97bbb3120736c358b802fb0f (commit)
      from  aac75cba36115a59a489c0b1a52be5259f54fb87 (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 625364c99277445b97bbb3120736c358b802fb0f
Author: Jonathan Brassow <jbrassow redhat com>
Date:   Mon Apr 7 10:48:24 2008 -0500

    - dm-cmirror.ko: Fix infinite election loop (bug 217895)
    
    It was possible for an election to be run just before
    a machine that was next in line to be server suspened.
    
    This would cause the remaining nodes to think a suspended
    node was the active server - worse, the suspended node
    would allow itself to become server and then say in was
    not in charge of the log.  This would simply keep going
    round and round.
    
    Fix is to increment 'suspended' before exiting postsuspend,
    and not allowing a node to be elected server if 'suspended'
    was set.

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

Summary of changes:
 cmirror-kernel/src/dm-cmirror-client.c |    1 +
 cmirror-kernel/src/dm-cmirror-server.c |   13 +++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/cmirror-kernel/src/dm-cmirror-client.c b/cmirror-kernel/src/dm-cmirror-client.c
index c11cedc..43fe5ef 100644
--- a/cmirror-kernel/src/dm-cmirror-client.c
+++ b/cmirror-kernel/src/dm-cmirror-client.c
@@ -836,6 +836,7 @@ static int cluster_postsuspend(struct dirty_log *log)
 			}
 		}
 	}
+	atomic_set(&lc->suspended, 2);
 
 	return 0;
 }
diff --git a/cmirror-kernel/src/dm-cmirror-server.c b/cmirror-kernel/src/dm-cmirror-server.c
index 4252058..c8f77ea 100644
--- a/cmirror-kernel/src/dm-cmirror-server.c
+++ b/cmirror-kernel/src/dm-cmirror-server.c
@@ -939,10 +939,19 @@ static int process_election(struct log_request *lr, struct log_c *lc,
 	if((lc->server_id == my_id) && !atomic_read(&lc->suspended)){
 	*/
 	if (lc->server_id == my_id) {
-		if (atomic_read(&lc->suspended)) {
-			DMDEBUG("I'm suspended, but still responding as server: %s",
+		int r = atomic_read(&lc->suspended);
+
+		if (r >= 2) {
+			DMDEBUG("I am the assigned server while suspended: %s",
 				lc->uuid + (strlen(lc->uuid) - 8));
+			lc->server_id = 0xDEAD;
+			lr->u.lr_node_count++;
+			return 0;
 		}
+
+		if (r == 1)
+			DMDEBUG("I'm suspended, but still responding as server: %s",
+				lc->uuid + (strlen(lc->uuid) - 8));
 		lr->u.lr_coordinator = my_id;
 		if(!(saddr->sin_addr.s_addr = nodeid_to_ipaddr(lr->u.lr_starter))){
 			return -1;


hooks/post-receive
--
Cluster Project


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