7f9b3f4598
- backport patches for lvm2 to avoid software abnormal work (bsc#1158861) + bug-1158861_01-config-remove-filter-typo.patch + bug-1158861_02-config-Fix-default-option-which-makes-no-sense.patch + bug-1158861_03-vgchange-don-t-fail-monitor-command-if-vg-is-exporte.patch + bug-1158861_04-fix-duplicate-pv-size-check.patch + bug-1158861_05-hints-fix-copy-of-filter.patch + bug-1158861_06-fix-segfault-for-invalid-characters-in-vg-name.patch + bug-1158861_07-vgck-let-updatemetadata-repair-mismatched-metadata.patch + bug-1158861_08-hints-fix-mem-leaking-buffers.patch + bug-1158861_09-pvcreate-pvremove-fix-reacquiring-global-lock-after.patch - add necessary patches for passing lvm2 testsuite (bsc#1158628) + bug-1158628_01-tests-replaces-grep-q-usage.patch + bug-1158628_02-tests-fix-ra-checking.patch + bug-1158628_03-tests-simplify-some-var-settings.patch + bug-1158628-04-pvmove-correcting-read_ahead-setting.patch + bug-1158628_05-activation-add-synchronization-point.patch + bug-1158628_06-pvmove-add-missing-synchronization.patch + bug-1158628_07-activation-extend-handling-of-pending_delete.patch + bug-1158628_08-lv_manip-add-synchronizations.patch + bug-1158628_09-lvconvert-improve-validation-thin-and-cache-pool-con.patch + bug-1158628_10-thin-activate-layer-pool-aas-read-only-LV.patch + bug-1158628_11-tests-mdadm-stop-in-test-cleanup.patch + bug-1158628_12-test-increase-size-of-raid10-LV-allowing-tests-to-su.patch + bug-1158628_13-lvconvert-fix-return-value-when-zeroing-fails.patch + bug-1158628_14-tests-add-extra-settle.patch + bug-1158628_15-test-Fix-handling-leftovers-from-previous-tests.patch OBS-URL: https://build.opensuse.org/request/show/755483 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=260
62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
From 30a98e4d6710a543692d40d11428ae4baea11b7b Mon Sep 17 00:00:00 2001
|
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
|
Date: Fri, 16 Aug 2019 23:49:59 +0200
|
|
Subject: [PATCH] activation: add synchronization point
|
|
|
|
Resuming of 'error' table entry followed with it's dirrect removal
|
|
is now troublesame with latest udev as it may skip processing of
|
|
udev rules for already 'dropped' device nodes.
|
|
|
|
As we cannot 'synchronize' with udev while we know we have devices
|
|
in suspended state - rework 'cleanup' so it collects nodes
|
|
for removal into pending_delete list and process the list with
|
|
synchronization once we are without any suspended nodes.
|
|
---
|
|
lib/activate/dev_manager.c | 20 ++++++++++++--------
|
|
1 files changed, 12 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
|
|
index b218225bb2..3168e88031 100644
|
|
--- a/lib/activate/dev_manager.c
|
|
+++ b/lib/activate/dev_manager.c
|
|
@@ -3579,13 +3579,6 @@ static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root, const
|
|
const char *name, *uuid;
|
|
struct dm_str_list *dl;
|
|
|
|
- /* Deactivate any tracked pending delete nodes */
|
|
- dm_list_iterate_items(dl, &dm->pending_delete) {
|
|
- log_debug_activation("Deleting tracked UUID %s.", dl->str);
|
|
- if (!dm_tree_deactivate_children(root, dl->str, strlen(dl->str)))
|
|
- return_0;
|
|
- }
|
|
-
|
|
while ((child = dm_tree_next_child(&handle, root, 0))) {
|
|
if (!(name = dm_tree_node_get_name(child)))
|
|
continue;
|
|
@@ -3606,10 +3599,21 @@ static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root, const
|
|
if (non_toplevel_tree_dlid && !strcmp(non_toplevel_tree_dlid, uuid))
|
|
continue;
|
|
|
|
- if (!dm_tree_deactivate_children(root, uuid, strlen(uuid)))
|
|
+ if (!str_list_add(dm->mem, &dm->pending_delete, uuid))
|
|
return_0;
|
|
}
|
|
|
|
+ /* Deactivate any tracked pending delete nodes */
|
|
+ if (!dm_list_empty(&dm->pending_delete) && !dm_get_suspended_counter()) {
|
|
+ fs_unlock();
|
|
+ dm_tree_set_cookie(root, fs_get_cookie());
|
|
+ dm_list_iterate_items(dl, &dm->pending_delete) {
|
|
+ log_debug_activation("Deleting tracked UUID %s.", dl->str);
|
|
+ if (!dm_tree_deactivate_children(root, dl->str, strlen(dl->str)))
|
|
+ return_0;
|
|
+ }
|
|
+ }
|
|
+
|
|
return 1;
|
|
}
|
|
|
|
--
|
|
2.24.0
|
|
|