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

[Cluster-devel] cluster/dlm-kernel/src dlm_internal.h lockspac ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4U4
Changes by:	teigland sourceware org	2006-09-26 16:33:05

Modified files:
	dlm-kernel/src : dlm_internal.h lockspace.c nodes.c recoverd.c 

Log message:
	Revert the following change for the errata -- only Corey has reported it
	and the change involves non-zero risk.
	
	"Add a spinlock around the ls_nodes_gone list.  The list is modified
	during mounting/unmounting and traversed by dlm_recvd when a request
	is received.  This should fix bz 206463."

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/dlm_internal.h.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.36.2.5.12.1&r2=1.36.2.5.12.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/lockspace.c.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.19.2.9.2.1&r2=1.19.2.9.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/nodes.c.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.10.2.2.10.1&r2=1.10.2.2.10.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/recoverd.c.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.19.2.4.12.1&r2=1.19.2.4.12.2

--- cluster/dlm-kernel/src/Attic/dlm_internal.h	2006/09/19 16:39:35	1.36.2.5.12.1
+++ cluster/dlm-kernel/src/Attic/dlm_internal.h	2006/09/26 16:33:05	1.36.2.5.12.2
@@ -259,7 +259,6 @@
 
 	struct list_head	ls_nodes;	/* current nodes in ls */
 	struct list_head	ls_nodes_gone;	/* dead node list, recovery */
-	spinlock_t		ls_nodes_gone_spin;
 	uint32_t		ls_num_nodes;	/* number of nodes in ls */
 	uint32_t		ls_low_nodeid;
 	uint32_t *		ls_node_array;
--- cluster/dlm-kernel/src/Attic/lockspace.c	2006/09/19 16:39:35	1.19.2.9.2.1
+++ cluster/dlm-kernel/src/Attic/lockspace.c	2006/09/26 16:33:05	1.19.2.9.2.2
@@ -322,7 +322,6 @@
 
 	INIT_LIST_HEAD(&ls->ls_nodes);
 	INIT_LIST_HEAD(&ls->ls_nodes_gone);
-	spin_lock_init(&ls->ls_nodes_gone_spin);
 	ls->ls_num_nodes = 0;
 	ls->ls_node_array = NULL;
 	ls->ls_recoverd_task = NULL;
--- cluster/dlm-kernel/src/Attic/nodes.c	2006/09/19 16:39:35	1.10.2.2.10.1
+++ cluster/dlm-kernel/src/Attic/nodes.c	2006/09/26 16:33:05	1.10.2.2.10.2
@@ -228,10 +228,8 @@
 		if (!found) {
 			neg++;
 			csb->gone_event = rv->event_id;
-			spin_lock(&ls->ls_nodes_gone_spin);
 			list_del(&csb->list);
 			list_add_tail(&csb->list, &ls->ls_nodes_gone);
-			spin_unlock(&ls->ls_nodes_gone_spin);
 			ls->ls_num_nodes--;
 			log_debug(ls, "remove node %u", csb->node->nodeid);
 		}
@@ -298,19 +296,7 @@
 
 void ls_nodes_gone_clear(struct dlm_ls *ls)
 {
-	struct dlm_csb *csb;
-
- retry:
-	spin_lock(&ls->ls_nodes_gone_spin);
-	if (list_empty(&ls->ls_nodes_gone))
-		goto out;
-	csb = list_entry(ls->ls_nodes_gone.next, struct dlm_csb, list);
-	list_del(&csb->list);
-	spin_unlock(&ls->ls_nodes_gone_spin);
-	release_csb(csb);
-	goto retry;
- out:
-	spin_unlock(&ls->ls_nodes_gone_spin);
+	nodes_clear(&ls->ls_nodes_gone);
 }
 
 int ls_nodes_init(struct dlm_ls *ls, struct dlm_recover *rv)
@@ -353,14 +339,9 @@
 {
 	struct dlm_csb *csb;
 
-	spin_lock(&ls->ls_nodes_gone_spin);
 	list_for_each_entry(csb, &ls->ls_nodes_gone, list) {
-		if (csb->node->nodeid == nodeid) {
-			spin_unlock(&ls->ls_nodes_gone_spin);
+		if (csb->node->nodeid == nodeid)
 			return TRUE;
-		}
 	}
-	spin_unlock(&ls->ls_nodes_gone_spin);
 	return FALSE;
 }
-
--- cluster/dlm-kernel/src/Attic/recoverd.c	2006/09/19 16:39:35	1.19.2.4.12.1
+++ cluster/dlm-kernel/src/Attic/recoverd.c	2006/09/26 16:33:05	1.19.2.4.12.2
@@ -226,17 +226,12 @@
 {
 	struct dlm_csb *csb, *safe;
 
- restart:
-	spin_lock(&ls->ls_nodes_gone_spin);
 	list_for_each_entry_safe(csb, safe, &ls->ls_nodes_gone, list) {
 		if (csb->gone_event <= finish_event) {
 			list_del(&csb->list);
-			spin_unlock(&ls->ls_nodes_gone_spin);
 			release_csb(csb);
-			goto restart;
 		}
 	}
-	spin_unlock(&ls->ls_nodes_gone_spin);
 }
 
 /*


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