[RFC] Remove requirement of alignment to track from MBR scheme

Warner Losh imp at bsdimp.com
Mon May 23 17:43:41 UTC 2011


On May 23, 2011, at 10:50 AM, Andrey V. Elsukov wrote:
> 
>> In any event, I'd be tempted to use a #define for 4096 like
>> MBR_MAX_SECTOR_SIZE.
>> 
>> -	msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX);
>> +	msize = MIN(pp->mediasize / pp->sectorsize, 2 * UINT32_MAX);
>> 
>> Why this change?  I think that it is in two places.
> 
> Currently we have limit to msize = UINT32_MAX, but partition in MBR has
> start offset and size (not end offset). Theoretically it can have size
> that is up to UINT32_MAX sectors, also start offset can be UINT32_MAX.
> And for example, for 4T disk we can have 2 partitions with 2TB size.

Are there any extant examples of this?  The CW is that the maximum size for an MBR device is 2TB.

Warner


More information about the freebsd-geom mailing list