[Ocfs2-devel] [PATCH 04/40] ocfs2: move ip_last_trans to struct ocfs2_caching_info
Tao Ma
tao.ma at oracle.com
Sun Feb 15 17:07:18 PST 2009
Joel,
a minor comment see inline.
Joel Becker wrote:
> We have the read side of metadata caching isolated to struct
> ocfs2_caching_info, now we need the write side. This means the journal
> functions. The journal only does a couple of things with struct inode.
>
> This change moves the ip_last_trans field onto struct
> ocfs2_caching_info as ci_last_trans. This field tells the journal
> whether a pending journal flush is required.
>
> Signed-off-by: Joel Becker <joel.becker at oracle.com>
> ---
> fs/ocfs2/inode.c | 10 +++++-----
> fs/ocfs2/inode.h | 2 --
> fs/ocfs2/journal.h | 5 +++--
> fs/ocfs2/ocfs2.h | 4 ++++
> fs/ocfs2/super.c | 1 -
> fs/ocfs2/uptodate.c | 22 +++++++++++++++++++---
> fs/ocfs2/uptodate.h | 1 +
> 7 files changed, 32 insertions(+), 13 deletions(-)
>
> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
> index fc55fcf..9cefa54 100644
> --- a/fs/ocfs2/inode.c
> +++ b/fs/ocfs2/inode.c
> @@ -1063,13 +1063,14 @@ void ocfs2_clear_inode(struct inode *inode)
> ocfs2_lock_res_free(&oi->ip_inode_lockres);
> ocfs2_lock_res_free(&oi->ip_open_lockres);
>
> - ocfs2_metadata_cache_purge(INODE_CACHE(inode));
> + ocfs2_metadata_cache_exit(INODE_CACHE(inode));
>
> - mlog_bug_on_msg(oi->ip_metadata_cache.ci_num_cached,
> + mlog_bug_on_msg(INODE_CACHE(inode)->ci_num_cached,
> "Clear inode of %llu, inode has %u cache items\n",
> - (unsigned long long)oi->ip_blkno, oi->ip_metadata_cache.ci_num_cached);
> + (unsigned long long)oi->ip_blkno,
> + INODE_CACHE(inode)->ci_num_cached);
>
> - mlog_bug_on_msg(!(oi->ip_metadata_cache.ci_flags &
> + mlog_bug_on_msg(!(INODE_CACHE(inode)->ci_flags &
> OCFS2_CACHE_FL_INLINE),
> "Clear inode of %llu, inode has a bad flag\n",
> (unsigned long long)oi->ip_blkno);
These 2 lines(mlog) has nothing to do with your ip_last_trans, why
change them? And if you really want to change it, it may be included in
the patch you add INODE_CACHE I guess?
Regards,
Tao
More information about the Ocfs2-devel
mailing list