[parted-devel] [PATCH] better fix for 'partprobe gives errors with dvh partition no. >16'

Petr Uzel petr.uzel at suse.cz
Fri Nov 7 12:57:21 UTC 2008


On Wed, Nov 05, 2008 at 09:40:27AM +0100, Petr Uzel wrote:
> There's a bug in current development version of parted which causes that the
> partition table, as seen by the kernel, is not updated correctly after deleting
> a partition. This bug was introduced in commit
> f6bd20573e3ecfb63f62d88c52a0870fb8851b59 (fix computation of largest partition
> number). Yes, I know - this patch was proposed by me - sorry for that :)
<SNIP>
> Before the broken commit was checked in, parted used PED_MAX(16, last_partition_num())
> to determine which partitions might be changed. But this also is not correct, because : 
> 1. for <= 16 partitions on the disk, the last_partition_num() call is useless 
> 2. if there's >16 partitions, the last_partition_num() might return inconsistent
> result (in case the last partition was just deleted)
> 
> I know that there may be situations where there are more than 16 partitions on
> the disk, but does parted want to support this? If not, the PED_MAX(16, last_partition_num())
> might be changed to be just 16 and everything should work fine.

                        ^^^^^^^^
If you decide not to go this way, there will still be the DVH bug
that the broken patch tried to fix. So better fix follows:

First revert the broken commit and one commit that depend on it:



More information about the parted-devel mailing list