Change default VFS timestamp precision?

Erik Cederstrand erik at cederstrand.dk
Wed Dec 17 12:21:47 UTC 2014


> Den 16/12/2014 kl. 19.48 skrev John Baldwin <jhb at freebsd.org>:
> 
> We still ship with vfs.timestamp_precision=0 by default meaning that VFS 
> timestamps have a granularity of one second.  It is not unusual on modern 
> systems for multiple updates to a file or directory to occur within a single 
> second (and thus share the same effective timestamp).  This can break things 
> that depend on timestamps to know when something has changed or is stale (such 
> as make(1) or NFS clients).

Mistaking timestamps for uniqueness is really a design error of the consumer. Changing granularity to milliseconds will diminish the problem, but also create harder-to-debug problems when multiple updates do happen in the same millisecond. Is there no other way than timestamps to find out if a file has changed (apart from md5 which is too expensive)?

Erik


More information about the freebsd-arch mailing list