Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Apr 2000 14:21:11 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, "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:  <200004032121.OAA61456@apollo.backplane.com>
References:   <Pine.BSF.4.21.0004040649300.1047-100000@alphplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
: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

    This seems needlessly complex to me.  A low level device driver knows
    what the sector size of its physical media is, if we are going to mess
    with the offset/blocknumber fields at all we should simply have a single
    64 bit offset field.  No validity bits, no dualities, no confusion 
    anywhere in the chain.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


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?200004032121.OAA61456>