On 24.05.2011 22:12, Marcel Moolenaar wrote: > > On May 24, 2011, at 10:46 AM, Warner Losh wrote: >>> All I'm saying: be careful. >> >> Agreed. But the care should be on the creation side, not on the >> interpretation side. > > ... as the original code was. We just need to add a sanity > check to the interpretation that filters out the real bogus > information (resulting in a partition with negative size).
A partition with negative size is not the one problem. Some time ago i found an easy reproducible bug, when BSD scheme creates providers with size bigger than parent provider size. Also there was nothing against creation of overlapped partitions. > 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. Today's devices do not report about their 4k sectors. > Thus: rather than hack MBR and forgetting about EBR and other I do not forget about EBR, PC98 and VTOC8. But we need begin from something. > schemes, maybe we only have to tweak the geometry synthesis > to give people what they want without going over board. After > 9.0 branched, we can do a lot more knowing we have plenty > of soak time... Ok, i can revert all related changes and just do nothing :) It seems it is better solution :) -- WBR, Andrey V. Elsukov
signature.asc
Description: OpenPGP digital signature
