From d1207a7795f6efc52e321e735a92d7b3d80aaaba Mon Sep 17 00:00:00 2001 From: Benjamin Marzinski Date: Sat, 2 Mar 2013 17:03:30 -0600 Subject: [PATCH] device-mapper-multipath-0.4.9-45 Updated to latest upstrem 0.4.9 code: multipath-tools-130222 (git commit id: 67b82ad6fe280caa1770025a6bb8110b633fa136) Refresh 0001-RH-dont_start_with_no_config.patch Modify 0002-RH-multipath.rules.patch Modify 0003-RH-Make-build-system-RH-Fedora-friendly.patch Refresh 0004-RH-multipathd-blacklist-all-by-default.patch Refresh 0005-RH-add-mpathconf.patch Refresh 0006-RH-add-find-multipaths.patch Add 0008-RH-revert-partition-changes.patch Rename 0008-RH-RHEL5-style-partitions.patch to 0009-RH-RHEL5-style-partitions.patch Rename 0009-RH-dont-remove-map-on-enomem.patch to 0010-RH-dont-remove-map-on-enomem.patch Rename 0010-RH-deprecate-uid-gid-mode.patch to 0011-RH-deprecate-uid-gid-mode.patch Rename 0013-RH-kpartx-msg.patch to 0012-RH-kpartx-msg.patch Rename 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch to 0013-RHBZ-883981-cleanup-rpmdiff-issues.patch Rename 0039-RH-handle-other-sector-sizes.patch to 0014-RH-handle-other-sector-sizes.patch Rename 0040-RH-fix-output-buffer.patch to 0015-RH-fix-output-buffer.patch Add 0016-RH-dont-print-ghost-messages.patch Add 0017-RH-fix-sigusr1.patch * Actually this fixes a number of issues related to signals Rename 0018-RH-remove-config-dups.patch to 0018-RH-fix-factorize.patch * just the part that isn't upstream Add 0019-RH-fix-sockets.patch * makes abstract multipathd a cli sockets use the correct name. Set find_multipaths in the default config --- .gitignore | 1 + 0001-RH-dont_start_with_no_config.patch | 12 +- 0002-RH-multipath.rules.patch | 37 +- ...Make-build-system-RH-Fedora-friendly.patch | 44 +- ...-multipathd-blacklist-all-by-default.patch | 14 +- 0005-RH-add-mpathconf.patch | 30 +- 0006-RH-add-find-multipaths.patch | 88 +-- 0008-RH-revert-partition-changes.patch | 45 ++ ...ch => 0009-RH-RHEL5-style-partitions.patch | 38 +- ...=> 0010-RH-dont-remove-map-on-enomem.patch | 8 +- ...ch => 0011-RH-deprecate-uid-gid-mode.patch | 0 0011-RH-use-sync-support.patch | 17 - 0012-RH-change-configs.patch | 541 ----------------- ...artx-msg.patch => 0012-RH-kpartx-msg.patch | 8 +- ...3-RHBZ-883981-cleanup-rpmdiff-issues.patch | 50 +- 0014-RH-dm_reassign.patch | 80 --- ...=> 0014-RH-handle-other-sector-sizes.patch | 0 ...r.patch => 0015-RH-fix-output-buffer.patch | 8 +- 0015-RH-selector_change.patch | 17 - 0016-RH-dont-print-ghost-messages.patch | 18 + 0016-RH-retain_hwhandler.patch | 426 ------------- 0017-RH-fix-sigusr1.patch | 82 +++ 0018-RH-fix-factorize.patch | 17 + 0018-RH-remove-config-dups.patch | 152 ----- 0019-RH-detect-prio.patch | 319 ---------- 0019-RH-fix-sockets.patch | 48 ++ 0020-RH-netapp-config.patch | 21 - 0021-RH-fix-oom-adj.patch | 21 - 0022-RHBZ-864368-disable-libdm-failback.patch | 58 -- 0023-RHBZ-866291-update-documentation.patch | 107 ---- ...-start-multipathd-service-before-lvm.patch | 11 - 0025-RH-fix-systemd-start-order.patch | 18 - 0026-RH-fix-mpathpersist-fns.patch | 62 -- 0027-RH-default-partition-delimiters.patch | 15 - 0028-RH-storagetek-config.patch | 30 - 0029-RH-kpartx-retry.patch | 34 -- 0030-RH-early-blacklist.patch | 569 ------------------ 0031-RHBZ-882060-fix-null-strncmp.patch | 66 -- 0032-RH-make-path-fd-readonly.patch | 17 - ...disable-libdm-failback-for-sync-case.patch | 111 ---- 0034-RHBZ-887737-check-for-null-key.patch | 28 - 0036-UP-fix-state-handling.patch | 38 -- 0037-UP-fix-params-size.patch | 17 - 0038-RH-fix-multipath.rules.patch | 18 - device-mapper-multipath.spec | 105 ++-- multipath.conf | 1 + sources | 2 +- 47 files changed, 428 insertions(+), 3021 deletions(-) create mode 100644 0008-RH-revert-partition-changes.patch rename 0008-RH-RHEL5-style-partitions.patch => 0009-RH-RHEL5-style-partitions.patch (90%) rename 0009-RH-dont-remove-map-on-enomem.patch => 0010-RH-dont-remove-map-on-enomem.patch (69%) rename 0010-RH-deprecate-uid-gid-mode.patch => 0011-RH-deprecate-uid-gid-mode.patch (100%) delete mode 100644 0011-RH-use-sync-support.patch delete mode 100644 0012-RH-change-configs.patch rename 0013-RH-kpartx-msg.patch => 0012-RH-kpartx-msg.patch (80%) rename 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch => 0013-RHBZ-883981-cleanup-rpmdiff-issues.patch (75%) delete mode 100644 0014-RH-dm_reassign.patch rename 0039-RH-handle-other-sector-sizes.patch => 0014-RH-handle-other-sector-sizes.patch (100%) rename 0040-RH-fix-output-buffer.patch => 0015-RH-fix-output-buffer.patch (85%) delete mode 100644 0015-RH-selector_change.patch create mode 100644 0016-RH-dont-print-ghost-messages.patch delete mode 100644 0016-RH-retain_hwhandler.patch create mode 100644 0017-RH-fix-sigusr1.patch create mode 100644 0018-RH-fix-factorize.patch delete mode 100644 0018-RH-remove-config-dups.patch delete mode 100644 0019-RH-detect-prio.patch create mode 100644 0019-RH-fix-sockets.patch delete mode 100644 0020-RH-netapp-config.patch delete mode 100644 0021-RH-fix-oom-adj.patch delete mode 100644 0022-RHBZ-864368-disable-libdm-failback.patch delete mode 100644 0023-RHBZ-866291-update-documentation.patch delete mode 100644 0024-RH-start-multipathd-service-before-lvm.patch delete mode 100644 0025-RH-fix-systemd-start-order.patch delete mode 100644 0026-RH-fix-mpathpersist-fns.patch delete mode 100644 0027-RH-default-partition-delimiters.patch delete mode 100644 0028-RH-storagetek-config.patch delete mode 100644 0029-RH-kpartx-retry.patch delete mode 100644 0030-RH-early-blacklist.patch delete mode 100644 0031-RHBZ-882060-fix-null-strncmp.patch delete mode 100644 0032-RH-make-path-fd-readonly.patch delete mode 100644 0033-RH-dont-disable-libdm-failback-for-sync-case.patch delete mode 100644 0034-RHBZ-887737-check-for-null-key.patch delete mode 100644 0036-UP-fix-state-handling.patch delete mode 100644 0037-UP-fix-params-size.patch delete mode 100644 0038-RH-fix-multipath.rules.patch diff --git a/.gitignore b/.gitignore index 8c66e89..763ac01 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ multipath-tools-091027.tar.gz /multipath-tools-120123.tgz /multipath-tools-120613.tgz /multipath-tools-120821.tgz +/multipath-tools-130222.tgz diff --git a/0001-RH-dont_start_with_no_config.patch b/0001-RH-dont_start_with_no_config.patch index 7efd925..e894632 100644 --- a/0001-RH-dont_start_with_no_config.patch +++ b/0001-RH-dont_start_with_no_config.patch @@ -2,15 +2,15 @@ multipathd/multipathd.service | 1 + 1 file changed, 1 insertion(+) -Index: multipath-tools-110916/multipathd/multipathd.service +Index: multipath-tools-130222/multipathd/multipathd.service =================================================================== ---- multipath-tools-110916.orig/multipathd/multipathd.service -+++ multipath-tools-110916/multipathd/multipathd.service +--- multipath-tools-130222.orig/multipathd/multipathd.service ++++ multipath-tools-130222/multipathd/multipathd.service @@ -2,6 +2,7 @@ Description=Device-Mapper Multipath Device Controller - Before=iscsi.service iscsid.service + Before=iscsi.service iscsid.service lvm2-activation-early.service After=syslog.target +ConditionPathExists=/etc/multipath.conf + DefaultDependencies=no + Conflicts=shutdown.target - [Service] - Type=forking diff --git a/0002-RH-multipath.rules.patch b/0002-RH-multipath.rules.patch index 32eee62..a910dc1 100644 --- a/0002-RH-multipath.rules.patch +++ b/0002-RH-multipath.rules.patch @@ -1,23 +1,17 @@ --- - multipath/Makefile | 6 +++--- - multipath/multipath.rules | 29 +++++++++++++++++++++++------ - 2 files changed, 26 insertions(+), 9 deletions(-) + multipath/Makefile | 3 +++ + multipath/multipath.rules | 24 ++++++++++++++++++++++++ + 2 files changed, 27 insertions(+) -Index: multipath-tools-120821/multipath/multipath.rules +Index: multipath-tools-130222/multipath/multipath.rules =================================================================== ---- multipath-tools-120821.orig/multipath/multipath.rules -+++ multipath-tools-120821/multipath/multipath.rules -@@ -1,7 +1,24 @@ --# --# udev rules for multipathing. --# The persistent symlinks are created with the kpartx rules --# +--- /dev/null ++++ multipath-tools-130222/multipath/multipath.rules +@@ -0,0 +1,24 @@ +# multipath wants the devmaps presented as meaninglful device names +# so name them after their devmap name +SUBSYSTEM!="block", GOTO="end_mpath" - --# socket for uevents --SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event" ++ +ENV{MPATH_SBIN_PATH}="/sbin" +TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin" + @@ -31,23 +25,21 @@ Index: multipath-tools-120821/multipath/multipath.rules + RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}" + +KERNEL!="dm-*", GOTO="end_mpath" -+ACTION!="change", GOTO="end_mpath" +ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10" ++ACTION!="change", GOTO="end_mpath" +ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath" +ENV{DM_SUSPENDED}=="1", GOTO="end_mpath" +ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath" -+RUN+="$env{MPATH_SBIN_PATH}/kpartx -a -p p $tempnode" ++RUN+="$env{MPATH_SBIN_PATH}/kpartx -a $tempnode" +LABEL="end_mpath" -Index: multipath-tools-120821/multipath/Makefile +Index: multipath-tools-130222/multipath/Makefile =================================================================== ---- multipath-tools-120821.orig/multipath/Makefile -+++ multipath-tools-120821/multipath/Makefile -@@ -21,15 +21,15 @@ $(EXEC): $(OBJS) +--- multipath-tools-130222.orig/multipath/Makefile ++++ multipath-tools-130222/multipath/Makefile +@@ -21,12 +21,15 @@ $(EXEC): $(OBJS) install: $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ -- $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d -- $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/ + $(INSTALL_PROGRAM) -d $(DESTDIR)/lib/udev/rules.d + $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/lib/udev/rules.d/62-multipath.rules $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) @@ -56,7 +48,6 @@ Index: multipath-tools-120821/multipath/Makefile $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir) uninstall: -- rm $(DESTDIR)/etc/udev/rules.d/multipath.rules + rm $(DESTDIR)/lib/udev/rules.d/62-multipath.rules rm $(DESTDIR)$(bindir)/$(EXEC) rm $(DESTDIR)$(mandir)/$(EXEC).8.gz diff --git a/0003-RH-Make-build-system-RH-Fedora-friendly.patch b/0003-RH-Make-build-system-RH-Fedora-friendly.patch index bc5d17d..f293c80 100644 --- a/0003-RH-Make-build-system-RH-Fedora-friendly.patch +++ b/0003-RH-Make-build-system-RH-Fedora-friendly.patch @@ -9,16 +9,16 @@ Signed-off-by: Fabio M. Di Nitto :100644 100644 21e4ad4... 06d79c0... M kpartx/Makefile :100644 100644 32d9ef5... 25e1483... M multipathd/Makefile Makefile.inc | 2 +- - kpartx/Makefile | 8 ++++---- + kpartx/Makefile | 10 +++++----- libmpathpersist/Makefile | 7 ++----- libmultipath/Makefile | 2 ++ multipathd/Makefile | 1 + - 5 files changed, 10 insertions(+), 10 deletions(-) + 5 files changed, 11 insertions(+), 11 deletions(-) -Index: multipath-tools-120613/Makefile.inc +Index: multipath-tools-130222/Makefile.inc =================================================================== ---- multipath-tools-120613.orig/Makefile.inc -+++ multipath-tools-120613/Makefile.inc +--- multipath-tools-130222.orig/Makefile.inc ++++ multipath-tools-130222/Makefile.inc @@ -29,7 +29,7 @@ multipathdir = $(TOPDIR)/libmultipath mandir = $(prefix)/usr/share/man/man8 man5dir = $(prefix)/usr/share/man/man5 @@ -28,11 +28,11 @@ Index: multipath-tools-120613/Makefile.inc syslibdir = $(prefix)/$(LIB) libdir = $(prefix)/$(LIB)/multipath unitdir = $(prefix)/lib/systemd/system -Index: multipath-tools-120613/kpartx/Makefile +Index: multipath-tools-130222/kpartx/Makefile =================================================================== ---- multipath-tools-120613.orig/kpartx/Makefile -+++ multipath-tools-120613/kpartx/Makefile -@@ -26,10 +26,10 @@ $(EXEC): $(OBJS) +--- multipath-tools-130222.orig/kpartx/Makefile ++++ multipath-tools-130222/kpartx/Makefile +@@ -26,17 +26,17 @@ $(EXEC): $(OBJS) install: $(EXEC) $(EXEC).8 $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) @@ -47,10 +47,18 @@ Index: multipath-tools-120613/kpartx/Makefile $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) -Index: multipath-tools-120613/multipathd/Makefile + uninstall: + rm -f $(DESTDIR)$(bindir)/$(EXEC) + rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz +- rm -f $(DESTDIR)$(libudevdir)/kpartx_id ++# rm -f $(DESTDIR)$(libudevdir)/kpartx_id + + clean: + rm -f core *.o $(EXEC) *.gz +Index: multipath-tools-130222/multipathd/Makefile =================================================================== ---- multipath-tools-120613.orig/multipathd/Makefile -+++ multipath-tools-120613/multipathd/Makefile +--- multipath-tools-130222.orig/multipathd/Makefile ++++ multipath-tools-130222/multipathd/Makefile @@ -35,6 +35,7 @@ install: $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) @@ -59,10 +67,10 @@ Index: multipath-tools-120613/multipathd/Makefile $(INSTALL_PROGRAM) -d $(DESTDIR)$(unitdir) $(INSTALL_PROGRAM) -m 644 $(EXEC).service $(DESTDIR)$(unitdir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) -Index: multipath-tools-120613/libmultipath/Makefile +Index: multipath-tools-130222/libmultipath/Makefile =================================================================== ---- multipath-tools-120613.orig/libmultipath/Makefile -+++ multipath-tools-120613/libmultipath/Makefile +--- multipath-tools-130222.orig/libmultipath/Makefile ++++ multipath-tools-130222/libmultipath/Makefile @@ -46,9 +46,11 @@ install: $(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir) $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS) @@ -75,10 +83,10 @@ Index: multipath-tools-120613/libmultipath/Makefile clean: rm -f core *.a *.o *.gz *.so *.so.* -Index: multipath-tools-120613/libmpathpersist/Makefile +Index: multipath-tools-130222/libmpathpersist/Makefile =================================================================== ---- multipath-tools-120613.orig/libmpathpersist/Makefile -+++ multipath-tools-120613/libmpathpersist/Makefile +--- multipath-tools-130222.orig/libmpathpersist/Makefile ++++ multipath-tools-130222/libmpathpersist/Makefile @@ -28,17 +28,14 @@ $(LIBS): install: $(LIBS) $(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir) diff --git a/0004-RH-multipathd-blacklist-all-by-default.patch b/0004-RH-multipathd-blacklist-all-by-default.patch index e27e4cf..2dda63c 100644 --- a/0004-RH-multipathd-blacklist-all-by-default.patch +++ b/0004-RH-multipathd-blacklist-all-by-default.patch @@ -16,10 +16,10 @@ Signed-off-by: Fabio M. Di Nitto libmultipath/config.h | 1 + 2 files changed, 17 insertions(+) -Index: multipath-tools-120817/libmultipath/config.c +Index: multipath-tools-130222/libmultipath/config.c =================================================================== ---- multipath-tools-120817.orig/libmultipath/config.c -+++ multipath-tools-120817/libmultipath/config.c +--- multipath-tools-130222.orig/libmultipath/config.c ++++ multipath-tools-130222/libmultipath/config.c @@ -21,6 +21,7 @@ #include "defaults.h" #include "prio.h" @@ -28,7 +28,7 @@ Index: multipath-tools-120817/libmultipath/config.c static int hwe_strmatch (struct hwentry *hwe1, struct hwentry *hwe2) -@@ -552,6 +553,21 @@ load_config (char * file) +@@ -585,6 +586,21 @@ load_config (char * file) } else { init_keywords(); @@ -50,10 +50,10 @@ Index: multipath-tools-120817/libmultipath/config.c } /* -Index: multipath-tools-120817/libmultipath/config.h +Index: multipath-tools-130222/libmultipath/config.h =================================================================== ---- multipath-tools-120817.orig/libmultipath/config.h -+++ multipath-tools-120817/libmultipath/config.h +--- multipath-tools-130222.orig/libmultipath/config.h ++++ multipath-tools-130222/libmultipath/config.h @@ -6,6 +6,7 @@ #define ORIGIN_DEFAULT 0 diff --git a/0005-RH-add-mpathconf.patch b/0005-RH-add-mpathconf.patch index 6cd9543..ce1b2c7 100644 --- a/0005-RH-add-mpathconf.patch +++ b/0005-RH-add-mpathconf.patch @@ -6,11 +6,11 @@ multipath/mpathconf.8 | 103 ++++++++++++++++ 5 files changed, 423 insertions(+), 2 deletions(-) -Index: multipath-tools-120817/libmultipath/config.c +Index: multipath-tools-130222/libmultipath/config.c =================================================================== ---- multipath-tools-120817.orig/libmultipath/config.c -+++ multipath-tools-120817/libmultipath/config.c -@@ -556,6 +556,7 @@ load_config (char * file) +--- multipath-tools-130222.orig/libmultipath/config.c ++++ multipath-tools-130222/libmultipath/config.c +@@ -589,6 +589,7 @@ load_config (char * file) condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); condlog(0, "A default multipath.conf file is located at"); condlog(0, "/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf", MULTIPATH_VERSION(VERSION_CODE)); @@ -18,10 +18,10 @@ Index: multipath-tools-120817/libmultipath/config.c if (conf->blist_devnode == NULL) { conf->blist_devnode = vector_alloc(); if (!conf->blist_devnode) { -Index: multipath-tools-120817/multipath/Makefile +Index: multipath-tools-130222/multipath/Makefile =================================================================== ---- multipath-tools-120817.orig/multipath/Makefile -+++ multipath-tools-120817/multipath/Makefile +--- multipath-tools-130222.orig/multipath/Makefile ++++ multipath-tools-130222/multipath/Makefile @@ -17,22 +17,27 @@ $(EXEC): $(OBJS) $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz @@ -50,11 +50,11 @@ Index: multipath-tools-120817/multipath/Makefile clean: rm -f core *.o $(EXEC) *.gz -Index: multipath-tools-120817/multipath/main.c +Index: multipath-tools-130222/multipath/main.c =================================================================== ---- multipath-tools-120817.orig/multipath/main.c -+++ multipath-tools-120817/multipath/main.c -@@ -432,10 +432,10 @@ main (int argc, char *argv[]) +--- multipath-tools-130222.orig/multipath/main.c ++++ multipath-tools-130222/multipath/main.c +@@ -433,10 +433,10 @@ main (int argc, char *argv[]) exit(1); } @@ -67,10 +67,10 @@ Index: multipath-tools-120817/multipath/main.c exit(1); while ((arg = getopt(argc, argv, ":dchl::FfM:v:p:b:Brtq")) != EOF ) { -Index: multipath-tools-120817/multipath/mpathconf +Index: multipath-tools-130222/multipath/mpathconf =================================================================== --- /dev/null -+++ multipath-tools-120817/multipath/mpathconf ++++ multipath-tools-130222/multipath/mpathconf @@ -0,0 +1,312 @@ +#!/bin/sh +# @@ -384,10 +384,10 @@ Index: multipath-tools-120817/multipath/mpathconf +elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then + service multipathd reload +fi -Index: multipath-tools-120817/multipath/mpathconf.8 +Index: multipath-tools-130222/multipath/mpathconf.8 =================================================================== --- /dev/null -+++ multipath-tools-120817/multipath/mpathconf.8 ++++ multipath-tools-130222/multipath/mpathconf.8 @@ -0,0 +1,103 @@ +.TH MPATHCONF 8 "June 2010" "" "Linux Administrator's Manual" +.SH NAME diff --git a/0006-RH-add-find-multipaths.patch b/0006-RH-add-find-multipaths.patch index 7c1e492..4a0c364 100644 --- a/0006-RH-add-find-multipaths.patch +++ b/0006-RH-add-find-multipaths.patch @@ -10,23 +10,23 @@ multipathd/main.c | 6 ++++++ 9 files changed, 82 insertions(+), 1 deletion(-) -Index: multipath-tools-120817/libmultipath/config.c +Index: multipath-tools-130222/libmultipath/config.c =================================================================== ---- multipath-tools-120817.orig/libmultipath/config.c -+++ multipath-tools-120817/libmultipath/config.c -@@ -517,6 +517,7 @@ load_config (char * file) +--- multipath-tools-130222.orig/libmultipath/config.c ++++ multipath-tools-130222/libmultipath/config.c +@@ -547,6 +547,7 @@ load_config (char * file) conf->reassign_maps = DEFAULT_REASSIGN_MAPS; conf->checkint = DEFAULT_CHECKINT; conf->max_checkint = MAX_CHECKINT(conf->checkint); + conf->find_multipaths = DEFAULT_FIND_MULTIPATHS; - - /* - * preload default hwtable -Index: multipath-tools-120817/libmultipath/configure.c + conf->fast_io_fail = DEFAULT_FAST_IO_FAIL; + conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER; + conf->detect_prio = DEFAULT_DETECT_PRIO; +Index: multipath-tools-130222/libmultipath/configure.c =================================================================== ---- multipath-tools-120817.orig/libmultipath/configure.c -+++ multipath-tools-120817/libmultipath/configure.c -@@ -505,6 +505,10 @@ coalesce_paths (struct vectors * vecs, v +--- multipath-tools-130222.orig/libmultipath/configure.c ++++ multipath-tools-130222/libmultipath/configure.c +@@ -508,6 +508,10 @@ coalesce_paths (struct vectors * vecs, v memset(empty_buff, 0, WWID_SIZE); @@ -37,7 +37,7 @@ Index: multipath-tools-120817/libmultipath/configure.c if (force_reload) { vector_foreach_slot (pathvec, pp1, k) { pp1->mpp = NULL; -@@ -534,6 +538,13 @@ coalesce_paths (struct vectors * vecs, v +@@ -537,6 +541,13 @@ coalesce_paths (struct vectors * vecs, v if (refwwid && strncmp(pp1->wwid, refwwid, WWID_SIZE)) continue; @@ -51,22 +51,22 @@ Index: multipath-tools-120817/libmultipath/configure.c /* * at this point, we know we really got a new mp */ -Index: multipath-tools-120817/libmultipath/defaults.h +Index: multipath-tools-130222/libmultipath/defaults.h =================================================================== ---- multipath-tools-120817.orig/libmultipath/defaults.h -+++ multipath-tools-120817/libmultipath/defaults.h +--- multipath-tools-130222.orig/libmultipath/defaults.h ++++ multipath-tools-130222/libmultipath/defaults.h @@ -15,6 +15,7 @@ #define DEFAULT_USER_FRIENDLY_NAMES 0 #define DEFAULT_VERBOSITY 2 #define DEFAULT_REASSIGN_MAPS 1 -+#define DEFAULT_FIND_MULTIPATHS 0 - - #define DEFAULT_CHECKINT 5 - #define MAX_CHECKINT(a) (a << 2) -Index: multipath-tools-120817/libmultipath/dict.c ++#define DEFAULT_FIND_MULTIPATHS 0 + #define DEFAULT_FAST_IO_FAIL 5 + #define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_OFF + #define DEFAULT_DETECT_PRIO DETECT_PRIO_OFF +Index: multipath-tools-130222/libmultipath/dict.c =================================================================== ---- multipath-tools-120817.orig/libmultipath/dict.c -+++ multipath-tools-120817/libmultipath/dict.c +--- multipath-tools-130222.orig/libmultipath/dict.c ++++ multipath-tools-130222/libmultipath/dict.c @@ -585,6 +585,27 @@ def_reservation_key_handler(vector strve } @@ -95,7 +95,7 @@ Index: multipath-tools-120817/libmultipath/dict.c def_names_handler(vector strvec) { char * buff; -@@ -2560,6 +2581,18 @@ snprint_def_log_checker_err (char * buff +@@ -2700,6 +2721,18 @@ snprint_def_log_checker_err (char * buff } static int @@ -114,18 +114,18 @@ Index: multipath-tools-120817/libmultipath/dict.c snprint_def_user_friendly_names (char * buff, int len, void * data) { if (conf->user_friendly_names == USER_FRIENDLY_NAMES_ON) -@@ -2662,6 +2695,7 @@ init_keywords(void) +@@ -2833,6 +2866,7 @@ init_keywords(void) install_keyword("wwids_file", &wwids_file_handler, &snprint_def_wwids_file); install_keyword("log_checker_err", &def_log_checker_err_handler, &snprint_def_log_checker_err); install_keyword("reservation_key", &def_reservation_key_handler, &snprint_def_reservation_key); + install_keyword("find_multipaths", &def_find_multipaths_handler, &snprint_def_find_multipaths); + install_keyword("retain_attached_hw_handler", &def_retain_hwhandler_handler, &snprint_def_retain_hwhandler_handler); + install_keyword("detect_prio", &def_detect_prio_handler, &snprint_def_detect_prio); __deprecated install_keyword("default_selector", &def_selector_handler, NULL); - __deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL); - __deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL); -Index: multipath-tools-120817/libmultipath/wwids.c +Index: multipath-tools-130222/libmultipath/wwids.c =================================================================== ---- multipath-tools-120817.orig/libmultipath/wwids.c -+++ multipath-tools-120817/libmultipath/wwids.c +--- multipath-tools-130222.orig/libmultipath/wwids.c ++++ multipath-tools-130222/libmultipath/wwids.c @@ -125,6 +125,32 @@ out: } @@ -159,10 +159,10 @@ Index: multipath-tools-120817/libmultipath/wwids.c remember_wwid(char *wwid) { int ret = check_wwids_file(wwid, 1); -Index: multipath-tools-120817/libmultipath/wwids.h +Index: multipath-tools-130222/libmultipath/wwids.h =================================================================== ---- multipath-tools-120817.orig/libmultipath/wwids.h -+++ multipath-tools-120817/libmultipath/wwids.h +--- multipath-tools-130222.orig/libmultipath/wwids.h ++++ multipath-tools-130222/libmultipath/wwids.h @@ -12,6 +12,7 @@ "#\n" \ "# Valid WWIDs:\n" @@ -171,11 +171,11 @@ Index: multipath-tools-120817/libmultipath/wwids.h int remember_wwid(char *wwid); int check_wwids_file(char *wwid, int write_wwid); -Index: multipath-tools-120817/multipath/main.c +Index: multipath-tools-130222/multipath/main.c =================================================================== ---- multipath-tools-120817.orig/multipath/main.c -+++ multipath-tools-120817/multipath/main.c -@@ -332,7 +332,7 @@ configure (void) +--- multipath-tools-130222.orig/multipath/main.c ++++ multipath-tools-130222/multipath/main.c +@@ -333,7 +333,7 @@ configure (void) /* * core logic entry point */ @@ -184,10 +184,10 @@ Index: multipath-tools-120817/multipath/main.c out: if (refwwid) -Index: multipath-tools-120817/multipathd/main.c +Index: multipath-tools-130222/multipathd/main.c =================================================================== ---- multipath-tools-120817.orig/multipathd/main.c -+++ multipath-tools-120817/multipathd/main.c +--- multipath-tools-130222.orig/multipathd/main.c ++++ multipath-tools-130222/multipathd/main.c @@ -49,6 +49,7 @@ #include #include @@ -196,7 +196,7 @@ Index: multipath-tools-120817/multipathd/main.c #include #include -@@ -473,6 +474,11 @@ rescan: +@@ -471,6 +472,11 @@ rescan: return 1; } @@ -208,11 +208,11 @@ Index: multipath-tools-120817/multipathd/main.c condlog(4,"%s: creating new map", pp->dev); if ((mpp = add_map_with_path(vecs, pp, 1))) { mpp->action = ACT_CREATE; -Index: multipath-tools-120817/libmultipath/config.h +Index: multipath-tools-130222/libmultipath/config.h =================================================================== ---- multipath-tools-120817.orig/libmultipath/config.h -+++ multipath-tools-120817/libmultipath/config.h -@@ -104,6 +104,7 @@ struct config { +--- multipath-tools-130222.orig/libmultipath/config.h ++++ multipath-tools-130222/libmultipath/config.h +@@ -106,6 +106,7 @@ struct config { unsigned int dev_loss; int log_checker_err; int allow_queueing; diff --git a/0008-RH-revert-partition-changes.patch b/0008-RH-revert-partition-changes.patch new file mode 100644 index 0000000..c563b0e --- /dev/null +++ b/0008-RH-revert-partition-changes.patch @@ -0,0 +1,45 @@ +--- + kpartx/dos.c | 2 -- + kpartx/kpartx.c | 9 ++++++--- + 2 files changed, 6 insertions(+), 5 deletions(-) + +Index: multipath-tools-130222/kpartx/dos.c +=================================================================== +--- multipath-tools-130222.orig/kpartx/dos.c ++++ multipath-tools-130222/kpartx/dos.c +@@ -98,8 +98,6 @@ read_dos_pt(int fd, struct slice all, st + break; + } + if (is_extended(p.sys_type)) { +- sp[i].size = 2; /* extended partitions only get two +- sectors mapped for LILO to install */ + n += read_extended_partition(fd, &p, i, sp+n, ns-n); + } + } +Index: multipath-tools-130222/kpartx/kpartx.c +=================================================================== +--- multipath-tools-130222.orig/kpartx/kpartx.c ++++ multipath-tools-130222/kpartx/kpartx.c +@@ -516,6 +516,7 @@ main(int argc, char **argv){ + d = c; + while (c) { + for (j = 0; j < n; j++) { ++ uint64_t start; + int k = slices[j].container - 1; + + if (slices[j].size == 0) +@@ -541,9 +542,11 @@ main(int argc, char **argv){ + } + strip_slash(partname); + +- if (safe_sprintf(params, "%s %" PRIu64, +- device, +- slices[j].start)) { ++ start = slices[j].start - slices[k].start; ++ if (safe_sprintf(params, "%d:%d %" PRIu64, ++ slices[k].major, ++ slices[k].minor, ++ start)) { + fprintf(stderr, "params too small\n"); + exit(1); + } diff --git a/0008-RH-RHEL5-style-partitions.patch b/0009-RH-RHEL5-style-partitions.patch similarity index 90% rename from 0008-RH-RHEL5-style-partitions.patch rename to 0009-RH-RHEL5-style-partitions.patch index 47fa725..a2691bb 100644 --- a/0008-RH-RHEL5-style-partitions.patch +++ b/0009-RH-RHEL5-style-partitions.patch @@ -6,10 +6,10 @@ kpartx/sun.c | 35 --------------- 5 files changed, 24 insertions(+), 177 deletions(-) -Index: multipath-tools-120123/kpartx/bsd.c +Index: multipath-tools-130222/kpartx/bsd.c =================================================================== ---- multipath-tools-120123.orig/kpartx/bsd.c -+++ multipath-tools-120123/kpartx/bsd.c +--- multipath-tools-130222.orig/kpartx/bsd.c ++++ multipath-tools-130222/kpartx/bsd.c @@ -50,10 +50,10 @@ int read_bsd_pt(int fd, struct slice all, struct slice *sp, int ns) { struct bsd_disklabel *l; @@ -60,10 +60,10 @@ Index: multipath-tools-120123/kpartx/bsd.c - } return n; } -Index: multipath-tools-120123/kpartx/dos.c +Index: multipath-tools-130222/kpartx/dos.c =================================================================== ---- multipath-tools-120123.orig/kpartx/dos.c -+++ multipath-tools-120123/kpartx/dos.c +--- multipath-tools-130222.orig/kpartx/dos.c ++++ multipath-tools-130222/kpartx/dos.c @@ -16,7 +16,7 @@ is_extended(int type) { } @@ -92,11 +92,11 @@ Index: multipath-tools-120123/kpartx/dos.c } } return n; -Index: multipath-tools-120123/kpartx/kpartx.c +Index: multipath-tools-130222/kpartx/kpartx.c =================================================================== ---- multipath-tools-120123.orig/kpartx/kpartx.c -+++ multipath-tools-120123/kpartx/kpartx.c -@@ -190,7 +190,7 @@ get_hotplug_device(void) +--- multipath-tools-130222.orig/kpartx/kpartx.c ++++ multipath-tools-130222/kpartx/kpartx.c +@@ -192,7 +192,7 @@ get_hotplug_device(void) int main(int argc, char **argv){ @@ -105,7 +105,7 @@ Index: multipath-tools-120123/kpartx/kpartx.c int fd = -1; struct slice all; struct pt *ptp; -@@ -380,49 +380,30 @@ main(int argc, char **argv){ +@@ -381,49 +381,30 @@ main(int argc, char **argv){ else continue; @@ -169,7 +169,7 @@ Index: multipath-tools-120123/kpartx/kpartx.c break; -@@ -461,16 +442,10 @@ main(int argc, char **argv){ +@@ -462,16 +443,10 @@ main(int argc, char **argv){ case ADD: case UPDATE: /* ADD and UPDATE share the same code that adds new partitions. */ @@ -187,7 +187,7 @@ Index: multipath-tools-120123/kpartx/kpartx.c if (safe_sprintf(partname, "%s%s%d", mapname, delim, j+1)) { fprintf(stderr, "partname too small\n"); -@@ -511,72 +486,6 @@ main(int argc, char **argv){ +@@ -512,72 +487,6 @@ main(int argc, char **argv){ slices[j].minor, slices[j].size, DM_TARGET, params); } @@ -260,10 +260,10 @@ Index: multipath-tools-120123/kpartx/kpartx.c if (what == ADD) { /* Skip code that removes devmappings for deleted partitions */ -Index: multipath-tools-120123/kpartx/kpartx.h +Index: multipath-tools-130222/kpartx/kpartx.h =================================================================== ---- multipath-tools-120123.orig/kpartx/kpartx.h -+++ multipath-tools-120123/kpartx/kpartx.h +--- multipath-tools-130222.orig/kpartx/kpartx.h ++++ multipath-tools-130222/kpartx/kpartx.h @@ -24,7 +24,6 @@ struct slice { uint64_t start; @@ -272,10 +272,10 @@ Index: multipath-tools-120123/kpartx/kpartx.h int major; int minor; }; -Index: multipath-tools-120123/kpartx/sun.c +Index: multipath-tools-130222/kpartx/sun.c =================================================================== ---- multipath-tools-120123.orig/kpartx/sun.c -+++ multipath-tools-120123/kpartx/sun.c +--- multipath-tools-130222.orig/kpartx/sun.c ++++ multipath-tools-130222/kpartx/sun.c @@ -62,8 +62,8 @@ int read_sun_pt(int fd, struct slice all, struct slice *sp, int ns) { struct sun_disk_label *l; diff --git a/0009-RH-dont-remove-map-on-enomem.patch b/0010-RH-dont-remove-map-on-enomem.patch similarity index 69% rename from 0009-RH-dont-remove-map-on-enomem.patch rename to 0010-RH-dont-remove-map-on-enomem.patch index b7ee42c..1740c10 100644 --- a/0009-RH-dont-remove-map-on-enomem.patch +++ b/0010-RH-dont-remove-map-on-enomem.patch @@ -2,11 +2,11 @@ multipathd/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -Index: multipath-tools-120518/multipathd/main.c +Index: multipath-tools-130222/multipathd/main.c =================================================================== ---- multipath-tools-120518.orig/multipathd/main.c -+++ multipath-tools-120518/multipathd/main.c -@@ -993,7 +993,8 @@ mpvec_garbage_collector (struct vectors +--- multipath-tools-130222.orig/multipathd/main.c ++++ multipath-tools-130222/multipathd/main.c +@@ -990,7 +990,8 @@ mpvec_garbage_collector (struct vectors return; vector_foreach_slot (vecs->mpvec, mpp, i) { diff --git a/0010-RH-deprecate-uid-gid-mode.patch b/0011-RH-deprecate-uid-gid-mode.patch similarity index 100% rename from 0010-RH-deprecate-uid-gid-mode.patch rename to 0011-RH-deprecate-uid-gid-mode.patch diff --git a/0011-RH-use-sync-support.patch b/0011-RH-use-sync-support.patch deleted file mode 100644 index c5dee9d..0000000 --- a/0011-RH-use-sync-support.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - libmultipath/devmapper.c | 2 ++ - 1 file changed, 2 insertions(+) - -Index: multipath-tools-120518/libmultipath/devmapper.c -=================================================================== ---- multipath-tools-120518.orig/libmultipath/devmapper.c -+++ multipath-tools-120518/libmultipath/devmapper.c -@@ -1272,6 +1272,8 @@ dm_rename (char * old, char * new) - goto out; - if (!dm_task_run(dmt)) - goto out; -+ if (conf->daemon) -+ dm_task_update_nodes(); - - r = 1; - out: diff --git a/0012-RH-change-configs.patch b/0012-RH-change-configs.patch deleted file mode 100644 index c34f492..0000000 --- a/0012-RH-change-configs.patch +++ /dev/null @@ -1,541 +0,0 @@ ---- - libmultipath/config.c | 1 - libmultipath/hwtable.c | 65 ------------------------------------------------- - 2 files changed, 1 insertion(+), 65 deletions(-) - -Index: multipath-tools-120817/libmultipath/config.c -=================================================================== ---- multipath-tools-120817.orig/libmultipath/config.c -+++ multipath-tools-120817/libmultipath/config.c -@@ -518,6 +518,7 @@ load_config (char * file) - conf->checkint = DEFAULT_CHECKINT; - conf->max_checkint = MAX_CHECKINT(conf->checkint); - conf->find_multipaths = DEFAULT_FIND_MULTIPATHS; -+ conf->fast_io_fail = 5; - - /* - * preload default hwtable -Index: multipath-tools-120817/libmultipath/hwtable.c -=================================================================== ---- multipath-tools-120817.orig/libmultipath/hwtable.c -+++ multipath-tools-120817/libmultipath/hwtable.c -@@ -28,7 +28,6 @@ static struct hwentry default_hw[] = { - .product = "Compellent Vol", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -50,7 +49,6 @@ static struct hwentry default_hw[] = { - .product = "Xserve RAID ", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -72,7 +70,6 @@ static struct hwentry default_hw[] = { - .product = "VV", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -88,7 +85,6 @@ static struct hwentry default_hw[] = { - .product = "HSG80", - .features = "1 queue_if_no_path", - .hwhandler = "1 hp_sw", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -104,7 +100,6 @@ static struct hwentry default_hw[] = { - .product = "A6189A", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -121,7 +116,6 @@ static struct hwentry default_hw[] = { - .product = "(MSA|HSV)1.0.*", - .features = "1 queue_if_no_path", - .hwhandler = "1 hp_sw", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -137,7 +131,6 @@ static struct hwentry default_hw[] = { - .product = "MSA VOLUME", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -153,7 +146,6 @@ static struct hwentry default_hw[] = { - .product = "HSV1[01]1|HSV2[01]0|HSV300|HSV4[05]0", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -169,7 +161,6 @@ static struct hwentry default_hw[] = { - .product = "MSA2[02]12fc|MSA2012i", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -185,7 +176,6 @@ static struct hwentry default_hw[] = { - .product = "MSA2012sa|MSA23(12|24)(fc|i|sa)|MSA2000s VOLUME", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -202,7 +192,6 @@ static struct hwentry default_hw[] = { - .product = "HSVX700", - .features = DEFAULT_FEATURES, - .hwhandler = "1 alua", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -219,7 +208,6 @@ static struct hwentry default_hw[] = { - .product = "LOGICAL VOLUME.*", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -236,7 +224,6 @@ static struct hwentry default_hw[] = { - .product = "P2000 G3 FC|P2000G3 FC/iSCSI|P2000 G3 SAS|P2000 G3 iSCSI", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -258,7 +245,6 @@ static struct hwentry default_hw[] = { - .product = "SAN DataDirector", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -280,7 +266,6 @@ static struct hwentry default_hw[] = { - .product = "SYMMETRIX", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -297,7 +282,6 @@ static struct hwentry default_hw[] = { - .bl_product = "LUNZ", - .features = "1 queue_if_no_path", - .hwhandler = "1 emc", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -314,7 +298,6 @@ static struct hwentry default_hw[] = { - .bl_product = "LUNZ", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -336,7 +319,6 @@ static struct hwentry default_hw[] = { - .product = "CentricStor", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_SERIAL, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -352,7 +334,6 @@ static struct hwentry default_hw[] = { - .product = "ETERNUS_DX(L|400|8000)", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -373,7 +354,6 @@ static struct hwentry default_hw[] = { - .product = "OPEN-.*", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -389,7 +369,6 @@ static struct hwentry default_hw[] = { - .product = "DF.*", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -411,7 +390,6 @@ static struct hwentry default_hw[] = { - .product = "ProFibre 4000R", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -429,7 +407,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "1 queue_if_no_path", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -447,7 +424,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "1 queue_if_no_path", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -465,7 +441,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "1 queue_if_no_path", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -483,7 +458,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -500,7 +474,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "2 pg_init_retries 50", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -518,7 +491,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -536,7 +508,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -554,7 +525,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -572,7 +542,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -589,7 +558,6 @@ static struct hwentry default_hw[] = { - .product = "^3542", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_SERIAL, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -606,7 +574,6 @@ static struct hwentry default_hw[] = { - .product = "^2105800", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_SERIAL, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -623,7 +590,6 @@ static struct hwentry default_hw[] = { - .product = "^2105F20", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_SERIAL, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -640,7 +606,6 @@ static struct hwentry default_hw[] = { - .product = "^1750500", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -657,7 +622,6 @@ static struct hwentry default_hw[] = { - .product = "^2107900", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -674,7 +638,6 @@ static struct hwentry default_hw[] = { - .product = "^2145", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -693,7 +656,6 @@ static struct hwentry default_hw[] = { - .uid_attribute = "ID_UID", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -712,7 +674,6 @@ static struct hwentry default_hw[] = { - .uid_attribute = "ID_UID", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -729,7 +690,6 @@ static struct hwentry default_hw[] = { - .product = "^IPR.*", - .features = "1 queue_if_no_path", - .hwhandler = "1 alua", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -746,7 +706,6 @@ static struct hwentry default_hw[] = { - .product = "1820N00", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -763,7 +722,6 @@ static struct hwentry default_hw[] = { - .product = "2810XIV", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = 15, - .rr_weight = RR_WEIGHT_NONE, -@@ -786,7 +744,6 @@ static struct hwentry default_hw[] = { - .product = "VDASD", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -803,7 +760,6 @@ static struct hwentry default_hw[] = { - .product = "3303 NVDISK", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = FAILOVER, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -820,7 +776,6 @@ static struct hwentry default_hw[] = { - .product = "NVDISK", - .features = DEFAULT_FEATURES, - .hwhandler = "1 alua", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -838,7 +793,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "2 pg_init_retries 50", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -856,7 +810,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "2 pg_init_retries 50", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -874,7 +827,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "2 pg_init_retries 50", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -892,7 +844,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "2 pg_init_retries 50", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -914,7 +865,6 @@ static struct hwentry default_hw[] = { - .product = "LUN.*", - .features = "3 queue_if_no_path pg_init_retries 50", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .flush_on_last_del = FLUSH_ENABLED, -@@ -936,7 +886,6 @@ static struct hwentry default_hw[] = { - .product = "COMSTAR", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_SERIAL, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -957,7 +906,6 @@ static struct hwentry default_hw[] = { - .product = "Nseries.*", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -978,7 +926,6 @@ static struct hwentry default_hw[] = { - .product = "Axiom.*", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -1001,7 +948,6 @@ static struct hwentry default_hw[] = { - .product = "TP9[13]00", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -1018,7 +964,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -1035,7 +980,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "2 pg_init_retries 50", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -1052,7 +996,6 @@ static struct hwentry default_hw[] = { - .product = "DISK ARRAY", - .features = DEFAULT_FEATURES, - .hwhandler = "1 alua", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -1075,7 +1018,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -1097,7 +1039,6 @@ static struct hwentry default_hw[] = { - .product = "(StorEdge 3510|T4)", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -1113,7 +1054,6 @@ static struct hwentry default_hw[] = { - .product = "FC2502", - .features = DEFAULT_FEATURES, - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -1135,7 +1075,6 @@ static struct hwentry default_hw[] = { - .product = "RAIGE VOLUME", - .features = "1 queue_if_no_path", - .hwhandler = DEFAULT_HWHANDLER, -- .selector = DEFAULT_SELECTOR, - .pgpolicy = MULTIBUS, - .pgfailback = FAILBACK_UNDEF, - .rr_weight = RR_WEIGHT_NONE, -@@ -1151,7 +1090,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -1169,7 +1107,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -1187,7 +1124,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = "2 pg_init_retries 50", - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, -@@ -1204,7 +1140,6 @@ static struct hwentry default_hw[] = { - .bl_product = "Universal Xport", - .features = DEFAULT_FEATURES, - .hwhandler = "1 rdac", -- .selector = DEFAULT_SELECTOR, - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, - .rr_weight = RR_WEIGHT_NONE, diff --git a/0013-RH-kpartx-msg.patch b/0012-RH-kpartx-msg.patch similarity index 80% rename from 0013-RH-kpartx-msg.patch rename to 0012-RH-kpartx-msg.patch index 4040049..7584c84 100644 --- a/0013-RH-kpartx-msg.patch +++ b/0012-RH-kpartx-msg.patch @@ -2,11 +2,11 @@ kpartx/lopart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: multipath-tools-120821/kpartx/lopart.c +Index: multipath-tools-130222/kpartx/lopart.c =================================================================== ---- multipath-tools-120821.orig/kpartx/lopart.c -+++ multipath-tools-120821/kpartx/lopart.c -@@ -216,13 +216,13 @@ find_unused_loop_device (void) +--- multipath-tools-130222.orig/kpartx/lopart.c ++++ multipath-tools-130222/kpartx/lopart.c +@@ -205,13 +205,13 @@ find_unused_loop_device (void) fprintf(stderr, "mount: Could not find any loop device, and, according to %s,\n" " this kernel does not know about the loop device.\n" diff --git a/0035-RHBZ-883981-cleanup-rpmdiff-issues.patch b/0013-RHBZ-883981-cleanup-rpmdiff-issues.patch similarity index 75% rename from 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch rename to 0013-RHBZ-883981-cleanup-rpmdiff-issues.patch index 924375f..03bce17 100644 --- a/0035-RHBZ-883981-cleanup-rpmdiff-issues.patch +++ b/0013-RHBZ-883981-cleanup-rpmdiff-issues.patch @@ -9,10 +9,10 @@ multipathd/Makefile | 5 +++-- 8 files changed, 15 insertions(+), 12 deletions(-) -Index: multipath-tools-120821/Makefile.inc +Index: multipath-tools-130222/Makefile.inc =================================================================== ---- multipath-tools-120821.orig/Makefile.inc -+++ multipath-tools-120821/Makefile.inc +--- multipath-tools-130222.orig/Makefile.inc ++++ multipath-tools-130222/Makefile.inc @@ -23,15 +23,15 @@ endif prefix = @@ -43,27 +43,27 @@ Index: multipath-tools-120821/Makefile.inc SHARED_FLAGS = -shared %.o: %.c -Index: multipath-tools-120821/multipathd/Makefile +Index: multipath-tools-130222/multipathd/Makefile =================================================================== ---- multipath-tools-120821.orig/multipathd/Makefile -+++ multipath-tools-120821/multipathd/Makefile +--- multipath-tools-130222.orig/multipathd/Makefile ++++ multipath-tools-130222/multipathd/Makefile @@ -5,9 +5,10 @@ include ../Makefile.inc # # basic flags setting # -CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) +CFLAGS += -fPIE -DPIE -I$(multipathdir) -I$(mpathpersistdir) - LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -ludev -ldl \ + LDFLAGS += -lpthread -ldevmapper -lreadline -ludev -ldl \ - -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist + -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \ + -Wl,-z,now -pie # # debuging stuff -Index: multipath-tools-120821/kpartx/Makefile +Index: multipath-tools-130222/kpartx/Makefile =================================================================== ---- multipath-tools-120821.orig/kpartx/Makefile -+++ multipath-tools-120821/kpartx/Makefile +--- multipath-tools-130222.orig/kpartx/Makefile ++++ multipath-tools-130222/kpartx/Makefile @@ -4,7 +4,7 @@ # include ../Makefile.inc @@ -73,10 +73,10 @@ Index: multipath-tools-120821/kpartx/Makefile LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' /usr/include/libdevmapper.h) -Index: multipath-tools-120821/libmpathpersist/Makefile +Index: multipath-tools-130222/libmpathpersist/Makefile =================================================================== ---- multipath-tools-120821.orig/libmpathpersist/Makefile -+++ multipath-tools-120821/libmpathpersist/Makefile +--- multipath-tools-130222.orig/libmpathpersist/Makefile ++++ multipath-tools-130222/libmpathpersist/Makefile @@ -10,7 +10,7 @@ DEVLIB = libmpathpersist.so LIBS = $(DEVLIB).$(SONAME) @@ -95,10 +95,10 @@ Index: multipath-tools-120821/libmpathpersist/Makefile $(CC) -shared $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) ln -s $(LIBS) $(DEVLIB) $(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz -Index: multipath-tools-120821/libmultipath/Makefile +Index: multipath-tools-130222/libmultipath/Makefile =================================================================== ---- multipath-tools-120821.orig/libmultipath/Makefile -+++ multipath-tools-120821/libmultipath/Makefile +--- multipath-tools-130222.orig/libmultipath/Makefile ++++ multipath-tools-130222/libmultipath/Makefile @@ -8,6 +8,7 @@ SONAME=0 DEVLIB = libmultipath.so LIBS = $(DEVLIB).$(SONAME) @@ -107,10 +107,10 @@ Index: multipath-tools-120821/libmultipath/Makefile OBJS = memory.o parser.o vector.o devmapper.o \ hwtable.o blacklist.o util.o dmparser.o config.o \ -Index: multipath-tools-120821/libmultipath/checkers/Makefile +Index: multipath-tools-130222/libmultipath/checkers/Makefile =================================================================== ---- multipath-tools-120821.orig/libmultipath/checkers/Makefile -+++ multipath-tools-120821/libmultipath/checkers/Makefile +--- multipath-tools-130222.orig/libmultipath/checkers/Makefile ++++ multipath-tools-130222/libmultipath/checkers/Makefile @@ -14,7 +14,7 @@ LIBS= \ libcheckhp_sw.so \ libcheckrdac.so @@ -120,10 +120,10 @@ Index: multipath-tools-120821/libmultipath/checkers/Makefile all: $(LIBS) -Index: multipath-tools-120821/libmultipath/prioritizers/Makefile +Index: multipath-tools-130222/libmultipath/prioritizers/Makefile =================================================================== ---- multipath-tools-120821.orig/libmultipath/prioritizers/Makefile -+++ multipath-tools-120821/libmultipath/prioritizers/Makefile +--- multipath-tools-130222.orig/libmultipath/prioritizers/Makefile ++++ multipath-tools-130222/libmultipath/prioritizers/Makefile @@ -17,7 +17,7 @@ LIBS = \ libprioweightedpath.so \ libprioiet.so @@ -133,10 +133,10 @@ Index: multipath-tools-120821/libmultipath/prioritizers/Makefile all: $(LIBS) -Index: multipath-tools-120821/multipath/Makefile +Index: multipath-tools-130222/multipath/Makefile =================================================================== ---- multipath-tools-120821.orig/multipath/Makefile -+++ multipath-tools-120821/multipath/Makefile +--- multipath-tools-130222.orig/multipath/Makefile ++++ multipath-tools-130222/multipath/Makefile @@ -6,7 +6,7 @@ include ../Makefile.inc OBJS = main.o diff --git a/0014-RH-dm_reassign.patch b/0014-RH-dm_reassign.patch deleted file mode 100644 index a66b93c..0000000 --- a/0014-RH-dm_reassign.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- - libmultipath/devmapper.c | 4 +++- - libmultipath/sysfs.c | 10 ++++++---- - libmultipath/util.c | 3 ++- - 3 files changed, 11 insertions(+), 6 deletions(-) - -Index: multipath-tools-120821/libmultipath/devmapper.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/devmapper.c -+++ multipath-tools-120821/libmultipath/devmapper.c -@@ -1372,8 +1372,10 @@ int dm_reassign(const char *mapname) - return 1; - } - -- if (!(dmt = dm_task_create(DM_DEVICE_DEPS))) -+ if (!(dmt = dm_task_create(DM_DEVICE_DEPS))) { -+ condlog(3, "%s: couldn't make dm task", mapname); - return 0; -+ } - - if (!dm_task_set_name(dmt, mapname)) - goto out; -Index: multipath-tools-120821/libmultipath/sysfs.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/sysfs.c -+++ multipath-tools-120821/libmultipath/sysfs.c -@@ -125,8 +125,10 @@ int sysfs_check_holders(char * check_dev - return 0; - } - -- if (devt2devname(check_dev, PATH_SIZE, check_devt)) -+ if (devt2devname(check_dev, PATH_SIZE, check_devt)) { -+ condlog(1, "can't get devname for %s", check_devt); - return 0; -+ } - - condlog(3, "%s: checking holder", check_dev); - -@@ -143,17 +145,17 @@ int sysfs_check_holders(char * check_dev - continue; - - if (sscanf(holder->d_name, "dm-%d", &table_minor) != 1) { -- condlog(3, "%s: %s is not a dm-device", -+ condlog(0, "%s: %s is not a dm-device", - check_dev, holder->d_name); - continue; - } - if (table_minor == new_minor) { -- condlog(3, "%s: holder already correct", check_dev); -+ condlog(0, "%s: holder already correct", check_dev); - continue; - } - table_name = dm_mapname(major, table_minor); - -- condlog(3, "%s: reassign table %s old %s new %s", check_dev, -+ condlog(0, "%s: reassign table %s old %s new %s", check_dev, - table_name, check_devt, new_devt); - - dm_reassign_table(table_name, check_devt, new_devt); -Index: multipath-tools-120821/libmultipath/util.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/util.c -+++ multipath-tools-120821/libmultipath/util.c -@@ -161,6 +161,7 @@ devt2devname (char *devname, int devname - struct stat statbuf; - - memset(block_path, 0, sizeof(block_path)); -+ memset(dev, 0, sizeof(dev)); - if (sscanf(devt, "%u:%u", &major, &minor) != 2) { - condlog(0, "Invalid device number %s", devt); - return 1; -@@ -172,7 +173,7 @@ devt2devname (char *devname, int devname - if (stat("/sys/dev/block", &statbuf) == 0) { - /* Newer kernels have /sys/dev/block */ - sprintf(block_path,"/sys/dev/block/%u:%u", major, minor); -- if (stat(block_path, &statbuf) == 0) { -+ if (lstat(block_path, &statbuf) == 0) { - if (S_ISLNK(statbuf.st_mode) && - readlink(block_path, dev, FILE_NAME_SIZE) > 0) { - char *p = strrchr(dev, '/'); diff --git a/0039-RH-handle-other-sector-sizes.patch b/0014-RH-handle-other-sector-sizes.patch similarity index 100% rename from 0039-RH-handle-other-sector-sizes.patch rename to 0014-RH-handle-other-sector-sizes.patch diff --git a/0040-RH-fix-output-buffer.patch b/0015-RH-fix-output-buffer.patch similarity index 85% rename from 0040-RH-fix-output-buffer.patch rename to 0015-RH-fix-output-buffer.patch index 97ff755..1a915f2 100644 --- a/0040-RH-fix-output-buffer.patch +++ b/0015-RH-fix-output-buffer.patch @@ -2,10 +2,10 @@ libmultipath/print.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) -Index: multipath-tools-120821/libmultipath/print.c +Index: multipath-tools-130222/libmultipath/print.c =================================================================== ---- multipath-tools-120821.orig/libmultipath/print.c -+++ multipath-tools-120821/libmultipath/print.c +--- multipath-tools-130222.orig/libmultipath/print.c ++++ multipath-tools-130222/libmultipath/print.c @@ -8,6 +8,8 @@ #include #include @@ -23,7 +23,7 @@ Index: multipath-tools-120821/libmultipath/print.c #define MAX(x,y) (x > y) ? x : y #define TAIL (line + len - 1 - c) -@@ -757,11 +760,30 @@ snprint_pathgroup (char * line, int len, +@@ -754,11 +757,30 @@ snprint_pathgroup (char * line, int len, extern void print_multipath_topology (struct multipath * mpp, int verbosity) { diff --git a/0015-RH-selector_change.patch b/0015-RH-selector_change.patch deleted file mode 100644 index 06a4148..0000000 --- a/0015-RH-selector_change.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - libmultipath/defaults.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: multipath-tools-120821/libmultipath/defaults.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/defaults.h -+++ multipath-tools-120821/libmultipath/defaults.h -@@ -1,7 +1,7 @@ - #define DEFAULT_UID_ATTRIBUTE "ID_SERIAL" - #define DEFAULT_UDEVDIR "/dev" - #define DEFAULT_MULTIPATHDIR "/" LIB_STRING "/multipath" --#define DEFAULT_SELECTOR "round-robin 0" -+#define DEFAULT_SELECTOR "service-time 0" - #define DEFAULT_ALIAS_PREFIX "mpath" - #define DEFAULT_FEATURES "0" - #define DEFAULT_HWHANDLER "0" diff --git a/0016-RH-dont-print-ghost-messages.patch b/0016-RH-dont-print-ghost-messages.patch new file mode 100644 index 0000000..3387424 --- /dev/null +++ b/0016-RH-dont-print-ghost-messages.patch @@ -0,0 +1,18 @@ +--- + libmultipath/discovery.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: multipath-tools-130222/libmultipath/discovery.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/discovery.c ++++ multipath-tools-130222/libmultipath/discovery.c +@@ -898,7 +898,8 @@ get_state (struct path * pp, int daemon) + c->timeout = DEF_TIMEOUT; + state = checker_check(c); + condlog(3, "%s: state = %s", pp->dev, checker_state_name(state)); +- if (state != PATH_UP && strlen(checker_message(c))) ++ if (state != PATH_UP && state != PATH_GHOST && ++ strlen(checker_message(c))) + condlog(3, "%s: checker msg is \"%s\"", + pp->dev, checker_message(c)); + return state; diff --git a/0016-RH-retain_hwhandler.patch b/0016-RH-retain_hwhandler.patch deleted file mode 100644 index 040297c..0000000 --- a/0016-RH-retain_hwhandler.patch +++ /dev/null @@ -1,426 +0,0 @@ ---- - libmultipath/config.c | 5 ++- - libmultipath/config.h | 4 +- - libmultipath/configure.c | 7 +++- - libmultipath/defaults.h | 1 - libmultipath/devmapper.c | 34 +++------------------ - libmultipath/devmapper.h | 8 ++++- - libmultipath/dict.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ - libmultipath/dmparser.c | 3 + - libmultipath/propsel.c | 29 +++++++++++++++++- - libmultipath/propsel.h | 1 - libmultipath/structs.h | 7 ++++ - 11 files changed, 138 insertions(+), 35 deletions(-) - -Index: multipath-tools-120821/libmultipath/config.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/config.c -+++ multipath-tools-120821/libmultipath/config.c -@@ -327,6 +327,7 @@ merge_hwe (struct hwentry * dst, struct - merge_num(fast_io_fail); - merge_num(dev_loss); - merge_num(user_friendly_names); -+ merge_num(retain_hwhandler); - - return 0; - } -@@ -386,6 +387,7 @@ store_hwe (vector hwtable, struct hwentr - hwe->fast_io_fail = dhwe->fast_io_fail; - hwe->dev_loss = dhwe->dev_loss; - hwe->user_friendly_names = dhwe->user_friendly_names; -+ hwe->retain_hwhandler = dhwe->retain_hwhandler; - - if (dhwe->bl_product && !(hwe->bl_product = set_param_str(dhwe->bl_product))) - goto out; -@@ -502,7 +504,7 @@ load_config (char * file) - conf->verbosity = DEFAULT_VERBOSITY; - - conf->udev = udev_new(); -- conf->dmrq = dm_drv_get_rq(); -+ dm_drv_version(conf->version, TGT_MPATH); - conf->dev_type = DEV_NONE; - conf->minio = DEFAULT_MINIO; - conf->minio_rq = DEFAULT_MINIO_RQ; -@@ -519,6 +521,7 @@ load_config (char * file) - conf->max_checkint = MAX_CHECKINT(conf->checkint); - conf->find_multipaths = DEFAULT_FIND_MULTIPATHS; - conf->fast_io_fail = 5; -+ conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER; - - /* - * preload default hwtable -Index: multipath-tools-120821/libmultipath/config.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/config.h -+++ multipath-tools-120821/libmultipath/config.h -@@ -46,6 +46,7 @@ struct hwentry { - int fast_io_fail; - unsigned int dev_loss; - int user_friendly_names; -+ int retain_hwhandler; - char * bl_product; - }; - -@@ -75,7 +76,6 @@ struct mpentry { - }; - - struct config { -- int dmrq; - int verbosity; - int dry_run; - int list; -@@ -110,6 +110,8 @@ struct config { - mode_t mode; - uint32_t cookie; - int reassign_maps; -+ int retain_hwhandler; -+ unsigned int version[3]; - - char * dev; - struct udev * udev; -Index: multipath-tools-120821/libmultipath/defaults.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/defaults.h -+++ multipath-tools-120821/libmultipath/defaults.h -@@ -16,6 +16,7 @@ - #define DEFAULT_VERBOSITY 2 - #define DEFAULT_REASSIGN_MAPS 1 - #define DEFAULT_FIND_MULTIPATHS 0 -+#define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_OFF - - #define DEFAULT_CHECKINT 5 - #define MAX_CHECKINT(a) (a << 2) -Index: multipath-tools-120821/libmultipath/dict.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/dict.c -+++ multipath-tools-120821/libmultipath/dict.c -@@ -650,6 +650,29 @@ wwids_file_handler(vector strvec) - return 0; - } - -+static int -+def_retain_hwhandler_handler(vector strvec) -+{ -+ char * buff; -+ -+ buff = set_value(strvec); -+ -+ if (!buff) -+ return 1; -+ -+ if ((strlen(buff) == 2 && !strcmp(buff, "no")) || -+ (strlen(buff) == 1 && !strcmp(buff, "0"))) -+ conf->retain_hwhandler = RETAIN_HWHANDLER_OFF; -+ else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) || -+ (strlen(buff) == 1 && !strcmp(buff, "1"))) -+ conf->retain_hwhandler = RETAIN_HWHANDLER_ON; -+ else -+ conf->retain_hwhandler = RETAIN_HWHANDLER_UNDEF; -+ -+ FREE(buff); -+ return 0; -+} -+ - /* - * blacklist block handlers - */ -@@ -1271,6 +1294,33 @@ hw_names_handler(vector strvec) - return 0; - } - -+static int -+hw_retain_hwhandler_handler(vector strvec) -+{ -+ struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable); -+ char * buff; -+ -+ if (!hwe) -+ return 1; -+ -+ buff = set_value(strvec); -+ -+ if (!buff) -+ return 1; -+ -+ if ((strlen(buff) == 2 && !strcmp(buff, "no")) || -+ (strlen(buff) == 1 && !strcmp(buff, "0"))) -+ hwe->retain_hwhandler = RETAIN_HWHANDLER_OFF; -+ else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) || -+ (strlen(buff) == 1 && !strcmp(buff, "1"))) -+ hwe->retain_hwhandler = RETAIN_HWHANDLER_ON; -+ else -+ hwe->user_friendly_names = RETAIN_HWHANDLER_UNDEF; -+ -+ FREE(buff); -+ return 0; -+} -+ - /* - * multipaths block handlers - */ -@@ -2295,6 +2345,19 @@ snprint_hw_user_friendly_names (char * b - } - - static int -+snprint_hw_retain_hwhandler_handler(char * buff, int len, void * data) -+{ -+ struct hwentry * hwe = (struct hwentry *)data; -+ -+ if (hwe->retain_hwhandler == RETAIN_HWHANDLER_ON) -+ return snprintf(buff, len, "yes"); -+ else if (hwe->retain_hwhandler == RETAIN_HWHANDLER_OFF) -+ return snprintf(buff, len, "no"); -+ else -+ return 0; -+} -+ -+static int - snprint_def_polling_interval (char * buff, int len, void * data) - { - return snprintf(buff, len, "%i", conf->checkint); -@@ -2632,6 +2695,15 @@ snprint_def_reservation_key(char * buff, - } - - static int -+snprint_def_retain_hwhandler_handler(char * buff, int len, void * data) -+{ -+ if (conf->retain_hwhandler == RETAIN_HWHANDLER_ON) -+ return snprintf(buff, len, "yes"); -+ else -+ return snprintf(buff, len, "no"); -+} -+ -+static int - snprint_ble_simple (char * buff, int len, void * data) - { - struct blentry * ble = (struct blentry *)data; -@@ -2696,6 +2768,7 @@ init_keywords(void) - install_keyword("log_checker_err", &def_log_checker_err_handler, &snprint_def_log_checker_err); - install_keyword("reservation_key", &def_reservation_key_handler, &snprint_def_reservation_key); - install_keyword("find_multipaths", &def_find_multipaths_handler, &snprint_def_find_multipaths); -+ install_keyword("retain_attached_hw_handler", &def_retain_hwhandler_handler, &snprint_def_retain_hwhandler_handler); - __deprecated install_keyword("default_selector", &def_selector_handler, NULL); - __deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL); - __deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL); -@@ -2757,6 +2830,7 @@ init_keywords(void) - install_keyword("fast_io_fail_tmo", &hw_fast_io_fail_handler, &snprint_hw_fast_io_fail); - install_keyword("dev_loss_tmo", &hw_dev_loss_handler, &snprint_hw_dev_loss); - install_keyword("user_friendly_names", &hw_names_handler, &snprint_hw_user_friendly_names); -+ install_keyword("retain_attached_hw_handler", &hw_retain_hwhandler_handler, &snprint_hw_retain_hwhandler_handler); - install_sublevel_end(); - - install_keyword_root("multipaths", &multipaths_handler); -Index: multipath-tools-120821/libmultipath/structs.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/structs.h -+++ multipath-tools-120821/libmultipath/structs.h -@@ -99,6 +99,12 @@ enum user_friendly_names_states { - USER_FRIENDLY_NAMES_ON, - }; - -+enum retain_hwhandler_states { -+ RETAIN_HWHANDLER_UNDEF, -+ RETAIN_HWHANDLER_OFF, -+ RETAIN_HWHANDLER_ON, -+}; -+ - struct scsi_idlun { - int dev_id; - int host_unique_id; -@@ -188,6 +194,7 @@ struct multipath { - int flush_on_last_del; - int attribute_flags; - int fast_io_fail; -+ int retain_hwhandler; - unsigned int dev_loss; - uid_t uid; - gid_t gid; -Index: multipath-tools-120821/libmultipath/configure.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/configure.c -+++ multipath-tools-120821/libmultipath/configure.c -@@ -76,6 +76,7 @@ setup_map (struct multipath * mpp, char - select_fast_io_fail(mpp); - select_dev_loss(mpp); - select_reservation_key(mpp); -+ select_retain_hwhandler(mpp); - - sysfs_set_scsi_tmo(mpp); - /* -@@ -217,8 +218,10 @@ select_action (struct multipath * mpp, v - mpp->alias); - return; - } -- if (!cmpp->selector || strncmp(cmpp->hwhandler, mpp->hwhandler, -- strlen(mpp->hwhandler))) { -+ if (mpp->retain_hwhandler != RETAIN_HWHANDLER_ON && -+ (strlen(cmpp->hwhandler) != strlen(mpp->hwhandler) || -+ strncmp(cmpp->hwhandler, mpp->hwhandler, -+ strlen(mpp->hwhandler)))) { - mpp->action = ACT_RELOAD; - condlog(3, "%s: set ACT_RELOAD (hwhandler change)", - mpp->alias); -Index: multipath-tools-120821/libmultipath/dmparser.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/dmparser.c -+++ multipath-tools-120821/libmultipath/dmparser.c -@@ -56,6 +56,7 @@ assemble_map (struct multipath * mp, cha - int nr_priority_groups, initial_pg_nr; - char * p, * f; - char no_path_retry[] = "queue_if_no_path"; -+ char retain_hwhandler[] = "retain_attached_hw_handler"; - struct pathgroup * pgp; - struct path * pp; - -@@ -81,6 +82,8 @@ assemble_map (struct multipath * mp, cha - } else { - add_feature(&f, no_path_retry); - } -+ if (mp->retain_hwhandler == RETAIN_HWHANDLER_ON) -+ add_feature(&f, retain_hwhandler); - - shift = snprintf(p, freechar, "%s %s %i %i", - f, mp->hwhandler, -Index: multipath-tools-120821/libmultipath/propsel.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/propsel.c -+++ multipath-tools-120821/libmultipath/propsel.c -@@ -513,7 +513,9 @@ select_minio_bio (struct multipath * mp) - extern int - select_minio (struct multipath * mp) - { -- if (conf->dmrq) -+ unsigned int minv_dmrq[3] = {1, 1, 0}; -+ -+ if (VERSION_GE(conf->version, minv_dmrq)) - return select_minio_rq(mp); - else - return select_minio_bio(mp); -@@ -674,3 +676,28 @@ select_reservation_key (struct multipath - return 0; - } - -+extern int -+select_retain_hwhandler (struct multipath * mp) -+{ -+ unsigned int minv_dm_retain[3] = {1, 5, 0}; -+ -+ if (!VERSION_GE(conf->version, minv_dm_retain)) { -+ mp->retain_hwhandler = RETAIN_HWHANDLER_OFF; -+ condlog(3, "%s: retain_attached_hw_hander disabled (requires kernel version >= 1.5.0)", mp->alias); -+ return 0; -+ } -+ -+ if (mp->hwe && mp->hwe->retain_hwhandler) { -+ mp->retain_hwhandler = mp->hwe->retain_hwhandler; -+ condlog(3, "%s: retain_attached_hw_handler = %d (controller default)", mp->alias, mp->retain_hwhandler); -+ return 0; -+ } -+ if (conf->retain_hwhandler) { -+ mp->retain_hwhandler = conf->retain_hwhandler; -+ condlog(3, "%s: retain_attached_hw_handler = %d (config file default)", mp->alias, mp->retain_hwhandler); -+ return 0; -+ } -+ mp->retain_hwhandler = 0; -+ condlog(3, "%s: retain_attached_hw_handler = %d (compiled in default)", mp->alias, mp->retain_hwhandler); -+ return 0; -+} -Index: multipath-tools-120821/libmultipath/propsel.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/propsel.h -+++ multipath-tools-120821/libmultipath/propsel.h -@@ -18,3 +18,4 @@ int select_gid(struct multipath *mp); - int select_fast_io_fail(struct multipath *mp); - int select_dev_loss(struct multipath *mp); - int select_reservation_key(struct multipath *mp); -+int select_retain_hwhandler (struct multipath * mp); -Index: multipath-tools-120821/libmultipath/devmapper.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/devmapper.c -+++ multipath-tools-120821/libmultipath/devmapper.c -@@ -98,12 +98,6 @@ dm_init(void) { - dm_log_init_verbose(conf ? conf->verbosity + 3 : 0); - } - --#define VERSION_GE(v, minv) ( \ -- (v[0] > minv[0]) || \ -- ((v[0] == minv[0]) && (v[1] > minv[1])) || \ -- ((v[0] == minv[0]) && (v[1] == minv[1]) && (v[2] >= minv[2])) \ --) -- - static int - dm_lib_prereq (void) - { -@@ -126,7 +120,7 @@ dm_lib_prereq (void) - return 1; - } - --static int -+int - dm_drv_version (unsigned int * version, char * str) - { - int r = 2; -@@ -135,6 +129,10 @@ dm_drv_version (unsigned int * version, - struct dm_versions *last_target; - unsigned int *v; - -+ version[0] = 0; -+ version[1] = 0; -+ version[2] = 0; -+ - if (!(dmt = dm_task_create(DM_DEVICE_LIST_VERSIONS))) - return 1; - -@@ -169,28 +167,6 @@ out: - return r; - } - --int --dm_drv_get_rq (void) --{ -- unsigned int minv_dmrq[3] = {1, 1, 0}; -- unsigned int version[3] = {0, 0, 0}; -- unsigned int * v = version; -- -- if (dm_drv_version(v, TGT_MPATH)) { -- /* in doubt return least capable */ -- return 0; -- } -- -- /* test request based multipath capability */ -- if VERSION_GE(v, minv_dmrq) { -- condlog(3, "activate request-based multipathing mode " -- "(driver >= v%u.%u.%u)", -- minv_dmrq[0], minv_dmrq[1], minv_dmrq[2]); -- return 1; -- } -- return 0; --} -- - static int - dm_drv_prereq (void) - { -Index: multipath-tools-120821/libmultipath/devmapper.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/devmapper.h -+++ multipath-tools-120821/libmultipath/devmapper.h -@@ -8,7 +8,7 @@ - - void dm_init(void); - int dm_prereq (void); --int dm_drv_get_rq (void); -+int dm_drv_version (unsigned int * version, char * str); - int dm_simplecmd_flush (int, const char *, int); - int dm_simplecmd_noflush (int, const char *); - int dm_addmap_create (struct multipath *mpp, char *params); -@@ -46,4 +46,10 @@ int dm_setgeometry(struct multipath *mpp - void udev_wait(unsigned int c); - void udev_set_sync_support(int c); - -+#define VERSION_GE(v, minv) ( \ -+ (v[0] > minv[0]) || \ -+ ((v[0] == minv[0]) && (v[1] > minv[1])) || \ -+ ((v[0] == minv[0]) && (v[1] == minv[1]) && (v[2] >= minv[2])) \ -+) -+ - #endif /* _DEVMAPPER_H */ diff --git a/0017-RH-fix-sigusr1.patch b/0017-RH-fix-sigusr1.patch new file mode 100644 index 0000000..8db973c --- /dev/null +++ b/0017-RH-fix-sigusr1.patch @@ -0,0 +1,82 @@ +--- + libmultipath/log_pthread.c | 3 +++ + multipathd/main.c | 12 +++++------- + 2 files changed, 8 insertions(+), 7 deletions(-) + +Index: multipath-tools-130222/multipathd/main.c +=================================================================== +--- multipath-tools-130222.orig/multipathd/main.c ++++ multipath-tools-130222/multipathd/main.c +@@ -1473,7 +1473,9 @@ sighup (int sig) + if (running_state != DAEMON_RUNNING) + return; + ++ lock(gvecs->lock); + reconfigure(gvecs); ++ unlock(gvecs->lock); + + #ifdef _DEBUG_ + dbg_free_final(NULL); +@@ -1487,16 +1489,9 @@ sigend (int sig) + } + + static void +-sigusr1 (int sig) +-{ +- condlog(3, "SIGUSR1 received"); +-} +- +-static void + signal_init(void) + { + signal_set(SIGHUP, sighup); +- signal_set(SIGUSR1, sigusr1); + signal_set(SIGINT, sigend); + signal_set(SIGTERM, sigend); + signal(SIGPIPE, SIG_IGN); +@@ -1652,6 +1647,7 @@ child (void * param) + */ + running_state = DAEMON_CONFIGURE; + ++ block_signal(SIGHUP, &set); + lock(vecs->lock); + if (configure(vecs, 1)) { + unlock(vecs->lock); +@@ -1659,6 +1655,7 @@ child (void * param) + exit(1); + } + unlock(vecs->lock); ++ pthread_sigmask(SIG_SETMASK, &set, NULL); + + /* + * start threads +@@ -1691,6 +1688,7 @@ child (void * param) + */ + running_state = DAEMON_SHUTDOWN; + pthread_sigmask(SIG_UNBLOCK, &set, NULL); ++ block_signal(SIGUSR1, NULL); + block_signal(SIGHUP, NULL); + lock(vecs->lock); + if (conf->queue_without_daemon == QUE_NO_DAEMON_OFF) +Index: multipath-tools-130222/libmultipath/log_pthread.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/log_pthread.c ++++ multipath-tools-130222/libmultipath/log_pthread.c +@@ -55,14 +55,17 @@ void log_safe (int prio, const char * fm + + void log_thread_flush (void) + { ++ sigset_t old; + int empty; + + do { ++ block_signal(SIGUSR1, &old); + pthread_mutex_lock(&logq_lock); + empty = log_dequeue(la->buff); + pthread_mutex_unlock(&logq_lock); + if (!empty) + log_syslog(la->buff); ++ pthread_sigmask(SIG_SETMASK, &old, NULL); + } while (empty == 0); + } + diff --git a/0018-RH-fix-factorize.patch b/0018-RH-fix-factorize.patch new file mode 100644 index 0000000..1dfcab5 --- /dev/null +++ b/0018-RH-fix-factorize.patch @@ -0,0 +1,17 @@ +--- + libmultipath/config.c | 2 ++ + 1 file changed, 2 insertions(+) + +Index: multipath-tools-130222/libmultipath/config.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/config.c ++++ multipath-tools-130222/libmultipath/config.c +@@ -437,6 +437,8 @@ restart: + merge_hwe(hwe2, hwe1); + if (hwe_strmatch(hwe2, hwe1) == 0) { + vector_del_slot(hw, i); ++ free_hwe(hwe1); ++ n -= 1; + /* + * Play safe here; we have modified + * the original vector so the outer diff --git a/0018-RH-remove-config-dups.patch b/0018-RH-remove-config-dups.patch deleted file mode 100644 index d5ca810..0000000 --- a/0018-RH-remove-config-dups.patch +++ /dev/null @@ -1,152 +0,0 @@ ---- - libmultipath/blacklist.c | 91 ++++++++++++++++++++++++----------------------- - libmultipath/config.c | 16 ++++++-- - 2 files changed, 60 insertions(+), 47 deletions(-) - -Index: multipath-tools-120821/libmultipath/blacklist.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/blacklist.c -+++ multipath-tools-120821/libmultipath/blacklist.c -@@ -96,50 +96,6 @@ set_ble_device (vector blist, char * ven - } - - int --setup_default_blist (struct config * conf) --{ -- struct blentry * ble; -- struct hwentry *hwe; -- char * str; -- int i; -- -- str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"); -- if (!str) -- return 1; -- if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) -- return 1; -- -- str = STRDUP("^hd[a-z]"); -- if (!str) -- return 1; -- if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) -- return 1; -- -- str = STRDUP("^dcssblk[0-9]*"); -- if (!str) -- return 1; -- if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) -- return 1; -- -- vector_foreach_slot (conf->hwtable, hwe, i) { -- if (hwe->bl_product) { -- if (alloc_ble_device(conf->blist_device)) -- return 1; -- ble = VECTOR_SLOT(conf->blist_device, -- VECTOR_SIZE(conf->blist_device) -1); -- if (set_ble_device(conf->blist_device, -- STRDUP(hwe->vendor), -- STRDUP(hwe->bl_product), -- ORIGIN_DEFAULT)) { -- FREE(ble); -- return 1; -- } -- } -- } -- return 0; --} -- --int - _blacklist_exceptions (vector elist, char * str) - { - int i; -@@ -192,6 +148,53 @@ _blacklist_device (vector blist, char * - } - return 0; - } -+ -+int -+setup_default_blist (struct config * conf) -+{ -+ struct blentry * ble; -+ struct hwentry *hwe; -+ char * str; -+ int i; -+ -+ str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"); -+ if (!str) -+ return 1; -+ if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) -+ return 1; -+ -+ str = STRDUP("^hd[a-z]"); -+ if (!str) -+ return 1; -+ if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) -+ return 1; -+ -+ str = STRDUP("^dcssblk[0-9]*"); -+ if (!str) -+ return 1; -+ if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) -+ return 1; -+ -+ vector_foreach_slot (conf->hwtable, hwe, i) { -+ if (hwe->bl_product) { -+ if (_blacklist_device(conf->blist_device, hwe->vendor, -+ hwe->bl_product)) -+ continue; -+ if (alloc_ble_device(conf->blist_device)) -+ return 1; -+ ble = VECTOR_SLOT(conf->blist_device, -+ VECTOR_SIZE(conf->blist_device) -1); -+ if (set_ble_device(conf->blist_device, -+ STRDUP(hwe->vendor), -+ STRDUP(hwe->bl_product), -+ ORIGIN_DEFAULT)) { -+ FREE(ble); -+ return 1; -+ } -+ } -+ } -+ return 0; -+} - - #define LOG_BLIST(M) \ - if (vendor && product) \ -Index: multipath-tools-120821/libmultipath/config.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/config.c -+++ multipath-tools-120821/libmultipath/config.c -@@ -26,13 +26,16 @@ - static int - hwe_strmatch (struct hwentry *hwe1, struct hwentry *hwe2) - { -- if (hwe1->vendor && hwe2->vendor && strcmp(hwe1->vendor, hwe2->vendor)) -+ if ((!!(hwe1->vendor) != !!(hwe2->vendor)) || -+ (hwe1->vendor && strcmp(hwe1->vendor, hwe2->vendor))) - return 1; - -- if (hwe1->product && hwe2->product && strcmp(hwe1->product, hwe2->product)) -+ if ((!!(hwe1->product) != !!(hwe2->product)) || -+ (hwe1->product && strcmp(hwe1->product, hwe2->product))) - return 1; - -- if (hwe1->revision && hwe2->revision && strcmp(hwe1->revision, hwe2->revision)) -+ if ((!!(hwe1->revision) != !!(hwe2->revision)) || -+ (hwe1->revision && strcmp(hwe1->revision, hwe2->revision))) - return 1; - - return 0; -@@ -417,6 +420,13 @@ factorize_hwtable (vector hw, int n) - continue; - /* dup */ - merge_hwe(hwe2, hwe1); -+ if (hwe_strmatch(hwe2, hwe1) == 0) { -+ vector_del_slot(hw, i); -+ free_hwe(hwe1); -+ n -= 1; -+ i -= 1; -+ j -= 1; -+ } - } - } - return 0; diff --git a/0019-RH-detect-prio.patch b/0019-RH-detect-prio.patch deleted file mode 100644 index f11409b..0000000 --- a/0019-RH-detect-prio.patch +++ /dev/null @@ -1,319 +0,0 @@ ---- - libmultipath/Makefile | 2 - - libmultipath/config.c | 3 + - libmultipath/config.h | 2 + - libmultipath/defaults.h | 1 - libmultipath/dict.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ - libmultipath/discovery.c | 1 - libmultipath/propsel.c | 41 ++++++++++++++++++++++++++ - libmultipath/propsel.h | 1 - libmultipath/structs.h | 7 ++++ - 9 files changed, 131 insertions(+), 1 deletion(-) - -Index: multipath-tools-120821/libmultipath/config.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/config.c -+++ multipath-tools-120821/libmultipath/config.c -@@ -331,6 +331,7 @@ merge_hwe (struct hwentry * dst, struct - merge_num(dev_loss); - merge_num(user_friendly_names); - merge_num(retain_hwhandler); -+ merge_num(detect_prio); - - return 0; - } -@@ -391,6 +392,7 @@ store_hwe (vector hwtable, struct hwentr - hwe->dev_loss = dhwe->dev_loss; - hwe->user_friendly_names = dhwe->user_friendly_names; - hwe->retain_hwhandler = dhwe->retain_hwhandler; -+ hwe->detect_prio = dhwe->detect_prio; - - if (dhwe->bl_product && !(hwe->bl_product = set_param_str(dhwe->bl_product))) - goto out; -@@ -532,6 +534,7 @@ load_config (char * file) - conf->find_multipaths = DEFAULT_FIND_MULTIPATHS; - conf->fast_io_fail = 5; - conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER; -+ conf->detect_prio = DEFAULT_DETECT_PRIO; - - /* - * preload default hwtable -Index: multipath-tools-120821/libmultipath/config.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/config.h -+++ multipath-tools-120821/libmultipath/config.h -@@ -47,6 +47,7 @@ struct hwentry { - unsigned int dev_loss; - int user_friendly_names; - int retain_hwhandler; -+ int detect_prio; - char * bl_product; - }; - -@@ -111,6 +112,7 @@ struct config { - uint32_t cookie; - int reassign_maps; - int retain_hwhandler; -+ int detect_prio; - unsigned int version[3]; - - char * dev; -Index: multipath-tools-120821/libmultipath/defaults.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/defaults.h -+++ multipath-tools-120821/libmultipath/defaults.h -@@ -17,6 +17,7 @@ - #define DEFAULT_REASSIGN_MAPS 1 - #define DEFAULT_FIND_MULTIPATHS 0 - #define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_OFF -+#define DEFAULT_DETECT_PRIO DETECT_PRIO_OFF - - #define DEFAULT_CHECKINT 5 - #define MAX_CHECKINT(a) (a << 2) -Index: multipath-tools-120821/libmultipath/dict.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/dict.c -+++ multipath-tools-120821/libmultipath/dict.c -@@ -673,6 +673,29 @@ def_retain_hwhandler_handler(vector strv - return 0; - } - -+static int -+def_detect_prio_handler(vector strvec) -+{ -+ char * buff; -+ -+ buff = set_value(strvec); -+ -+ if (!buff) -+ return 1; -+ -+ if ((strlen(buff) == 2 && !strcmp(buff, "no")) || -+ (strlen(buff) == 1 && !strcmp(buff, "0"))) -+ conf->detect_prio = DETECT_PRIO_OFF; -+ else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) || -+ (strlen(buff) == 1 && !strcmp(buff, "1"))) -+ conf->detect_prio = DETECT_PRIO_ON; -+ else -+ conf->detect_prio = DETECT_PRIO_UNDEF; -+ -+ FREE(buff); -+ return 0; -+} -+ - /* - * blacklist block handlers - */ -@@ -1321,6 +1344,33 @@ hw_retain_hwhandler_handler(vector strve - return 0; - } - -+static int -+hw_detect_prio_handler(vector strvec) -+{ -+ struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable); -+ char * buff; -+ -+ if (!hwe) -+ return 1; -+ -+ buff = set_value(strvec); -+ -+ if (!buff) -+ return 1; -+ -+ if ((strlen(buff) == 2 && !strcmp(buff, "no")) || -+ (strlen(buff) == 1 && !strcmp(buff, "0"))) -+ hwe->detect_prio = DETECT_PRIO_OFF; -+ else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) || -+ (strlen(buff) == 1 && !strcmp(buff, "1"))) -+ hwe->detect_prio = DETECT_PRIO_ON; -+ else -+ hwe->detect_prio = DETECT_PRIO_UNDEF; -+ -+ FREE(buff); -+ return 0; -+} -+ - /* - * multipaths block handlers - */ -@@ -2358,6 +2408,19 @@ snprint_hw_retain_hwhandler_handler(char - } - - static int -+snprint_detect_prio(char * buff, int len, void * data) -+{ -+ struct hwentry * hwe = (struct hwentry *)data; -+ -+ if (hwe->detect_prio == DETECT_PRIO_ON) -+ return snprintf(buff, len, "yes"); -+ else if (hwe->detect_prio == DETECT_PRIO_OFF) -+ return snprintf(buff, len, "no"); -+ else -+ return 0; -+} -+ -+static int - snprint_def_polling_interval (char * buff, int len, void * data) - { - return snprintf(buff, len, "%i", conf->checkint); -@@ -2704,6 +2767,15 @@ snprint_def_retain_hwhandler_handler(cha - } - - static int -+snprint_def_detect_prio(char * buff, int len, void * data) -+{ -+ if (conf->detect_prio == DETECT_PRIO_ON) -+ return snprintf(buff, len, "yes"); -+ else -+ return snprintf(buff, len, "no"); -+} -+ -+static int - snprint_ble_simple (char * buff, int len, void * data) - { - struct blentry * ble = (struct blentry *)data; -@@ -2769,6 +2841,7 @@ init_keywords(void) - install_keyword("reservation_key", &def_reservation_key_handler, &snprint_def_reservation_key); - install_keyword("find_multipaths", &def_find_multipaths_handler, &snprint_def_find_multipaths); - install_keyword("retain_attached_hw_handler", &def_retain_hwhandler_handler, &snprint_def_retain_hwhandler_handler); -+ install_keyword("detect_prio", &def_detect_prio_handler, &snprint_def_detect_prio); - __deprecated install_keyword("default_selector", &def_selector_handler, NULL); - __deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL); - __deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL); -@@ -2831,6 +2904,7 @@ init_keywords(void) - install_keyword("dev_loss_tmo", &hw_dev_loss_handler, &snprint_hw_dev_loss); - install_keyword("user_friendly_names", &hw_names_handler, &snprint_hw_user_friendly_names); - install_keyword("retain_attached_hw_handler", &hw_retain_hwhandler_handler, &snprint_hw_retain_hwhandler_handler); -+ install_keyword("detect_prio", &hw_detect_prio_handler, &snprint_detect_prio); - install_sublevel_end(); - - install_keyword_root("multipaths", &multipaths_handler); -Index: multipath-tools-120821/libmultipath/structs.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/structs.h -+++ multipath-tools-120821/libmultipath/structs.h -@@ -105,6 +105,12 @@ enum retain_hwhandler_states { - RETAIN_HWHANDLER_ON, - }; - -+enum detect_prio_states { -+ DETECT_PRIO_UNDEF, -+ DETECT_PRIO_OFF, -+ DETECT_PRIO_ON, -+}; -+ - struct scsi_idlun { - int dev_id; - int host_unique_id; -@@ -162,6 +168,7 @@ struct path { - int failcount; - int priority; - int pgindex; -+ int detect_prio; - char * uid_attribute; - struct prio * prio; - struct checker checker; -Index: multipath-tools-120821/libmultipath/propsel.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/propsel.c -+++ multipath-tools-120821/libmultipath/propsel.c -@@ -17,6 +17,7 @@ - #include "devmapper.h" - #include "prio.h" - #include "discovery.h" -+#include "prioritizers/alua_rtpg.h" - #include - - pgpolicyfn *pgpolicies[] = { -@@ -379,11 +380,33 @@ select_getuid (struct path * pp) - return 0; - } - -+struct prio * -+detect_prio(struct path * pp) -+{ -+ struct prio *prio; -+ -+ if (get_target_port_group_support(pp->fd) > 0) { -+ prio = prio_lookup(PRIO_ALUA); -+ prio_set_args(prio, DEFAULT_PRIO_ARGS); -+ return prio; -+ } -+ return NULL; -+} -+ - extern int - select_prio (struct path * pp) - { - struct mpentry * mpe; - -+ if (pp->detect_prio == DETECT_PRIO_ON) { -+ pp->prio = detect_prio(pp); -+ if (pp->prio) { -+ condlog(3, "%s: prio = %s (detected setting)", -+ pp->dev, pp->prio->name); -+ return 0; -+ } -+ } -+ - if ((mpe = find_mpe(pp->wwid))) { - if (mpe->prio_name) { - pp->prio = prio_lookup(mpe->prio_name); -@@ -701,3 +724,21 @@ select_retain_hwhandler (struct multipat - condlog(3, "%s: retain_attached_hw_handler = %d (compiled in default)", mp->alias, mp->retain_hwhandler); - return 0; - } -+ -+extern int -+select_detect_prio (struct path * pp) -+{ -+ if (pp->hwe && pp->hwe->detect_prio) { -+ pp->detect_prio = pp->hwe->detect_prio; -+ condlog(3, "%s: detect_prio = %d (controller default)", pp->dev, pp->detect_prio); -+ return 0; -+ } -+ if (conf->detect_prio) { -+ pp->detect_prio = conf->detect_prio; -+ condlog(3, "%s: detect_prio = %d (config file default)", pp->dev, pp->detect_prio); -+ return 0; -+ } -+ pp->detect_prio = 0; -+ condlog(3, "%s: detect_prio = %d (compiled in default)", pp->dev, pp->detect_prio); -+ return 0; -+} -Index: multipath-tools-120821/libmultipath/Makefile -=================================================================== ---- multipath-tools-120821.orig/libmultipath/Makefile -+++ multipath-tools-120821/libmultipath/Makefile -@@ -15,7 +15,7 @@ OBJS = memory.o parser.o vector.o devmap - pgpolicies.o debug.o regex.o defaults.o uevent.o \ - switchgroup.o uxsock.o print.o alias.o log_pthread.o \ - log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \ -- lock.o waiter.o file.o wwids.o -+ lock.o waiter.o file.o wwids.o prioritizers/alua_rtpg.o - - LIBDM_API_FLUSH = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_no_flush' /usr/include/libdevmapper.h) - -Index: multipath-tools-120821/libmultipath/discovery.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/discovery.c -+++ multipath-tools-120821/libmultipath/discovery.c -@@ -778,6 +778,7 @@ get_prio (struct path * pp) - return 0; - - if (!pp->prio) { -+ select_detect_prio(pp); - select_prio(pp); - if (!pp->prio) { - condlog(3, "%s: no prio selected", pp->dev); -Index: multipath-tools-120821/libmultipath/propsel.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/propsel.h -+++ multipath-tools-120821/libmultipath/propsel.h -@@ -19,3 +19,4 @@ int select_fast_io_fail(struct multipath - int select_dev_loss(struct multipath *mp); - int select_reservation_key(struct multipath *mp); - int select_retain_hwhandler (struct multipath * mp); -+int select_detect_prio(struct path * pp); diff --git a/0019-RH-fix-sockets.patch b/0019-RH-fix-sockets.patch new file mode 100644 index 0000000..8639e20 --- /dev/null +++ b/0019-RH-fix-sockets.patch @@ -0,0 +1,48 @@ +--- + libmpathpersist/mpath_updatepr.c | 3 ++- + libmultipath/uxsock.c | 4 ++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +Index: multipath-tools-130222/libmpathpersist/mpath_updatepr.c +=================================================================== +--- multipath-tools-130222.orig/libmpathpersist/mpath_updatepr.c ++++ multipath-tools-130222/libmpathpersist/mpath_updatepr.c +@@ -14,6 +14,7 @@ + #include + #include "memory.h" + #include "../libmultipath/uxsock.h" ++#include "../libmultipath/defaults.h" + + unsigned long mem_allocated; /* Total memory used in Bytes */ + +@@ -25,7 +26,7 @@ int update_prflag(char * arg1, char * ar + size_t len; + int ret = 0; + +- fd = ux_socket_connect("/var/run/multipathd.sock"); ++ fd = ux_socket_connect(DEFAULT_SOCKET); + if (fd == -1) { + condlog (0, "ux socket connect error"); + return 1 ; +Index: multipath-tools-130222/libmultipath/uxsock.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/uxsock.c ++++ multipath-tools-130222/libmultipath/uxsock.c +@@ -31,7 +31,7 @@ int ux_socket_connect(const char *name) + memset(&addr, 0, sizeof(addr)); + addr.sun_family = AF_LOCAL; + addr.sun_path[0] = '\0'; +- len = strlen(name) + 1; ++ len = strlen(name) + 1 + sizeof(sa_family_t); + strncpy(&addr.sun_path[1], name, len); + + fd = socket(AF_LOCAL, SOCK_STREAM, 0); +@@ -62,7 +62,7 @@ int ux_socket_listen(const char *name) + memset(&addr, 0, sizeof(addr)); + addr.sun_family = AF_LOCAL; + addr.sun_path[0] = '\0'; +- len = strlen(name) + 1; ++ len = strlen(name) + 1 + sizeof(sa_family_t); + strncpy(&addr.sun_path[1], name, len); + + if (bind(fd, (struct sockaddr *)&addr, len) == -1) { diff --git a/0020-RH-netapp-config.patch b/0020-RH-netapp-config.patch deleted file mode 100644 index 831ff7f..0000000 --- a/0020-RH-netapp-config.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- - libmultipath/hwtable.c | 3 +++ - 1 file changed, 3 insertions(+) - -Index: multipath-tools-120821/libmultipath/hwtable.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/hwtable.c -+++ multipath-tools-120821/libmultipath/hwtable.c -@@ -871,9 +871,12 @@ static struct hwentry default_hw[] = { - .rr_weight = RR_WEIGHT_NONE, - .no_path_retry = NO_PATH_RETRY_UNDEF, - .minio = 128, -+ .dev_loss = MAX_DEV_LOSS_TMO, - .checker_name = TUR, - .prio_name = PRIO_ONTAP, - .prio_args = NULL, -+ .retain_hwhandler = RETAIN_HWHANDLER_ON, -+ .detect_prio = DETECT_PRIO_ON, - }, - /* - * NEXENTA/COMSTAR controller family diff --git a/0021-RH-fix-oom-adj.patch b/0021-RH-fix-oom-adj.patch deleted file mode 100644 index 88c53a8..0000000 --- a/0021-RH-fix-oom-adj.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- - multipathd/main.c | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: multipath-tools-120821/multipathd/main.c -=================================================================== ---- multipath-tools-120821.orig/multipathd/main.c -+++ multipath-tools-120821/multipathd/main.c -@@ -1568,8 +1568,12 @@ set_oom_adj (void) - strerror(errno)); - return; - } -+#ifdef OOM_ADJUST_MIN - file = "/proc/self/oom_adj"; - score = OOM_ADJUST_MIN; -+#else -+ retry = 0; -+#endif - } while (retry--); - condlog(0, "couldn't adjust oom score"); - } diff --git a/0022-RHBZ-864368-disable-libdm-failback.patch b/0022-RHBZ-864368-disable-libdm-failback.patch deleted file mode 100644 index e04f97b..0000000 --- a/0022-RHBZ-864368-disable-libdm-failback.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- - kpartx/devmapper.c | 4 ++-- - libmultipath/devmapper.c | 6 +++--- - 2 files changed, 5 insertions(+), 5 deletions(-) - -Index: multipath-tools-120821/kpartx/devmapper.c -=================================================================== ---- multipath-tools-120821.orig/kpartx/devmapper.c -+++ multipath-tools-120821/kpartx/devmapper.c -@@ -78,7 +78,7 @@ dm_simplecmd (int task, const char *name - if (no_flush) - dm_task_no_flush(dmt); - -- if (udev_wait_flag && !dm_task_set_cookie(dmt, cookie, 0)) -+ if (udev_wait_flag && !dm_task_set_cookie(dmt, cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) - goto out; - r = dm_task_run(dmt); - -@@ -128,7 +128,7 @@ dm_addmap (int task, const char *name, c - - dm_task_no_open_count(dmt); - -- if (task == DM_DEVICE_CREATE && !dm_task_set_cookie(dmt, cookie, 0)) -+ if (task == DM_DEVICE_CREATE && !dm_task_set_cookie(dmt, cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) - goto addout; - r = dm_task_run (dmt); - -Index: multipath-tools-120821/libmultipath/devmapper.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/devmapper.c -+++ multipath-tools-120821/libmultipath/devmapper.c -@@ -219,7 +219,7 @@ dm_simplecmd (int task, const char *name - dm_task_no_flush(dmt); /* for DM_DEVICE_SUSPEND/RESUME */ - #endif - -- if (udev_wait_flag && !dm_task_set_cookie(dmt, &conf->cookie, 0)) -+ if (udev_wait_flag && !dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) - goto out; - r = dm_task_run (dmt); - -@@ -284,7 +284,7 @@ dm_addmap (int task, const char *target, - dm_task_no_open_count(dmt); - - if (task == DM_DEVICE_CREATE && -- !dm_task_set_cookie(dmt, &conf->cookie, 0)) -+ !dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) - goto freeout; - r = dm_task_run (dmt); - -@@ -1244,7 +1244,7 @@ dm_rename (char * old, char * new) - - dm_task_no_open_count(dmt); - -- if (!dm_task_set_cookie(dmt, &conf->cookie, 0)) -+ if (!dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) - goto out; - if (!dm_task_run(dmt)) - goto out; diff --git a/0023-RHBZ-866291-update-documentation.patch b/0023-RHBZ-866291-update-documentation.patch deleted file mode 100644 index d898341..0000000 --- a/0023-RHBZ-866291-update-documentation.patch +++ /dev/null @@ -1,107 +0,0 @@ ---- - multipath/main.c | 1 + - multipath/multipath.8 | 14 +++++++++++++- - multipath/multipath.conf.5 | 31 +++++++++++++++++++++++++++++++ - 3 files changed, 45 insertions(+), 1 deletion(-) - -Index: multipath-tools-120821/multipath/main.c -=================================================================== ---- multipath-tools-120821.orig/multipath/main.c -+++ multipath-tools-120821/multipath/main.c -@@ -101,6 +101,7 @@ usage (char * progname) - " -d dry run, do not create or update devmaps\n" \ - " -t dump internal hardware table\n" \ - " -r force devmap reload\n" \ -+ " -B treat the bindings file as read only\n" \ - " -p policy failover|multibus|group_by_serial|group_by_prio\n" \ - " -b fil bindings file location\n" \ - " -p pol force all maps to specified path grouping policy :\n" \ -Index: multipath-tools-120821/multipath/multipath.8 -=================================================================== ---- multipath-tools-120821.orig/multipath/multipath.8 -+++ multipath-tools-120821/multipath/multipath.8 -@@ -5,8 +5,10 @@ multipath \- Device mapper target autoco - .B multipath - .RB [\| \-v\ \c - .IR verbosity \|] -+.RB [\| \-b\ \c -+.IR bindings_file \|] - .RB [\| \-d \|] --.RB [\| \-h | \-l | \-ll | \-f | \-t | \-F \| \-B \|] -+.RB [\| \-h | \-l | \-ll | \-f | \-t | \-F | \-B | \-c | \-q | \|-r \|] - .RB [\| \-p\ \c - .BR failover | multibus | group_by_serial | group_by_prio | group_by_node_name \|] - .RB [\| device \|] -@@ -56,6 +58,16 @@ force devmap reload - .B \-B - treat the bindings file as read only - .TP -+.B \-b " bindings_file" -+set user_friendly_names bindings file location. The default is -+/etc/multipath/bindings -+.TP -+.B \-c -+check if a block device should be a path in a multipath device -+.TP -+.B \-q -+allow device tables with queue_if_no_path when multipathd is not running -+.TP - .BI \-p " policy" - force new maps to use the specified policy: - .RS 1.2i -Index: multipath-tools-120821/multipath/multipath.conf.5 -=================================================================== ---- multipath-tools-120821.orig/multipath/multipath.conf.5 -+++ multipath-tools-120821/multipath/multipath.conf.5 -@@ -369,6 +369,31 @@ errors are logged at level 3 until the d - .I always - , multipathd always logs the path checker error at logging level 2. Default is - .I always -+.TP -+.B reservation_key -+This is the service action reservation key used by mpathpersist. It must be -+set for all multipath devices using persistent reservations, and it must be -+the same as the RESERVATION KEY field of the PERSISTENT RESERVE OUT parameter -+list which contains an 8-byte value provided by the application client to the -+device server to identify the I_T nexus. It is unset by default. -+.TP -+.B retain_attached_hw_handler -+If set to -+.I yes -+and the scsi layer has already attached a hardware_handler to the device, -+multipath will not force the device to use the hardware_handler specified by -+mutipath.conf. If the scsi layer has not attached a hardware handler, -+multipath will continue to use its configured hardware handler. Default is -+.I no -+.TP -+.B detect_prio -+If set to -+.I yes -+, multipath will try to detect if the device supports ALUA. If so, the device -+will automatically use the -+.I alua -+prioritizer. If not, the prioritizer will be selected as usual. Default is -+.I no - . - .SH "blacklist section" - The -@@ -468,6 +493,8 @@ section: - .B rr_min_io_q - .TP - .B features -+.TP -+.B reservation_key - .RE - .PD - .LP -@@ -554,6 +581,10 @@ section: - .B dev_loss_tmo - .TP - .B flush_on_last_del -+.TP -+.B retain_attached_hw_handler -+.TP -+.B detect_prio - .RE - .PD - .LP diff --git a/0024-RH-start-multipathd-service-before-lvm.patch b/0024-RH-start-multipathd-service-before-lvm.patch deleted file mode 100644 index cd70038..0000000 --- a/0024-RH-start-multipathd-service-before-lvm.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -purN old/multipathd/multipathd.service new/multipathd/multipathd.service ---- old/multipathd/multipathd.service 2012-10-31 14:40:23.197092673 +0100 -+++ new/multipathd/multipathd.service 2012-10-31 14:42:14.174713711 +0100 -@@ -1,6 +1,6 @@ - [Unit] - Description=Device-Mapper Multipath Device Controller --Before=iscsi.service iscsid.service -+Before=iscsi.service iscsid.service lvm2-activation-early.service - After=syslog.target - ConditionPathExists=/etc/multipath.conf - diff --git a/0025-RH-fix-systemd-start-order.patch b/0025-RH-fix-systemd-start-order.patch deleted file mode 100644 index 00f05fc..0000000 --- a/0025-RH-fix-systemd-start-order.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -purN old/multipathd/multipathd.service new/multipathd/multipathd.service ---- old/multipathd/multipathd.service 2012-11-02 15:03:38.024721232 +0100 -+++ new/multipathd/multipathd.service 2012-11-02 15:11:54.386624285 +0100 -@@ -2,6 +2,8 @@ - Description=Device-Mapper Multipath Device Controller - Before=iscsi.service iscsid.service lvm2-activation-early.service - After=syslog.target -+DefaultDependencies=no -+Conflicts=shutdown.target - ConditionPathExists=/etc/multipath.conf - - [Service] -@@ -12,4 +14,4 @@ ExecReload=/sbin/multipathd reconfigure - #ExecStop=/path/to/scrip delete-me if not necessary - - [Install] --WantedBy=multi-user.target -+WantedBy=sysinit.target diff --git a/0026-RH-fix-mpathpersist-fns.patch b/0026-RH-fix-mpathpersist-fns.patch deleted file mode 100644 index bb01026..0000000 --- a/0026-RH-fix-mpathpersist-fns.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- - libmultipath/dict.c | 25 +++++++++++++++++++++++-- - multipathd/cli_handlers.c | 2 +- - 2 files changed, 24 insertions(+), 3 deletions(-) - -Index: multipath-tools-120821/libmultipath/dict.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/dict.c -+++ multipath-tools-120821/libmultipath/dict.c -@@ -2073,8 +2073,19 @@ snprint_mp_prio_args(char * buff, int le - static int - snprint_mp_reservation_key (char * buff, int len, void * data) - { -+ int i; -+ unsigned char *keyp; -+ uint64_t prkey = 0; - struct mpentry * mpe = (struct mpentry *)data; -- return snprintf(buff, len, "%s" , mpe->reservation_key); -+ keyp = (unsigned char *)mpe->reservation_key; -+ for (i = 0; i < 8; i++) { -+ if (i > 0) -+ prkey <<= 8; -+ prkey |= *keyp; -+ keyp++; -+ } -+ -+ return snprintf(buff, len, "0x%" PRIx64, prkey); - } - - static int -@@ -2754,7 +2765,17 @@ snprint_def_wwids_file (char * buff, int - static int - snprint_def_reservation_key(char * buff, int len, void * data) - { -- return snprintf(buff, len, "%s", conf->reservation_key); -+ int i; -+ unsigned char *keyp; -+ uint64_t prkey = 0; -+ keyp = (unsigned char *)conf->reservation_key; -+ for (i = 0; i < 8; i++) { -+ if (i > 0) -+ prkey <<= 8; -+ prkey |= *keyp; -+ keyp++; -+ } -+ return snprintf(buff, len, "0x%" PRIx64, prkey); - } - - static int -Index: multipath-tools-120821/multipathd/cli_handlers.c -=================================================================== ---- multipath-tools-120821.orig/multipathd/cli_handlers.c -+++ multipath-tools-120821/multipathd/cli_handlers.c -@@ -947,7 +947,7 @@ cli_getprstatus (void * v, char ** reply - - - sprintf(*reply,"%d",mpp->prflag); -- *reply[1]='\0'; -+ (*reply)[1]='\0'; - - - condlog(3, "%s: reply = %s", param, *reply); diff --git a/0027-RH-default-partition-delimiters.patch b/0027-RH-default-partition-delimiters.patch deleted file mode 100644 index 395a139..0000000 --- a/0027-RH-default-partition-delimiters.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - multipath/multipath.rules | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: multipath-tools-120821/multipath/multipath.rules -=================================================================== ---- multipath-tools-120821.orig/multipath/multipath.rules -+++ multipath-tools-120821/multipath/multipath.rules -@@ -20,5 +20,5 @@ ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath - ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath" - ENV{DM_SUSPENDED}=="1", GOTO="end_mpath" - ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath" --RUN+="$env{MPATH_SBIN_PATH}/kpartx -a -p p $tempnode" -+RUN+="$env{MPATH_SBIN_PATH}/kpartx -a $tempnode" - LABEL="end_mpath" diff --git a/0028-RH-storagetek-config.patch b/0028-RH-storagetek-config.patch deleted file mode 100644 index adac5a7..0000000 --- a/0028-RH-storagetek-config.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- - libmultipath/hwtable.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -Index: multipath-tools-120821/libmultipath/hwtable.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/hwtable.c -+++ multipath-tools-120821/libmultipath/hwtable.c -@@ -1120,6 +1120,21 @@ static struct hwentry default_hw[] = { - .prio_name = PRIO_RDAC, - .prio_args = NULL, - }, -+ /* StorageTek 6180 */ -+ { -+ .vendor = "SUN", -+ .product = "SUN_6180", -+ .features = DEFAULT_FEATURES, -+ .hwhandler = "1 rdac", -+ .pgpolicy = GROUP_BY_PRIO, -+ .pgfailback = -FAILBACK_IMMEDIATE, -+ .rr_weight = RR_WEIGHT_NONE, -+ .no_path_retry = NO_PATH_RETRY_QUEUE, -+ .minio = DEFAULT_MINIO, -+ .minio_rq = DEFAULT_MINIO_RQ, -+ .checker_name = RDAC, -+ .prio_name = PRIO_RDAC, -+ }, - /* LSI/Engenio/NetApp E-Series RDAC storage */ - { - .vendor = "(LSI|ENGENIO)", diff --git a/0029-RH-kpartx-retry.patch b/0029-RH-kpartx-retry.patch deleted file mode 100644 index a6cf0bd..0000000 --- a/0029-RH-kpartx-retry.patch +++ /dev/null @@ -1,34 +0,0 @@ -Index: multipath-tools-120821/kpartx/lopart.c -=================================================================== ---- multipath-tools-120821.orig/kpartx/lopart.c -+++ multipath-tools-120821/kpartx/lopart.c -@@ -286,6 +286,7 @@ set_loop (const char *device, const char - extern int - del_loop (const char *device) - { -+ int retries = 3; - int fd; - - if ((fd = open (device, O_RDONLY)) < 0) { -@@ -295,10 +296,17 @@ del_loop (const char *device) - return 1; - } - -- if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { -- perror ("ioctl: LOOP_CLR_FD"); -- close (fd); -- return 1; -+ while (ioctl (fd, LOOP_CLR_FD, 0) < 0) { -+ if (errno != EBUSY || retries-- <= 0) { -+ perror ("ioctl: LOOP_CLR_FD"); -+ close (fd); -+ return 1; -+ } -+ fprintf(stderr, -+ "loop: device %s still in use, retrying delete\n", -+ device); -+ sleep(1); -+ continue; - } - - close (fd); diff --git a/0030-RH-early-blacklist.patch b/0030-RH-early-blacklist.patch deleted file mode 100644 index 42b70d1..0000000 --- a/0030-RH-early-blacklist.patch +++ /dev/null @@ -1,569 +0,0 @@ ---- - libmultipath/alias.c | 47 +++++++++++++++++------------- - libmultipath/alias.h | 2 - - libmultipath/configure.c | 70 ++++++++++++++++++++++++++++++---------------- - libmultipath/configure.h | 2 - - libmultipath/discovery.c | 47 +++++++++++++++++++++++------- - libmultipath/discovery.h | 11 ++++--- - libmultipath/util.c | 2 - - multipath/main.c | 14 ++++----- - multipathd/cli_handlers.c | 11 +++---- - multipathd/main.c | 22 ++++++-------- - 10 files changed, 140 insertions(+), 88 deletions(-) - -Index: multipath-tools-120821/libmultipath/discovery.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/discovery.c -+++ multipath-tools-120821/libmultipath/discovery.c -@@ -28,37 +28,45 @@ - #include "prio.h" - #include "defaults.h" - --struct path * -+int - store_pathinfo (vector pathvec, vector hwtable, struct udev_device *udevice, -- int flag) -+ int flag, struct path **pp_ptr) - { -+ int err = 1; - struct path * pp; - const char * devname; - -+ if (pp_ptr) -+ *pp_ptr = NULL; -+ - devname = udev_device_get_sysname(udevice); - if (!devname) -- return NULL; -+ return 1; - - pp = alloc_path(); - - if (!pp) -- return NULL; -+ return 1; - - if(safe_sprintf(pp->dev, "%s", devname)) { - condlog(0, "pp->dev too small"); - goto out; - } - pp->udev = udev_device_ref(udevice); -- if (pathinfo(pp, hwtable, flag)) -+ err = pathinfo(pp, hwtable, flag | DI_BLACKLIST); -+ if (err) - goto out; - -- if (store_path(pathvec, pp)) -+ err = store_path(pathvec, pp); -+ if (err) - goto out; - -- return pp; - out: -- free_path(pp); -- return NULL; -+ if (err) -+ free_path(pp); -+ else if (pp_ptr) -+ *pp_ptr = pp; -+ return err; - } - - static int -@@ -78,9 +86,11 @@ path_discover (vector pathvec, struct co - - pp = find_path_by_dev(pathvec, (char *)devname); - if (!pp) { -- pp = store_pathinfo(pathvec, conf->hwtable, -- udevice, flag); -- return (pp ? 0 : 1); -+ if (store_pathinfo(pathvec, conf->hwtable, -+ udevice, flag, NULL) != 1) -+ return 0; -+ else -+ return 1; - } - return pathinfo(pp, conf->hwtable, flag); - } -@@ -853,6 +863,13 @@ pathinfo (struct path *pp, vector hwtabl - if (mask & DI_SYSFS && sysfs_pathinfo(pp)) - return 1; - -+ if (mask & DI_BLACKLIST && mask & DI_SYSFS) { -+ if (filter_device(conf->blist_device, conf->elist_device, -+ pp->vendor_id, pp->product_id) > 0) { -+ return 2; -+ } -+ } -+ - path_state = path_offline(pp); - - /* -@@ -906,6 +923,12 @@ pathinfo (struct path *pp, vector hwtabl - - if (path_state == PATH_UP && (mask & DI_WWID) && !strlen(pp->wwid)) - get_uid(pp); -+ if (mask & DI_BLACKLIST && mask & DI_WWID) { -+ if (filter_wwid(conf->blist_wwid, conf->elist_wwid, -+ pp->wwid) > 0) { -+ return 2; -+ } -+ } - - return 0; - -Index: multipath-tools-120821/libmultipath/discovery.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/discovery.h -+++ multipath-tools-120821/libmultipath/discovery.h -@@ -33,8 +33,9 @@ int do_tur (char *); - int path_offline (struct path *); - int get_state (struct path * pp, int daemon); - int pathinfo (struct path *, vector hwtable, int mask); --struct path * store_pathinfo (vector pathvec, vector hwtable, -- struct udev_device *udevice, int flag); -+int store_pathinfo (vector pathvec, vector hwtable, -+ struct udev_device *udevice, int flag, -+ struct path **pp_ptr); - int sysfs_set_scsi_tmo (struct multipath *mpp); - int sysfs_get_timeout(struct path *pp, unsigned int *timeout); - -@@ -46,14 +47,16 @@ enum discovery_mode { - __DI_SERIAL, - __DI_CHECKER, - __DI_PRIO, -- __DI_WWID -+ __DI_WWID, -+ __DI_BLACKLIST, - }; - - #define DI_SYSFS (1 << __DI_SYSFS) - #define DI_SERIAL (1 << __DI_SERIAL) - #define DI_CHECKER (1 << __DI_CHECKER) - #define DI_PRIO (1 << __DI_PRIO) --#define DI_WWID (1 << __DI_WWID) -+#define DI_WWID (1 << __DI_WWID) -+#define DI_BLACKLIST (1 << __DI_BLACKLIST) - - #define DI_ALL (DI_SYSFS | DI_SERIAL | DI_CHECKER | DI_PRIO | \ - DI_WWID) -Index: multipath-tools-120821/libmultipath/alias.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/alias.c -+++ multipath-tools-120821/libmultipath/alias.c -@@ -13,6 +13,9 @@ - #include "uxsock.h" - #include "alias.h" - #include "file.h" -+#include "vector.h" -+#include "checkers.h" -+#include "structs.h" - - - /* -@@ -121,23 +124,23 @@ lookup_binding(FILE *f, char *map_wwid, - } - - static int --rlookup_binding(FILE *f, char **map_wwid, char *map_alias) -+rlookup_binding(FILE *f, char *buff, char *map_alias) - { -- char buf[LINE_MAX]; -+ char line[LINE_MAX]; - unsigned int line_nr = 0; - int id = 0; - -- *map_wwid = NULL; -+ buff[0] = '\0'; - -- while (fgets(buf, LINE_MAX, f)) { -+ while (fgets(line, LINE_MAX, f)) { - char *c, *alias, *wwid; - int curr_id; - - line_nr++; -- c = strpbrk(buf, "#\n\r"); -+ c = strpbrk(line, "#\n\r"); - if (c) - *c = '\0'; -- alias = strtok(buf, " \t"); -+ alias = strtok(line, " \t"); - if (!alias) /* blank line */ - continue; - curr_id = scan_devname(alias, NULL); /* TBD: Why this call? */ -@@ -150,13 +153,16 @@ rlookup_binding(FILE *f, char **map_wwid - line_nr); - continue; - } -+ if (strlen(wwid) > WWID_SIZE - 1) { -+ condlog(3, -+ "Ignoring too large wwid at %u in bindings file", line_nr); -+ continue; -+ } - if (strcmp(alias, map_alias) == 0){ - condlog(3, "Found matching alias [%s] in bindings file." - "\nSetting wwid to %s", alias, wwid); -- *map_wwid = strdup(wwid); -- if (*map_wwid == NULL) -- condlog(0, "Cannot copy alias from bindings " -- "file : %s", strerror(errno)); -+ strncpy(buff, wwid, WWID_SIZE); -+ buff[WWID_SIZE - 1] = '\0'; - return id; - } - } -@@ -255,36 +261,35 @@ get_user_friendly_alias(char *wwid, char - return alias; - } - --char * --get_user_friendly_wwid(char *alias, char *file) -+int -+get_user_friendly_wwid(char *alias, char *buff, char *file) - { -- char *wwid; -- int fd, id, unused; -+ int fd, unused; - FILE *f; - - if (!alias || *alias == '\0') { - condlog(3, "Cannot find binding for empty alias"); -- return NULL; -+ return -1; - } - - fd = open_file(file, &unused, BINDINGS_FILE_HEADER); - if (fd < 0) -- return NULL; -+ return -1; - - f = fdopen(fd, "r"); - if (!f) { - condlog(0, "cannot fdopen on bindings file descriptor : %s", - strerror(errno)); - close(fd); -- return NULL; -+ return -1; - } - -- id = rlookup_binding(f, &wwid, alias); -- if (id < 0) { -+ rlookup_binding(f, buff, alias); -+ if (!strlen(buff)) { - fclose(f); -- return NULL; -+ return -1; - } - - fclose(f); -- return wwid; -+ return 0; - } -Index: multipath-tools-120821/libmultipath/alias.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/alias.h -+++ multipath-tools-120821/libmultipath/alias.h -@@ -9,4 +9,4 @@ - - char *get_user_friendly_alias(char *wwid, char *file, char *prefix, - int bindings_readonly); --char *get_user_friendly_wwid(char *alias, char *file); -+int get_user_friendly_wwid(char *alias, char *buff, char *file); -Index: multipath-tools-120821/libmultipath/configure.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/configure.c -+++ multipath-tools-120821/libmultipath/configure.c -@@ -687,21 +687,32 @@ coalesce_paths (struct vectors * vecs, v - return 0; - } - --extern char * --get_refwwid (char * dev, enum devtypes dev_type, vector pathvec) -+/* -+ * returns: -+ * 0 - success -+ * 1 - failure -+ * 2 - blacklist -+ */ -+extern int -+get_refwwid (char * dev, enum devtypes dev_type, vector pathvec, char **wwid) - { -+ int ret = 1; - struct path * pp; - char buff[FILE_NAME_SIZE]; - char * refwwid = NULL, tmpwwid[WWID_SIZE]; - -+ if (!wwid) -+ return 1; -+ *wwid = NULL; -+ - if (dev_type == DEV_NONE) -- return NULL; -+ return 1; - - if (dev_type == DEV_DEVNODE) { - if (basenamecpy(dev, buff, FILE_NAME_SIZE) == 0) { - condlog(1, "basename failed for '%s' (%s)", - dev, buff); -- return NULL; -+ return 1; - } - - pp = find_path_by_dev(pathvec, buff); -@@ -710,14 +721,16 @@ get_refwwid (char * dev, enum devtypes d - - if (!udevice) { - condlog(2, "%s: can't get udev device", buff); -- return NULL; -+ return 1; - } -- pp = store_pathinfo(pathvec, conf->hwtable, udevice, -- DI_SYSFS | DI_WWID); -+ ret = store_pathinfo(pathvec, conf->hwtable, udevice, -+ DI_SYSFS | DI_WWID, &pp); - udev_device_unref(udevice); - if (!pp) { -- condlog(0, "%s can't store path info", buff); -- return NULL; -+ if (ret == 1) -+ condlog(0, "%s can't store path info", -+ buff); -+ return ret; - } - } - refwwid = pp->wwid; -@@ -732,14 +745,16 @@ get_refwwid (char * dev, enum devtypes d - - if (!udevice) { - condlog(2, "%s: can't get udev device", dev); -- return NULL; -+ return 1; - } -- pp = store_pathinfo(pathvec, conf->hwtable, udevice, -- DI_SYSFS | DI_WWID); -+ ret = store_pathinfo(pathvec, conf->hwtable, udevice, -+ DI_SYSFS | DI_WWID, &pp); - udev_device_unref(udevice); - if (!pp) { -- condlog(0, "%s can't store path info", buff); -- return NULL; -+ if (ret == 1) -+ condlog(0, "%s can't store path info", -+ buff); -+ return ret; - } - } - refwwid = pp->wwid; -@@ -749,17 +764,17 @@ get_refwwid (char * dev, enum devtypes d - - if (((dm_get_uuid(dev, tmpwwid)) == 0) && (strlen(tmpwwid))) { - refwwid = tmpwwid; -- goto out; -+ goto check; - } - - /* - * may be a binding - */ -- refwwid = get_user_friendly_wwid(dev, -- conf->bindings_file); -- -- if (refwwid) -- return refwwid; -+ if (get_user_friendly_wwid(dev, tmpwwid, -+ conf->bindings_file) == 0) { -+ refwwid = tmpwwid; -+ goto check; -+ } - - /* - * or may be an alias -@@ -771,12 +786,21 @@ get_refwwid (char * dev, enum devtypes d - */ - if (!refwwid) - refwwid = dev; -+ -+check: -+ if (refwwid && strlen(refwwid)) { -+ if (filter_wwid(conf->blist_wwid, conf->elist_wwid, -+ refwwid) > 0) -+ return 2; -+ } - } - out: -- if (refwwid && strlen(refwwid)) -- return STRDUP(refwwid); -+ if (refwwid && strlen(refwwid)) { -+ *wwid = STRDUP(refwwid); -+ return 0; -+ } - -- return NULL; -+ return 1; - } - - extern int reload_map(struct vectors *vecs, struct multipath *mpp) -Index: multipath-tools-120821/libmultipath/configure.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/configure.h -+++ multipath-tools-120821/libmultipath/configure.h -@@ -27,6 +27,6 @@ int setup_map (struct multipath * mpp, c - int domap (struct multipath * mpp, char * params); - int reinstate_paths (struct multipath *mpp); - int coalesce_paths (struct vectors *vecs, vector curmp, char * refwwid, int force_reload); --char * get_refwwid (char * dev, enum devtypes dev_type, vector pathvec); -+int get_refwwid (char * dev, enum devtypes dev_type, vector pathvec, char **wwid); - int reload_map(struct vectors *vecs, struct multipath *mpp); - -Index: multipath-tools-120821/libmultipath/util.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/util.c -+++ multipath-tools-120821/libmultipath/util.c -@@ -27,7 +27,7 @@ basenamecpy (const char * str1, char * s - if (!str1 || !strlen(str1)) - return 0; - -- if (strlen(str1) > str2len) -+ if (strlen(str1) >= str2len) - return 0; - - if (!str2) -Index: multipath-tools-120821/multipath/main.c -=================================================================== ---- multipath-tools-120821.orig/multipath/main.c -+++ multipath-tools-120821/multipath/main.c -@@ -262,7 +262,7 @@ configure (void) - /* - * if we have a blacklisted device parameter, exit early - */ -- if (dev && -+ if (dev && conf->dev_type == DEV_DEVNODE && - (filter_devnode(conf->blist_devnode, - conf->elist_devnode, dev) > 0)) { - if (conf->dry_run == 2) -@@ -275,16 +275,16 @@ configure (void) - * failing the translation is fatal (by policy) - */ - if (conf->dev) { -- refwwid = get_refwwid(conf->dev, conf->dev_type, pathvec); -- -+ int failed = get_refwwid(conf->dev, conf->dev_type, pathvec, -+ &refwwid); - if (!refwwid) { -- condlog(3, "scope is nul"); -+ if (failed == 2 && conf->dry_run == 2) -+ printf("%s is not a valid multipath device path\n", conf->dev); -+ else -+ condlog(3, "scope is nul"); - goto out; - } - condlog(3, "scope limited to %s", refwwid); -- if (filter_wwid(conf->blist_wwid, conf->elist_wwid, -- refwwid) > 0) -- goto out; - if (conf->dry_run == 2) { - if (check_wwids_file(refwwid, 0) == 0){ - printf("%s is a valid multipath device path\n", conf->dev); -Index: multipath-tools-120821/multipathd/cli_handlers.c -=================================================================== ---- multipath-tools-120821.orig/multipathd/cli_handlers.c -+++ multipath-tools-120821/multipathd/cli_handlers.c -@@ -433,19 +433,18 @@ cli_add_path (void * v, char ** reply, i - udevice = udev_device_new_from_subsystem_sysname(conf->udev, - "block", - param); -- pp = store_pathinfo(vecs->pathvec, conf->hwtable, -- udevice, DI_ALL); -+ r = store_pathinfo(vecs->pathvec, conf->hwtable, -+ udevice, DI_ALL, &pp); - udev_device_unref(udevice); - if (!pp) { -+ if (r == 2) -+ goto blacklisted; - condlog(0, "%s: failed to store path info", param); - return 1; - } - pp->checkint = conf->checkint; - } -- r = ev_add_path(pp, vecs); -- if (r == 2) -- goto blacklisted; -- return r; -+ return ev_add_path(pp, vecs); - blacklisted: - *reply = strdup("blacklisted\n"); - *len = strlen(*reply) + 1; -Index: multipath-tools-120821/multipathd/main.c -=================================================================== ---- multipath-tools-120821.orig/multipathd/main.c -+++ multipath-tools-120821/multipathd/main.c -@@ -300,7 +300,7 @@ ev_add_map (char * dev, char * alias, st - condlog(2, "%s: devmap %s registered", alias, dev); - return 0; - } -- refwwid = get_refwwid(dev, DEV_DEVMAP, vecs->pathvec); -+ r = get_refwwid(dev, DEV_DEVMAP, vecs->pathvec, &refwwid); - - if (refwwid) { - r = coalesce_paths(vecs, NULL, refwwid, 0); -@@ -309,6 +309,8 @@ ev_add_map (char * dev, char * alias, st - - if (!r) - condlog(2, "%s: devmap %s added", alias, dev); -+ else if (r == 2) -+ condlog(2, "%s: uev_add_map %s blacklisted", alias, dev); - else - condlog(0, "%s: uev_add_map %s failed", alias, dev); - -@@ -374,6 +376,7 @@ static int - uev_add_path (struct uevent *uev, struct vectors * vecs) - { - struct path *pp; -+ int ret; - - condlog(2, "%s: add path (uevent)", uev->kernel); - if (strstr(uev->kernel, "..") != NULL) { -@@ -394,8 +397,11 @@ uev_add_path (struct uevent *uev, struct - /* - * get path vital state - */ -- if (!(pp = store_pathinfo(vecs->pathvec, conf->hwtable, -- uev->udev, DI_ALL))) { -+ ret = store_pathinfo(vecs->pathvec, conf->hwtable, -+ uev->udev, DI_ALL, &pp); -+ if (!pp) { -+ if (ret == 2) -+ return 0; - condlog(0, "%s: failed to store path info", - uev->kernel); - return 1; -@@ -403,14 +409,13 @@ uev_add_path (struct uevent *uev, struct - pp->checkint = conf->checkint; - } - -- return (ev_add_path(pp, vecs) != 1)? 0 : 1; -+ return ev_add_path(pp, vecs); - } - - /* - * returns: - * 0: added - * 1: error -- * 2: blacklisted - */ - int - ev_add_path (struct path * pp, struct vectors * vecs) -@@ -428,13 +433,6 @@ ev_add_path (struct path * pp, struct ve - condlog(0, "%s: failed to get path uid", pp->dev); - goto fail; /* leave path added to pathvec */ - } -- if (filter_path(conf, pp) > 0){ -- int i = find_slot(vecs->pathvec, (void *)pp); -- if (i != -1) -- vector_del_slot(vecs->pathvec, i); -- free_path(pp); -- return 2; -- } - mpp = pp->mpp = find_mp_by_wwid(vecs->mpvec, pp->wwid); - rescan: - if (mpp) { diff --git a/0031-RHBZ-882060-fix-null-strncmp.patch b/0031-RHBZ-882060-fix-null-strncmp.patch deleted file mode 100644 index 50f2f68..0000000 --- a/0031-RHBZ-882060-fix-null-strncmp.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- - libmultipath/discovery.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -Index: multipath-tools-120821/libmultipath/discovery.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/discovery.c -+++ multipath-tools-120821/libmultipath/discovery.c -@@ -113,6 +113,7 @@ path_discovery (vector pathvec, struct c - - udev_list_entry_foreach(entry, - udev_enumerate_get_list_entry(udev_iter)) { -+ const char *devtype; - devpath = udev_list_entry_get_name(entry); - condlog(4, "Discover device %s", devpath); - udevice = udev_device_new_from_syspath(conf->udev, devpath); -@@ -121,7 +122,8 @@ path_discovery (vector pathvec, struct c - r++; - continue; - } -- if(!strncmp(udev_device_get_devtype(udevice), "disk", 4)) -+ devtype = udev_device_get_devtype(udevice); -+ if(devtype && !strncmp(devtype, "disk", 4)) - r += path_discover(pathvec, conf, udevice, flag); - udev_device_unref(udevice); - } -@@ -459,7 +461,8 @@ scsi_sysfs_pathinfo (struct path * pp) - - parent = pp->udev; - while (parent) { -- if (!strncmp(udev_device_get_subsystem(parent), "scsi", 4)) { -+ const char *subsys = udev_device_get_subsystem(parent); -+ if (subsys && !strncmp(subsys, "scsi", 4)) { - attr_path = udev_device_get_sysname(parent); - if (!attr_path) - break; -@@ -525,7 +528,8 @@ ccw_sysfs_pathinfo (struct path * pp) - - parent = pp->udev; - while (parent) { -- if (!strncmp(udev_device_get_subsystem(parent), "ccw", 3)) -+ const char *subsys = udev_device_get_subsystem(parent); -+ if (subsys && !strncmp(subsys, "ccw", 3)) - break; - parent = udev_device_get_parent(parent); - } -@@ -581,7 +585,8 @@ cciss_sysfs_pathinfo (struct path * pp) - - parent = pp->udev; - while (parent) { -- if (!strncmp(udev_device_get_subsystem(parent), "cciss", 5)) { -+ const char *subsys = udev_device_get_subsystem(parent); -+ if (subsys && !strncmp(subsys, "cciss", 5)) { - attr_path = udev_device_get_sysname(parent); - if (!attr_path) - break; -@@ -662,7 +667,8 @@ path_offline (struct path * pp) - - parent = pp->udev; - while (parent) { -- if (!strncmp(udev_device_get_subsystem(parent), "scsi", 4)) -+ const char *subsys = udev_device_get_subsystem(parent); -+ if (subsys && !strncmp(subsys, "scsi", 4)) - break; - parent = udev_device_get_parent(parent); - } diff --git a/0032-RH-make-path-fd-readonly.patch b/0032-RH-make-path-fd-readonly.patch deleted file mode 100644 index 2c14fab..0000000 --- a/0032-RH-make-path-fd-readonly.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - libmultipath/discovery.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: multipath-tools-120821/libmultipath/discovery.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/discovery.c -+++ multipath-tools-120821/libmultipath/discovery.c -@@ -882,7 +882,7 @@ pathinfo (struct path *pp, vector hwtabl - * fetch info not available through sysfs - */ - if (pp->fd < 0) -- pp->fd = open(udev_device_get_devnode(pp->udev), O_RDWR); -+ pp->fd = open(udev_device_get_devnode(pp->udev), O_RDONLY); - - if (pp->fd < 0) { - condlog(4, "Couldn't open node for %s: %s", diff --git a/0033-RH-dont-disable-libdm-failback-for-sync-case.patch b/0033-RH-dont-disable-libdm-failback-for-sync-case.patch deleted file mode 100644 index 7bea525..0000000 --- a/0033-RH-dont-disable-libdm-failback-for-sync-case.patch +++ /dev/null @@ -1,111 +0,0 @@ ---- - kpartx/devmapper.c | 4 ++-- - kpartx/devmapper.h | 2 ++ - kpartx/kpartx.c | 6 +++--- - libmultipath/devmapper.c | 6 +++--- - 4 files changed, 10 insertions(+), 8 deletions(-) - -Index: multipath-tools-120821/kpartx/devmapper.c -=================================================================== ---- multipath-tools-120821.orig/kpartx/devmapper.c -+++ multipath-tools-120821/kpartx/devmapper.c -@@ -78,7 +78,7 @@ dm_simplecmd (int task, const char *name - if (no_flush) - dm_task_no_flush(dmt); - -- if (udev_wait_flag && !dm_task_set_cookie(dmt, cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) -+ if (udev_wait_flag && !dm_task_set_cookie(dmt, cookie, (udev_sync)? 0 : DM_UDEV_DISABLE_LIBRARY_FALLBACK)) - goto out; - r = dm_task_run(dmt); - -@@ -128,7 +128,7 @@ dm_addmap (int task, const char *name, c - - dm_task_no_open_count(dmt); - -- if (task == DM_DEVICE_CREATE && !dm_task_set_cookie(dmt, cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) -+ if (task == DM_DEVICE_CREATE && !dm_task_set_cookie(dmt, cookie, (udev_sync)? 0 : DM_UDEV_DISABLE_LIBRARY_FALLBACK)) - goto addout; - r = dm_task_run (dmt); - -Index: multipath-tools-120821/kpartx/devmapper.h -=================================================================== ---- multipath-tools-120821.orig/kpartx/devmapper.h -+++ multipath-tools-120821/kpartx/devmapper.h -@@ -2,6 +2,8 @@ - #define MINOR(dev) ((dev & 0xff) | ((dev >> 12) & 0xfff00)) - #define MKDEV(ma,mi) ((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12)) - -+extern int udev_sync; -+ - int dm_prereq (char *, int, int, int); - int dm_simplecmd (int, const char *, int, uint32_t *); - int dm_addmap (int, const char *, const char *, const char *, uint64_t, -Index: multipath-tools-120821/kpartx/kpartx.c -=================================================================== ---- multipath-tools-120821.orig/kpartx/kpartx.c -+++ multipath-tools-120821/kpartx/kpartx.c -@@ -56,6 +56,7 @@ struct pt { - } pts[MAXTYPES]; - - int ptct = 0; -+int udev_sync = 0; - - static void - addpts(char *t, ptreader f) -@@ -205,7 +206,6 @@ main(int argc, char **argv){ - int loopro = 0; - int hotplug = 0; - int loopcreated = 0; -- int sync = 0; - struct stat buf; - uint32_t cookie = 0; - -@@ -267,7 +267,7 @@ main(int argc, char **argv){ - what = DELETE; - break; - case 's': -- sync = 1; -+ udev_sync = 1; - break; - case 'u': - what = UPDATE; -@@ -278,7 +278,7 @@ main(int argc, char **argv){ - } - - #ifdef LIBDM_API_COOKIE -- if (!sync) -+ if (!udev_sync) - dm_udev_set_sync_support(0); - #endif - -Index: multipath-tools-120821/libmultipath/devmapper.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/devmapper.c -+++ multipath-tools-120821/libmultipath/devmapper.c -@@ -219,7 +219,7 @@ dm_simplecmd (int task, const char *name - dm_task_no_flush(dmt); /* for DM_DEVICE_SUSPEND/RESUME */ - #endif - -- if (udev_wait_flag && !dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) -+ if (udev_wait_flag && !dm_task_set_cookie(dmt, &conf->cookie, (conf->daemon)? DM_UDEV_DISABLE_LIBRARY_FALLBACK : 0)) - goto out; - r = dm_task_run (dmt); - -@@ -284,7 +284,7 @@ dm_addmap (int task, const char *target, - dm_task_no_open_count(dmt); - - if (task == DM_DEVICE_CREATE && -- !dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) -+ !dm_task_set_cookie(dmt, &conf->cookie, (conf->daemon)? DM_UDEV_DISABLE_LIBRARY_FALLBACK : 0)) - goto freeout; - r = dm_task_run (dmt); - -@@ -1244,7 +1244,7 @@ dm_rename (char * old, char * new) - - dm_task_no_open_count(dmt); - -- if (!dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK)) -+ if (!dm_task_set_cookie(dmt, &conf->cookie, (conf->daemon)? DM_UDEV_DISABLE_LIBRARY_FALLBACK : 0)) - goto out; - if (!dm_task_run(dmt)) - goto out; diff --git a/0034-RHBZ-887737-check-for-null-key.patch b/0034-RHBZ-887737-check-for-null-key.patch deleted file mode 100644 index 5a1ae3e..0000000 --- a/0034-RHBZ-887737-check-for-null-key.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- - libmultipath/dict.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -Index: multipath-tools-120821/libmultipath/dict.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/dict.c -+++ multipath-tools-120821/libmultipath/dict.c -@@ -2077,6 +2077,9 @@ snprint_mp_reservation_key (char * buff, - unsigned char *keyp; - uint64_t prkey = 0; - struct mpentry * mpe = (struct mpentry *)data; -+ -+ if (!mpe->reservation_key) -+ return 0; - keyp = (unsigned char *)mpe->reservation_key; - for (i = 0; i < 8; i++) { - if (i > 0) -@@ -2768,6 +2771,9 @@ snprint_def_reservation_key(char * buff, - int i; - unsigned char *keyp; - uint64_t prkey = 0; -+ -+ if (!conf->reservation_key) -+ return 0; - keyp = (unsigned char *)conf->reservation_key; - for (i = 0; i < 8; i++) { - if (i > 0) diff --git a/0036-UP-fix-state-handling.patch b/0036-UP-fix-state-handling.patch deleted file mode 100644 index 1477b6a..0000000 --- a/0036-UP-fix-state-handling.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- - libmultipath/discovery.c | 5 +++-- - libmultipath/structs.h | 2 +- - 2 files changed, 4 insertions(+), 3 deletions(-) - -Index: multipath-tools-120821/libmultipath/discovery.c -=================================================================== ---- multipath-tools-120821.orig/libmultipath/discovery.c -+++ multipath-tools-120821/libmultipath/discovery.c -@@ -683,12 +683,13 @@ path_offline (struct path * pp) - - condlog(3, "%s: path state = %s", pp->dev, buff); - -- if (!strncmp(buff, "offline", 7)) { -+ if (!strncmp(buff, "offline", 7) || -+ !strncmp(buff, "transport-offline", 17)) { - pp->offline = 1; - return PATH_DOWN; - } - pp->offline = 0; -- if (!strncmp(buff, "blocked", 7)) -+ if (!strncmp(buff, "blocked", 7) || !strncmp(buff, "quiesce", 7)) - return PATH_PENDING; - else if (!strncmp(buff, "running", 7)) - return PATH_UP; -Index: multipath-tools-120821/libmultipath/structs.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/structs.h -+++ multipath-tools-120821/libmultipath/structs.h -@@ -18,7 +18,7 @@ - #define SCSI_VENDOR_SIZE 9 - #define SCSI_PRODUCT_SIZE 17 - #define SCSI_REV_SIZE 5 --#define SCSI_STATE_SIZE 9 -+#define SCSI_STATE_SIZE 19 - - #define NO_PATH_RETRY_UNDEF 0 - #define NO_PATH_RETRY_FAIL -1 diff --git a/0037-UP-fix-params-size.patch b/0037-UP-fix-params-size.patch deleted file mode 100644 index 62f4c57..0000000 --- a/0037-UP-fix-params-size.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - libmultipath/structs.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: multipath-tools-120821/libmultipath/structs.h -=================================================================== ---- multipath-tools-120821.orig/libmultipath/structs.h -+++ multipath-tools-120821/libmultipath/structs.h -@@ -7,7 +7,7 @@ - #define SERIAL_SIZE 65 - #define NODE_NAME_SIZE 224 - #define PATH_STR_SIZE 16 --#define PARAMS_SIZE 1024 -+#define PARAMS_SIZE 4096 - #define FILE_NAME_SIZE 256 - #define CALLOUT_MAX_SIZE 256 - #define BLK_DEV_SIZE 33 diff --git a/0038-RH-fix-multipath.rules.patch b/0038-RH-fix-multipath.rules.patch deleted file mode 100644 index f943cbc..0000000 --- a/0038-RH-fix-multipath.rules.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- - multipath/multipath.rules | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: multipath-tools-120821/multipath/multipath.rules -=================================================================== ---- multipath-tools-120821.orig/multipath/multipath.rules -+++ multipath-tools-120821/multipath/multipath.rules -@@ -15,8 +15,8 @@ ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{ - RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}" - - KERNEL!="dm-*", GOTO="end_mpath" --ACTION!="change", GOTO="end_mpath" - ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10" -+ACTION!="change", GOTO="end_mpath" - ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath" - ENV{DM_SUSPENDED}=="1", GOTO="end_mpath" - ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath" diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index bb1f3c6..dd284ec 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,12 +1,12 @@ Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.4.9 -Release: 44%{?dist} +Release: 45%{?dist} License: GPL+ Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ -Source0: multipath-tools-120821.tgz +Source0: multipath-tools-130222.tgz Source1: multipath.conf Patch0001: 0001-RH-dont_start_with_no_config.patch Patch0002: 0002-RH-multipath.rules.patch @@ -15,39 +15,18 @@ Patch0004: 0004-RH-multipathd-blacklist-all-by-default.patch Patch0005: 0005-RH-add-mpathconf.patch Patch0006: 0006-RH-add-find-multipaths.patch Patch0007: 0007-RH-add-hp_tur-checker.patch -Patch0008: 0008-RH-RHEL5-style-partitions.patch -Patch0009: 0009-RH-dont-remove-map-on-enomem.patch -Patch0010: 0010-RH-deprecate-uid-gid-mode.patch -Patch0011: 0011-RH-use-sync-support.patch -Patch0012: 0012-RH-change-configs.patch -Patch0013: 0013-RH-kpartx-msg.patch -Patch0014: 0014-RH-dm_reassign.patch -Patch0015: 0015-RH-selector_change.patch -Patch0016: 0016-RH-retain_hwhandler.patch -# Patch0017: 0017-RH-netapp_config.patch -Patch0018: 0018-RH-remove-config-dups.patch -Patch0019: 0019-RH-detect-prio.patch -Patch0020: 0020-RH-netapp-config.patch -Patch0021: 0021-RH-fix-oom-adj.patch -Patch0022: 0022-RHBZ-864368-disable-libdm-failback.patch -Patch0023: 0023-RHBZ-866291-update-documentation.patch -Patch0024: 0024-RH-start-multipathd-service-before-lvm.patch -Patch0025: 0025-RH-fix-systemd-start-order.patch -Patch0026: 0026-RH-fix-mpathpersist-fns.patch -Patch0027: 0027-RH-default-partition-delimiters.patch -Patch0028: 0028-RH-storagetek-config.patch -Patch0029: 0029-RH-kpartx-retry.patch -Patch0030: 0030-RH-early-blacklist.patch -Patch0031: 0031-RHBZ-882060-fix-null-strncmp.patch -Patch0032: 0032-RH-make-path-fd-readonly.patch -Patch0033: 0033-RH-dont-disable-libdm-failback-for-sync-case.patch -Patch0034: 0034-RHBZ-887737-check-for-null-key.patch -Patch0035: 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch -Patch0036: 0036-UP-fix-state-handling.patch -Patch0037: 0037-UP-fix-params-size.patch -Patch0038: 0038-RH-fix-multipath.rules.patch -Patch0039: 0039-RH-handle-other-sector-sizes.patch -Patch0040: 0040-RH-fix-output-buffer.patch +Patch0008: 0008-RH-revert-partition-changes.patch +Patch0009: 0009-RH-RHEL5-style-partitions.patch +Patch0010: 0010-RH-dont-remove-map-on-enomem.patch +Patch0011: 0011-RH-deprecate-uid-gid-mode.patch +Patch0012: 0012-RH-kpartx-msg.patch +Patch0013: 0013-RHBZ-883981-cleanup-rpmdiff-issues.patch +Patch0014: 0014-RH-handle-other-sector-sizes.patch +Patch0015: 0015-RH-fix-output-buffer.patch +Patch0016: 0016-RH-dont-print-ghost-messages.patch +Patch0017: 0017-RH-fix-sigusr1.patch +Patch0018: 0018-RH-fix-factorize.patch +Patch0019: 0019-RH-fix-sockets.patch # runtime Requires: %{name}-libs = %{version}-%{release} @@ -99,7 +78,7 @@ Group: System Environment/Base kpartx manages partition creation and removal for device-mapper devices. %prep -%setup -q -n multipath-tools-120821 +%setup -q -n multipath-tools-130222 %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 @@ -116,30 +95,9 @@ kpartx manages partition creation and removal for device-mapper devices. %patch0014 -p1 %patch0015 -p1 %patch0016 -p1 -# %patch0017 -p1 +%patch0017 -p1 %patch0018 -p1 %patch0019 -p1 -%patch0020 -p1 -%patch0021 -p1 -%patch0022 -p1 -%patch0023 -p1 -%patch0024 -p1 -%patch0025 -p1 -%patch0026 -p1 -%patch0027 -p1 -%patch0028 -p1 -%patch0029 -p1 -%patch0030 -p1 -%patch0031 -p1 -%patch0032 -p1 -%patch0033 -p1 -%patch0034 -p1 -%patch0035 -p1 -%patch0036 -p1 -%patch0037 -p1 -%patch0038 -p1 -%patch0039 -p1 -%patch0040 -p1 cp %{SOURCE1} . %build @@ -230,6 +188,37 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||: %{_mandir}/man8/kpartx.8.gz %changelog +* Sat Mar 2 2013 Benjamin Marzinski 0.4.9-45 +- Updated to latest upstrem 0.4.9 code: multipath-tools-130222 + (git commit id: 67b82ad6fe280caa1770025a6bb8110b633fa136) +- Refresh 0001-RH-dont_start_with_no_config.patch +- Modify 0002-RH-multipath.rules.patch +- Modify 0003-RH-Make-build-system-RH-Fedora-friendly.patch +- Refresh 0004-RH-multipathd-blacklist-all-by-default.patch +- Refresh 0005-RH-add-mpathconf.patch +- Refresh 0006-RH-add-find-multipaths.patch +- Add 0008-RH-revert-partition-changes.patch +- Rename 0008-RH-RHEL5-style-partitions.patch to + 0009-RH-RHEL5-style-partitions.patch +- Rename 0009-RH-dont-remove-map-on-enomem.patch to + 0010-RH-dont-remove-map-on-enomem.patch +- Rename 0010-RH-deprecate-uid-gid-mode.patch to + 0011-RH-deprecate-uid-gid-mode.patch +- Rename 0013-RH-kpartx-msg.patch to 0012-RH-kpartx-msg.patch +- Rename 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch to + 0013-RHBZ-883981-cleanup-rpmdiff-issues.patch +- Rename 0039-RH-handle-other-sector-sizes.patch to + 0014-RH-handle-other-sector-sizes.patch +- Rename 0040-RH-fix-output-buffer.patch to 0015-RH-fix-output-buffer.patch +- Add 0016-RH-dont-print-ghost-messages.patch +- Add 0017-RH-fix-sigusr1.patch + * Actually this fixes a number of issues related to signals +- Rename 0018-RH-remove-config-dups.patch to 0018-RH-fix-factorize.patch + * just the part that isn't upstream +- Add 0019-RH-fix-sockets.patch + * makes abstract multipathd a cli sockets use the correct name. +- Set find_multipaths in the default config + * Wed Feb 19 2013 Benjamin Marzinski 0.4.9-44 - Add 0036-UP-fix-state-handling.patch * handle transport-offline and quiesce sysfs state diff --git a/multipath.conf b/multipath.conf index 6bbeadb..e40420f 100644 --- a/multipath.conf +++ b/multipath.conf @@ -18,6 +18,7 @@ ## Use user friendly names, instead of using WWIDs as names. defaults { user_friendly_names yes + find_multipaths yes } ## ## Here is an example of how to configure some standard options. diff --git a/sources b/sources index 1003511..05ab47e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7115cfd8ebcf6a005299c18f00aac575 multipath-tools-120821.tgz +808f827ea6e832cf373ebacf0c70e6f8 multipath-tools-130222.tgz