device-mapper-multipath/0095-libmultipath-coalesce_paths-stop-triggering-spurious.patch
Benjamin Marzinski b05147c356 device-mapper-multipath-0.8.5-6
Change patch format to remove Git version
  * Patches 0001-0122 only have the patch format modified
Update to the head of the upstream staging branch plus redhat patches
  * Patches 0123-0134 & 1036-0142 are from the upstream staging branch
  * Patches 0143-1046 have been submitted upstream
  * Patch 0156 is a Red Hat only patch. Red Hat udev rules set ID_SERIAL
    from 60-persistent-storage.rules instead of 55-scsi-sg3_id.rules.
    Multipath's parse_vpd_pg83() function needs to match the ID_SERIAL
    value from udev.
Rename files
  * Previous patches 0123-0132 are now patches 1035 & 0147-0155
2021-03-26 13:33:56 -05:00

63 lines
2.2 KiB
Diff

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);