Re: Relative atime (was Re: What's in ocfs2.git)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 5 Dec 2006 14:20:27 -0800
Mark Fasheh <mark.fasheh@xxxxxxxxxx> wrote:

> Update ocfs2_should_update_atime() to understand the MNT_RELATIME flag and
> to test against mtime / ctime accordingly.
> 
> ...
>
> --- a/fs/ocfs2/file.c
> +++ b/fs/ocfs2/file.c
> @@ -154,6 +154,15 @@ int ocfs2_should_update_atime(struct ino
>  		return 0;
>  
>  	now = CURRENT_TIME;
> +
> +	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;

So if atime == mtime == ctime, we don't update the atime.

I think we should.  It seems risky to leave them all equal.
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux