[Ocfs2-commits] mfasheh commits r1619 - branches/dlm-glue/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Nov 2 20:25:57 CST 2004


Author: mfasheh
Date: 2004-11-02 20:25:56 -0600 (Tue, 02 Nov 2004)
New Revision: 1619

Modified:
   branches/dlm-glue/src/dlmglue.c
Log:
* allow us to continue on a currently compatible lock request if we're
  only requesting an upconvert.



Modified: branches/dlm-glue/src/dlmglue.c
===================================================================
--- branches/dlm-glue/src/dlmglue.c	2004-11-03 01:47:37 UTC (rev 1618)
+++ branches/dlm-glue/src/dlmglue.c	2004-11-03 02:25:56 UTC (rev 1619)
@@ -370,7 +370,7 @@
 
 	LOG_TRACE_ARGS("incrementing inode seq... current is %d\n", 
 		       atomic_read(seq));
-	
+
 	/* wrap to ONE after 13 bits, will need a spinlock */
 	spin_lock (&osb->clean_buffer_lock);
 	if ((atomic_read(&osb->clean_buffer_seq)+1) % STATE_BIT_MAX == 0)
@@ -623,7 +623,12 @@
 	}
 
 	spin_lock(&lockres->lr_lock);
-	if (lock->l_flags & OCFS2_LOCK_BUSY) {
+
+	/* We only compare against the currently granted level
+	 * here. If the lock is blocked waiting on a downconvert,
+	 * we'll get caught below. */
+	if (lock->l_flags & OCFS2_LOCK_BUSY &&
+	    level > lock->l_level) {
 		/* is someone sitting in dlm_lock? If so, wait on
 		 * them. */
 		spin_unlock(&lockres->lr_lock);



More information about the Ocfs2-commits mailing list