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

[Cluster-devel] cluster/group/gfs_controld lock_dlm.h plock.c ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-08-07 16:57:50

Modified files:
	group/gfs_controld: lock_dlm.h plock.c recover.c 

Log message:
	free all plock state for an fs when it's unmounted

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/lock_dlm.h.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.8&r2=1.9

--- cluster/group/gfs_controld/lock_dlm.h	2006/08/04 21:56:10	1.10
+++ cluster/group/gfs_controld/lock_dlm.h	2006/08/07 16:57:50	1.11
@@ -263,6 +263,6 @@
 void retrieve_plocks(struct mountgroup *mg);
 int dump_plocks(char *name, int fd);
 void process_saved_plocks(struct mountgroup *mg);
-void purge_plocks(struct mountgroup *mg, int nodeid);
+void purge_plocks(struct mountgroup *mg, int nodeid, int unmount);
 
 #endif
--- cluster/group/gfs_controld/plock.c	2006/08/04 21:56:10	1.7
+++ cluster/group/gfs_controld/plock.c	2006/08/07 16:57:50	1.8
@@ -942,7 +942,7 @@
 	}
 }
 
-void purge_plocks(struct mountgroup *mg, int nodeid)
+void purge_plocks(struct mountgroup *mg, int nodeid, int unmount)
 {
 	struct posix_lock *po, *po2;
 	struct lock_waiter *w, *w2;
@@ -951,7 +951,7 @@
 
 	list_for_each_entry_safe(r, r2, &mg->resources, list) {
 		list_for_each_entry_safe(po, po2, &r->locks, list) {
-			if (po->nodeid == nodeid) {
+			if (po->nodeid == nodeid || unmount) {
 				list_del(&po->list);
 				free(po);
 				purged++;
@@ -959,7 +959,7 @@
 		}
 
 		list_for_each_entry_safe(w, w2, &r->waiters, list) {
-			if (w->info.nodeid == nodeid) {
+			if (w->info.nodeid == nodeid || unmount) {
 				list_del(&w->list);
 				free(w);
 				purged++;
--- cluster/group/gfs_controld/recover.c	2006/08/04 21:56:10	1.8
+++ cluster/group/gfs_controld/recover.c	2006/08/07 16:57:50	1.9
@@ -966,7 +966,7 @@
 				  memb->spectator,
 				  memb->wait_gfs_recover_done);
 
-			purge_plocks(mg, memb->nodeid);
+			purge_plocks(mg, memb->nodeid, 0);
 		}
 	}	
 
@@ -2011,9 +2011,7 @@
 
 int do_terminate(struct mountgroup *mg)
 {
-	/* FIXME: all group members aren't guaranteed to be stopped for
-	   our leave yet when we get terminate.  We need that guarantee
-	   before we tell a withdrawing gfs to drop locks. */
+	purge_plocks(mg, 0, 1);
 
 	if (mg->withdraw) {
 		log_group(mg, "termination of our withdraw leave");


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