All of lore.kernel.org
 help / color / mirror / Atom feed
From: shentino@gmail.com (Raymond Jennings)
To: kernelnewbies@lists.kernelnewbies.org
Subject: [PATCH] allow strictatime to be set as a global default
Date: Fri, 18 Dec 2015 06:42:35 -0800	[thread overview]
Message-ID: <1450449755.29773.0@smtp.gmail.com> (raw)

I'm aware of a little tiff regarding strictatime in the past, and I 
think I came up with a patch that might help everyone get what they 
want.  I'm already using it myself.

I've had some review on #kernelnewbies for technical issues, how does 
this look?

---

diff --git a/fs/Kconfig b/fs/Kconfig
index 4b917eb..6ce72d8 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -4,17 +4,6 @@

 menu "File systems"

-config DEFAULT_STRICTATIME
-	bool "Use strictatime by default"
-	default n
-	help
-	  Use strictatime as a default mount option.
-
-	  Strictatime preserves ancient historic behavior of keeping the 
atime field always up to date.
-	  However, it was changed in 2007 to relatime to reduce I/O load on 
block devices.
-
-	  If unsure, say N.
-
 # Use unaligned word dcache accesses
 config DCACHE_WORD_ACCESS
        bool
diff --git a/fs/namespace.c b/fs/namespace.c
index 48e7c15..0570729 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2680,15 +2680,9 @@ long do_mount(const char *dev_name, const char 
__user *dir_name,
 	if (retval)
 		goto dput_out;

-#ifdef CONFIG_DEFAULT_STRICTATIME
-	/* Default to strictatime unless overridden */
-	if (flags & MS_RELATIME)
-		mnt_flags |= MNT_RELATIME;
-#else
-	/* Default to relatime unless overridden */
+	/* Default to relatime unless overriden */
 	if (!(flags & MS_NOATIME))
 		mnt_flags |= MNT_RELATIME;
-#endif

 	/* Separate the per-mountpoint flags */
 	if (flags & MS_NOSUID)

             reply	other threads:[~2015-12-18 14:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 14:42 Raymond Jennings [this message]
2015-12-18 18:50 ` [PATCH] allow strictatime to be set as a global default Mandeep Sandhu
2015-12-18 22:12   ` Raymond Jennings
2015-12-18 22:21     ` Mandeep Sandhu
2015-12-19 21:41       ` Raymond Jennings
2015-12-20  1:25         ` Mandeep Sandhu

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=1450449755.29773.0@smtp.gmail.com \
    --to=shentino@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.