[parted-devel] [PATCH 1/2] libparted: enforce dos partition limit

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Wed Jan 18 15:17:07 UTC 2012


On 18.01.2012 15:36, Phillip Susi wrote:
> On 1/18/2012 8:23 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> I disagree with this patch being good. msdos layout has no inherent
>> limit on number of logical partitions. The above mentioned limit comes
>> from how Linux allocates minor SCSI bits and presence of this limit is
>> Linux bug. non-SCSI disks on Linux have higher limit. Even on SCSI disks
>> it can be circumvented with kpartx. Moreover other kernels and tools are
>> probably not affected by this limit.
>> If you really want to handle this limit AFAIK it's not specific to just
>> msdos partitions, so it has to be on higher level and happen only on
>> SCSI disks and only when running under Linux or similarly affected
>> kernels (e.g. kOpenSolaris has a similar limit) and has to be reduced to
>> a warning since a bug in some other software isn't a reason to create a
>> same bug.
> While it is true that there is no limit imposed by the partition table,
> for the purposes of parted there must be a limit somewhere so it can
> decide how many partitions it needs to try and remove from the kernel
> partition table.
Ideally there should be a function allowing to know how many entries 
this table has.
If kernel API is unmodifiable and has inherent limit IMHO the best 
strategy is to make this limit pertain only to kernel-specific parts.
> The kernel allows up to 256 partitions so the limit
> could be set that high, but since the limit was 16 before and nobody
> complained, I figured that raising it to 64 should be plenty.  I think
> that anyone actually hitting that limit needs to have their head examined.
I'll see when I can get an appointment with the doctor. I've had 
problems with hitting those limits when I created ultra-multi-boot disk


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




More information about the parted-devel mailing list