All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6 open(O_EXCL) sets silly mtime
@ 2004-04-20  8:18 Olaf Kirch
  2004-04-20 14:47 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Kirch @ 2004-04-20  8:18 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

Hi,

the attached patch (relative to 2.6.5) is required to make sure a file
created with O_EXCL gets the proper mtime.

Olaf
-- 
Olaf Kirch     |  The Hardware Gods hate me.
okir@suse.de   |
---------------+ 

[-- Attachment #2: nfs-o-excl-mtime --]
[-- Type: text/plain, Size: 450 bytes --]

--- linux-2.6.5/fs/nfs/nfs3proc.c.excl	2004-04-19 14:35:47.000000000 +0200
+++ linux-2.6.5/fs/nfs/nfs3proc.c	2004-04-19 16:55:50.000000000 +0200
@@ -375,6 +375,9 @@
 		};
 		dprintk("NFS call  setattr (post-create)\n");
 
+		if (!(sattr->ia_valid & ATTR_MTIME_SET))
+			sattr->ia_valid |= ATTR_MTIME;
+
 		/* Note: we could use a guarded setattr here, but I'm
 		 * not sure this buys us anything (and I'd have
 		 * to revamp the NFSv3 XDR code) */

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

* Re: [PATCH] 2.6 open(O_EXCL) sets silly mtime
  2004-04-20  8:18 [PATCH] 2.6 open(O_EXCL) sets silly mtime Olaf Kirch
@ 2004-04-20 14:47 ` Trond Myklebust
  2004-04-21  8:17   ` Olaf Kirch
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2004-04-20 14:47 UTC (permalink / raw)
  To: Olaf Kirch; +Cc: nfs

On Tue, 2004-04-20 at 04:18, Olaf Kirch wrote:
> Hi,
> 
> the attached patch (relative to 2.6.5) is required to make sure a file
> created with O_EXCL gets the proper mtime.

Well spotted. Should we also do the same for atime? AFAICS the server is
allowed to trash that too.

Hmm... Looking at the NFSv4 code, we really need to fix the same issues
up there too.

Cheers,
  Trond


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* Re: [PATCH] 2.6 open(O_EXCL) sets silly mtime
  2004-04-20 14:47 ` Trond Myklebust
@ 2004-04-21  8:17   ` Olaf Kirch
  0 siblings, 0 replies; 3+ messages in thread
From: Olaf Kirch @ 2004-04-21  8:17 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: nfs

On Tue, Apr 20, 2004 at 10:47:53AM -0400, Trond Myklebust wrote:
> > the attached patch (relative to 2.6.5) is required to make sure a file
> > created with O_EXCL gets the proper mtime.
> 
> Well spotted. Should we also do the same for atime? AFAICS the server is
> allowed to trash that too.

If the spec says so, we should make sure atime gets set as well, yes.
I only fixed the mntime case because that's what the Linux nfsd clobbers.

Olaf
-- 
Olaf Kirch     |  The Hardware Gods hate me.
okir@suse.de   |
---------------+ 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

end of thread, other threads:[~2004-04-21  8:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-20  8:18 [PATCH] 2.6 open(O_EXCL) sets silly mtime Olaf Kirch
2004-04-20 14:47 ` Trond Myklebust
2004-04-21  8:17   ` Olaf Kirch

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.