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

Jim Meyering jim at meyering.net
Mon Jan 23 17:41:37 UTC 2012


H. Peter Anvin wrote:
> On 01/18/2012 05:23 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>> The msdos partition table claimed a maximum partition count of 16 but
>> would allow you to go beyond that. This resulted in the kernel not being
>> informed of
>>> those partitions. Corrected to enforce the limit.
>> 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.
>
> Not to mention that newer kernels have an overflow system so it can
> handle more partitions.

Vladimir, Peter, thanks for the info.

I now want to revert the notify-kernel requirement imposed by this patch.
I.e., it's fine to warn the user that the kernel will not be notified
about 65th and subsequent partitions, but that is no reason to prohibit
creation of Vladimir's mega-multiboot disk.

Phillip, dare I ask...  Do you feel like doing that?
If not, I will.



More information about the parted-devel mailing list