Subject: Re: problems with 1024 byte/sector disks?
To: Michael L. Hitch <osymh@lightning.oscs.montana.edu>
From: Jon Buller <jonb@metronet.com>
List: current-users
Date: 06/12/1996 22:41:11
Michael L. Hitch writes:

>   NetBSD will not work with 1024 byte sectors (or any size other
> than 512 bytes).  The "block size" is used inconsistently in various
> places in the kernel.  The page and swap handling all assume 512
> byte blocks, while newfs and the rest of the FFS stuff use the
> actual physical block size.  To confuse FFS and newfs, the partition
> stuff and disk drivers treat things as 512-byte blocks (if I remember
> correctly).  This has been discussed before (I ran into it trying
> to help someone get a MO drive working with 1024 byte sectors).  I've
> been keeping patches to scsi/sd.c and scsi/cd.c that should allow
> the use of non-512 byte blocks for file access, but I never did try
> to do anything about paging/swapping.  The machine-dependant label
> processing also required some changes - the amiga port has these, but
> I don't think any other port does.

I didn't realize it was that bad, although it appears that the
pc532 port can at least deal with the disklabel on 1024 byte blocks.
Also, I took a look at the newfs code, and saw a #ifdef TAHOE that
appeared to deal with physical blocks being different from actual
blocks...  I vaguely remember trying this disk with 1024 byte blocks
about 18 months ago, and couldn't even write the disk label, so I
guess it's improved a bit, but not enough.  Are there any plans to
have this kind of thing done properly and integrated into the tree?

If anyone wants to work on this, and thinks it's important, I'll
volunteer my machine and disk for some testing.  (And if you give
me some pointers, I'll try some of the more simple coding too.)

Jon