Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7e913c53609d5e8374f55d6f29c0bcd6650a2362 Commit: 7e913c53609d5e8374f55d6f29c0bcd6650a2362 Parent: 47ae32d6a54955a041cdc30b06d0bb16e75f68d5 Author: Mark Fasheh <[EMAIL PROTECTED]> AuthorDate: Wed Dec 13 00:34:35 2006 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed Dec 13 09:05:50 2006 -0800
[PATCH] ocfs2: relative atime support Update ocfs2_should_update_atime() to understand the MNT_RELATIME flag and to test against mtime / ctime accordingly. [EMAIL PROTECTED]: cleanups] Signed-off-by: Mark Fasheh <[EMAIL PROTECTED]> Cc: Valerie Henson <[EMAIL PROTECTED]> Cc: Al Viro <[EMAIL PROTECTED]> Cc: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/ocfs2/file.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index e9a82ad..9fd590b 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -153,6 +153,14 @@ int ocfs2_should_update_atime(struct inode *inode, ((vfsmnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))) return 0; + if (vfsmnt->mnt_flags & MNT_RELATIME) { + if ((timespec_compare(&inode->i_atime, &inode->i_mtime) <= 0) || + (timespec_compare(&inode->i_atime, &inode->i_ctime) <= 0)) + return 1; + + return 0; + } + now = CURRENT_TIME; if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum)) return 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html