[RFC] Remove requirement of alignment to track from MBR scheme
Warner Losh
imp at bsdimp.com
Wed May 25 17:43:33 UTC 2011
On May 25, 2011, at 9:12 AM, Andriy Gapon wrote:
> on 24/05/2011 21:12 Marcel Moolenaar said the following:
>> With respect to the creation:
>>
>> Since out synthesized geometry is not necessarily the same
>> as other OSes, we could opt to synthesize a geometry that
>> has a track size (= sectors/track) that is a multiple of 8
>> (to play nice with 4K sectors), and/or take the stripe
>> size of the underlying GEOM into account. This fundamentally
>> doesn't change a thing for MBR, but has the side effect of
>> achieving some of the goals *and* automatically works for
>> EBR as well.
>>
>> Thus: rather than hack MBR and forgetting about EBR and other
>> schemes, maybe we only have to tweak the geometry synthesis
>> to give people what they want without going over board.
>
> I don't think that currently we do synthesize any geometry in kernel.
We do. There's at least three cases I can think of. For CAM da devices, we always synthesize something bogus. For ata devices on pc98 machines, we create the right fake geometry when certain conditions require us to create a fake geometry. CAM on pc98 machines also does this.
The disk drives themselves are creating fake geometry and passing it up.
> I think that we just whatever BIOS/firmware/etc provides to us in some way.
For MBR and devices > 8GB, this should be ignored, since the fields saturate (except ones created with our fdisk/sysinstall programs: then they just size & 0x3ff the values for cylinders rather than the proper 1023 saturation).
>> After
>> 9.0 branched, we can do a lot more knowing we have plenty
>> of soak time...
>
> I agree in general, but there is one thing I want now/ASAP - ability to use gpart
> to create (valid) partitions the way I like it disregarding whatever fake geometry
> there might be. I hate when tools go EDAVE on me.
At this stage of the game, the boundary checks should be relaxed and opt-in. We likely should just create MBR slices starting at 64 always, unless someone has specifically requested that we align things, or asks for a different starting place.
Warner
More information about the freebsd-geom
mailing list