[parted-devel] [PATCH 1/2] libparted: use PED_MAX in dm_reread_part_table (#803108)

Phillip Susi psusi at ubuntu.com
Fri Apr 20 20:09:43 UTC 2012


On 4/20/2012 2:46 PM, Brian C. Lane wrote:
> From: "Brian C. Lane"<bcl at redhat.com>
>
> DM devices can have more than 16 partitions, this prevents
> a mpath or dmsetup device from notifying the kernel about>  16
> partitions.

That changes it from assuming there are AT MOST 16 partitions to 
assuming there are AT LEAST 16 partitions.  I think you want to change 
the 16 to ped_disk_get_max_supported_partitions().

Actually, the patch I posted back on Jan 8 removed this function 
entirely, fixing a few problems with it.  It appears to not have been 
applied yet.

> Resolves: rhbz#803108
>
> * libparted/arch/linux.c (dm_reread_part_table): Use PED_MAX not PED_MIN
> ---
>   libparted/arch/linux.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
> index e2c4139..2cae27b 100644
> --- a/libparted/arch/linux.c
> +++ b/libparted/arch/linux.c
> @@ -2859,7 +2859,7 @@ _dm_reread_part_table (PedDisk* disk)
>             return 1;
>
>           int     rc = 1;
> -        int     last = PED_MIN (largest_partnum, 16);
> +        int     last = PED_MAX (largest_partnum, 16);
>           int     i;
>
>           sync();




More information about the parted-devel mailing list