Subject: Re: Disks with 128 or 256 bytes per sector
To: Manuel Bouyer <>
From: Bill Studenmund <>
List: tech-kern
Date: 05/29/2001 12:38:51
On Tue, 29 May 2001, Manuel Bouyer wrote:

> On Tue, May 29, 2001 at 01:52:35PM +0200, Jochen Kunz wrote:
> > Hi.
> > 
> > I am currently in the beginning of writing a device driver for the 
> > DEC RX01 / RX02 floppy disk system. These drives use 128 or 256 bytes
> > per sctor. How does NetBSD deal with this? Is there a system to use non
> > 512 byte per sector disks, or should my driver do a transparent sector
> > mapping to 512 byte sectors. (Like the firmware of SCSI CDROM drives in 
> > 512 byte per sector mode.) A first look at disk(9) did not gave me
> > a hint. 

Do transparent remapping. Look at the HP-IP disk drivers for the hp300 

> As far as I know, We're limited to 512 bytes/sector for now.
> Solutions have been provided in kern/3790, 3791 and 3792; but unfortunably
> nobody looked at this until now :(

Some of us have looked at them. I almost had one of them done, changing
the buffer cache to deal with the native block size. I had 2k & 512 byte
sector disks working in the same machine. Unfortunatly I didn't get a
chance to finish before getting moved to a different project at NAS, and
then before quitting.

With the advent of UBC, we're getting one of the other methods of adding
non-512-byte disk support. Since the VM cache is now the hot thing, how
the buffer cache does things isn't as important. Chuck is changing things
so that you now access a certain number of bytes at a certain offset, and
both have to be multiples of the underlying disk block size.

I've given up on what I was doing now since fixing the buffer cache isn't
that big a deal w/ UBC.

Take care,