From owner-cvs-all Mon Apr 3 14:11:15 2000 Delivered-To: cvs-all@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id CDB1C37B982 for ; Mon, 3 Apr 2000 14:11:10 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (qmail 4465 invoked from network); 3 Apr 2000 21:11:06 -0000 Received: from bde.zeta.org.au (203.2.228.102) by gidora.zeta.org.au with SMTP; 3 Apr 2000 21:11:06 -0000 Date: Tue, 4 Apr 2000 07:10:47 +1000 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Poul-Henning Kamp Cc: "Justin T. Gibbs" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_mib.c vfs_bio.c src/sys/sys buf.h In-Reply-To: <23424.954794021@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 3 Apr 2000, Poul-Henning Kamp wrote: > In message , Bruce Eva > ns writes: > > >The disk layer already handles special sector sizes without adding much > >overhead to the usual case. I hope it can do something similar for > >b_offset. E.g., only one of { b_blkno, b_offset } needs to be valid. > >Theat one could be maintained by all layers and the other one ignored > >by all layers. > > Let me see if I read you right: > a 64bit byte offset in bio->bio_offset > no bio->bio_*blkno fields > we retain buf->b_blkno > > is that it ? Not quite. Something obviously has to set the disk-level block number (currently bio_pblkno). It should be set from a valid block number or offset (bio_blkno or bio_offset). There needs to be a validity bit or out-of bounds values to indicate invalid fields (I prefer the bit). Callers prefer bio_blkno if it is convenient and works (i.e., in most cases, until 1TB disks become common). bio_offset could be overlayed with bio_blkno to save space (this requires a validity bit). The validity bit essentially gives a block size. It is set when the block size is 1 and the full 64 bits of the offset are valid, and clear when the block size is DEV_BSIZE and only 32 bits of the offset are valid. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message