Date: Mon, 10 Jan 2000 16:29:04 -0800 (PST) From: John Polstra <jdp@polstra.com> To: dhagan@cs.vt.edu Cc: bugs@freebsd.org Subject: Re: bin/4238 - chpass time delay sensitivity [PATCH] Message-ID: <200001110029.QAA67996@vashon.polstra.com> In-Reply-To: <Pine.OSF.4.02.10001100920220.1760-100000@vtopus.cs.vt.edu> References: <Pine.OSF.4.02.10001100920220.1760-100000@vtopus.cs.vt.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.OSF.4.02.10001100920220.1760-100000@vtopus.cs.vt.edu>, Daniel Hagan <dhagan@cs.vt.edu> wrote: > J"org wrote a long time ago: > > Fix: include st_mtimensec into the consideration. > > st_mtimensec is only available if _POSIX_SOURCE is defined. However, > defining this in the Makefile breaks lots of other things. The stat > struct includes st_mtimespec.tv_nsec, which should be equivalent (I > think). Yes, it is. > Here's a patch that uses this field. Are there any reasons to > avoid using this? (is this a non-standard field that might disappear?) The value wasn't filled in prior to -current of late August 1999. In -stable it still isn't filled in, and I believe it can contain garbage under some circumstances. Even in -current the value is 0 by default. You can enable better precision with the "vfs.timestamp_precision" sysctl. It can have these settings (from sys/kern/vfs_subr.c): * Knob to control the precision of file timestamps: * * 0 = seconds only; nanoseconds zeroed. * 1 = seconds and nanoseconds, accurate within 1/HZ. * 2 = seconds and nanoseconds, truncated to microseconds. * >=3 = seconds and nanoseconds, maximum precision. It's the usual trade-off between precision and performance. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001110029.QAA67996>
