Re: [PATCH] nfsd: Disable NFSv2 timestamp workaround for NFSv3+

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

 



On Wed, May 06, 2015 at 08:50:24AM +0200, Andreas Gruenbacher wrote:
> The NFSv2 protocol does not have a way to set the atime or mtime of a
> file to the server's current time, only to specific timestamps.  To make
> up for that, when a client sets both atime and mtime to the same
> timestamp and that timestamp is within the last half hour, the server
> sets them to its own current time instead.
> 
> The NFSv3 and later protocols do support setting atime or mtime to the
> server's current time and clients do use that, so skip the NFSv2
> workaround there.
> 
> With this change, clients which have write access but are not the owner
> can still do the equivalent of utimes("file", NULL), for example with
> "touch", but setting atime or mtime to any other value will now
> consistently fail.  This is also the local, non-NFS behavior.

How about moving the workaround into the NFSv2 specific code?

Looks like the call from nfsd_create() should never be used for this
workaround, and the call from nfsd_proc_create isn't ever used for
anything but size updates, leaving nfsd_proc_setattr as the only
caller for which we should apply this hack.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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