2017-12-22 16:53:51 +00:00
|
|
|
From: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
Subject: libparted: Avoid libdevice-mapper warnings
|
|
|
|
Patch-mainline: no, custom SUSE patch
|
2015-04-24 15:49:30 +00:00
|
|
|
---
|
|
|
|
libparted/arch/linux.c | 6 ++++++
|
|
|
|
1 file changed, 6 insertions(+)
|
|
|
|
|
|
|
|
Index: parted-3.2/libparted/arch/linux.c
|
|
|
|
===================================================================
|
|
|
|
--- parted-3.2.orig/libparted/arch/linux.c
|
|
|
|
+++ parted-3.2/libparted/arch/linux.c
|
|
|
|
@@ -2728,6 +2728,12 @@ _dm_remove_partition(PedDisk* disk, int
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
close (fd);
|
|
|
|
+ /* After we closed the fd, udev starts sniffing it, rendering the device busy for a moment
|
|
|
|
+ * This is not fatal since we're going to retry anyway, but produces bogus warnings
|
|
|
|
+ * from libdevice-mapper.
|
|
|
|
+ * Avoid this by giving udev a moment to release the device
|
|
|
|
+ */
|
|
|
|
+ usleep(100000);
|
|
|
|
struct dm_task *task = dm_task_create(DM_DEVICE_REMOVE);
|
|
|
|
if (!task)
|
|
|
|
goto err;
|