2.6 open(O_EXCL) sets silly mtime
Subsystems (2)
PATCH 1/1 2.6 open(O_EXCL) sets silly mtime
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
Signature · 3 lines
Olaf Kirch | The Hardware Gods hate me. [email protected] | ---------------+
fs/nfs/nfs3proc.c renamed from fs/nfs/nfs3proc.c.excl +3 -0
@@ -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) */
Quoted 4 lines · Olaf Kirch
Hi,
the attached patch (relative to 2.6.5) is required to make sure a file created with
O_EXCLgets 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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 5 lines · Trond Myklebust
Quoted 2 lines
the attached patch (relative to 2.6.5) is required to make sure a file created with
O_EXCLgets 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
Signature · 13 lines
Olaf Kirch | The Hardware Gods hate me. [email protected] | ---------------+ ------------------------------------------------------- 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 - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs