[Ocfs2-commits] mfasheh commits r1717 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Dec 23 15:40:47 CST 2004
Author: mfasheh
Date: 2004-12-23 15:40:45 -0600 (Thu, 23 Dec 2004)
New Revision: 1717
Modified:
trunk/src/Makefile
trunk/src/dlmglue.c
Log:
* fix a bug with downconvert asts
* clean up and add some more logging. this helped me greatly during
debugging.
Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile 2004-12-23 21:31:15 UTC (rev 1716)
+++ trunk/src/Makefile 2004-12-23 21:40:45 UTC (rev 1717)
@@ -51,7 +51,7 @@
ifneq ($(QUIET),1)
GLOBAL_DEFINES += -DVERBOSE_BH_JBD_TRACE
-#GLOBAL_DEFINES += -DVERBOSE_LOCKING_TRACE
+GLOBAL_DEFINES += -DVERBOSE_LOCKING_TRACE
GLOBAL_DEFINES += -DVERBOSE_BH_SEQNUM_TRACE
GLOBAL_DEFINES += -DVERBOSE_PROCESS_VOTE
GLOBAL_DEFINES += -DVERBOSE_COMMIT_THREAD
Modified: trunk/src/dlmglue.c
===================================================================
--- trunk/src/dlmglue.c 2004-12-23 21:31:15 UTC (rev 1716)
+++ trunk/src/dlmglue.c 2004-12-23 21:40:45 UTC (rev 1717)
@@ -425,12 +425,15 @@
OCFS_ASSERT(lockres->l_flags & OCFS2_LOCK_BUSY);
OCFS_ASSERT(lockres->l_flags & OCFS2_LOCK_ATTACHED);
OCFS_ASSERT(lockres->l_flags & OCFS2_LOCK_BLOCKED);
+ OCFS_ASSERT(lockres->l_blocking > LKM_NLMODE);
lockres->l_level = lockres->l_requested;
- lockres->l_blocking = LKM_NLMODE;
- lockres->l_flags &= ~OCFS2_LOCK_BLOCKED;
+ if (lockres->l_level <=
+ ocfs2_highest_compat_lock_level(lockres->l_blocking)) {
+ lockres->l_blocking = LKM_NLMODE;
+ lockres->l_flags &= ~OCFS2_LOCK_BLOCKED;
+ }
lockres->l_flags &= ~OCFS2_LOCK_BUSY;
- wake_up(&lockres->l_event);
LOG_EXIT();
}
@@ -530,7 +533,9 @@
osb = OCFS2_SB(inode->i_sb);
#ifdef VERBOSE_LOCKING_TRACE
- printk("AST fired for inode %llu\n", OCFS_I(inode)->ip_blkno);
+ printk("(%u) AST fired for inode %llu, l_action = %u, type = %s\n",
+ current->pid, OCFS_I(inode)->ip_blkno, lockres->l_action,
+ (lockres->l_type == OCFS_TYPE_META) ? "Meta" : "Data");
#endif
OCFS_ASSERT(ocfs2_is_inode_lock(lockres));
@@ -604,8 +609,10 @@
osb = OCFS2_SB(inode->i_sb);
#ifdef VERBOSE_LOCKING_TRACE
- printk("BAST fired for inode %llu, blocking = %d, level = %d\n",
- OCFS_I(inode)->ip_blkno, level, lockres->l_level);
+ printk("(%u) BAST fired for inode %llu, blocking = %d, level = %d"
+ "type = %s\n", current->pid, OCFS_I(inode)->ip_blkno, level,
+ lockres->l_level,
+ (lockres->l_type == OCFS_TYPE_META) ? "Meta" : "Data");
#endif
ocfs2_generic_handle_bast(lockres, level);
@@ -844,6 +851,9 @@
lockres->l_flags |= OCFS2_LOCK_BUSY;
spin_unlock(&lockres->l_lock);
+ OCFS_ASSERT(level != LKM_IVMODE);
+ OCFS_ASSERT(level != LKM_NLMODE);
+
/* call dlm_lock to upgrade lock now */
status = dlmlock(osb->dlm,
level,
@@ -1931,7 +1941,7 @@
LOG_ERROR_STATUS(status);
#ifdef VERBOSE_LOCKING_TRACE
- printk("(%u) ocfs2_unblock_data: inode %llu, reqeue = %d\n",
+ printk("(%u) ocfs2_unblock_data: inode %llu, requeue = %d\n",
current->pid, OCFS_I(inode)->ip_blkno, *requeue);
#endif
@@ -2058,3 +2068,4 @@
ocfs2_schedule_blocked_lock(OCFS2_SB(inode->i_sb), lockres);
LOG_EXIT();
}
+
More information about the Ocfs2-commits
mailing list