Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Apr 2000 23:28:37 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Bruce Evans <bde@zeta.org.au>
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:  <23861.954797317@critter.freebsd.dk>
In-Reply-To: Your message of "Tue, 04 Apr 2000 07:10:47 %2B1000." <Pine.BSF.4.21.0004040649300.1047-100000@alphplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.21.0004040649300.1047-100000@alphplex.bde.org>, 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




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