From owner-freebsd-arch Tue Oct 30 10:45:19 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 923CA37B401 for ; Tue, 30 Oct 2001 10:45:16 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id FAA02122; Wed, 31 Oct 2001 05:44:57 +1100 Date: Wed, 31 Oct 2001 05:43:56 +1100 (EST) From: Bruce Evans X-X-Sender: To: Peter Wemm Cc: Garance A Drosihn , Julian Elischer , Nate Williams , Subject: Re: 64 bit times revisited.. In-Reply-To: <20011030173210.59A5F39F4@overcee.netplex.com.au> Message-ID: <20011031052447.H4665-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 30 Oct 2001, Peter Wemm wrote: > Bruce Evans wrote: > > On Mon, 29 Oct 2001, Peter Wemm wrote: > > > > > ... UFS does not have future dates ... > > > > Script started on Tue Oct 30 21:04:39 2001 > > ttyv7:bde@delplex:/tmp> touch -t 203801011230 foo > > ttyv7:bde@delplex:/tmp> ls -l foo > > -rw-r--r-- 1 bde wheel 0 Jan 1 2038 foo > > ttyv7:bde@delplex:/tmp> exit > > I know that.. This is a contrived example. atime, mtime, ctime are defined > as the time that the file was last operated on. One does not do 30-year > mortgage calculations using ufs file timestamps. The only dates they *need* > to support is "a long time ago" through "now". Sure it's contrived, but it shows that UFS does have future dates. In fact, the timestamps for writable POSIX filesystems are implicitly specified to be able to represent all possible values of a time_t (including the invalid one (time_t)-1!), because all these values can be requested using utime(2) and there is no documented way that utime(2) can fail due to invalid times. This currently "just works" for ffs at least, because the timestamps really are time_t's. The timestamps for writable BSD filesystems are also implicitly specified to be able to represent all possible values of a long, becaue of the same considerations for utimes(2). This currently just doesn't work for ffs on alphas at least. Proposterously distant times passed by utimes(2) cause overflow in TIMEVAL_TO_TIMESPEC(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message