forked from pool/parted
Amend patch headers (no functional change) OBS-URL: https://build.opensuse.org/request/show/559489 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=137
25 lines
920 B
Diff
25 lines
920 B
Diff
From: Petr Uzel <petr.uzel@suse.cz>
|
|
Subject: libparted: Avoid libdevice-mapper warnings
|
|
Patch-mainline: no, custom SUSE patch
|
|
---
|
|
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;
|