/* Clear all other flags. */
oi->ip_flags = 0;
- oi->ip_created_trans = 0;
oi->ip_dir_start_lookup = 0;
oi->ip_blkno = 0ULL;
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;
-
struct ocfs2_caching_info ip_metadata_cache;
struct ocfs2_extent_map ip_extent_map;
return 0;
spin_lock(&trans_inc_lock);
ret = !(time_after(OCFS2_SB(inode->i_sb)->journal->j_trans_id,
- OCFS2_I(inode)->ip_created_trans));
+ INODE_CACHE(inode)->ci_created_trans));
if (!ret)
- OCFS2_I(inode)->ip_created_trans = 0;
+ INODE_CACHE(inode)->ci_created_trans = 0;
spin_unlock(&trans_inc_lock);
return ret;
}
struct inode *inode)
{
spin_lock(&trans_inc_lock);
- OCFS2_I(inode)->ip_created_trans = osb->journal->j_trans_id;
+ INODE_CACHE(inode)->ci_created_trans = osb->journal->j_trans_id;
spin_unlock(&trans_inc_lock);
}
*/
const struct ocfs2_caching_operations *ci_ops;
+ /* next two are protected by trans_inc_lock */
+ /* which transaction were we created on? Zero if none. */
+ unsigned long ci_created_trans;
/* last transaction we were a part of. */
unsigned long ci_last_trans;
spin_lock_init(&oi->ip_lock);
ocfs2_extent_map_init(&oi->vfs_inode);
INIT_LIST_HEAD(&oi->ip_io_markers);
- oi->ip_created_trans = 0;
oi->ip_dir_start_lookup = 0;
init_rwsem(&oi->ip_alloc_sem);
ci->ci_flags |= OCFS2_CACHE_FL_INLINE;
ci->ci_num_cached = 0;
- if (clear)
+ if (clear) {
+ ci->ci_created_trans = 0;
ci->ci_last_trans = 0;
+ }
}
void ocfs2_metadata_cache_init(struct ocfs2_caching_info *ci,