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

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Nov 15 17:52:48 CST 2004


Author: mfasheh
Date: 2004-11-15 17:52:47 -0600 (Mon, 15 Nov 2004)
New Revision: 1649

Modified:
   branches/dlm-glue/src/ocfs.h
   branches/dlm-glue/src/ocfs_journal.h
Log:
* move the last_trans variable from the ocfs2_lock structure to inode
  private.



Modified: branches/dlm-glue/src/ocfs.h
===================================================================
--- branches/dlm-glue/src/ocfs.h	2004-11-15 23:39:48 UTC (rev 1648)
+++ branches/dlm-glue/src/ocfs.h	2004-11-15 23:52:47 UTC (rev 1649)
@@ -203,7 +203,6 @@
 	unsigned int            l_ro_holders;
 	unsigned int            l_ex_holders;
 	dlm_lockstatus          l_lksb;
-	unsigned long           l_last_trans; /* protected by trans_inc_lock */
 	u32                     l_local_seq;
 
 	/* used from AST/BAST funcs. */
@@ -277,9 +276,11 @@
 
 	u32 		  ip_dir_start_lookup;
 
-	/* protected by trans_inc_lock, which transaction were we
-	 * created on? Zero if none. */
+	/* next two are protected by trans_inc_lock */
+	/* which transaction were we created on? Zero if none. */
 	unsigned long               ip_created_trans;
+	/* last transaction we were a part of. */
+	unsigned long               ip_last_trans;
 } ocfs_inode_private;
 
 /* 'flags' flags. */

Modified: branches/dlm-glue/src/ocfs_journal.h
===================================================================
--- branches/dlm-glue/src/ocfs_journal.h	2004-11-15 23:39:48 UTC (rev 1648)
+++ branches/dlm-glue/src/ocfs_journal.h	2004-11-15 23:52:47 UTC (rev 1649)
@@ -87,10 +87,8 @@
 static inline void ocfs_set_inode_lock_trans(ocfs_journal *journal,
 					     struct inode *inode)
 {
-	ocfs2_lock *lock = &OCFS_I(inode)->ip_lockres.lr_meta;
-
 	spin_lock(&trans_inc_lock);
-	lock->l_last_trans = journal->trans_id;
+	OCFS_I(inode)->ip_last_trans = journal->trans_id;
 	spin_unlock(&trans_inc_lock);
 }
 
@@ -102,11 +100,10 @@
 static inline int ocfs_inode_fully_checkpointed(struct inode *inode)
 {
 	int ret;
-	ocfs2_lock *lock = &OCFS_I(inode)->ip_lockres.lr_meta;
 	ocfs_journal *journal = OCFS2_SB(inode->i_sb)->journal;
 
 	spin_lock(&trans_inc_lock);
-	ret = time_after(journal->trans_id, lock->l_last_trans);
+	ret = time_after(journal->trans_id, OCFS_I(inode)->ip_last_trans);
 	spin_unlock(&trans_inc_lock);
 	return ret;
 }



More information about the Ocfs2-commits mailing list