parted/0031-libparted-Tell-libdevmapper-to-retry-remove-when-BUS.patch
Brian C. Lane e7b34705b0 - libparted: Tell libdevmapper to retry remove when BUSY (bcl)
-   Resolves: rhbz#1980697
- parted: Escape colons and backslashes in machine output (bcl)
- tests: check for vfat kernel support and tools (ross.burton)
- tests: add a helper to check the kernel knows about a file system (ross.burton)
- tests: add aarch64 and mips64 as a valid 64-bit machines (ross.burton)
- libparted: Add swap flag to msdos disklabel (bcl)
- Move Exception Option values into enum (bcl)
2021-08-10 16:24:56 -07:00

33 lines
1.0 KiB
Diff

From 9e194581edf31ddd2474e7be5393578542b4ef8d Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Fri, 9 Jul 2021 10:54:51 -0700
Subject: [PATCH] libparted: Tell libdevmapper to retry remove when BUSY
This sets the libdevmapper retry remove flag, which will retry a remove
command if it is BUSY.
parted already has it's own BUSY retry code, but when run with
device-mapper an error can be printed by libdevmapper which can be
confusing to the user.
Resolves: rhbz#1980697
---
libparted/arch/linux.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index aacc94f..758d36a 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2855,6 +2855,7 @@ _dm_remove_partition(PedDisk* disk, int partno)
if (!task)
goto err;
dm_task_set_name (task, part_name);
+ dm_task_retry_remove(task);
if (!dm_task_set_cookie (task, &cookie, 0))
goto err;
rc = _dm_task_run_wait (task, cookie);
--
2.31.1