Subject: Re: Supporting sector size != DEV_BSIZE -- patches
To: None <tech-kern@netbsd.org>
From: Trevin Beattie <trevin@xmission.com>
List: tech-kern
Date: 06/03/2002 18:05:46
At 11:51 PM 6/3/2002 -0000, eeh@netbsd.org wrote:
>
>| I've implemented a fix for the ffs filesystem so that all upper-level disk
>| operations use DEV_BSIZE blocks, and the actual sector size is left to the
>| physical device driver (below the buffer cache). I've successfully
>| created, mounted, and written to a virtual disk using 2048-byte sectors.
>| Next thing I need to do is run the patched NetBSD on real hardware (I've
>| been using VMware for testing :-) and see if it will work with a SCSI MO
>| drive.
>
>I don't think that's a very good way of doing this. This means you have to
>fix every single filesystem to handle different block sizes.
What's wrong with fixing everything? ;-)
Seriously, though, what I'd rather do is fix every filesystem (as far as
they remain backwards compatible) to *ignore* different block or sector sizes.
>The BSD FFS should be quite capable of handling blocks of different sizes
>without a problem. It's just the buffer cache that expects everything
>to be in increments of DEV_BSIZE.
And the buffer cache sits between the FFS and the physical media. So...
>
>The two ways I would recommend trying to tackle the problem would be
>either fix the buffer cache so it can handle different block sizes for
>different devices, or enhance the disk driver to do whatever it needs to
>so transfers in DEV_BSIZE increments can be converted to native device
>block sizes.
I personally prefer the latter approach, as it appears (from a few tests)
that we're already doing that.
Come to think of it, the only driver I've really tested at this point is vnd.
>
>Fixing the buffer cache is definitely the better way to go. But since
>DEV_BSIZE is so ubiquitous throughout the kernel, this is no small task.
>
>Chuck Silvers mentioned he wants to address this issue some time. You
>might want to send him some email to see what his thoughts are.
I thought he was on the mailing list? Guess I shouldn't assume. Maybe
that's why I haven't seen a comment from him...
-----------------------
Trevin Beattie "Do not meddle in the affairs of wizards,
trevin@xmission.com for you are crunchy and good with ketchup."
{:-> --unknown