Date: Thu, 11 Mar 2004 17:26:35 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: John Baldwin <jhb@FreeBSD.org> Cc: freebsd-current@FreeBSD.org Subject: Re: Expand libdisk to use 64bit size/offset Message-ID: <20040311171544.L4571@gamplex.bde.org> In-Reply-To: <200403101734.08022.jhb@FreeBSD.org> References: <7m7jxth70h.wl@black.imgsrc.co.jp> <200403101309.32292.jhb@FreeBSD.org> <200403101734.08022.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040311171544.L4571>