Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Apr 2000 07:10:47 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        "Justin T. Gibbs" <gibbs@FreeBSD.org>, 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
Message-ID:  <Pine.BSF.4.21.0004040649300.1047-100000@alphplex.bde.org>
In-Reply-To: <23424.954794021@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 3 Apr 2000, Poul-Henning Kamp wrote:

> In message <Pine.BSF.4.21.0004040545020.977-100000@alphplex.bde.org>, 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004040649300.1047-100000>