From: Valerie Henson <val_henson@linux.intel.com>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: Akkana Peck <akkana@shallowsky.com>,
Mark Fasheh <mark.fasheh@oracle.com>,
Jesse Barnes <jesse.barnes@intel.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Chris Wedgewood <cw@f00f.org>,
jsipek@cs.sunysb.edu, Al Viro <viro@ftp.linux.org.uk>,
Christoph Hellwig <hch@lst.de>, Adrian Bunk <bunk@stusta.de>
Subject: [patch] Relative atime - userspace
Date: Fri, 25 Aug 2006 16:56:19 -0700 [thread overview]
Message-ID: <20060825235619.GB25003@goober> (raw)
In-Reply-To: <20060825235215.820563000@linux.intel.com>
Add the "relatime" (relative atime) option support to mount. Relative
atime only updates the atime if the previous atime is older than the
mtime or ctime. Like noatime, but useful for applications like mutt
that need to know when a file has been read since it was last
modified.
Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
---
mount/mount.8 | 7 +++++++
mount/mount.c | 6 ++++++
mount/mount_constants.h | 4 ++++
3 files changed, 17 insertions(+)
--- util-linux-2.13-pre7.orig/mount/mount.8
+++ util-linux-2.13-pre7/mount/mount.8
@@ -586,6 +586,13 @@ access on the news spool to speed up new
.B nodiratime
Do not update directory inode access times on this filesystem.
.TP
+.B relatime
+Update inode access times relative to modify or change time. Access
+time is only updated if the previous access time was earlier than the
+current modify or change time. (Similar to noatime, but doesn't break
+mutt or other applications that need to know if a file has been read
+since the last time it was modified.)
+.TP
.B noauto
Can only be mounted explicitly (i.e., the
.B \-a
--- util-linux-2.13-pre7.orig/mount/mount.c
+++ util-linux-2.13-pre7/mount/mount.c
@@ -164,6 +164,12 @@ static const struct opt_map opt_map[] =
{ "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */
{ "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */
#endif
+#ifdef MS_RELATIME
+ { "relatime", 0, 0, MS_RELATIME }, /* Update access times relative to
+ mtime/ctime */
+ { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
+ to mtime/ctime */
+#endif
{ NULL, 0, 0, 0 }
};
--- util-linux-2.13-pre7.orig/mount/mount_constants.h
+++ util-linux-2.13-pre7/mount/mount_constants.h
@@ -57,6 +57,10 @@ if we have a stack or plain mount - moun
#ifndef MS_VERBOSE
#define MS_VERBOSE 0x8000 /* 32768 */
#endif
+#ifndef MS_RELATIME
+#define MS_RELATIME 0x200000 /* 200000: Update access times relative
+ to mtime/ctime */
+#endif
/*
* Magic mount flag number. Had to be or-ed to the flag values.
*/
next prev parent reply other threads:[~2006-08-25 23:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 23:52 [patch 0/1] Relative atime Valerie Henson
2006-08-25 23:52 ` [patch 1/1] Relative atime - kernel side Valerie Henson
2006-08-25 23:56 ` Valerie Henson [this message]
2006-08-28 21:49 ` [patch] Relative atime - userspace Josef Sipek
2006-08-29 0:14 ` Valerie Henson
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=20060825235619.GB25003@goober \
--to=val_henson@linux.intel.com \
--cc=akkana@shallowsky.com \
--cc=arjan@linux.intel.com \
--cc=bunk@stusta.de \
--cc=cw@f00f.org \
--cc=hch@lst.de \
--cc=jesse.barnes@intel.com \
--cc=jsipek@cs.sunysb.edu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.fasheh@oracle.com \
--cc=viro@ftp.linux.org.uk \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®