Subject: Re: Supporting sector size != DEV_BSIZE on lfs
To: Konrad Schroder <perseant@hhhh.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/20/2002 13:39:23
On Thu, 20 Jun 2002, Konrad Schroder wrote:
> On Thu, 20 Jun 2002, Bill Studenmund wrote:
>
> > Kinda. DEV_BSIZE is still the size used in the buffer cache.
>
> Um. Just so we're all on the same page, which of the approaches in PRs
> 3790, 3791, 3792 are we talking about? Sounds like you're talking about
> the 3791 case?
I think we are talking 3791.
Specifically, we are talking about keeping DEV_BSIZE around for the buffer
cache (block numbers indexed in units of it), but all i/o has to be in
units of sector size. Thus if DEV_BSIZE is 512 and sector size is 2k,
block numbers and counts have to be multiples of 4 (2k/512). device-level
i/o has to be multiples of sector size (2k). DEV_BSIZE must be <= sector
size.
We want to make sure that DEV_BSIZE doesn't wind up on disk inadvertently,
so that you can freely change DEV_BSIZE and large-sector file systems
still work.
Also, to try and not start free-forming file system design, I've suggested
(and Trevin is using) a design model that we want a revised kernel, when
writing to a file system on a drive of sector size X (that was formatted
on that disk), to use the exact same info format/file layout etc. as an
old kernel (which would have to have had DEV_BSIZE == that sector size)
would have used.
Take care,
Bill