[parted-devel] [PATCH] libparted: Tell libdevmapper to retry remove when BUSY

Brian C. Lane bcl at redhat.com
Fri Jul 9 19:50:57 BST 2021


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




More information about the parted-devel mailing list