Re: [PATCH] nfsd: special case truncates some more

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-01-23 at 18:38 +0100, hch wrote:
> On Mon, Jan 23, 2017 at 05:25:34PM +0000, Trond Myklebust wrote:
> > In that case the client will be required to continue to need to
> > send
> > mtime/ctime in order to ensure that we get the same historical
> > semantics w.r.t. ftruncate() vs truncate().
> > 
> > IOW: It's not a question of the client being lazy about clearing
> > the
> > flags. It's a question of enforcing the correct semantics.
> 
> No, the NFS spec requires the server to add an implicit mtime
> when the size actually changes.  In fact the current code has a
> comment
> pointing to the section:
> 
>  * RFC5661, Section 18.30.4:
>  *   Changing the size of a file with SETATTR indirectly
>  *   changes the time_modify and change attributes.
>  *
>  * (and similar for the older RFCs)
> 
> And yes, I've double checked that in the RFC.

Sure, but truncate() on POSIX adds the requirement that the mtime/ctime
should change even when the file size is not changed.

-- 
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@xxxxxxxxxxxxxxx
��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux