NFS incorrectly update atime

Bruce Evans bde at zeta.org.au
Thu Sep 25 17:07:07 PDT 2003


On Thu, 25 Sep 2003, Doug White wrote:

> On Thu, 25 Sep 2003, Rong-en Fan wrote:
>
> > My application is NFS mail spool, so atime is important to me.
> > I've tested it on Linux client, it's atime not updated in this case.
> > So, I don't know if we can fix this or any workaround?

I think it is not easy to fix or work around.  Linux has timestamping
at a higher level, so I think low-level i/o's done by nfs would
avoid it without really trying, leaving the problem of making the
client tell the server when to do the updates.  I'm not very familiar
with nfs's protocols for metadata, but seem to remember that none
are used for atime updates for reads of data that has been cached
by the client, and that this is important for efficiency.  So atime
updates are fundamentally broken for nfs.

> This is an exceptionally bad idea, unless your application knows it is
> talking to NFS.  There is no locking and sendmail, etc. expect to be able
> to use file locking to protect queue files from itself.

There is nfs locking in -current.

Bruce


More information about the freebsd-fs mailing list