aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorValerie Henson <val_henson@linux.intel.com>2006-12-13 03:34:34 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:50 -0500
commit47ae32d6a54955a041cdc30b06d0bb16e75f68d5 (patch)
treeb28623f98ae536342d35443c6548c373df342e7f /fs/namespace.c
parentb227613841d4d211a10c5860acc73e133b613bc0 (diff)
[PATCH] relative atime
Add "relatime" (relative atime) support. 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. A corresponding patch against mount(8) is available at http://userweb.kernel.org/~akpm/mount-relative-atime.txt Signed-off-by: Valerie Henson <val_henson@linux.intel.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Cc: Karel Zak <kzak@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index fde8553faa76..5ef336c1103c 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -368,6 +368,7 @@ static int show_vfsmnt(struct seq_file *m, void *v)
368 { MNT_NOEXEC, ",noexec" }, 368 { MNT_NOEXEC, ",noexec" },
369 { MNT_NOATIME, ",noatime" }, 369 { MNT_NOATIME, ",noatime" },
370 { MNT_NODIRATIME, ",nodiratime" }, 370 { MNT_NODIRATIME, ",nodiratime" },
371 { MNT_RELATIME, ",relatime" },
371 { 0, NULL } 372 { 0, NULL }
372 }; 373 };
373 struct proc_fs_info *fs_infop; 374 struct proc_fs_info *fs_infop;
@@ -1405,9 +1406,11 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
1405 mnt_flags |= MNT_NOATIME; 1406 mnt_flags |= MNT_NOATIME;
1406 if (flags & MS_NODIRATIME) 1407 if (flags & MS_NODIRATIME)
1407 mnt_flags |= MNT_NODIRATIME; 1408 mnt_flags |= MNT_NODIRATIME;
1409 if (flags & MS_RELATIME)
1410 mnt_flags |= MNT_RELATIME;
1408 1411
1409 flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | 1412 flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE |
1410 MS_NOATIME | MS_NODIRATIME); 1413 MS_NOATIME | MS_NODIRATIME | MS_RELATIME);
1411 1414
1412 /* ... and get the mountpoint */ 1415 /* ... and get the mountpoint */
1413 retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd); 1416 retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd);