summaryrefslogtreecommitdiff
path: root/tools/pvscan.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-08-16 14:35:17 -0500
committerDavid Teigland <teigland@redhat.com>2019-08-16 14:41:26 -0500
commit0534cd9cd4066c88a7dd815f2f3206a177169334 (patch)
tree9a976a3967d0f62025c33d612d8e5951ff34f95b /tools/pvscan.c
parent61fce72a114d23b98bfd4a9d457e3d55297455ef (diff)
downloadlvm2-0534cd9cd4066c88a7dd815f2f3206a177169334.tar.gz
pvscan: disable sleeping and retrying for udev
When systemd is running pvscans, udev may not be entirely initialized, so the pvscan should not sleep and retry waiting for udev info.
Diffstat (limited to 'tools/pvscan.c')
-rw-r--r--tools/pvscan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c
index ac4150059..bfa5a83ad 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -914,6 +914,13 @@ int pvscan_cache_cmd(struct cmd_context *cmd, int argc, char **argv)
dm_list_init(&rem_devs);
dm_list_init(&vgnames);
+ /*
+ * When systemd/udev run pvscan --cache commands, those commands
+ * should not wait on udev info since the udev info may not be
+ * complete until the pvscan --cache command is done.
+ */
+ init_udev_sleeping(0);
+
if (do_activate)
complete_vgnames = &vgnames;