aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2009-03-26 13:49:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 13:56:35 -0400
commitd0adde574b8487ef30f69e2d08bba769e4be513f (patch)
treefa8b98978bc9ebe607cbdf78c4ed13eeb545ba80 /fs/namespace.c
parent11ff6f05f1e836a6a02369a4c4b64757e484adc1 (diff)
Add a strictatime mount option
Add support for explicitly requesting full atime updates. This makes it possible for kernels to default to relatime but still allow userspace to override it. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 06f8e63f6cb1..d0659ec291c9 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -780,6 +780,7 @@ static void show_mnt_opts(struct seq_file *m, struct vfsmount *mnt)
780 { MNT_NOATIME, ",noatime" }, 780 { MNT_NOATIME, ",noatime" },
781 { MNT_NODIRATIME, ",nodiratime" }, 781 { MNT_NODIRATIME, ",nodiratime" },
782 { MNT_RELATIME, ",relatime" }, 782 { MNT_RELATIME, ",relatime" },
783 { MNT_STRICTATIME, ",strictatime" },
783 { 0, NULL } 784 { 0, NULL }
784 }; 785 };
785 const struct proc_fs_info *fs_infop; 786 const struct proc_fs_info *fs_infop;
@@ -1932,11 +1933,14 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
1932 mnt_flags |= MNT_NODIRATIME; 1933 mnt_flags |= MNT_NODIRATIME;
1933 if (flags & MS_RELATIME) 1934 if (flags & MS_RELATIME)
1934 mnt_flags |= MNT_RELATIME; 1935 mnt_flags |= MNT_RELATIME;
1936 if (flags & MS_STRICTATIME)
1937 mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME);
1935 if (flags & MS_RDONLY) 1938 if (flags & MS_RDONLY)
1936 mnt_flags |= MNT_READONLY; 1939 mnt_flags |= MNT_READONLY;
1937 1940
1938 flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | 1941 flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE |
1939 MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT); 1942 MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
1943 MS_STRICTATIME);
1940 1944
1941 /* ... and get the mountpoint */ 1945 /* ... and get the mountpoint */
1942 retval = kern_path(dir_name, LOOKUP_FOLLOW, &path); 1946 retval = kern_path(dir_name, LOOKUP_FOLLOW, &path);