@@ -4,6 +4,20 @@
menu "File systems"
+config DEFAULT_STRICTATIME
+ bool "Use strictatime by default"
+ default n
+ help
+ Use strictatime as a default mount option.
+
+ Relatime became the default in 2007 to reduce I/O load on block
devices.
+
+ Enabling this option will restore historic behavior and provide
perfectly
+ accurate atimes, but the increase in write load may reduce
performance
+ and shorten the life of the block device.
+
+ If unsure, say N.
+
# Use unaligned word dcache accesses
config DCACHE_WORD_ACCESS
bool
@@ -2680,9 +2680,15 @@ long do_mount(const char *dev_name, const char
__user *dir_name,
if (retval)
goto dput_out;
- /* Default to relatime unless overriden */
+#ifdef CONFIG_DEFAULT_STRICTATIME
+ /* Default to strictatime unless overridden */
+ if (flags & MS_RELATIME)
+ mnt_flags |= MNT_RELATIME;
+#else
+ /* Default to relatime unless overridden */
if (!(flags & MS_NOATIME))
mnt_flags |= MNT_RELATIME;
+#endif
/* Separate the per-mountpoint flags */