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

[Cluster-devel] cluster/group/gfs_controld recover.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-08-31 18:56:25

Modified files:
	group/gfs_controld: recover.c 

Log message:
	When deciding whether we need to unlink the checkpoint and resend journals
	for a failed master node we weren't distinguishing between the master
	failing (where we need to do this stuff) and the master just leaving
	(where we don't).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.16&r2=1.17

--- cluster/group/gfs_controld/recover.c	2006/08/21 19:38:53	1.16
+++ cluster/group/gfs_controld/recover.c	2006/08/31 18:56:25	1.17
@@ -967,6 +967,7 @@
 {
 	struct mg_member *memb, *safe;
 	int i, found, id, pos = 0, neg = 0, prev_master_nodeid;
+	int master_failed = 0;
 
 	/* move departed nodes from members list to members_gone */
 
@@ -1017,6 +1018,10 @@
 				  memb->wait_gfs_recover_done);
 
 			purge_plocks(mg, memb->nodeid, 0);
+
+			if (mg->master_nodeid == memb->nodeid &&
+			    memb->gone_type == GROUP_NODE_FAILED)
+				master_failed = 1;
 		}
 	}	
 
@@ -1048,7 +1053,7 @@
 	   - store plocks in ckpt for the new mounters to read when they
 	     get the journals msg from us */
 
-	if (neg &&
+	if (neg && master_failed &&
 	    (prev_master_nodeid != -1) &&
 	    (prev_master_nodeid != mg->master_nodeid) &&
 	    (our_nodeid == mg->master_nodeid)) {


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