Subject: Re: kern/31430: ptyfs isn't getting mtime right
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Simon Burge <simonb@wasabisystems.com>
List: netbsd-bugs
Date: 10/12/2005 16:37:01
The following reply was made to PR kern/31430; it has been noted by GNATS.
From: Simon Burge <simonb@wasabisystems.com>
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Cc: christos@netbsd.org, gnats-bugs@netbsd.org,
kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: kern/31430: ptyfs isn't getting mtime right
Date: Thu, 13 Oct 2005 02:36:20 +1000
YAMAMOTO Takashi wrote:
> > The patch below is a result of a discussion off-line with Christos.
> > The granularity of the mtime doesn't need to be down to the nanosecond
> > - using the kernel "time" variable (which is updated on each
> > hardclock call) saves a potentially relatively expensive call to
> > microtime/nanotime for each write, and is more than accurate enough to
> > track pty idle times.
>
> it isn't good to mix "time" and nanotime
> because it can make timestamps go backward sometimes.
You're suggesting that ptyfs_itimes() use "time" as well if any of the
timespec pointers are NULL then? Or a different solution?
Cheers,
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Support and Service: http://www.wasabisystems.com/