summaryrefslogtreecommitdiff
path: root/tools/toollib.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2022-01-28 17:42:04 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2022-01-31 14:55:42 +0100
commitf8d12913e78e25120ca41d8d6938ec3a423274f5 (patch)
treec3b313fa9e22d97a0557881c5dd3f11fc6059300 /tools/toollib.c
parente10f67e91728f1e576803df884049ecbd92874d0 (diff)
downloadlvm2-f8d12913e78e25120ca41d8d6938ec3a423274f5.tar.gz
tools: missing sync after deactivation
Caching of DM states optimisation revealed some missing synchronisation points.
Diffstat (limited to 'tools/toollib.c')
-rw-r--r--tools/toollib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/toollib.c b/tools/toollib.c
index e8873adee..4a131aea8 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -900,6 +900,10 @@ void lv_spawn_background_polling(struct cmd_context *cmd,
const char *pvname;
const struct logical_volume *lv_mirr = NULL;
+ /* Ensure there is nothing waiting on cookie */
+ if (!sync_local_dev_names(cmd))
+ log_warn("Failed to sync local dev names.");
+
if (lv_is_pvmove(lv))
lv_mirr = lv;
else if (lv_is_locked(lv))