Subject: Re: Disklabel and non 512-byte media
To: Steve Woodford <>
From: David Laight <>
List: tech-kern
Date: 10/14/2006 09:17:26
On Fri, Oct 13, 2006 at 11:05:44PM +0100, Steve Woodford wrote:
> The reason for this is the 'e' partition's vital statistics are copied 
> straight from the MBR, whereas the raw partition's details are set in 
> sdgetdefaultlabel() after conversion to the DEV_BSIZE equivalent.

I don't think that should happen....

> Right now I have MSDOSFS working on 2048 bytes/sector media based on the 
> patch in kern/17398, with an additional tweak to 
> bounds_check_with_label() to account for the disklabel discrepancy.

I think you need to add code to stop other parts of the system trying to
use non-512 byte sectors.  At least until the 'correct' disk formats
have been determined.
For instance all the code to access mbr extended partitions is likely wrong.
and anything to do with UFS.
> The alternative is to ensure disklabels are always specified in 
> DEV_BSIZE units (at least until we ditch fixed DEV_BSIZE).

IMHO disklabels should be specified is the units that the disklabel
reports as the sector size.  With the requirement that all partition
boundaries be on physical sector boundaries.
(Deliberately worded so that the label could say the sectors are 64k
in order to describe a disk > 2TB.)


David Laight: