From owner-freebsd-current@FreeBSD.ORG Wed Mar 10 22:26:41 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D850216A4CE; Wed, 10 Mar 2004 22:26:41 -0800 (PST) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28F3943D2D; Wed, 10 Mar 2004 22:26:41 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i2B6QdnX001756; Thu, 11 Mar 2004 17:26:39 +1100 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i2B6QagC022906; Thu, 11 Mar 2004 17:26:37 +1100 Date: Thu, 11 Mar 2004 17:26:35 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: John Baldwin In-Reply-To: <200403101734.08022.jhb@FreeBSD.org> Message-ID: <20040311171544.L4571@gamplex.bde.org> References: <7m7jxth70h.wl@black.imgsrc.co.jp> <200403101309.32292.jhb@FreeBSD.org> <200403101734.08022.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Jun Kuriyama cc: freebsd-current@FreeBSD.org Subject: Re: Expand libdisk to use 64bit size/offset X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 11 Mar 2004 06:26:42 -0000 On Wed, 10 Mar 2004, John Baldwin wrote: > On Wednesday 10 March 2004 02:16 pm, Bruce Evans wrote: > > On Wed, 10 Mar 2004, John Baldwin wrote: > > > dadd_t is a uint32_t, so it won't help. Just use off_t for chunk > > > offset/size/end. > > > > Erm, daddr_t is (signed) int64_t. It is the correct type for storing > > ... > > Bah, I looked for u_daddr_t (which is 32-bit (why?)). Yikes. Because it didn't get updated when daddr_t was. I think it is not for unsigned disk addresses like its name suggests, but is for a bitmap of disk addresses, so it works up to disk address 2^(31+3) (8TB). I think it also only used for swap space disk addresses, and swap has other limits and shouldn't have size 8TB anyway (yet). So using only 32-bits for it is a good optimization. It is just a bit dangerous since there are no systematic overflow checks and it will overflow someday. Bruce