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

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Mon Jan 23 18:38:45 UTC 2012


On 23.01.2012 19:22, Phillip Susi wrote:
> 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.
You can always use a limit dictated by allocated bits and if it exceeds 
this, you need to issue a warning.
However if the light of hpa's statement I suppose that it should handle 
the overflow somehow as well.
Also any code asking for limits when there is none is either also 
limited by something else or is against GNU Coding Standards.


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




More information about the parted-devel mailing list