freebsd-skq/sys
John Polstra a2801b7731 Support full-precision file timestamps. Until now, only the seconds
have been maintained, and that is still the default.  A new sysctl
variable "vfs.timestamp_precision" can be used to enable higher
levels of precision:

      0 = seconds only; nanoseconds zeroed (default).
      1 = seconds and nanoseconds, accurate within 1/HZ.
      2 = seconds and nanoseconds, truncated to microseconds.
    >=3 = seconds and nanoseconds, maximum precision.

Level 1 uses getnanotime(), which is fast but can be wrong by up
to 1/HZ.  Level 2 uses microtime().  It might be desirable for
consistency with utimes() and friends, which take timeval structures
rather than timespecs.  Level 3 uses nanotime() for the higest
precision.

I benchmarked levels 0, 1, and 3 by copying a 550 MB tree with
"cpio -pdu".  There was almost negligible difference in the system
times -- much less than 1%, and less than the variation among
multiple runs at the same level.  Bruce Evans dreamed up a torture
test involving 1-byte reads with intervening fstat() calls, but
the cpio test seems more realistic to me.

This feature is currently implemented only for the UFS (FFS and
MFS) filesystems.  But I think it should be easy to support it in
the others as well.

An earlier version of this was reviewed by Bruce.  He's not to
blame for any breakage I've introduced since then.

Reviewed by:	bde (an earlier version of the code)
1999-08-22 00:15:16 +00:00
..
alpha This commit adds device driver support for the Sundance Technologies ST201 1999-08-21 18:34:58 +00:00
amd64 This commit adds device driver support for the Sundance Technologies ST201 1999-08-21 18:34:58 +00:00
boot Fix a bunch of broken cross-references 1999-08-18 05:55:22 +00:00
cam Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
coda Don't examine vp->v_tag (see comment in vnode.h) 1999-08-13 13:05:08 +00:00
compat Fix a bug in debug-printfs of struct linux_termios fields, where I forgot to 1999-08-17 10:27:55 +00:00
compile
conf This commit adds device driver support for the Sundance Technologies ST201 1999-08-21 18:34:58 +00:00
contrib SMP: Release the giant lock while we work the flash array 1999-08-15 14:30:09 +00:00
ddb
dev Clean up after removing sys/eventhandler.h from sys/systm.h at the last 1999-08-21 22:10:49 +00:00
fs Let processes retrieve their argv through procfs. Revert to the original 1999-08-19 19:41:08 +00:00
geom Spring cleaning around strategy and disklabels/slices: 1999-08-14 11:40:51 +00:00
gnu The bdevsw() and cdevsw() are now identical, so kill the former. 1999-08-13 10:29:38 +00:00
i4b
i386 Clean up after removing sys/eventhandler.h from sys/systm.h at the last 1999-08-21 22:10:49 +00:00
isa Recognize Interlink VersaPad. `Tap' action will be recognized 1999-08-17 12:14:13 +00:00
isofs/cd9660 The bdevsw() and cdevsw() are now identical, so kill the former. 1999-08-13 10:29:38 +00:00
kern Support full-precision file timestamps. Until now, only the seconds 1999-08-22 00:15:16 +00:00
libkern
miscfs Let processes retrieve their argv through procfs. Revert to the original 1999-08-19 19:41:08 +00:00
modules This commit adds device driver support for the Sundance Technologies ST201 1999-08-21 18:34:58 +00:00
msdosfs The bdevsw() and cdevsw() are now identical, so kill the former. 1999-08-13 10:29:38 +00:00
net Hopefully make IFMEDIA_DEBUG compile. if_xname[] is a NetBSD addition, 1999-08-18 13:13:01 +00:00
netatalk
netatm Clean up after removing sys/eventhandler.h from sys/systm.h at the last 1999-08-21 22:10:49 +00:00
netinet To christen the brand new security category for syslog, we get IPFW 1999-08-21 18:35:55 +00:00
netipx
netkey Fix a printf(3) formatter to match its variable. 1999-08-17 22:11:02 +00:00
netnatm
netns
nfs Convert all the nfs macros to do { blah } while (0) to ensure it 1999-08-19 14:50:12 +00:00
nfsclient Convert all the nfs macros to do { blah } while (0) to ensure it 1999-08-19 14:50:12 +00:00
nfsserver Convert all the nfs macros to do { blah } while (0) to ensure it 1999-08-19 14:50:12 +00:00
ntfs The bdevsw() and cdevsw() are now identical, so kill the former. 1999-08-13 10:29:38 +00:00
pc98 Merge from sys/i386/isa/spkr.c revision 1.38. 1999-08-18 08:24:35 +00:00
pccard (1) Fix a spelling mistake in a comment. 1999-08-17 22:13:06 +00:00
pci Clean up after removing sys/eventhandler.h from sys/systm.h at the last 1999-08-21 22:10:49 +00:00
posix4
powerpc Fix a nasty kld bug where modules with objects of type GLOB_DAT which had 1999-08-20 14:21:35 +00:00
rpc
svr4 Avoid possible panic by checking for EFAULT from copyinstr() during 1999-08-14 10:52:33 +00:00
sys Support full-precision file timestamps. Until now, only the seconds 1999-08-22 00:15:16 +00:00
tools This commit adds support for the NetBSD MII abstraction layer and 1999-08-21 17:40:53 +00:00
ufs Support full-precision file timestamps. Until now, only the seconds 1999-08-22 00:15:16 +00:00
vm Remove two unused variable declarations. 1999-08-22 00:01:46 +00:00
Makefile