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

Brian C. Lane bcl at redhat.com
Wed Apr 25 18:46:19 UTC 2012


On Fri, Apr 20, 2012 at 11:46:00AM -0700, 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.
> 
> 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();
> -- 
> 1.7.7.6

So I wonder, why do we do this at all? Why not just use largest_partnum?
The reason why I reverted instead of just switching to using largest is
that I don't know if there was a good reason for always doing the first
16 partitions or not.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20120425/ef39fddb/attachment.pgp>


More information about the parted-devel mailing list