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

Phillip Susi phillsusi at gmail.com
Mon Jan 23 18:22:15 UTC 2012


On 1/23/2012 12:41 PM, Jim Meyering wrote:
> 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.

I think the enforcement needs to stay the way it is.  GPT enforces its
limit, and arch/linux.c assumes that the limit the partition table
advertises is actual and correct.  If that isn't the case, then linux.c
and anyone else asking the pt for its limit probably needs refactored to
not do so.  Advertising a limit that isn't actually a limit is wrong.

If you want to raise the limit to 256 or even higher then you could have
more than 256 partitions on msdos, even though it isn't supported on linux.

Theoretically linux.c should then throw an exception complaining if the
partition count exceeds that supported by the kernel, though I'm not
sure fixing that is particularly important since parted has gone this
long without complaining if you exceeded the old limit of 16, and now
the limit is 256 it is even less of an issue.



More information about the parted-devel mailing list