device-mapper-multipath-0.9.9-1

Update source to upstream version 0.9.9
  * Previous patches 0014-0015 are included in the soruce tarball
  * Patch 0001 is from the upstream staging branch
Rename redhat patches
  * Previous patches 0001-0013 are now 0002-0014
Install /lib/udev/rules.d/99-z-dm-mpath-late.rules
Resolves: RHEL-50698
This commit is contained in:
Benjamin Marzinski 2024-07-26 16:52:55 -04:00
parent 5360854526
commit 457b1ac346
19 changed files with 115 additions and 145 deletions

1
.gitignore vendored
View File

@ -30,3 +30,4 @@ multipath-tools-091027.tar.gz
/multipath-tools-0.9.5.tgz /multipath-tools-0.9.5.tgz
/multipath-tools-0.9.6.tgz /multipath-tools-0.9.6.tgz
/multipath-tools-0.9.7.tgz /multipath-tools-0.9.7.tgz
/multipath-tools-0.9.9.tgz

View File

@ -0,0 +1,28 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Wed, 5 Jun 2024 19:22:48 -0400
Subject: [PATCH] multipathd: fix flush check in flush_map()
Forgot the comparison in the "if" statement.
Fixes 8a3898339 ("multipathd: sync features on flush_map failure corner case")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
---
multipathd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 09286dd0..58afe14a 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -813,7 +813,7 @@ flush_map(struct multipath * mpp, struct vectors * vecs)
{
int r = dm_suspend_and_flush_map(mpp->alias, 0);
if (r != DM_FLUSH_OK) {
- if (DM_FLUSH_FAIL_CANT_RESTORE)
+ if (r == DM_FLUSH_FAIL_CANT_RESTORE)
remove_feature(&mpp->features, "queue_if_no_path");
condlog(0, "%s: can't flush", mpp->alias);
return r;

View File

@ -15,7 +15,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
3 files changed, 4 insertions(+), 4 deletions(-) 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc diff --git a/Makefile.inc b/Makefile.inc
index 6b454303..0b0e3ad2 100644 index 81b86cd8..33dbb99c 100644
--- a/Makefile.inc --- a/Makefile.inc
+++ b/Makefile.inc +++ b/Makefile.inc
@@ -34,7 +34,7 @@ endif @@ -34,7 +34,7 @@ endif
@ -26,9 +26,9 @@ index 6b454303..0b0e3ad2 100644
+exec_prefix := $(prefix)/usr +exec_prefix := $(prefix)/usr
# Prefix for non-essential libraries (libdmmp) # Prefix for non-essential libraries (libdmmp)
usr_prefix := $(if $(prefix),$(prefix),/usr) usr_prefix := $(if $(prefix),$(prefix),/usr)
# Prefix for configfuration files (multipath.conf) # Prefix for configuration files (multipath.conf)
diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
index 1969dee0..d2b28233 100644 index 8dd3369c..7c3c7524 100644
--- a/kpartx/kpartx.rules --- a/kpartx/kpartx.rules
+++ b/kpartx/kpartx.rules +++ b/kpartx/kpartx.rules
@@ -39,6 +39,6 @@ LABEL="mpath_kpartx_end" @@ -39,6 +39,6 @@ LABEL="mpath_kpartx_end"
@ -40,20 +40,20 @@ index 1969dee0..d2b28233 100644
LABEL="kpartx_end" LABEL="kpartx_end"
diff --git a/multipath/Makefile b/multipath/Makefile diff --git a/multipath/Makefile b/multipath/Makefile
index 0efb9b26..504d6892 100644 index 67fb5e62..2ea9e528 100644
--- a/multipath/Makefile --- a/multipath/Makefile
+++ b/multipath/Makefile +++ b/multipath/Makefile
@@ -26,7 +26,7 @@ install: @@ -27,7 +27,7 @@ install:
$(Q)$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
$(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) $(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
$(Q)$(INSTALL_PROGRAM) -m 644 99-z-dm-mpath-late.rules $(DESTDIR)$(udevrulesdir)
- $(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/56-multipath.rules - $(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/56-multipath.rules
+ $(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules + $(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules
$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(tmpfilesdir) $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(tmpfilesdir)
$(Q)$(INSTALL_PROGRAM) -m 644 tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/multipath.conf $(Q)$(INSTALL_PROGRAM) -m 644 tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/multipath.conf
$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man8 $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man8
@@ -48,7 +48,7 @@ uninstall: @@ -50,7 +50,7 @@ uninstall:
$(Q)$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules $(Q)$(RM) $(DESTDIR)$(udevrulesdir)/99-z-dm-mpath-late.rules
$(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf
$(Q)$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
- $(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules - $(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules

View File

@ -42,10 +42,10 @@ index 75100b20..0b212078 100644
udev_device_get_properties_list_entry(udev)) { udev_device_get_properties_list_entry(udev)) {
diff --git a/multipath/multipath.conf.5.in b/multipath/multipath.conf.5.in diff --git a/multipath/multipath.conf.5.in b/multipath/multipath.conf.5.in
index 683bdb72..87b3b2a5 100644 index dacb9b0e..645e8f88 100644
--- a/multipath/multipath.conf.5.in --- a/multipath/multipath.conf.5.in
+++ b/multipath/multipath.conf.5.in +++ b/multipath/multipath.conf.5.in
@@ -1431,9 +1431,14 @@ keywords. Both are regular expressions. For a full description of these keywords @@ -1468,9 +1468,14 @@ keywords. Both are regular expressions. For a full description of these keywords
Regular expression for an udev property. All Regular expression for an udev property. All
devices that have matching udev properties will be excluded/included. devices that have matching udev properties will be excluded/included.
The handling of the \fIproperty\fR keyword is special, The handling of the \fIproperty\fR keyword is special,
@ -61,7 +61,7 @@ index 683bdb72..87b3b2a5 100644
. .
.RS .RS
.PP .PP
@@ -1444,10 +1449,6 @@ Blacklisting by missing properties is only applied to devices which do have the @@ -1481,10 +1486,6 @@ Blacklisting by missing properties is only applied to devices which do have the
property specified by \fIuid_attribute\fR (e.g. \fIID_SERIAL\fR) property specified by \fIuid_attribute\fR (e.g. \fIID_SERIAL\fR)
set. Previously, it was applied to every device, possibly causing devices to be set. Previously, it was applied to every device, possibly causing devices to be
blacklisted because of temporary I/O error conditions. blacklisted because of temporary I/O error conditions.

View File

@ -22,10 +22,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
7 files changed, 25 insertions(+) 7 files changed, 25 insertions(+)
diff --git a/libmultipath/config.c b/libmultipath/config.c diff --git a/libmultipath/config.c b/libmultipath/config.c
index b7dbc6f5..3a374b3d 100644 index 83fa7369..002027a7 100644
--- a/libmultipath/config.c --- a/libmultipath/config.c
+++ b/libmultipath/config.c +++ b/libmultipath/config.c
@@ -958,6 +958,19 @@ int _init_config (const char *file, struct config *conf) @@ -959,6 +959,19 @@ int _init_config (const char *file, struct config *conf)
} }
factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); factorize_hwtable(conf->hwtable, builtin_hwtable_size, file);
validate_pctable(conf->overrides, 0, file); validate_pctable(conf->overrides, 0, file);
@ -58,12 +58,12 @@ index 384193ab..158cebf0 100644
enum devtypes { enum devtypes {
DEV_NONE, DEV_NONE,
diff --git a/multipath/main.c b/multipath/main.c diff --git a/multipath/main.c b/multipath/main.c
index 9e1c5052..46944589 100644 index ce702e7f..c21e3e0b 100644
--- a/multipath/main.c --- a/multipath/main.c
+++ b/multipath/main.c +++ b/multipath/main.c
@@ -829,11 +829,14 @@ main (int argc, char *argv[]) @@ -842,11 +842,14 @@ main (int argc, char *argv[])
char *dev = NULL;
struct config *conf; struct config *conf;
int retries = -1;
bool enable_foreign = false; bool enable_foreign = false;
+ bool have_config; + bool have_config;
+ struct stat buf; + struct stat buf;
@ -76,7 +76,7 @@ index 9e1c5052..46944589 100644
if (init_config(DEFAULT_CONFIGFILE)) if (init_config(DEFAULT_CONFIGFILE))
exit(RTVL_FAIL); exit(RTVL_FAIL);
if (atexit(uninit_config)) if (atexit(uninit_config))
@@ -1081,6 +1084,9 @@ main (int argc, char *argv[]) @@ -1097,6 +1100,9 @@ main (int argc, char *argv[])
while ((r = configure(conf, cmd, dev_type, dev)) == RTVL_RETRY) while ((r = configure(conf, cmd, dev_type, dev)) == RTVL_RETRY)
condlog(3, "restart multipath configuration process"); condlog(3, "restart multipath configuration process");
@ -87,7 +87,7 @@ index 9e1c5052..46944589 100644
put_multipath_config(conf); put_multipath_config(conf);
if (dev) if (dev)
diff --git a/multipath/multipath.rules.in b/multipath/multipath.rules.in diff --git a/multipath/multipath.rules.in b/multipath/multipath.rules.in
index 6f123760..70b69a06 100644 index 780bf852..2c518378 100644
--- a/multipath/multipath.rules.in --- a/multipath/multipath.rules.in
+++ b/multipath/multipath.rules.in +++ b/multipath/multipath.rules.in
@@ -9,6 +9,7 @@ IMPORT{cmdline}="nompath" @@ -9,6 +9,7 @@ IMPORT{cmdline}="nompath"
@ -99,7 +99,7 @@ index 6f123760..70b69a06 100644
ENV{DEVTYPE}!="partition", GOTO="test_dev" ENV{DEVTYPE}!="partition", GOTO="test_dev"
IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH" IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH"
diff --git a/multipathd/multipathd.8.in b/multipathd/multipathd.8.in diff --git a/multipathd/multipathd.8.in b/multipathd/multipathd.8.in
index e98c27fd..fd2061e5 100644 index 7bc8806e..315884eb 100644
--- a/multipathd/multipathd.8.in --- a/multipathd/multipathd.8.in
+++ b/multipathd/multipathd.8.in +++ b/multipathd/multipathd.8.in
@@ -49,6 +49,8 @@ map regains its maximum performance and redundancy. @@ -49,6 +49,8 @@ map regains its maximum performance and redundancy.
@ -112,7 +112,7 @@ index e98c27fd..fd2061e5 100644
. .
.\" ---------------------------------------------------------------------------- .\" ----------------------------------------------------------------------------
diff --git a/multipathd/multipathd.service.in b/multipathd/multipathd.service.in diff --git a/multipathd/multipathd.service.in b/multipathd/multipathd.service.in
index 6d03ff71..0965d6f9 100644 index a63ddd9a..01ceff7d 100644
--- a/multipathd/multipathd.service.in --- a/multipathd/multipathd.service.in
+++ b/multipathd/multipathd.service.in +++ b/multipathd/multipathd.service.in
@@ -6,6 +6,7 @@ Wants=systemd-udevd-kernel.socket @MODPROBE_UNIT@ @@ -6,6 +6,7 @@ Wants=systemd-udevd-kernel.socket @MODPROBE_UNIT@
@ -124,7 +124,7 @@ index 6d03ff71..0965d6f9 100644
Conflicts=shutdown.target Conflicts=shutdown.target
Conflicts=initrd-cleanup.service Conflicts=initrd-cleanup.service
diff --git a/multipathd/multipathd.socket b/multipathd/multipathd.socket diff --git a/multipathd/multipathd.socket b/multipathd/multipathd.socket
index c777e5e3..3c20a2ff 100644 index 6a62f5fd..263b6b0c 100644
--- a/multipathd/multipathd.socket --- a/multipathd/multipathd.socket
+++ b/multipathd/multipathd.socket +++ b/multipathd/multipathd.socket
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@

View File

@ -13,7 +13,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
1 file changed, 17 insertions(+), 5 deletions(-) 1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc diff --git a/Makefile.inc b/Makefile.inc
index 0b0e3ad2..3d80d224 100644 index 33dbb99c..94e0ec85 100644
--- a/Makefile.inc --- a/Makefile.inc
+++ b/Makefile.inc +++ b/Makefile.inc
@@ -95,11 +95,23 @@ SYSTEMD_LIBDEPS := $(if $(SYSTEMD),$(if $(shell test $(SYSTEMD) -gt 209 && echo @@ -95,11 +95,23 @@ SYSTEMD_LIBDEPS := $(if $(SYSTEMD),$(if $(shell test $(SYSTEMD) -gt 209 && echo
@ -41,10 +41,10 @@ index 0b0e3ad2..3d80d224 100644
-CPPFLAGS := $(FORTIFY_OPT) $(CPPFLAGS) $(D_URCU_VERSION) \ -CPPFLAGS := $(FORTIFY_OPT) $(CPPFLAGS) $(D_URCU_VERSION) \
+ $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) $(W_URCU_TYPE_LIMITS) -Wstrict-prototypes + $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) $(W_URCU_TYPE_LIMITS) -Wstrict-prototypes
+CPPFLAGS := $(CPPFLAGS) $(D_URCU_VERSION) \ +CPPFLAGS := $(CPPFLAGS) $(D_URCU_VERSION) \
-DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" \ -D_FILE_OFFSET_BITS=64 \
-DRUNTIME_DIR=\"$(runtimedir)\" -DCONFIG_DIR=\"$(configdir)\" \ -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(TGTDIR)$(plugindir)\" \
-DDEFAULT_CONFIGFILE=\"$(configfile)\" -DSTATE_DIR=\"$(statedir)\" \ -DRUNTIME_DIR=\"$(runtimedir)\" -DCONFIG_DIR=\"$(TGTDIR)$(configdir)\" \
@@ -108,7 +120,7 @@ CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe @@ -109,7 +121,7 @@ CFLAGS := -std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe
BIN_CFLAGS := -fPIE -DPIE BIN_CFLAGS := -fPIE -DPIE
LIB_CFLAGS := -fPIC LIB_CFLAGS := -fPIC
SHARED_FLAGS := -shared SHARED_FLAGS := -shared

View File

@ -22,10 +22,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
create mode 100644 multipath/mpathconf.8 create mode 100644 multipath/mpathconf.8
diff --git a/libmultipath/config.c b/libmultipath/config.c diff --git a/libmultipath/config.c b/libmultipath/config.c
index 3a374b3d..4544f484 100644 index 002027a7..3d5943d3 100644
--- a/libmultipath/config.c --- a/libmultipath/config.c
+++ b/libmultipath/config.c +++ b/libmultipath/config.c
@@ -960,6 +960,8 @@ int _init_config (const char *file, struct config *conf) @@ -961,6 +961,8 @@ int _init_config (const char *file, struct config *conf)
validate_pctable(conf->overrides, 0, file); validate_pctable(conf->overrides, 0, file);
} else { } else {
condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
@ -35,7 +35,7 @@ index 3a374b3d..4544f484 100644
conf->blist_devnode = vector_alloc(); conf->blist_devnode = vector_alloc();
if (!conf->blist_devnode) { if (!conf->blist_devnode) {
diff --git a/multipath/Makefile b/multipath/Makefile diff --git a/multipath/Makefile b/multipath/Makefile
index 504d6892..9f14036c 100644 index 2ea9e528..3dc241cc 100644
--- a/multipath/Makefile --- a/multipath/Makefile
+++ b/multipath/Makefile +++ b/multipath/Makefile
@@ -24,6 +24,7 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so @@ -24,6 +24,7 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so
@ -45,8 +45,8 @@ index 504d6892..9f14036c 100644
+ $(Q)$(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/ + $(Q)$(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/
$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
$(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) $(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
$(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules $(Q)$(INSTALL_PROGRAM) -m 644 99-z-dm-mpath-late.rules $(DESTDIR)$(udevrulesdir)
@@ -31,6 +32,7 @@ install: @@ -32,6 +33,7 @@ install:
$(Q)$(INSTALL_PROGRAM) -m 644 tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/multipath.conf $(Q)$(INSTALL_PROGRAM) -m 644 tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/multipath.conf
$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man8 $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man8
$(Q)$(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir)/man8 $(Q)$(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir)/man8
@ -54,12 +54,13 @@ index 504d6892..9f14036c 100644
$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man5 $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)/man5
$(Q)$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(mandir)/man5 $(Q)$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(mandir)/man5
$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(modulesloaddir) $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(modulesloaddir)
@@ -45,11 +47,13 @@ endif @@ -46,12 +48,14 @@ endif
uninstall: uninstall:
$(Q)$(RM) $(DESTDIR)$(bindir)/$(EXEC) $(Q)$(RM) $(DESTDIR)$(bindir)/$(EXEC)
+ $(Q)$(RM) $(DESTDIR)$(bindir)/mpathconf + $(Q)$(RM) $(DESTDIR)$(bindir)/mpathconf
$(Q)$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules $(Q)$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules
$(Q)$(RM) $(DESTDIR)$(udevrulesdir)/99-z-dm-mpath-late.rules
$(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf
$(Q)$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
$(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules $(Q)$(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules

View File

@ -20,7 +20,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
3 files changed, 59 insertions(+), 3 deletions(-) 3 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/multipath/main.c b/multipath/main.c diff --git a/multipath/main.c b/multipath/main.c
index 46944589..47f89a0a 100644 index c21e3e0b..3f3ac9fb 100644
--- a/multipath/main.c --- a/multipath/main.c
+++ b/multipath/main.c +++ b/multipath/main.c
@@ -120,7 +120,7 @@ usage (char * progname) @@ -120,7 +120,7 @@ usage (char * progname)
@ -92,7 +92,7 @@ index 46944589..47f89a0a 100644
static int static int
configure (struct config *conf, enum mpath_cmds cmd, configure (struct config *conf, enum mpath_cmds cmd,
enum devtypes dev_type, char *devpath) enum devtypes dev_type, char *devpath)
@@ -848,7 +894,7 @@ main (int argc, char *argv[]) @@ -861,7 +907,7 @@ main (int argc, char *argv[])
condlog(1, "failed to register cleanup handler for vecs: %m"); condlog(1, "failed to register cleanup handler for vecs: %m");
if (atexit(cleanup_bindings)) if (atexit(cleanup_bindings))
condlog(1, "failed to register cleanup handler for bindings: %m"); condlog(1, "failed to register cleanup handler for bindings: %m");
@ -101,7 +101,7 @@ index 46944589..47f89a0a 100644
switch(arg) { switch(arg) {
case 'v': case 'v':
if (!isdigit(optarg[0])) { if (!isdigit(optarg[0])) {
@@ -919,6 +965,10 @@ main (int argc, char *argv[]) @@ -932,6 +978,10 @@ main (int argc, char *argv[])
case 'T': case 'T':
cmd = CMD_DUMP_CONFIG; cmd = CMD_DUMP_CONFIG;
break; break;
@ -113,7 +113,7 @@ index 46944589..47f89a0a 100644
usage(argv[0]); usage(argv[0]);
exit(RTVL_OK); exit(RTVL_OK);
diff --git a/multipath/multipath.8.in b/multipath/multipath.8.in diff --git a/multipath/multipath.8.in b/multipath/multipath.8.in
index 348eb220..82a7e68e 100644 index b88e9a4c..edd742aa 100644
--- a/multipath/multipath.8.in --- a/multipath/multipath.8.in
+++ b/multipath/multipath.8.in +++ b/multipath/multipath.8.in
@@ -64,7 +64,7 @@ multipath \- Device mapper target autoconfig. @@ -64,7 +64,7 @@ multipath \- Device mapper target autoconfig.
@ -138,7 +138,7 @@ index 348eb220..82a7e68e 100644
Remove the WWID for the specified device from the WWIDs file. Remove the WWID for the specified device from the WWIDs file.
. .
diff --git a/multipathd/multipathd.service.in b/multipathd/multipathd.service.in diff --git a/multipathd/multipathd.service.in b/multipathd/multipathd.service.in
index 0965d6f9..c964eb1b 100644 index 01ceff7d..e0c2011b 100644
--- a/multipathd/multipathd.service.in --- a/multipathd/multipathd.service.in
+++ b/multipathd/multipathd.service.in +++ b/multipathd/multipathd.service.in
@@ -17,6 +17,7 @@ ConditionVirtualization=!container @@ -17,6 +17,7 @@ ConditionVirtualization=!container

View File

@ -14,7 +14,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
2 files changed, 2 insertions(+), 2 deletions(-) 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
index 64b633f2..5bda9f93 100644 index ed08c251..4b033ff9 100644
--- a/libmultipath/defaults.h --- a/libmultipath/defaults.h
+++ b/libmultipath/defaults.h +++ b/libmultipath/defaults.h
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
@ -27,10 +27,10 @@ index 64b633f2..5bda9f93 100644
#define DEFAULT_DEV_LOSS_TMO 600 #define DEFAULT_DEV_LOSS_TMO 600
#define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_ON #define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_ON
diff --git a/multipath/multipath.conf.5.in b/multipath/multipath.conf.5.in diff --git a/multipath/multipath.conf.5.in b/multipath/multipath.conf.5.in
index 87b3b2a5..8e246571 100644 index 645e8f88..a7543939 100644
--- a/multipath/multipath.conf.5.in --- a/multipath/multipath.conf.5.in
+++ b/multipath/multipath.conf.5.in +++ b/multipath/multipath.conf.5.in
@@ -1213,7 +1213,7 @@ as non-multipath and passed on to upper layers. @@ -1225,7 +1225,7 @@ as non-multipath and passed on to upper layers.
\fBNote:\fR this may cause delays during device detection if \fBNote:\fR this may cause delays during device detection if
there are single-path devices which aren\'t blacklisted. there are single-path devices which aren\'t blacklisted.
.TP .TP

View File

@ -14,10 +14,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
2 files changed, 8 insertions(+), 10 deletions(-) 2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 6fd4dabb..19692b1e 100644 index e2052422..3bcd94ce 100644
--- a/libmultipath/discovery.c --- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c +++ b/libmultipath/discovery.c
@@ -1216,13 +1216,9 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len, @@ -1221,13 +1221,9 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
good_len = 8; good_len = 8;
break; break;
case 2: case 2:
@ -33,7 +33,7 @@ index 6fd4dabb..19692b1e 100644
good_len = 8; good_len = 8;
break; break;
default: default:
@@ -1240,10 +1236,6 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len, @@ -1245,10 +1241,6 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
break; break;
case 0x8: case 0x8:
/* SCSI Name: Prio 3 */ /* SCSI Name: Prio 3 */
@ -45,10 +45,10 @@ index 6fd4dabb..19692b1e 100644
case 0x1: case 0x1:
/* T-10 Vendor ID: Prio 2 */ /* T-10 Vendor ID: Prio 2 */
diff --git a/tests/vpd.c b/tests/vpd.c diff --git a/tests/vpd.c b/tests/vpd.c
index 1b2d62d6..7309b5c5 100644 index e3212e61..cdb111bb 100644
--- a/tests/vpd.c --- a/tests/vpd.c
+++ b/tests/vpd.c +++ b/tests/vpd.c
@@ -231,11 +231,13 @@ static const char * const str_prefix[] = { @@ -232,11 +232,13 @@ static const char * const str_prefix[] = {
[STR_IQN] = "iqn.", [STR_IQN] = "iqn.",
}; };
@ -62,7 +62,7 @@ index 1b2d62d6..7309b5c5 100644
/** /**
* create_scsi_string_desc() - create a SCSI name string descriptor. * create_scsi_string_desc() - create a SCSI name string descriptor.
@@ -766,6 +768,7 @@ make_test_vpd_naa(2, 18); @@ -767,6 +769,7 @@ make_test_vpd_naa(2, 18);
make_test_vpd_naa(2, 17); make_test_vpd_naa(2, 17);
make_test_vpd_naa(2, 16); make_test_vpd_naa(2, 16);
@ -70,7 +70,7 @@ index 1b2d62d6..7309b5c5 100644
/* SCSI Name string: EUI64, WWID size: 17 */ /* SCSI Name string: EUI64, WWID size: 17 */
make_test_vpd_str(0, 20, 18) make_test_vpd_str(0, 20, 18)
make_test_vpd_str(0, 20, 17) make_test_vpd_str(0, 20, 17)
@@ -801,6 +804,7 @@ make_test_vpd_str(18, 20, 18) @@ -802,6 +805,7 @@ make_test_vpd_str(18, 20, 18)
make_test_vpd_str(18, 20, 17) make_test_vpd_str(18, 20, 17)
make_test_vpd_str(18, 20, 16) make_test_vpd_str(18, 20, 16)
make_test_vpd_str(18, 20, 15) make_test_vpd_str(18, 20, 15)
@ -78,7 +78,7 @@ index 1b2d62d6..7309b5c5 100644
static int test_vpd(void) static int test_vpd(void)
{ {
@@ -909,6 +913,7 @@ static int test_vpd(void) @@ -910,6 +914,7 @@ static int test_vpd(void)
cmocka_unit_test(test_vpd_naa_2_18), cmocka_unit_test(test_vpd_naa_2_18),
cmocka_unit_test(test_vpd_naa_2_17), cmocka_unit_test(test_vpd_naa_2_17),
cmocka_unit_test(test_vpd_naa_2_16), cmocka_unit_test(test_vpd_naa_2_16),
@ -86,7 +86,7 @@ index 1b2d62d6..7309b5c5 100644
cmocka_unit_test(test_vpd_str_0_20_18), cmocka_unit_test(test_vpd_str_0_20_18),
cmocka_unit_test(test_vpd_str_0_20_17), cmocka_unit_test(test_vpd_str_0_20_17),
cmocka_unit_test(test_vpd_str_0_20_16), cmocka_unit_test(test_vpd_str_0_20_16),
@@ -933,6 +938,7 @@ static int test_vpd(void) @@ -934,6 +939,7 @@ static int test_vpd(void)
cmocka_unit_test(test_vpd_str_18_20_17), cmocka_unit_test(test_vpd_str_18_20_17),
cmocka_unit_test(test_vpd_str_18_20_16), cmocka_unit_test(test_vpd_str_18_20_16),
cmocka_unit_test(test_vpd_str_18_20_15), cmocka_unit_test(test_vpd_str_18_20_15),

View File

@ -11,7 +11,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.inc b/Makefile.inc diff --git a/Makefile.inc b/Makefile.inc
index 3d80d224..15e3bd3a 100644 index 94e0ec85..49514b06 100644
--- a/Makefile.inc --- a/Makefile.inc
+++ b/Makefile.inc +++ b/Makefile.inc
@@ -16,7 +16,7 @@ READLINE := @@ -16,7 +16,7 @@ READLINE :=

View File

@ -12,7 +12,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.inc b/Makefile.inc diff --git a/Makefile.inc b/Makefile.inc
index 15e3bd3a..64384a72 100644 index 49514b06..a3ed9f28 100644
--- a/Makefile.inc --- a/Makefile.inc
+++ b/Makefile.inc +++ b/Makefile.inc
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@

View File

@ -14,7 +14,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
create mode 100755 multipath/mpathcleanup create mode 100755 multipath/mpathcleanup
diff --git a/multipath/Makefile b/multipath/Makefile diff --git a/multipath/Makefile b/multipath/Makefile
index 9f14036c..99ad81b0 100644 index 3dc241cc..47e82234 100644
--- a/multipath/Makefile --- a/multipath/Makefile
+++ b/multipath/Makefile +++ b/multipath/Makefile
@@ -25,6 +25,7 @@ install: @@ -25,6 +25,7 @@ install:
@ -24,15 +24,15 @@ index 9f14036c..99ad81b0 100644
+ $(Q)$(INSTALL_PROGRAM) -m 755 mpathcleanup $(DESTDIR)$(bindir)/ + $(Q)$(INSTALL_PROGRAM) -m 755 mpathcleanup $(DESTDIR)$(bindir)/
$(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) $(Q)$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
$(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) $(Q)$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
$(Q)$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules $(Q)$(INSTALL_PROGRAM) -m 644 99-z-dm-mpath-late.rules $(DESTDIR)$(udevrulesdir)
@@ -48,6 +49,7 @@ endif @@ -49,6 +50,7 @@ endif
uninstall: uninstall:
$(Q)$(RM) $(DESTDIR)$(bindir)/$(EXEC) $(Q)$(RM) $(DESTDIR)$(bindir)/$(EXEC)
$(Q)$(RM) $(DESTDIR)$(bindir)/mpathconf $(Q)$(RM) $(DESTDIR)$(bindir)/mpathconf
+ $(Q)$(RM) $(DESTDIR)$(bindir)/mpathcleanup + $(Q)$(RM) $(DESTDIR)$(bindir)/mpathcleanup
$(Q)$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules $(Q)$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules
$(Q)$(RM) $(DESTDIR)$(udevrulesdir)/99-z-dm-mpath-late.rules
$(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf $(Q)$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf
$(Q)$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
diff --git a/multipath/mpathcleanup b/multipath/mpathcleanup diff --git a/multipath/mpathcleanup b/multipath/mpathcleanup
new file mode 100755 new file mode 100755
index 00000000..6fd921e4 index 00000000..6fd921e4

View File

@ -1,27 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Tue, 16 Jan 2024 00:54:37 -0500
Subject: [PATCH] multipathd: fix null pointer dereference in uev_update_path
The Auto-resize code added a check that deferences pp->mpp without
checking that it's non-NULL. Fix it.
Fixes: 981b83ad1 ("multipathd: Add auto_resize config option")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipathd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 230c9d10..57c04364 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1653,7 +1653,7 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
}
}
}
- if (auto_resize != AUTO_RESIZE_NEVER &&
+ if (auto_resize != AUTO_RESIZE_NEVER && mpp &&
!mpp->wait_for_udev) {
struct pathgroup *pgp;
struct path *pp2;

View File

@ -1,42 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Tue, 16 Jan 2024 01:11:02 -0500
Subject: [PATCH] multipathd: fix auto-resize configuration
The code acted like AUTO_RESIZE_UNDEFINED didn't exist, but since
conf->auto_resize was never set to AUTO_RESIZE_NEVER, the default was in
fact AUTO_RESIZE_UNDEFINED, which ended up getting treated like
AUTO_RESIZE_GROW_SHRINK. Remove AUTO_RESIZE_UNDEFINED and explicitly
default auto_resize tp AUTO_RESIZE_NEVER.
Fixes: 981b83ad1 ("multipathd: Add auto_resize config option")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/config.c | 1 +
libmultipath/structs.h | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/config.c b/libmultipath/config.c
index 4544f484..3d5943d3 100644
--- a/libmultipath/config.c
+++ b/libmultipath/config.c
@@ -927,6 +927,7 @@ int _init_config (const char *file, struct config *conf)
conf->retrigger_tries = DEFAULT_RETRIGGER_TRIES;
conf->retrigger_delay = DEFAULT_RETRIGGER_DELAY;
conf->uev_wait_timeout = DEFAULT_UEV_WAIT_TIMEOUT;
+ conf->auto_resize = DEFAULT_AUTO_RESIZE;
conf->remove_retries = 0;
conf->ghost_delay = DEFAULT_GHOST_DELAY;
conf->all_tg_pt = DEFAULT_ALL_TG_PT;
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
index a1aac1b4..734905e2 100644
--- a/libmultipath/structs.h
+++ b/libmultipath/structs.h
@@ -180,7 +180,6 @@ enum queue_mode_states {
};
enum auto_resize_state {
- AUTO_RESIZE_UNDEF = 0,
AUTO_RESIZE_NEVER,
AUTO_RESIZE_GROW_ONLY,
AUTO_RESIZE_GROW_SHRINK,

View File

@ -1,30 +1,29 @@
Name: device-mapper-multipath Name: device-mapper-multipath
Version: 0.9.7 Version: 0.9.9
Release: 10%{?dist} Release: 1%{?dist}
Summary: Tools to manage multipath devices using device-mapper Summary: Tools to manage multipath devices using device-mapper
License: GPLv2 License: GPLv2
URL: http://christophe.varoqui.free.fr/ URL: http://christophe.varoqui.free.fr/
# The source for this package was pulled from upstream's git repo. Use the # The source for this package was pulled from upstream's git repo. Use the
# following command to generate the tarball # following command to generate the tarball
# curl -L https://github.com/opensvc/multipath-tools/archive/0.9.7.tar.gz -o multipath-tools-0.9.7.tgz # curl -L https://github.com/opensvc/multipath-tools/archive/0.9.9.tar.gz -o multipath-tools-0.9.9.tgz
Source0: multipath-tools-0.9.7.tgz Source0: multipath-tools-0.9.9.tgz
Source1: multipath.conf Source1: multipath.conf
Patch0001: 0001-RH-fixup-udev-rules-for-redhat.patch Patch0001: 0001-multipathd-fix-flush-check-in-flush_map.patch
Patch0002: 0002-RH-Remove-the-property-blacklist-exception-builtin.patch Patch0002: 0002-RH-fixup-udev-rules-for-redhat.patch
Patch0003: 0003-RH-don-t-start-without-a-config-file.patch Patch0003: 0003-RH-Remove-the-property-blacklist-exception-builtin.patch
Patch0004: 0004-RH-Fix-nvme-function-missing-argument.patch Patch0004: 0004-RH-don-t-start-without-a-config-file.patch
Patch0005: 0005-RH-use-rpm-optflags-if-present.patch Patch0005: 0005-RH-Fix-nvme-function-missing-argument.patch
Patch0006: 0006-RH-add-mpathconf.patch Patch0006: 0006-RH-use-rpm-optflags-if-present.patch
Patch0007: 0007-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch Patch0007: 0007-RH-add-mpathconf.patch
Patch0008: 0008-RH-reset-default-find_mutipaths-value-to-off.patch Patch0008: 0008-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
Patch0009: 0009-RH-attempt-to-get-ANA-info-via-sysfs-first.patch Patch0009: 0009-RH-reset-default-find_mutipaths-value-to-off.patch
Patch0010: 0010-RH-make-parse_vpd_pg83-match-scsi_id-output.patch Patch0010: 0010-RH-attempt-to-get-ANA-info-via-sysfs-first.patch
Patch0011: 0011-RH-add-scsi-device-handlers-to-modules-load.d.patch Patch0011: 0011-RH-make-parse_vpd_pg83-match-scsi_id-output.patch
Patch0012: 0012-RH-compile-with-libreadline-support.patch Patch0012: 0012-RH-add-scsi-device-handlers-to-modules-load.d.patch
Patch0013: 0013-RH-Add-mpathcleanup.patch Patch0013: 0013-RH-compile-with-libreadline-support.patch
Patch0014: 0014-multipathd-fix-null-pointer-dereference-in-uev_updat.patch Patch0014: 0014-RH-Add-mpathcleanup.patch
Patch0015: 0015-multipathd-fix-auto-resize-configuration.patch
# runtime # runtime
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
@ -111,7 +110,7 @@ This package contains the files needed to develop applications that use
device-mapper-multipath's libdmmp C API library device-mapper-multipath's libdmmp C API library
%prep %prep
%autosetup -n multipath-tools-0.9.7 -p1 %autosetup -n multipath-tools-0.9.9 -p1
cp %{SOURCE1} . cp %{SOURCE1} .
%build %build
@ -173,6 +172,7 @@ fi
%{_mandir}/man8/mpathpersist.8* %{_mandir}/man8/mpathpersist.8*
%config /usr/lib/udev/rules.d/62-multipath.rules %config /usr/lib/udev/rules.d/62-multipath.rules
%config /usr/lib/udev/rules.d/11-dm-mpath.rules %config /usr/lib/udev/rules.d/11-dm-mpath.rules
%config /usr/lib/udev/rules.d/99-z-dm-mpath-late.rules
%dir %{_modulesloaddir} %dir %{_modulesloaddir}
%{_modulesloaddir}/scsi_dh.conf %{_modulesloaddir}/scsi_dh.conf
%{_tmpfilesdir}/multipath.conf %{_tmpfilesdir}/multipath.conf
@ -233,6 +233,15 @@ fi
%{_pkgconfdir}/libdmmp.pc %{_pkgconfdir}/libdmmp.pc
%changelog %changelog
* Fri Jul 26 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.9.9-1
- Update source to upstream version 0.9.9
* Previous patches 0014-0015 are included in the soruce tarball
* Patch 0001 is from the upstream staging branch
- Rename redhat patches
* Previous patches 0001-0013 are now 0002-0014
- Install /lib/udev/rules.d/99-z-dm-mpath-late.rules
- Resolves: RHEL-50698
* Fri Jun 28 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.9.7-10 * Fri Jun 28 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.9.7-10
- Fix CI tests - Fix CI tests

View File

@ -1,2 +1,2 @@
SHA512 (multipath-tools-0.9.7.tgz) = 0f4c97179a3de5a0c77893fec229eb183293fed8e5e01a9945b261845ccf5d13f8ef2c2ff0c17c9345217d236275caed4765422ec95aed80821f11658bf96e26 SHA512 (multipath-tools-0.9.9.tgz) = 65b5d5c48792f6041d700968c87675bc349ede475fe178a203814dbb0325f69895782a22c5c35f6c0157f694951714de9e83cc1464a6c062d911a58faed8960a
SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942 SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942