File retry-cleanup-deactivation.patch of Package lvm2.631
From 2f260c99096c9db4aa6c3d3623739d18c203e1b4 Mon Sep 17 00:00:00 2001
From: Zdenek Kabelac <zkabelac@redhat.com>
Date: Mon, 9 Jun 2014 10:58:57 +0200
Subject: activation: retry cleanup deactivation
Git-repo: https://git.fedorahosted.org/git/lvm2.git
Git-commit: 2f260c99096c9db4aa6c3d3623739d18c203e1b4 (partial)
Patch-filtered: skipped WHATS_NEW
References: bnc#892319
Enable 'retry' deactivation also in 'cleanup' phase.
It shouldn't be mostly needed - however udev now produces
more and more completelny non-synchronizable device opens,
so even for orphan devices we can't easily predict where
udevd opens devices.
So it's more preferable here to log error about device being open
and retry clean, but let the command proceed.
---
lib/activate/dev_manager.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index cfceab5..22b13ec 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
Index: LVM2.2.02.98/lib/activate/dev_manager.c
===================================================================
--- LVM2.2.02.98.orig/lib/activate/dev_manager.c
+++ LVM2.2.02.98/lib/activate/dev_manager.c
@@ -2169,6 +2169,8 @@ static int _tree_action(struct dev_manag
/* Only process nodes with uuid of "LVM-" plus VG id. */
switch(action) {
case CLEAN:
+ if (retry_deactivation())
+ dm_tree_retry_remove(root);
/* Deactivate any unused non-toplevel nodes */
if (!_clean_tree(dm, root, laopts->origin_only ? dlid : NULL))
goto_out;