public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Don't set relatime when noatime is specified
@ 2009-04-19 16:40 Andi Kleen
  2009-04-19 17:54 ` Matthew Garrett
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2009-04-19 16:40 UTC (permalink / raw)
  To: viro, torvalds, linux-kernel, mjg

Don't set relatime when noatime is specified

Since 

commit 0a1c01c9477602ee8b44548a9405b2c1d587b5a2
Author: Matthew Garrett <mjg@redhat.com>
Date:   Thu Mar 26 17:53:14 2009 +0000

    Make relatime default

when a file system is mounted explicitely with noatime it gets both
relatime and noatime set. 

This shows up like this in /proc/mounts:

/dev/xxx /yyy ext3 rw,noatime,relatime,errors=continue,data=writeback 0 0

That looks strange.  The VFS uses noatime in this case, but both
flags are set. So it's more a cosmetic issue, but still better
to fix.

Cc: mjg@redhat.com

Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
 fs/namespace.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.30-rc2-ak/fs/namespace.c
===================================================================
--- linux-2.6.30-rc2-ak.orig/fs/namespace.c	2009-04-08 12:15:15.000000000 +0200
+++ linux-2.6.30-rc2-ak/fs/namespace.c	2009-04-19 18:13:11.000000000 +0200
@@ -1920,8 +1920,9 @@
 	if (data_page)
 		((char *)data_page)[PAGE_SIZE - 1] = 0;
 
-	/* Default to relatime */
-	mnt_flags |= MNT_RELATIME;
+	/* Default to relatime unless overriden */
+	if (!(flags & MS_NOATIME))
+		mnt_flags |= MNT_RELATIME;
 
 	/* Separate the per-mountpoint flags */
 	if (flags & MS_NOSUID)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Don't set relatime when noatime is specified
  2009-04-19 16:40 [PATCH] Don't set relatime when noatime is specified Andi Kleen
@ 2009-04-19 17:54 ` Matthew Garrett
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Garrett @ 2009-04-19 17:54 UTC (permalink / raw)
  To: Andi Kleen; +Cc: viro, torvalds, linux-kernel

On Sun, Apr 19, 2009 at 06:40:43PM +0200, Andi Kleen wrote:

> That looks strange.  The VFS uses noatime in this case, but both
> flags are set. So it's more a cosmetic issue, but still better
> to fix.
> 
> Cc: mjg@redhat.com

Acked-by: Matthew Garrett <mjg@redhat.com>

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-19 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-19 16:40 [PATCH] Don't set relatime when noatime is specified Andi Kleen
2009-04-19 17:54 ` Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox