From owner-freebsd-bugs Mon Jan 10 16:29:19 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id A98A7153BF for ; Mon, 10 Jan 2000 16:29:14 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id QAA22353; Mon, 10 Jan 2000 16:29:05 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id QAA67996; Mon, 10 Jan 2000 16:29:04 -0800 (PST) (envelope-from jdp@polstra.com) Date: Mon, 10 Jan 2000 16:29:04 -0800 (PST) Message-Id: <200001110029.QAA67996@vashon.polstra.com> To: dhagan@cs.vt.edu Subject: Re: bin/4238 - chpass time delay sensitivity [PATCH] In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Cc: bugs@freebsd.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In article , Daniel Hagan 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