From owner-cvs-all Mon Apr 3 14:28:58 2000 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 2145237B644; Mon, 3 Apr 2000 14:28:52 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.freebsd.dk [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.3) with ESMTP id XAA23863; Mon, 3 Apr 2000 23:28:37 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Bruce Evans 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: Your message of "Tue, 04 Apr 2000 07:10:47 +1000." Date: Mon, 03 Apr 2000 23:28:37 +0200 Message-ID: <23861.954797317@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , Bruce Ev ans writes: >> 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. Uhm Bruce, the code to implement this dual valid bit thingie will take up more space than we will ever save by doing it. Lets keep it simple please. I will propose we stick to just one field in struct bio: a 64bit byte offset, we may want to keep a blkno around in struct buf, but lets decide that separately. The need for multiple adresses (_blkno, _pblkno) will go away in one of the next rounds so all we need in the end is just one bio_offset field. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message