diff --git a/0008-multipathd-add-failures-path-format-wildcard.patch b/0008-multipathd-add-failures-path-format-wildcard.patch new file mode 100644 index 0000000..2cf1c24 --- /dev/null +++ b/0008-multipathd-add-failures-path-format-wildcard.patch @@ -0,0 +1,40 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 19 Apr 2018 17:36:56 -0500 +Subject: [PATCH] multipathd: add failures path format wildcard + +multipath already tracks this, so it should be able to print it out. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/print.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libmultipath/print.c b/libmultipath/print.c +index d532994..b1844c9 100644 +--- a/libmultipath/print.c ++++ b/libmultipath/print.c +@@ -632,6 +632,12 @@ snprint_path_foreign (char * buff, size_t len, const struct path * pp) + return snprintf(buff, len, "%s", "--"); + } + ++static int ++snprint_path_failures(char * buff, size_t len, const struct path * pp) ++{ ++ return snprint_int(buff, len, pp->failcount); ++} ++ + struct multipath_data mpd[] = { + {'n', "name", 0, snprint_name}, + {'w', "uuid", 0, snprint_multipath_uuid}, +@@ -680,6 +686,7 @@ struct path_data pd[] = { + {'r', "target WWPN", 0, snprint_tgt_wwpn}, + {'a', "host adapter", 0, snprint_host_adapter}, + {'G', "foreign", 0, snprint_path_foreign}, ++ {'0', "failures", 0, snprint_path_failures}, + {0, NULL, 0 , NULL} + }; + +-- +2.7.4 + diff --git a/0009-multipathd-fix-reservation_key-check.patch b/0009-multipathd-fix-reservation_key-check.patch new file mode 100644 index 0000000..9b68246 --- /dev/null +++ b/0009-multipathd-fix-reservation_key-check.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Mon, 23 Apr 2018 17:53:02 -0500 +Subject: [PATCH] multipathd: fix reservation_key check + +mpath_pr_event_handle should exit if the reservation key is zero, not +non-zero. + +Signed-off-by: Benjamin Marzinski +--- + multipathd/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/multipathd/main.c b/multipathd/main.c +index 841d3e9..84af946 100644 +--- a/multipathd/main.c ++++ b/multipathd/main.c +@@ -3136,7 +3136,7 @@ int mpath_pr_event_handle(struct path *pp) + + mpp = pp->mpp; + +- if (get_be64(mpp->reservation_key)) ++ if (!get_be64(mpp->reservation_key)) + return -1; + + pthread_attr_init(&attr); +-- +2.7.4 + diff --git a/0008-RH-fixup-udev-rules-for-redhat.patch b/0010-RH-fixup-udev-rules-for-redhat.patch similarity index 100% rename from 0008-RH-fixup-udev-rules-for-redhat.patch rename to 0010-RH-fixup-udev-rules-for-redhat.patch diff --git a/0009-RH-Remove-the-property-blacklist-exception-builtin.patch b/0011-RH-Remove-the-property-blacklist-exception-builtin.patch similarity index 100% rename from 0009-RH-Remove-the-property-blacklist-exception-builtin.patch rename to 0011-RH-Remove-the-property-blacklist-exception-builtin.patch diff --git a/0010-RH-don-t-start-without-a-config-file.patch b/0012-RH-don-t-start-without-a-config-file.patch similarity index 100% rename from 0010-RH-don-t-start-without-a-config-file.patch rename to 0012-RH-don-t-start-without-a-config-file.patch diff --git a/0011-RH-use-rpm-optflags-if-present.patch b/0013-RH-use-rpm-optflags-if-present.patch similarity index 100% rename from 0011-RH-use-rpm-optflags-if-present.patch rename to 0013-RH-use-rpm-optflags-if-present.patch diff --git a/0012-RH-add-mpathconf.patch b/0014-RH-add-mpathconf.patch similarity index 100% rename from 0012-RH-add-mpathconf.patch rename to 0014-RH-add-mpathconf.patch diff --git a/0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch b/0015-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch similarity index 100% rename from 0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch rename to 0015-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch diff --git a/0014-RH-trigger-change-uevent-on-new-device-creation.patch b/0016-RH-trigger-change-uevent-on-new-device-creation.patch similarity index 99% rename from 0014-RH-trigger-change-uevent-on-new-device-creation.patch rename to 0016-RH-trigger-change-uevent-on-new-device-creation.patch index a7c133d..da3c151 100644 --- a/0014-RH-trigger-change-uevent-on-new-device-creation.patch +++ b/0016-RH-trigger-change-uevent-on-new-device-creation.patch @@ -127,7 +127,7 @@ index baf6759..12d6f15 100644 fprintf(stderr, "need to be root\n"); exit(1); diff --git a/multipathd/main.c b/multipathd/main.c -index 841d3e9..417fc7e 100644 +index 84af946..b3f319a 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -2323,7 +2323,8 @@ configure (struct vectors * vecs) diff --git a/0015-RH-warn-on-invalid-regex-instead-of-failing.patch b/0017-RH-warn-on-invalid-regex-instead-of-failing.patch similarity index 100% rename from 0015-RH-warn-on-invalid-regex-instead-of-failing.patch rename to 0017-RH-warn-on-invalid-regex-instead-of-failing.patch diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index e54dc7d..ae86cae 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,7 +1,7 @@ Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.7.6 -Release: 2.git1cb704b%{?dist} +Release: 3.git1cb704b%{?dist} License: GPL+ Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ @@ -18,14 +18,16 @@ Patch0004: 0004-multipathd-remove-unneeded-function-parameter.patch Patch0005: 0005-mpathcmd-fix-libmpathcmd-license.patch Patch0006: 0006-libmultipath-don-t-print-undefined-values.patch Patch0007: 0007-libmultipath-Fix-logic-in-should_multipath.patch -Patch0008: 0008-RH-fixup-udev-rules-for-redhat.patch -Patch0009: 0009-RH-Remove-the-property-blacklist-exception-builtin.patch -Patch0010: 0010-RH-don-t-start-without-a-config-file.patch -Patch0011: 0011-RH-use-rpm-optflags-if-present.patch -Patch0012: 0012-RH-add-mpathconf.patch -Patch0013: 0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch -Patch0014: 0014-RH-trigger-change-uevent-on-new-device-creation.patch -Patch0015: 0015-RH-warn-on-invalid-regex-instead-of-failing.patch +Patch0008: 0008-multipathd-add-failures-path-format-wildcard.patch +Patch0009: 0009-multipathd-fix-reservation_key-check.patch +Patch0010: 0010-RH-fixup-udev-rules-for-redhat.patch +Patch0011: 0011-RH-Remove-the-property-blacklist-exception-builtin.patch +Patch0012: 0012-RH-don-t-start-without-a-config-file.patch +Patch0013: 0013-RH-use-rpm-optflags-if-present.patch +Patch0014: 0014-RH-add-mpathconf.patch +Patch0015: 0015-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch +Patch0016: 0016-RH-trigger-change-uevent-on-new-device-creation.patch +Patch0017: 0017-RH-warn-on-invalid-regex-instead-of-failing.patch # runtime Requires: %{name}-libs = %{version}-%{release} @@ -119,6 +121,8 @@ device-mapper-multipath's libdmmp C API library %patch0013 -p1 %patch0014 -p1 %patch0015 -p1 +%patch0016 -p1 +%patch0017 -p1 cp %{SOURCE1} . %build @@ -242,6 +246,12 @@ fi %{_pkgconfdir}/libdmmp.pc %changelog +* Tue Apr 24 2018 Benjamin Marzinski 0.7.6-3.git1cb704b +- Add 0008-multipathd-add-failures-path-format-wildcard.patch +- Add 0009-multipathd-fix-reservation_key-check.patch +- Rename files + * Previous patches 0008-0015 are now patches 0010-0017 + * Fri Apr 13 2018 Benjamin Marzinski 0.7.6-2.git1cb704b - Add 0007-libmultipath-Fix-logic-in-should_multipath.patch * fix bug in identifying multipathable devices. posted upstream