Change default VFS timestamp precision?

Garrett Wollman wollman at hergotha.csail.mit.edu
Fri Dec 19 20:12:06 UTC 2014


In article <20141219194800.GA29107 at stack.nl>, jilles at stack.nl writes:

>Because there is no API to set timestamps with nanosecond resolution,
>and therefore a cp -p copy of a file will appear older than the original
>with 99.9% probability. I think that is undesirable.

But that's something we can easily fix -- and should have done, years
ago.  Why don't we just *do* that?

Of course, in the case of NFS clients, where this issue is most
severe, the RPCs are already defined.  The underlying VOP_SETATTR has
no trouble with nanoseconds, either.  It's just a matter of providing
a standard library interface (and associated system call(s)) to do it,
and since Linux has already implemented this, we can just implement
that interface and applications will get it "for free".

-GAWollman


More information about the freebsd-arch mailing list