Subject: Re: Supporting sector size != DEV_BSIZE on msdosfs
To: Trevin Beattie <trevin@xmission.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/25/2002 17:23:46
On Tue, 25 Jun 2002, Trevin Beattie wrote:

> I just got through fixing and testing msdosfs to work with large sector
> sizes.  The only reason it took me two days instead of one was because I
> had made a stupid one-word mistake in the code (BSIZE instead of BSHIFT --
> big difference!)  This file system was a real pleasure to work on, because
> nothing in it relied on DEV_BSIZE at all.  Everything was done in terms of
> sectors.  So all I had to do was adjust the argument passed to bread() (and
> a couple of other little spots).

Cool. Though it makes sense as msdosfs has seen sector sizes change.

> I was also very happy to find that newfs_msdos had already been written to
> accomodate a wider variety of sector sizes that I even though possible.
> But I did have to make one small change to it -- it put the boot signature
> in the wrong place.  This change necessitated changing the minimum sector
> size from 128 to 512 bytes.  If anyone has evidence of a 128- or
> 256-bytes/sector disk created by DOS, we may need to add some more code in
> there.

Floppies. Old ones.

Not sure about the 128 bytes, but the original (OLD OLD) format I thought
had 256-byte sectors. Like the 180K version or something like that.

> The changes are very simple, and as long as nobody objects to the name I
> made up for the new conversion macro (de_bn2kb() => convert sector # to
> kernel block #), I believe it is suitable for merging into the NetBSD
> source tree!
>
> These patches have been submitted to NetBSD as PR #17398.

Cool.

Take care,

Bill