File libparted-handle-busy-extended-partition.patch of Package parted
---
libparted/arch/linux.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: parted-3.1/libparted/arch/linux.c
===================================================================
--- parted-3.1.orig/libparted/arch/linux.c
+++ parted-3.1/libparted/arch/linux.c
@@ -2623,12 +2623,16 @@ _disk_sync_part_table (PedDisk* disk)
&start, &length))
goto cleanup;
if (start == part->geom.start
- && length == part->geom.length)
+ && ((length == part->geom.length) ||
+ part->type == PED_PARTITION_EXTENDED))
ok[i - 1] = 1;
/* If the new partition is unchanged and the
existing one was not removed because it was
in use, then reset the error flag and do not
try to add it since it is already there. */
+ /* Note: kernel reports extended partition to
+ be have size of 1 sector, so we can not
+ (and don't have to) compare to real size */
continue;
}