Subject: Re: Disks with 128 or 256 bytes per sector
To: Ignatios Souvatzis <is@netbsd.org>
From: Bill Studenmund <wrstuden@zembu.com>
List: tech-kern
Date: 06/01/2001 12:15:55
On Fri, 1 Jun 2001, Ignatios Souvatzis wrote:

> I'm pretty sure that we added (based on some external work by err, David
> W=FClkner?) enough "disklabel" (RDB) support to /Amiga to have 2k ADOSFS
> work fine.

I'm not familiar with the work in question. But are you sure that's
support for 2k physical sectors? To really support 2k physical sectors,
the disk driver for them would have to have been written/changed to do all
its i/o in terms of DEV_BSIZE lumps. Among other things, thats all the
buffer cache understands.

For sizes smaller than DEV_BSIZE, it's not that hard - you just scale
everything. Like the hpib disk driver - it grabs 2 256-byte sectors when
one 512-byte sector is requested. For sizes larger than DEV_BSIZE, either
you'd have to make sure the requests mapped into an integer number of
blocks (for 2k sectors and 512 byte DEV_BSIZE that's all requests are for
multiples of 4 blocks and on offsets divisable by 4), or you might have to
read more than you need (read one 2k sector to get a given 512-bytes out
of it).

Take care,

Bill