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

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Wed Apr 19 17:50:22 CDT 2006


Author: smushran
Signed-off-by: mfasheh
Signed-off-by: khackel
Date: 2006-04-19 17:50:21 -0500 (Wed, 19 Apr 2006)
New Revision: 2863

Modified:
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c
Log:
Do lvb puts during downconvert
Signed-off-by: mfasheh
Signed-off-by: khackel

Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c	2006-04-19 22:49:08 UTC (rev 2862)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c	2006-04-19 22:50:21 UTC (rev 2863)
@@ -197,12 +197,14 @@
 				  lock->ml.node == dlm->node_num ? "master" :
 				  "remote");
 			memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN);
-		} else if (lksb->flags & DLM_LKSB_PUT_LVB) {
-			mlog(0, "setting lvb from lockres for %s node\n",
-				  lock->ml.node == dlm->node_num ? "master" :
-				  "remote");
-			memcpy(res->lvb, lksb->lvb, DLM_LVB_LEN);
 		}
+		/* Do nothing for lvb put requests - they should be done in
+ 		 * place when the lock is downconverted - otherwise we risk
+ 		 * racing gets and puts which could result in old lvb data
+ 		 * being propagated. We leave the put flag set and clear it
+ 		 * here. In the future we might want to clear it at the time
+ 		 * the put is actually done.
+		 */
 		spin_unlock(&res->spinlock);
 	}
 

Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c	2006-04-19 22:49:08 UTC (rev 2862)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c	2006-04-19 22:50:21 UTC (rev 2863)
@@ -214,6 +214,9 @@
 	if (lock->ml.node == dlm->node_num)
 		mlog(0, "doing in-place convert for nonlocal lock\n");
 	lock->ml.type = type;
+	if (lock->lksb->flags & DLM_LKSB_PUT_LVB)
+		memcpy(res->lvb, lock->lksb->lvb, DLM_LVB_LEN);
+
 	status = DLM_NORMAL;
 	*call_ast = 1;
 	goto unlock_exit;




More information about the Ocfs2-commits mailing list