From owner-freebsd-hackers Fri Aug 14 17:08:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA20560 for freebsd-hackers-outgoing; Fri, 14 Aug 1998 17:08:38 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA20531 for ; Fri, 14 Aug 1998 17:08:25 -0700 (PDT) (envelope-from tlambert@usr04.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id RAA19649; Fri, 14 Aug 1998 17:07:52 -0700 (MST) Received: from usr04.primenet.com(206.165.6.204) via SMTP by smtp02.primenet.com, id smtpd019603; Fri Aug 14 17:07:45 1998 Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id RAA28867; Fri, 14 Aug 1998 17:07:41 -0700 (MST) From: Terry Lambert Message-Id: <199808150007.RAA28867@usr04.primenet.com> Subject: Re: 64-bit time_t To: drosih@rpi.edu (Garance A Drosihn) Date: Sat, 15 Aug 1998 00:07:41 +0000 (GMT) Cc: brett@lariat.org, rabtter@aye.net, mike@smith.net.au, hackers@FreeBSD.ORG In-Reply-To: from "Garance A Drosihn" at Aug 14, 98 01:19:53 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I believe that Linux is already moving to a 64-bit time_t. The BSDs > > are behind. Maybe that's why there's resistance here (I can't figure > > out any LOGICAL reason for resisting this necessary change.) > > Just that it's work, and it's work which does not need to be done > right this second (so to speak). It will most likely be somewhat > disruptive work. Perhaps we should consider it for FreeBSD 4.0, > because (IMO) it does seem like a good thing to do "sometime". > But right now we have other projects we should concentrate on and > finish off (IMO) before opening this one up. > > (elf, SMP, perl5, softupdates, etc) The FS is going to be worst, mostly because of the quota code and some ill-considered changes which used up the spare fields. The quota code is broken (struct dqblk has no spaces in it). But the quota code needs to become a stacking layer anyway. The ufsmount struct is broken (in the quota code), but it's not an on-disk structure, so it doesn't need to change. The fs_time field in struct fs is broken, but the purpose of the last written time is to avoid the AppleTalk polling refresh, so it can be deprecated out as an int32_t "spare" field, and the real thing can be kept in the in core data fields that are never written out. If you need to keep it on disk (why?), then you can steal two of the adjacent 32 bit long fields that can be calculated from the other fields at mount time, and themselves kept incore instead. The struct cg and ocg cg_time field is a bit sticky. Probably it would be best to spare it out and take two adjacent 32 bit fields from cg_sparecon (which is 13 32 bit fields long and reserved for future use). This will only work for cg, not ocg. cg_cgx could be overridden, and abused as half of the time_t, since you could calculate this value as well. It's even in the right place for the byte order. Unless there is a pressing use for the struct fs/struct cg/struct ocg values except for them to monotonically increment (note: *not* "increase"), then it might even be worthwhile to just mask the low 32 bits from the time_t. Which leaves us with the non-POSIX struct timespec, which ate our beloved spare longs which were put there for expanding time_t in the year 2038, and stolen by some nasty person to store useless nanoseconds (breaking stat's Y2039 compliance at the same time). Back out the timespec crap, and the FS should be easily convertable, leaving only the issues that Sun was kind enough to document for us: http://www.sun.com/y2000/strategy.html Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message