[Ocfs2-commits] smushran commits r3081 - branches/ocfs2-1.2/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jan 22 11:21:31 PST 2008


Author: smushran
Date: 2008-01-22 11:21:31 -0800 (Tue, 22 Jan 2008)
New Revision: 3081

Modified:
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c
Log:
dlm: Reversing patch r3062

Patch to _fix double increment of migrated lockres' owner count_ was causing problems
in recovery. Reversing the patch. The original problem will be addressed later.

Signed-off-by: mfasheh

Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h	2008-01-22 19:18:07 UTC (rev 3080)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h	2008-01-22 19:21:31 UTC (rev 3081)
@@ -770,9 +770,6 @@
 					      unsigned int len);
 
 int dlm_is_host_down(int errno);
-void dlm_reset_lockres_owner(struct dlm_ctxt *dlm,
-			     struct dlm_lock_resource *res,
-			     u8 owner);
 void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
 			      struct dlm_lock_resource *res,
 			      u8 owner);

Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c	2008-01-22 19:18:07 UTC (rev 3080)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c	2008-01-22 19:21:31 UTC (rev 3081)
@@ -583,8 +583,8 @@
 	res->owner = owner;
 }
 
-void dlm_reset_lockres_owner(struct dlm_ctxt *dlm,
-			     struct dlm_lock_resource *res, u8 owner)
+void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
+			      struct dlm_lock_resource *res, u8 owner)
 {
 	assert_spin_locked(&res->spinlock);
 
@@ -597,18 +597,7 @@
 		atomic_dec(&dlm->unknown_resources);
 	else
 		atomic_dec(&dlm->remote_resources);
-}
 
-void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
-			      struct dlm_lock_resource *res, u8 owner)
-{
-	assert_spin_locked(&res->spinlock);
-
-	if (owner == res->owner)
-		return;
-
-	dlm_reset_lockres_owner(dlm, res, owner);
-
 	dlm_set_lockres_owner(dlm, res, owner);
 }
 

Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c	2008-01-22 19:18:07 UTC (rev 3080)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c	2008-01-22 19:21:31 UTC (rev 3081)
@@ -1443,7 +1443,7 @@
 	} else {
 		/* take a reference now to pin the lockres, drop it
 		 * when locks are added in the worker */
-		dlm_reset_lockres_owner(dlm, res, dlm->node_num);
+		dlm_change_lockres_owner(dlm, res, dlm->node_num);
 	}
 	spin_unlock(&res->spinlock);
 




More information about the Ocfs2-commits mailing list