diff mbox series

[02/13] multipathd: don't reload the map when waiting for udev

Message ID 20250123031643.3017891-3-bmarzins@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: Benjamin Marzinski
Headers show
Series fix for GitHub issue #108 and misc cleanups | expand

Commit Message

Benjamin Marzinski Jan. 23, 2025, 3:16 a.m. UTC
In checker_finished(), if we are still waiting for the initial uevent,
we should instead set wait_for_udev to UDEV_WAIT_RELOAD, so that we
trigger a reload when we get the uevent.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/multipathd/main.c b/multipathd/main.c
index 3b4e61fc..b4a366ea 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2978,7 +2978,10 @@  static void checker_finished(struct vectors *vecs, unsigned int ticks)
 				continue;
 			}
 		} else if (prio_reload || failback_reload || ghost_reload || inconsistent) {
-			if (reload_and_sync_map(mpp, vecs) == 2) {
+			if (mpp->wait_for_udev != UDEV_WAIT_DONE) {
+				mpp->need_reload = false;
+				mpp->wait_for_udev = UDEV_WAIT_RELOAD;
+			} else if (reload_and_sync_map(mpp, vecs) == 2) {
 				/* multipath device deleted */
 				i--;
 				continue;