From: Petr Uzel 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;