From owner-freebsd-current@FreeBSD.ORG Mon Jul 16 14:58:14 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D242116A403; Mon, 16 Jul 2007 14:58:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 75C2313C4B2; Mon, 16 Jul 2007 14:58:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.7b8) with ESMTP id 196960712 for multiple; Mon, 16 Jul 2007 11:06:01 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l6GEvMLB032514; Mon, 16 Jul 2007 10:57:42 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Ivan Voras Date: Mon, 16 Jul 2007 10:49:27 -0400 User-Agent: KMail/1.9.6 References: <200707160755.14498.jhb@freebsd.org> <469B6F1C.6020605@fer.hr> In-Reply-To: <469B6F1C.6020605@fer.hr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707161049.27779.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 16 Jul 2007 10:57:42 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3681/Mon Jul 16 09:16:18 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Debugging times X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2007 14:58:14 -0000 On Monday 16 July 2007 09:14:04 am Ivan Voras wrote: > John Baldwin wrote: > > > It's more that we use the filesystem's timestamp as a way to validate the > > timestamp from the RTC and to do a fixup if the RTC appears to be dead. > > Why not use something that doesn't depend on external factors, like > kernel build time (AFAIK it's embedded somewhere - at least it's written > on boot)? This way people using non-UFS file systems wouldn't get bitten. The kernel build time isn't updated if you leave a machine up for 2 years, but the filesystem mount time is. Also, the kernel build time is not stored in a raw date format, but as part of a string, so you'd have to import strftime(3) into the kernel. The kernel build time is also localized, so you'd have to import the timezone database into the kernel as well. This Would Be Bad (tm). -- John Baldwin