device-mapper-multipath/0096-Revert-multipathd-uev_trigger-handle-incomplete-ADD-.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

59 lines
2.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Fri, 8 Jan 2021 17:27:10 +0100
Subject: [PATCH] Revert "multipathd: uev_trigger(): handle incomplete ADD
events"
cb10d38 ("multipathd: uev_trigger(): handle incomplete ADD events") was an
attempt to fix issues with incompletely initialized multipath maps observed
in various scenarious. However, that patch was wrong. Spurious "change" events
as this patch would generate have no effect, because they are ignored by
the device-mapper udev rules. The correct fix for the problem we were
facing is 0d66e03 ("libmultipath: force map reload if udev incomplete"),
which forces a full map reload.
Reverts: cb10d38 ("multipathd: uev_trigger(): handle incomplete ADD events")
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipathd/main.c | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 7612430a..92c45d44 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1499,31 +1499,6 @@ uev_trigger (struct uevent * uev, void * trigger_data)
uev_pathfail_check(uev, vecs);
} else if (!strncmp(uev->action, "remove", 6)) {
r = uev_remove_map(uev, vecs);
- } else if (!strncmp(uev->action, "add", 3)) {
- const char *ev_name;
- char *dm_name;
- int major = -1, minor = -1;
-
- /*
- * If DM_NAME is not set for a valid map, trigger a
- * change event. This can happen during coldplug
- * if udev was killed between handling the 'add' and
- * 'change' events before.
- */
- ev_name = uevent_get_dm_name(uev);
- if (!ev_name) {
- major = uevent_get_major(uev);
- minor = uevent_get_minor(uev);
- dm_name = dm_mapname(major, minor);
- if (dm_name && *dm_name) {
- condlog(2, "%s: received incomplete 'add' uevent, triggering change",
- dm_name);
- udev_device_set_sysattr_value(uev->udev,
- "uevent",
- "change");
- free(dm_name);
- }
- }
}
goto out;
}