parted/parted-3.1-libparted-use-largest_partnum-in-dm_reread_part_tabl.patch
Brian C. Lane 5c7b01233e - use dm_udev_wait to synchronize with udev
- use largest_partnum in dm_reread_part_table (#803108)
- preserve the uuid on dm partitions (#832145)
2012-08-07 12:39:09 -07:00

42 lines
1.1 KiB
Diff

From 26fbffe8389e732be29225bd649adfdd5588b131 Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Wed, 21 Mar 2012 15:34:20 -0700
Subject: [PATCH] libparted: use largest_partnum in dm_reread_part_table
(#803108)
DM devices can have more than 16 partitions, notify the kernel about
all of them.
Resolves: rhbz#803108
* libparted/arch/linux.c (dm_reread_part_table): Use largest_partnum
fixup
---
libparted/arch/linux.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 7dd664e..ed14f50 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2516,14 +2516,13 @@ _dm_reread_part_table (PedDisk* disk)
return 1;
int rc = 1;
- int last = PED_MIN (largest_partnum, 16);
int i;
sync();
if (!_dm_remove_parts(disk->dev))
rc = 0;
- for (i = 1; i <= last; i++) {
+ for (i = 1; i <= largest_partnum; i++) {
PedPartition* part;
part = ped_disk_get_partition (disk, i);
--
1.7.7.6