LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Valerie Henson <val_henson@linux.intel.com>,
	Steven Whitehouse <steve@chygwyn.com>,
	linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com,
	linux-fsdevel@vger.kernel.org, Al Viro <viro@ftp.linux.org.uk>
Subject: Re: Relative atime (was Re: What's in ocfs2.git)
Date: Tue, 5 Dec 2006 22:11:45 -0800	[thread overview]
Message-ID: <20061205221145.53dab6bf.akpm@osdl.org> (raw)
In-Reply-To: <20061205222027.GA4497@ca-server1.us.oracle.com>

On Tue, 5 Dec 2006 14:20:27 -0800
Mark Fasheh <mark.fasheh@oracle.com> 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.

  reply	other threads:[~2006-12-06  6:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 20:31 What's in ocfs2.git Mark Fasheh
2006-12-04 10:54 ` Steven Whitehouse
2006-12-05  0:10   ` Mark Fasheh
2006-12-05  0:36     ` Relative atime (was Re: What's in ocfs2.git) Valerie Henson
2006-12-05  0:56       ` Valerie Henson
2006-12-05 22:20       ` Mark Fasheh
2006-12-06  6:11         ` Andrew Morton [this message]
2006-12-06  4:58       ` Andrew Morton
2006-12-06  8:58         ` Valerie Henson
2006-12-06  9:42         ` Eric Dumazet
2006-12-06 12:48           ` Arjan van de Ven
2006-12-09  3:15         ` Valerie Henson
2006-12-12  9:30           ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061205221145.53dab6bf.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.fasheh@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=steve@chygwyn.com \
    --cc=val_henson@linux.intel.com \
    --cc=viro@ftp.linux.org.uk \
    --subject='Re: Relative atime (was Re: What'\''s in ocfs2.git)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).