device-mapper-multipath/0095-libmultipath-coalesce_paths-stop-triggering-spurious.patch

66 lines
2.2 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Fri, 8 Jan 2021 17:36:40 +0100
Subject: [PATCH] libmultipath: coalesce_paths(): stop triggering spurious
uevents
Since 0d66e03 ("libmultipath: force map reload if udev incomplete"), we
force-reload maps that we find incompletely initialized by udev. If
select_action returns ACT_NOTHING nonetheless, the map must be initialized
in udev, and thus and "add" uevent must have been seen already. Triggering
this event once more is unlikely to fix anything for real.
Reverts: b516118 ("libmultipath: coalesce_paths: trigger uevent if nothing done")
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/configure.c | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 999f3106..3263bb01 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -527,18 +527,6 @@ get_udev_for_mpp(const struct multipath *mpp)
return udd;
}
-static void
-trigger_udev_change(const struct multipath *mpp)
-{
- static const char change[] = "change";
- struct udev_device *udd = get_udev_for_mpp(mpp);
- if (!udd)
- return;
- condlog(3, "triggering %s uevent for %s", change, mpp->alias);
- sysfs_attr_set_value(udd, "uevent", change, sizeof(change)-1);
- udev_device_unref(udd);
-}
-
static void trigger_partitions_udev_change(struct udev_device *dev,
const char *action, int len)
{
@@ -1297,18 +1285,6 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
continue;
}
- if (r == DOMAP_EXIST && mpp->action == ACT_NOTHING &&
- force_reload == FORCE_RELOAD_WEAK)
- /*
- * First time we're called, and no changes applied.
- * domap() was a noop. But we can't be sure that
- * udev has already finished setting up this device
- * (udev in initrd may have been shut down while
- * processing this device or its children).
- * Trigger a change event, just in case.
- */
- trigger_udev_change(find_mp_by_wwid(curmp, mpp->wwid));
-
conf = get_multipath_config();
allow_queueing = conf->allow_queueing;
put_multipath_config(conf);
--
2.17.2