[Ocfs2-commits] jlbec commits r2267 - branches/alloc_inode/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue May 17 18:25:12 CDT 2005
Author: jlbec
Date: 2005-05-17 18:25:10 -0500 (Tue, 17 May 2005)
New Revision: 2267
Modified:
branches/alloc_inode/fs/ocfs2/inode.c
branches/alloc_inode/fs/ocfs2/journal.h
branches/alloc_inode/fs/ocfs2/ocfs.h
branches/alloc_inode/fs/ocfs2/super.c
Log:
o Move ip_created_trans and ip_last_trans to ocfs2_inode_info.
Modified: branches/alloc_inode/fs/ocfs2/inode.c
===================================================================
--- branches/alloc_inode/fs/ocfs2/inode.c 2005-05-17 22:33:51 UTC (rev 2266)
+++ branches/alloc_inode/fs/ocfs2/inode.c 2005-05-17 23:25:10 UTC (rev 2267)
@@ -291,7 +291,6 @@
"ip_blkno %"MLFu64" != i_blkno %"MLFu64"!\n",
OCFS2_I(inode)->ip_blkno, fe->i_blkno);
- OCFS_I(inode)->ip_inode = inode;
OCFS2_I(inode)->ip_clusters = fe->i_clusters;
OCFS2_I(inode)->ip_orphaned_slot = OCFS_INVALID_NODE_NUM;
@@ -727,6 +726,7 @@
void ocfs2_clear_inode(struct inode *inode)
{
int status;
+ struct ocfs2_inode_info *oi = OCFS2_I(inode);
ocfs_super *osb;
mlog_entry_void();
@@ -751,14 +751,14 @@
if (!INODE_DELETED(inode))
ocfs2_checkpoint_inode(inode);
- if (OCFS2_I(inode)->ip_blkno == -1)
+ if (oi->ip_blkno == -1)
BUG();
OCFS_ASSERT(list_empty(&OCFS_I(inode)->ip_io_markers));
/* blkno == 0 if this inode is newly created and hasn't been
* filled in yet. */
- if (OCFS2_I(inode)->ip_blkno == 0) {
+ if (oi->ip_blkno == 0) {
mlog(0, "uhm, blkno = 0!\n");
goto bail;
}
@@ -769,26 +769,27 @@
if (status < 0)
mlog_errno(status);
- ocfs2_lock_res_free(&OCFS2_I(inode)->ip_meta_lockres);
- ocfs2_lock_res_free(&OCFS2_I(inode)->ip_data_lockres);
+ ocfs2_lock_res_free(&oi->ip_meta_lockres);
+ ocfs2_lock_res_free(&oi->ip_data_lockres);
OCFS_I(inode)->ip_flags &= ~OCFS_INODE_INITIALIZED;
- if (OCFS2_I(inode)->ip_open_count)
+ if (oi->ip_open_count)
mlog(ML_ERROR,
"Clear inode of %"MLFu64" has open count %d\n",
- OCFS2_I(inode)->ip_blkno,
- OCFS2_I(inode)->ip_open_count);
- if (!list_empty(&OCFS2_I(inode)->ip_handle_list))
+ oi->ip_blkno, oi->ip_open_count);
+ if (!list_empty(&oi->ip_handle_list))
mlog(ML_ERROR,
"Clear inode of %"MLFu64" has non empty handle list\n",
- OCFS2_I(inode)->ip_blkno);
- if (OCFS2_I(inode)->ip_handle)
+ oi->ip_blkno);
+ if (oi->ip_handle)
mlog(ML_ERROR,
"Clear inode of %"MLFu64" has non empty handle pointer\n",
- OCFS2_I(inode)->ip_blkno);
- OCFS2_I(inode)->ip_flags = 0;
- OCFS2_I(inode)->ip_blkno = 0ULL;
+ oi->ip_blkno);
+ oi->ip_flags = 0;
+ oi->ip_blkno = 0ULL;
+ oi->ip_created_trans = 0;
+ oi->ip_last_trans = 0;
/* clean out the inode private ... why?! */
memset(inode->u.generic_ip, 0, sizeof(ocfs_inode_private));
Modified: branches/alloc_inode/fs/ocfs2/journal.h
===================================================================
--- branches/alloc_inode/fs/ocfs2/journal.h 2005-05-17 22:33:51 UTC (rev 2266)
+++ branches/alloc_inode/fs/ocfs2/journal.h 2005-05-17 23:25:10 UTC (rev 2267)
@@ -87,7 +87,7 @@
struct inode *inode)
{
spin_lock(&trans_inc_lock);
- OCFS_I(inode)->ip_last_trans = journal->j_trans_id;
+ OCFS2_I(inode)->ip_last_trans = journal->j_trans_id;
spin_unlock(&trans_inc_lock);
}
@@ -102,7 +102,7 @@
ocfs_journal *journal = OCFS2_SB(inode->i_sb)->journal;
spin_lock(&trans_inc_lock);
- ret = time_after(journal->j_trans_id, OCFS_I(inode)->ip_last_trans);
+ ret = time_after(journal->j_trans_id, OCFS2_I(inode)->ip_last_trans);
spin_unlock(&trans_inc_lock);
return ret;
}
@@ -121,9 +121,9 @@
return 0;
spin_lock(&trans_inc_lock);
ret = !(time_after(OCFS2_SB(inode->i_sb)->journal->j_trans_id,
- OCFS_I(inode)->ip_created_trans));
+ OCFS2_I(inode)->ip_created_trans));
if (!ret)
- OCFS_I(inode)->ip_created_trans = 0;
+ OCFS2_I(inode)->ip_created_trans = 0;
spin_unlock(&trans_inc_lock);
return ret;
}
@@ -132,7 +132,7 @@
struct inode *inode)
{
spin_lock(&trans_inc_lock);
- OCFS_I(inode)->ip_created_trans = osb->journal->j_trans_id;
+ OCFS2_I(inode)->ip_created_trans = osb->journal->j_trans_id;
spin_unlock(&trans_inc_lock);
}
Modified: branches/alloc_inode/fs/ocfs2/ocfs.h
===================================================================
--- branches/alloc_inode/fs/ocfs2/ocfs.h 2005-05-17 22:33:51 UTC (rev 2266)
+++ branches/alloc_inode/fs/ocfs2/ocfs.h 2005-05-17 23:25:10 UTC (rev 2267)
@@ -195,10 +195,6 @@
/* OCFS2 Inode Private Data */
typedef struct _ocfs_inode_private
{
- /* inode and feoff fields never change and are always safe to
- * read. */
- struct inode *ip_inode;
-
/* protects allocation changes on this inode. */
struct rw_semaphore ip_alloc_sem;
@@ -215,12 +211,6 @@
struct inode *ip_next_orphan;
u32 ip_dir_start_lookup;
-
- /* 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/alloc_inode/fs/ocfs2/super.c
===================================================================
--- branches/alloc_inode/fs/ocfs2/super.c 2005-05-17 22:33:51 UTC (rev 2266)
+++ branches/alloc_inode/fs/ocfs2/super.c 2005-05-17 23:25:10 UTC (rev 2267)
@@ -556,6 +556,8 @@
INIT_LIST_HEAD(&oi->ip_io_markers);
oi->ip_handle = NULL;
oi->ip_next_orphan = NULL;
+ oi->ip_created_trans = 0;
+ oi->ip_last_trans = 0;
init_rwsem(&oi->ip_alloc_sem);
init_MUTEX(&(oi->ip_io_sem));
More information about the Ocfs2-commits
mailing list