91e4f40a90
Resolves: #1960618
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
From 936549a57ad174786c3bae629462166149515c99 Mon Sep 17 00:00:00 2001
|
|
From: David Teigland <teigland@redhat.com>
|
|
Date: Fri, 9 Apr 2021 15:49:26 -0500
|
|
Subject: [PATCH 09/10] pvscan: don't get info from udev
|
|
|
|
don't use obtain_device_info_from_udev since udev
|
|
will repeatedly return errors, stalling a command.
|
|
---
|
|
tools/pvscan.c | 11 +++++++++++
|
|
1 file changed, 11 insertions(+)
|
|
|
|
diff --git a/tools/pvscan.c b/tools/pvscan.c
|
|
index 3406de2..de18c04 100644
|
|
--- a/tools/pvscan.c
|
|
+++ b/tools/pvscan.c
|
|
@@ -1848,6 +1848,17 @@ int pvscan_cache_cmd(struct cmd_context *cmd, int argc, char **argv)
|
|
return ECMD_PROCESSED;
|
|
}
|
|
|
|
+ /*
|
|
+ * Don't ask udev for info since pvscan is running from udev.
|
|
+ * If a pvscan attempts to get dev info from udev, udev can
|
|
+ * repeatedly return errors about the dev not being initialized
|
|
+ * which will stall the pvscan.
|
|
+ * FIXME: lvm commands should be changed to request and use udev
|
|
+ * info if it's available, and if udev info is not immediately
|
|
+ * available the command should just continue without it.
|
|
+ */
|
|
+ init_obtain_device_list_from_udev(0);
|
|
+
|
|
if (arg_is_set(cmd, major_ARG) + arg_is_set(cmd, minor_ARG))
|
|
devno_args = 1;
|
|
|
|
--
|
|
1.8.3.1
|
|
|