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

[Cluster-devel] cluster/group/daemon app.c joinleave.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-10-13 20:07:45

Modified files:
	group/daemon   : app.c joinleave.c 

Log message:
	Fix an effect of recovery mixed with joins where the node whose join
	event was interrupted by the recovery can sometimes not have its
	g->joining flag cleared which would cause a later unmount to hang.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/app.c.diff?cvsroot=cluster&r1=1.50&r2=1.51
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/joinleave.c.diff?cvsroot=cluster&r1=1.18&r2=1.19

--- cluster/group/daemon/app.c	2006/10/12 14:25:58	1.50
+++ cluster/group/daemon/app.c	2006/10/13 20:07:45	1.51
@@ -1610,6 +1610,12 @@
 	if (event_state_starting(a) || event_state_all_started(a)) {
 		log_group(g, "rev %d replaces current ev %d %s",
 			  rev->nodeid, ev->nodeid, ev_state_str(ev));
+
+		/* what we do for our own join when reaching JOIN_ALL_STARTED */
+		if (is_our_join(ev)) {
+			purge_messages(g);
+			g->joining = 0;
+		}
 		clear_all_nodes_stopped(a);
 		list_del(&rev->list);
 		a->current_event = rev;
--- cluster/group/daemon/joinleave.c	2006/09/26 19:17:21	1.18
+++ cluster/group/daemon/joinleave.c	2006/10/13 20:07:45	1.19
@@ -116,25 +116,25 @@
 	}
 
 	if (g->joining) {
-		log_group(g, "leave: still joining");
+		log_error(g, "leave: still joining");
 		return -EAGAIN;
 	}
 
 	if (g->leaving) {
-		log_group(g, "leave: already leaving");
+		log_error(g, "leave: already leaving");
 		return -EBUSY;
 	}
 
 	if (g->app->current_event &&
 	    g->app->current_event->nodeid == our_nodeid) {
-		log_group(g, "leave: busy event %llx state %s",
+		log_error(g, "leave: busy event %llx state %s",
 			  ev->id, ev_state_str(g->app->current_event));
 		return -EAGAIN;
 	}
 
 	list_for_each_entry(ev, &g->app->events, list) {
 		ASSERT(ev->nodeid != our_nodeid);
-		log_group(g, "event id %llx", ev->id);
+		log_group(g, "do_leave: found queued event id %llx", ev->id);
 	}
 
 	log_debug("%d:%s got leave", level, name);


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