From 652daa1a21de278169ef96a967b720d2aa967479 Mon Sep 17 00:00:00 2001 From: Benjamin Marzinski Date: Wed, 13 Jul 2022 16:51:42 -0500 Subject: [PATCH] device-mapper-multipath-0.9.0-1 Update source to upstream version 0.9.0 * Previous patches 0001-0005 are included in the commit. * This version deprecates multiple options: mutlipath_dir, config_dir, and getuid_callout, along with the "default_" prefixed alternate names for the default section parameters. Add patches from upstream staging branch * Patches 0001-0006 are from the upstream staging branch Rename redhat patches * Previous patches 0006-0016 are now patches 0007-0017 --- .gitignore | 1 + ...github-workflows-switch-to-fedora-36.patch | 29 ++++ ...add-HPE-as-vendor-for-OPEN-XP8-array.patch | 32 ----- ...fix-multipath-ll-bug-for-Native-NVME.patch | 103 +++++++++++++ ...path-tools-add-HP-HSVX740-to-hwtable.patch | 31 ---- ...update-Huawei-OceanStor-NVMe-vendor-.patch | 39 +++++ ...add-DellEMC-ME5-PowerVault-ME5-to-ha.patch | 37 ----- ...update-Generic-NVMe-vendor-regex-in-.patch | 25 ++-- ...et-detect_checker-for-clariion-Unity.patch | 30 ++++ ...update-mpp-force_readonly-in-ev_add_.patch | 136 ------------------ ...-find_multipaths_timeout-for-unknown.patch | 27 ++++ ... 0007-RH-fixup-udev-rules-for-redhat.patch | 10 +- ...property-blacklist-exception-builtin.patch | 6 +- ...RH-don-t-start-without-a-config-file.patch | 8 +- ...H-Fix-nvme-function-missing-argument.patch | 0 ... 0011-RH-use-rpm-optflags-if-present.patch | 38 ++--- ...hconf.patch => 0012-RH-add-mpathconf.patch | 14 +- ...om-kernel-cmdline-mpath.wwids-with-A.patch | 2 +- ...-default-find_mutipaths-value-to-off.patch | 4 +- ...empt-to-get-ANA-info-via-sysfs-first.patch | 0 ...-parse_vpd_pg83-match-scsi_id-output.patch | 6 +- ...si-device-handlers-to-modules-load.d.patch | 4 +- device-mapper-multipath.spec | 52 ++++--- sources | 2 +- 24 files changed, 315 insertions(+), 321 deletions(-) create mode 100644 0001-github-workflows-switch-to-fedora-36.patch delete mode 100644 0002-multipath-tools-add-HPE-as-vendor-for-OPEN-XP8-array.patch create mode 100644 0002-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch delete mode 100644 0003-multipath-tools-add-HP-HSVX740-to-hwtable.patch create mode 100644 0003-multipath-tools-update-Huawei-OceanStor-NVMe-vendor-.patch delete mode 100644 0004-multipath-tools-add-DellEMC-ME5-PowerVault-ME5-to-ha.patch rename 0001-multipath-tools-identify-more-arrays-under-IBM-2145-.patch => 0004-multipath-tools-update-Generic-NVMe-vendor-regex-in-.patch (55%) create mode 100644 0005-libmultipath-unset-detect_checker-for-clariion-Unity.patch delete mode 100644 0005-multipath-tools-update-mpp-force_readonly-in-ev_add_.patch create mode 100644 0006-libmultipath-fix-find_multipaths_timeout-for-unknown.patch rename 0006-RH-fixup-udev-rules-for-redhat.patch => 0007-RH-fixup-udev-rules-for-redhat.patch (94%) rename 0007-RH-Remove-the-property-blacklist-exception-builtin.patch => 0008-RH-Remove-the-property-blacklist-exception-builtin.patch (96%) rename 0008-RH-don-t-start-without-a-config-file.patch => 0009-RH-don-t-start-without-a-config-file.patch (95%) rename 0009-RH-Fix-nvme-function-missing-argument.patch => 0010-RH-Fix-nvme-function-missing-argument.patch (100%) rename 0010-RH-use-rpm-optflags-if-present.patch => 0011-RH-use-rpm-optflags-if-present.patch (66%) rename 0011-RH-add-mpathconf.patch => 0012-RH-add-mpathconf.patch (98%) rename 0012-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch => 0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch (99%) rename 0013-RH-reset-default-find_mutipaths-value-to-off.patch => 0014-RH-reset-default-find_mutipaths-value-to-off.patch (94%) rename 0014-RH-attempt-to-get-ANA-info-via-sysfs-first.patch => 0015-RH-attempt-to-get-ANA-info-via-sysfs-first.patch (100%) rename 0015-RH-make-parse_vpd_pg83-match-scsi_id-output.patch => 0016-RH-make-parse_vpd_pg83-match-scsi_id-output.patch (94%) rename 0016-RH-add-scsi-device-handlers-to-modules-load.d.patch => 0017-RH-add-scsi-device-handlers-to-modules-load.d.patch (85%) diff --git a/.gitignore b/.gitignore index d5360ef..7a13460 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ multipath-tools-091027.tar.gz /multipath-tools-0.8.6.tgz /multipath-tools-0.8.7.tgz /multipath-tools-0.8.9.tgz +/multipath-tools-0.9.0.tgz diff --git a/0001-github-workflows-switch-to-fedora-36.patch b/0001-github-workflows-switch-to-fedora-36.patch new file mode 100644 index 0000000..1583fd8 --- /dev/null +++ b/0001-github-workflows-switch-to-fedora-36.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Fri, 10 Jun 2022 22:44:11 +0200 +Subject: [PATCH] github workflows: switch to fedora 36 + +Signed-off-by: Benjamin Marzinski +--- + .github/workflows/native.yaml | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/.github/workflows/native.yaml b/.github/workflows/native.yaml +index 19c9e297..ddfd4a09 100644 +--- a/.github/workflows/native.yaml ++++ b/.github/workflows/native.yaml +@@ -12,12 +12,10 @@ jobs: + runs-on: ubuntu-20.04 + strategy: + matrix: +- os: [buster, jessie, bullseye, fedora-35] ++ os: [buster, jessie, bullseye, fedora-36] + arch: ['', '-i386'] + exclude: +- - os: fedora-34 +- arch: '-i386' +- - os: fedora-35 ++ - os: fedora-36 + arch: '-i386' + container: mwilck/multipath-build-${{ matrix.os }}${{ matrix.arch }} + steps: diff --git a/0002-multipath-tools-add-HPE-as-vendor-for-OPEN-XP8-array.patch b/0002-multipath-tools-add-HPE-as-vendor-for-OPEN-XP8-array.patch deleted file mode 100644 index 7df0d4b..0000000 --- a/0002-multipath-tools-add-HPE-as-vendor-for-OPEN-XP8-array.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Xose Vazquez Perez -Date: Thu, 24 Feb 2022 22:23:34 +0100 -Subject: [PATCH] multipath-tools: add HPE as vendor for OPEN- (XP8 arrays) - -Cc: Matthias Rudolph -Cc: Martin Wilck -Cc: Benjamin Marzinski -Cc: Christophe Varoqui -Cc: DM-DEVEL ML -Signed-off-by: Xose Vazquez Perez -Reviewed-by: Martin Wilck -Signed-off-by: Benjamin Marzinski ---- - libmultipath/hwtable.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c -index 643caa32..3b9e0e0f 100644 ---- a/libmultipath/hwtable.c -+++ b/libmultipath/hwtable.c -@@ -467,8 +467,8 @@ static struct hwentry default_hw[] = { - * Maintainer: Matthias Rudolph - */ - { -- /* USP-V, HUS VM, VSP, VSP G1X00 and VSP GX00 families / HP XP */ -- .vendor = "(HITACHI|HP)", -+ /* USP-V, HUS VM, VSP, VSP G1X00 and VSP GX00 families / HPE XP */ -+ .vendor = "(HITACHI|HP|HPE)", - .product = "^OPEN-", - .pgpolicy = MULTIBUS, - }, diff --git a/0002-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch b/0002-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch new file mode 100644 index 0000000..c54b4cd --- /dev/null +++ b/0002-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch @@ -0,0 +1,103 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: chengjike +Date: Fri, 8 Oct 2021 20:24:49 +0800 +Subject: [PATCH] multipath-tools: fix "multipath -ll" bug for Native NVME + Multipath devices + +After "Native NVME Multipath" is configured, +the content displayed is incorrect when you run "multipath -ll" command. +Each NVME devices have the same path name. For example: + +[root@localhost home]# multipath -ll +eui.710032e8fb22a86c24a52c1000000db8 [nvme]:nvme1n1 NVMe,Huawei-XSG1,1000001 +size=10485760 features='n/a' hwhandler='ANA' wp=rw +|-+- policy='n/a' prio=50 status=optimized +| `- 1:4:1 nvme1c4n1 0:0 n/a optimized live +`-+- policy='n/a' prio=50 status=optimized + `- 1:9:1 nvme1c9n1 0:0 n/a optimized live +eui.710032e8fb22a86b24a52c7c00000db7 [nvme]:nvme1n2 NVMe,Huawei-XSG1,1000001 +size=10485760 features='n/a' hwhandler='ANA' wp=rw +|-+- policy='n/a' prio=50 status=optimized +| `- 1:4:1 nvme1c4n1 0:0 n/a optimized live +`-+- policy='n/a' prio=50 status=optimized + `- 1:9:1 nvme1c9n1 0:0 n/a optimized live +[root@localhost home]# + +The logical paths of "nvme1n1" and "nvme1n2" are both "nvme1c4n1" and "nvme1c9n1". +So when multipath-tools aggregates disks, use "nvme_ns_head->instance" for matching. +such as ,Use "b" in "nvmeanb" string to match "z" in "nvmexcynz"(a,b,x,y,z can be any number), +and if "b" and "z" are the same, they are related. + +Signed-off-by: chengjike +Reviewed-by: Martin Wilck +Signed-off-by: Benjamin Marzinski +--- + libmultipath/foreign/nvme.c | 26 ++++++++++++++++++++------ + 1 file changed, 20 insertions(+), 6 deletions(-) + +diff --git a/libmultipath/foreign/nvme.c b/libmultipath/foreign/nvme.c +index 52ca56d8..9a05b333 100644 +--- a/libmultipath/foreign/nvme.c ++++ b/libmultipath/foreign/nvme.c +@@ -531,14 +531,18 @@ static int _dirent_controller(const struct dirent *di) + + /* Find the block device for a given nvme controller */ + struct udev_device *get_ctrl_blkdev(const struct context *ctx, +- struct udev_device *ctrl) ++ struct udev_device *ctrl, const char *ctrl_name) + { ++ int ctrl_num, ns_num; + struct udev_list_entry *item; + struct udev_device *blkdev = NULL; + struct udev_enumerate *enm = udev_enumerate_new(ctx->udev); + const char *devtype; + +- if (enm == NULL) ++ if (enm == NULL || ctrl_name == NULL) ++ return NULL; ++ ++ if (sscanf(ctrl_name, "nvme%dn%d", &ctrl_num, &ns_num) != 2) + return NULL; + + pthread_cleanup_push(_udev_enumerate_unref, enm); +@@ -556,6 +560,8 @@ struct udev_device *get_ctrl_blkdev(const struct context *ctx, + item != NULL; + item = udev_list_entry_get_next(item)) { + struct udev_device *tmp; ++ const char *name = NULL ; ++ int m, n, l; + + tmp = udev_device_new_from_syspath(ctx->udev, + udev_list_entry_get_name(item)); +@@ -563,11 +569,19 @@ struct udev_device *get_ctrl_blkdev(const struct context *ctx, + continue; + + devtype = udev_device_get_devtype(tmp); +- if (devtype && !strcmp(devtype, "disk")) { ++ if (devtype == NULL || strcmp(devtype, "disk")) { ++ udev_device_unref(tmp); ++ continue; ++ } ++ ++ name = udev_device_get_sysname(tmp); ++ if (name != NULL && ++ sscanf(name, "nvme%dc%dn%d", &m, &n, &l) == 3 && ++ l == ns_num) { + blkdev = tmp; + break; +- } else +- udev_device_unref(tmp); ++ } ++ udev_device_unref(tmp); + } + + if (blkdev == NULL) +@@ -680,7 +694,7 @@ static void _find_controllers(struct context *ctx, struct nvme_map *map) + } + + pthread_cleanup_push(_udev_device_unref, ctrl); +- udev = get_ctrl_blkdev(ctx, ctrl); ++ udev = get_ctrl_blkdev(ctx, ctrl, udev_device_get_sysname(map->udev)); + /* + * We give up the reference to the nvme device here and get + * it back from the child below. diff --git a/0003-multipath-tools-add-HP-HSVX740-to-hwtable.patch b/0003-multipath-tools-add-HP-HSVX740-to-hwtable.patch deleted file mode 100644 index b950020..0000000 --- a/0003-multipath-tools-add-HP-HSVX740-to-hwtable.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Xose Vazquez Perez -Date: Thu, 24 Feb 2022 22:24:39 +0100 -Subject: [PATCH] multipath-tools: add HP/HSVX740 to hwtable - -Info from: https://community.hpe.com/hpeb/attachments/hpeb/itrc-248/61618/1/HP_DM_MP_Guide.pdf - -Cc: Martin Wilck -Cc: Benjamin Marzinski -Cc: Christophe Varoqui -Cc: DM-DEVEL ML -Signed-off-by: Xose Vazquez Perez -Reviewed-by: Martin Wilck -Signed-off-by: Benjamin Marzinski ---- - libmultipath/hwtable.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c -index 3b9e0e0f..ff8ed036 100644 ---- a/libmultipath/hwtable.c -+++ b/libmultipath/hwtable.c -@@ -192,7 +192,7 @@ static struct hwentry default_hw[] = { - { - /* SAN Virtualization Services Platform */ - .vendor = "HP", -- .product = "HSVX700", -+ .product = "(HSVX700|HSVX740)", - .hwhandler = "1 alua", - .pgpolicy = GROUP_BY_PRIO, - .pgfailback = -FAILBACK_IMMEDIATE, diff --git a/0003-multipath-tools-update-Huawei-OceanStor-NVMe-vendor-.patch b/0003-multipath-tools-update-Huawei-OceanStor-NVMe-vendor-.patch new file mode 100644 index 0000000..6bb4ab0 --- /dev/null +++ b/0003-multipath-tools-update-Huawei-OceanStor-NVMe-vendor-.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Xose Vazquez Perez +Date: Sun, 10 Jul 2022 01:07:08 +0200 +Subject: [PATCH] multipath-tools: update Huawei OceanStor NVMe vendor id + +"NVME" in the doc, but "NVMe" is the real output: +(page 61-62): https://drive.google.com/file/d/1c5RK4GXX7ofZBFxTtZ_IN1qHyIjw5eR1 +https://marc.info/?l=dm-devel&m=163393151312418 +Use both, just in case. + +Cc: +Cc: +Cc: +Cc: Zhouweigang (Jack) +Cc: Zou Ming +Cc: Martin Wilck +Cc: Benjamin Marzinski +Cc: Christophe Varoqui +Cc: DM-DEVEL ML +Signed-off-by: Xose Vazquez Perez +Reviewed-by: Martin Wilck +Signed-off-by: Benjamin Marzinski +--- + libmultipath/hwtable.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c +index 513fa679..fc0252ba 100644 +--- a/libmultipath/hwtable.c ++++ b/libmultipath/hwtable.c +@@ -1116,7 +1116,7 @@ static struct hwentry default_hw[] = { + }, + { + /* OceanStor NVMe */ +- .vendor = "NVME", ++ .vendor = "NVM[eE]", + .product = "Huawei-XSG1", + .checker_name = DIRECTIO, + .no_path_retry = 12, diff --git a/0004-multipath-tools-add-DellEMC-ME5-PowerVault-ME5-to-ha.patch b/0004-multipath-tools-add-DellEMC-ME5-PowerVault-ME5-to-ha.patch deleted file mode 100644 index 8834238..0000000 --- a/0004-multipath-tools-add-DellEMC-ME5-PowerVault-ME5-to-ha.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Xose Vazquez Perez -Date: Wed, 23 Feb 2022 23:16:44 +0100 -Subject: [PATCH] multipath-tools: add DellEMC/ME5 (PowerVault ME5) to hardware - table - -Convert PowerVault ME4 template for all ME series. - -[MW] https://dl.dell.com/content/manual51886263-dell-powervault-me5-series-administrator's-guide.pdf - -Cc: Martin Wilck -Cc: Benjamin Marzinski -Cc: Christophe Varoqui -Cc: DM-DEVEL ML -Signed-off-by: Xose Vazquez Perez -Reviewed-by: Martin Wilck -Signed-off-by: Benjamin Marzinski ---- - libmultipath/hwtable.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c -index ff8ed036..0e1c0a41 100644 ---- a/libmultipath/hwtable.c -+++ b/libmultipath/hwtable.c -@@ -397,9 +397,9 @@ static struct hwentry default_hw[] = { - .fast_io_fail = 15, - }, - { -- /* PowerVault ME4 */ -+ /* PowerVault ME 4/5 families */ - .vendor = "DellEMC", -- .product = "ME4", -+ .product = "^ME", - .pgpolicy = GROUP_BY_PRIO, - .prio_name = PRIO_ALUA, - .hwhandler = "1 alua", diff --git a/0001-multipath-tools-identify-more-arrays-under-IBM-2145-.patch b/0004-multipath-tools-update-Generic-NVMe-vendor-regex-in-.patch similarity index 55% rename from 0001-multipath-tools-identify-more-arrays-under-IBM-2145-.patch rename to 0004-multipath-tools-update-Generic-NVMe-vendor-regex-in-.patch index c34345e..e70f088 100644 --- a/0001-multipath-tools-identify-more-arrays-under-IBM-2145-.patch +++ b/0004-multipath-tools-update-Generic-NVMe-vendor-regex-in-.patch @@ -1,7 +1,10 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Xose Vazquez Perez -Date: Thu, 24 Feb 2022 22:06:08 +0100 -Subject: [PATCH] multipath-tools: identify more arrays under IBM/2145 ID +Date: Sun, 10 Jul 2022 01:07:09 +0200 +Subject: [PATCH] multipath-tools: update "Generic NVMe" vendor regex in + hwtable + +to accept NVME and NVMe Cc: Martin Wilck Cc: Benjamin Marzinski @@ -15,15 +18,15 @@ Signed-off-by: Benjamin Marzinski 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c -index bd157103..643caa32 100644 +index fc0252ba..c88fa09a 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c -@@ -665,7 +665,7 @@ static struct hwentry default_hw[] = { - }, +@@ -86,7 +86,7 @@ static struct hwentry default_hw[] = { + */ { - // Storwize V5000 and V7000 lines / SAN Volume Controller (SVC) / Flex System V7000 / -- // FlashSystem V840/V9000/5000/5100/5200/7200/9100/9200/9200R -+ // FlashSystem V840/V9000/5000/5100/5200/7200/7300/9100/9200/9200R/9500 - .vendor = "IBM", - .product = "^2145", - .no_path_retry = NO_PATH_RETRY_QUEUE, + /* Generic NVMe */ +- .vendor = "NVME", ++ .vendor = "NVM[eE]", + .product = ".*", + .uid_attribute = DEFAULT_NVME_UID_ATTRIBUTE, + .checker_name = NONE, diff --git a/0005-libmultipath-unset-detect_checker-for-clariion-Unity.patch b/0005-libmultipath-unset-detect_checker-for-clariion-Unity.patch new file mode 100644 index 0000000..d80c1cf --- /dev/null +++ b/0005-libmultipath-unset-detect_checker-for-clariion-Unity.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Tue, 10 May 2022 14:17:22 -0500 +Subject: [PATCH] libmultipath: unset detect_checker for clariion / Unity + arrays + +Dell EMC would like to always use the emc_clariion checker. Currently +detect_checker will switch the checker to TUR for Unity arrays. +This can cause problems on some setups with replicated Unity LUNs, +which are handled correctly the the emc_checker, but not the TUR +checker. + +Cc: vincent.chen1@dell.com +Signed-off-by: Benjamin Marzinski +--- + libmultipath/hwtable.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c +index c88fa09a..2085aba5 100644 +--- a/libmultipath/hwtable.c ++++ b/libmultipath/hwtable.c +@@ -350,6 +350,7 @@ static struct hwentry default_hw[] = { + .no_path_retry = (300 / DEFAULT_CHECKINT), + .checker_name = EMC_CLARIION, + .prio_name = PRIO_EMC, ++ .detect_checker = DETECT_CHECKER_OFF, + }, + { + /* Invista / VPLEX */ diff --git a/0005-multipath-tools-update-mpp-force_readonly-in-ev_add_.patch b/0005-multipath-tools-update-mpp-force_readonly-in-ev_add_.patch deleted file mode 100644 index a2538e4..0000000 --- a/0005-multipath-tools-update-mpp-force_readonly-in-ev_add_.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Uday Shankar -Date: Wed, 9 Mar 2022 13:03:26 -0700 -Subject: [PATCH] multipath-tools: update mpp->force_readonly in ev_add_path - -When NVMe disks are added to the system, no uevent containing the -DISK_RO property is generated. As a result, dm-* nodes backed by -readonly NVMe disks will not have their RO state set properly. The -result looks like this: - -$ multipath -l -eui.00c92c091fd6564424a9376600011bd1 dm-3 NVME,Pure Storage FlashArray -size=1.0T features='0' hwhandler='0' wp=rw -|-+- policy='service-time 0' prio=0 status=active -| `- 0:2:2:72657 nvme0n2 259:4 active undef running -`-+- policy='service-time 0' prio=0 status=enabled - `- 1:0:2:72657 nvme1n2 259:1 active undef running -$ cat /sys/block/dm-3/ro -0 -$ cat /sys/block/nvme*n2/ro -1 -1 - -This is not a problem for SCSI disks, since the kernel will emit change -uevents containing the DISK_RO property when the disk is added to the -system. See the following thread for my initial attempt to fix this -issue at the kernel level: -https://lore.kernel.org/linux-block/Yib8GqCA5e3SQYty@infradead.org/T/#t - -Fix the issue by picking up the path ro state from sysfs in ev_add_path, -setting the mpp->force_readonly accordingly, and changing -dm_addmap_create to be aware of mpp->force_readonly. - -Signed-off-by: Uday Shankar -Reviewed-by: Benjamin Marzinski -Signed-off-by: Benjamin Marzinski ---- - libmultipath/devmapper.c | 2 +- - multipathd/main.c | 50 ++++++++++++++++++++++------------------ - 2 files changed, 29 insertions(+), 23 deletions(-) - -diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c -index 2507f77f..9819e29b 100644 ---- a/libmultipath/devmapper.c -+++ b/libmultipath/devmapper.c -@@ -540,7 +540,7 @@ int dm_addmap_create (struct multipath *mpp, char * params) - int ro; - uint16_t udev_flags = build_udev_flags(mpp, 0); - -- for (ro = 0; ro <= 1; ro++) { -+ for (ro = mpp->force_readonly ? 1 : 0; ro <= 1; ro++) { - int err; - - if (dm_addmap(DM_DEVICE_CREATE, TGT_MPATH, mpp, params, ro, -diff --git a/multipathd/main.c b/multipathd/main.c -index f2c0b280..a67865df 100644 ---- a/multipathd/main.c -+++ b/multipathd/main.c -@@ -1130,6 +1130,28 @@ out: - return ret; - } - -+static int -+sysfs_get_ro (struct path *pp) -+{ -+ int ro; -+ char buff[3]; /* Either "0\n\0" or "1\n\0" */ -+ -+ if (!pp->udev) -+ return -1; -+ -+ if (sysfs_attr_get_value(pp->udev, "ro", buff, sizeof(buff)) <= 0) { -+ condlog(3, "%s: Cannot read ro attribute in sysfs", pp->dev); -+ return -1; -+ } -+ -+ if (sscanf(buff, "%d\n", &ro) != 1 || ro < 0 || ro > 1) { -+ condlog(3, "%s: Cannot parse ro attribute", pp->dev); -+ return -1; -+ } -+ -+ return ro; -+} -+ - /* - * returns: - * 0: added -@@ -1143,6 +1165,7 @@ ev_add_path (struct path * pp, struct vectors * vecs, int need_do_map) - int retries = 3; - int start_waiter = 0; - int ret; -+ int ro; - - /* - * need path UID to go any further -@@ -1207,6 +1230,11 @@ rescan: - /* persistent reservation check*/ - mpath_pr_event_handle(pp); - -+ /* ro check - if new path is ro, force map to be ro as well */ -+ ro = sysfs_get_ro(pp); -+ if (ro == 1) -+ mpp->force_readonly = 1; -+ - if (!need_do_map) - return 0; - -@@ -1446,28 +1474,6 @@ finish_path_init(struct path *pp, struct vectors * vecs) - return -1; - } - --static int --sysfs_get_ro (struct path *pp) --{ -- int ro; -- char buff[3]; /* Either "0\n\0" or "1\n\0" */ -- -- if (!pp->udev) -- return -1; -- -- if (sysfs_attr_get_value(pp->udev, "ro", buff, sizeof(buff)) <= 0) { -- condlog(3, "%s: Cannot read ro attribute in sysfs", pp->dev); -- return -1; -- } -- -- if (sscanf(buff, "%d\n", &ro) != 1 || ro < 0 || ro > 1) { -- condlog(3, "%s: Cannot parse ro attribute", pp->dev); -- return -1; -- } -- -- return ro; --} -- - static bool - needs_ro_update(struct multipath *mpp, int ro) - { diff --git a/0006-libmultipath-fix-find_multipaths_timeout-for-unknown.patch b/0006-libmultipath-fix-find_multipaths_timeout-for-unknown.patch new file mode 100644 index 0000000..96b7260 --- /dev/null +++ b/0006-libmultipath-fix-find_multipaths_timeout-for-unknown.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Tue, 28 Jun 2022 15:38:28 -0500 +Subject: [PATCH] libmultipath: fix find_multipaths_timeout for unknown + hardware + +pp->hwe is now a vector that will always be allocated for all path +devices. Instead of checking if it is NULL, check if it is empty. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/propsel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c +index 50d0b5c8..f782f251 100644 +--- a/libmultipath/propsel.c ++++ b/libmultipath/propsel.c +@@ -1293,7 +1293,7 @@ out: + */ + if (pp->find_multipaths_timeout < 0) { + pp->find_multipaths_timeout = -pp->find_multipaths_timeout; +- if (!pp->hwe) { ++ if (VECTOR_SIZE(pp->hwe) == 0) { + pp->find_multipaths_timeout = + DEFAULT_UNKNOWN_FIND_MULTIPATHS_TIMEOUT; + origin = "(default for unknown hardware)"; diff --git a/0006-RH-fixup-udev-rules-for-redhat.patch b/0007-RH-fixup-udev-rules-for-redhat.patch similarity index 94% rename from 0006-RH-fixup-udev-rules-for-redhat.patch rename to 0007-RH-fixup-udev-rules-for-redhat.patch index 6153d90..f24e8db 100644 --- a/0006-RH-fixup-udev-rules-for-redhat.patch +++ b/0007-RH-fixup-udev-rules-for-redhat.patch @@ -15,10 +15,10 @@ Signed-off-by: Benjamin Marzinski 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.inc b/Makefile.inc -index d24da43e..fb23635c 100644 +index bcd2212a..40cfbd0c 100644 --- a/Makefile.inc +++ b/Makefile.inc -@@ -75,7 +75,7 @@ endif +@@ -76,7 +76,7 @@ endif prefix = exec_prefix = $(prefix) usr_prefix = $(prefix) @@ -40,10 +40,10 @@ index 1969dee0..d2b28233 100644 LABEL="kpartx_end" diff --git a/multipath/Makefile b/multipath/Makefile -index c930499d..2059a4f4 100644 +index bcb04533..d2b3fd82 100644 --- a/multipath/Makefile +++ b/multipath/Makefile -@@ -22,7 +22,7 @@ install: +@@ -23,7 +23,7 @@ install: $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) @@ -52,7 +52,7 @@ index c930499d..2059a4f4 100644 $(INSTALL_PROGRAM) -d $(DESTDIR)$(modulesloaddir) $(INSTALL_PROGRAM) -m 644 modules-load.conf $(DESTDIR)$(modulesloaddir)/multipath.conf $(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir) -@@ -40,7 +40,7 @@ uninstall: +@@ -41,7 +41,7 @@ uninstall: $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules $(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf $(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf diff --git a/0007-RH-Remove-the-property-blacklist-exception-builtin.patch b/0008-RH-Remove-the-property-blacklist-exception-builtin.patch similarity index 96% rename from 0007-RH-Remove-the-property-blacklist-exception-builtin.patch rename to 0008-RH-Remove-the-property-blacklist-exception-builtin.patch index edc8dc1..3bf0684 100644 --- a/0007-RH-Remove-the-property-blacklist-exception-builtin.patch +++ b/0008-RH-Remove-the-property-blacklist-exception-builtin.patch @@ -43,10 +43,10 @@ index 8d15d2ea..eff690fd 100644 udev_device_get_properties_list_entry(udev)) { diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 -index 605b46e0..1844a250 100644 +index c2d34f18..18a55b70 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5 -@@ -1365,9 +1365,14 @@ keywords. Both are regular expressions. For a full description of these keywords +@@ -1348,9 +1348,14 @@ keywords. Both are regular expressions. For a full description of these keywords Regular expression for an udev property. All devices that have matching udev properties will be excluded/included. The handling of the \fIproperty\fR keyword is special, @@ -62,7 +62,7 @@ index 605b46e0..1844a250 100644 . .RS .PP -@@ -1378,10 +1383,6 @@ Blacklisting by missing properties is only applied to devices which do have the +@@ -1361,10 +1366,6 @@ Blacklisting by missing properties is only applied to devices which do have the property specified by \fIuid_attribute\fR (e.g. \fIID_SERIAL\fR) set. Previously, it was applied to every device, possibly causing devices to be blacklisted because of temporary I/O error conditions. diff --git a/0008-RH-don-t-start-without-a-config-file.patch b/0009-RH-don-t-start-without-a-config-file.patch similarity index 95% rename from 0008-RH-don-t-start-without-a-config-file.patch rename to 0009-RH-don-t-start-without-a-config-file.patch index 82bf02f..77f2958 100644 --- a/0008-RH-don-t-start-without-a-config-file.patch +++ b/0009-RH-don-t-start-without-a-config-file.patch @@ -21,13 +21,13 @@ Signed-off-by: Benjamin Marzinski 6 files changed, 19 insertions(+) diff --git a/libmultipath/config.c b/libmultipath/config.c -index c595e768..b193de5c 100644 +index ab8b26e7..f06fcbf9 100644 --- a/libmultipath/config.c +++ b/libmultipath/config.c -@@ -894,6 +894,19 @@ int _init_config (const char *file, struct config *conf) - goto out; +@@ -955,6 +955,19 @@ int _init_config (const char *file, struct config *conf) } factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); + validate_pctable(conf->overrides, 0, file); + } else { + condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); + if (conf->blist_devnode == NULL) { @@ -45,7 +45,7 @@ index c595e768..b193de5c 100644 conf->processed_main_config = 1; diff --git a/libmultipath/config.h b/libmultipath/config.h -index c73389b5..69a01cb7 100644 +index 36d40157..115b463b 100644 --- a/libmultipath/config.h +++ b/libmultipath/config.h @@ -9,6 +9,7 @@ diff --git a/0009-RH-Fix-nvme-function-missing-argument.patch b/0010-RH-Fix-nvme-function-missing-argument.patch similarity index 100% rename from 0009-RH-Fix-nvme-function-missing-argument.patch rename to 0010-RH-Fix-nvme-function-missing-argument.patch diff --git a/0010-RH-use-rpm-optflags-if-present.patch b/0011-RH-use-rpm-optflags-if-present.patch similarity index 66% rename from 0010-RH-use-rpm-optflags-if-present.patch rename to 0011-RH-use-rpm-optflags-if-present.patch index 7436fd0..5b0ed18 100644 --- a/0010-RH-use-rpm-optflags-if-present.patch +++ b/0011-RH-use-rpm-optflags-if-present.patch @@ -9,27 +9,21 @@ still being generic. Signed-off-by: Benjamin Marzinski --- - Makefile.inc | 26 +++++++++++++++++++------- - 1 file changed, 19 insertions(+), 7 deletions(-) + Makefile.inc | 24 ++++++++++++++++++------ + 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile.inc b/Makefile.inc -index fb23635c..4511ab1f 100644 +index 40cfbd0c..307b6b4d 100644 --- a/Makefile.inc +++ b/Makefile.inc -@@ -114,23 +114,35 @@ TEST_CC_OPTION = $(shell \ - echo "$(2)"; \ - fi) - --STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) - ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,) +@@ -136,18 +136,30 @@ ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered -Wno-error=clobbered,) WFORMATOVERFLOW := $(call TEST_CC_OPTION,-Wformat-overflow=2,) -OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4 -WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \ +ifndef RPM_OPT_FLAGS -+ STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) -+ OPTFLAGS := -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \ ++ OPTFLAGS := -O2 -g -Wall $(FORTIFY_OPT) -fexceptions \ + $(STACKPROT) -grecord-gcc-switches \ + -fasynchronous-unwind-tables --param=ssp-buffer-size=4 + ifeq ($(shell test -f /usr/lib/rpm/redhat/redhat-hardened-cc1 && echo 1),1) @@ -44,12 +38,13 @@ index fb23635c..4511ab1f 100644 +WARNFLAGS := -Werror -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \ -Werror=implicit-function-declaration -Werror=format-security \ - $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) --CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2 -+ $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \ -+ -Wstrict-prototypes - CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \ - -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \ - -MMD -MP +-CPPFLAGS := $(FORTIFY_OPT) \ +- -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \ ++ $(WNOCLOBBERED) -Werror=cast-qual \ ++ $(ERROR_DISCARDED_QUALIFIERS) -Wstrict-prototypes ++CPPFLAGS := -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \ + -DCONFIG_DIR=\"$(configdir)\" -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP + CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe BIN_CFLAGS = -fPIE -DPIE LIB_CFLAGS = -fPIC SHARED_FLAGS = -shared @@ -58,12 +53,3 @@ index fb23635c..4511ab1f 100644 BIN_LDFLAGS = -pie # Check whether a function with name $1 has been declared in header file $2. -@@ -174,7 +186,7 @@ check_var = $(shell \ - - %.o: %.c - @echo building $@ because of $? -- $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< -+ $(CC) $(CFLAGS) -c -o $@ $< - - %.abi: %.so.0 - abidw $< >$@ diff --git a/0011-RH-add-mpathconf.patch b/0012-RH-add-mpathconf.patch similarity index 98% rename from 0011-RH-add-mpathconf.patch rename to 0012-RH-add-mpathconf.patch index 80b882a..ff2487f 100644 --- a/0011-RH-add-mpathconf.patch +++ b/0012-RH-add-mpathconf.patch @@ -21,11 +21,11 @@ Signed-off-by: Benjamin Marzinski create mode 100644 multipath/mpathconf.8 diff --git a/libmultipath/config.c b/libmultipath/config.c -index b193de5c..a8ec3bf4 100644 +index f06fcbf9..e2840839 100644 --- a/libmultipath/config.c +++ b/libmultipath/config.c -@@ -896,6 +896,8 @@ int _init_config (const char *file, struct config *conf) - factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); +@@ -957,6 +957,8 @@ int _init_config (const char *file, struct config *conf) + validate_pctable(conf->overrides, 0, file); } else { condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); + condlog(0, "You can run \"/sbin/mpathconf --enable\" to create"); @@ -34,10 +34,10 @@ index b193de5c..a8ec3bf4 100644 conf->blist_devnode = vector_alloc(); if (!conf->blist_devnode) { diff --git a/multipath/Makefile b/multipath/Makefile -index 2059a4f4..e2ebe431 100644 +index d2b3fd82..00e46a0d 100644 --- a/multipath/Makefile +++ b/multipath/Makefile -@@ -20,6 +20,7 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so +@@ -21,6 +21,7 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so install: $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ @@ -45,7 +45,7 @@ index 2059a4f4..e2ebe431 100644 $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules -@@ -29,6 +30,7 @@ install: +@@ -30,6 +31,7 @@ install: $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(man8dir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir) @@ -53,7 +53,7 @@ index 2059a4f4..e2ebe431 100644 ifneq ($(SCSI_DH_MODULES_PRELOAD),) $(INSTALL_PROGRAM) -m 644 scsi_dh.conf $(DESTDIR)$(modulesloaddir)/scsi_dh.conf for _x in $(SCSI_DH_MODULES_PRELOAD); do echo "$$_x"; done \ -@@ -41,8 +43,10 @@ uninstall: +@@ -42,8 +44,10 @@ uninstall: $(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf $(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules diff --git a/0012-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch b/0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch similarity index 99% rename from 0012-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch rename to 0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch index c133e00..fbf22db 100644 --- a/0012-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch +++ b/0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch @@ -20,7 +20,7 @@ Signed-off-by: Benjamin Marzinski 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/multipath/main.c b/multipath/main.c -index d09f62db..0d786ee5 100644 +index 034dd2f4..4c31820b 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -120,7 +120,7 @@ usage (char * progname) diff --git a/0013-RH-reset-default-find_mutipaths-value-to-off.patch b/0014-RH-reset-default-find_mutipaths-value-to-off.patch similarity index 94% rename from 0013-RH-reset-default-find_mutipaths-value-to-off.patch rename to 0014-RH-reset-default-find_mutipaths-value-to-off.patch index f1e8c33..9b6b7bb 100644 --- a/0013-RH-reset-default-find_mutipaths-value-to-off.patch +++ b/0014-RH-reset-default-find_mutipaths-value-to-off.patch @@ -12,10 +12,10 @@ Signed-off-by: Benjamin Marzinski 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h -index 7d95413d..4fe08991 100644 +index 7979f208..78b3d938 100644 --- a/libmultipath/defaults.h +++ b/libmultipath/defaults.h -@@ -24,7 +24,7 @@ +@@ -23,7 +23,7 @@ #define DEFAULT_NO_PATH_RETRY NO_PATH_RETRY_UNDEF #define DEFAULT_VERBOSITY 2 #define DEFAULT_REASSIGN_MAPS 0 diff --git a/0014-RH-attempt-to-get-ANA-info-via-sysfs-first.patch b/0015-RH-attempt-to-get-ANA-info-via-sysfs-first.patch similarity index 100% rename from 0014-RH-attempt-to-get-ANA-info-via-sysfs-first.patch rename to 0015-RH-attempt-to-get-ANA-info-via-sysfs-first.patch diff --git a/0015-RH-make-parse_vpd_pg83-match-scsi_id-output.patch b/0016-RH-make-parse_vpd_pg83-match-scsi_id-output.patch similarity index 94% rename from 0015-RH-make-parse_vpd_pg83-match-scsi_id-output.patch rename to 0016-RH-make-parse_vpd_pg83-match-scsi_id-output.patch index bbc0212..619ce7d 100644 --- a/0015-RH-make-parse_vpd_pg83-match-scsi_id-output.patch +++ b/0016-RH-make-parse_vpd_pg83-match-scsi_id-output.patch @@ -14,10 +14,10 @@ Signed-off-by: Benjamin Marzinski 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c -index b969fba1..d2f2a8cf 100644 +index 0d8a558c..0c73b754 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c -@@ -1156,13 +1156,9 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len, +@@ -1177,13 +1177,9 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len, good_len = 8; break; case 2: @@ -33,7 +33,7 @@ index b969fba1..d2f2a8cf 100644 good_len = 8; break; default: -@@ -1180,10 +1176,6 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len, +@@ -1201,10 +1197,6 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len, break; case 0x8: /* SCSI Name: Prio 3 */ diff --git a/0016-RH-add-scsi-device-handlers-to-modules-load.d.patch b/0017-RH-add-scsi-device-handlers-to-modules-load.d.patch similarity index 85% rename from 0016-RH-add-scsi-device-handlers-to-modules-load.d.patch rename to 0017-RH-add-scsi-device-handlers-to-modules-load.d.patch index 07f921f..d86e03b 100644 --- a/0016-RH-add-scsi-device-handlers-to-modules-load.d.patch +++ b/0017-RH-add-scsi-device-handlers-to-modules-load.d.patch @@ -11,7 +11,7 @@ Signed-off-by: Benjamin Marzinski 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc -index 4511ab1f..fec82b00 100644 +index 307b6b4d..8f64c700 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -11,7 +11,7 @@ @@ -21,5 +21,5 @@ index 4511ab1f..fec82b00 100644 -SCSI_DH_MODULES_PRELOAD := +SCSI_DH_MODULES_PRELOAD := scsi_dh_alua scsi_dh_emc scsi_dh_rdac + EXTRAVERSION := $(shell rev=$$(git rev-parse --short=7 HEAD 2>/dev/null); echo $${rev:+-g$$rev}) - PKGCONFIG ?= pkg-config diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index 97d7dfc..23dcdc9 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,5 +1,5 @@ Name: device-mapper-multipath -Version: 0.8.9 +Version: 0.9.0 Release: 1%{?dist} Summary: Tools to manage multipath devices using device-mapper License: GPLv2 @@ -7,25 +7,26 @@ URL: http://christophe.varoqui.free.fr/ # The source for this package was pulled from upstream's git repo. Use the # following command to generate the tarball -# curl -L https://github.com/opensvc/multipath-tools/archive/0.8.9.tar.gz -o multipath-tools-0.8.9.tgz -Source0: multipath-tools-0.8.9.tgz +# curl -L https://github.com/opensvc/multipath-tools/archive/0.9.0.tar.gz -o multipath-tools-0.9.0.tgz +Source0: multipath-tools-0.9.0.tgz Source1: multipath.conf -Patch0001: 0001-multipath-tools-identify-more-arrays-under-IBM-2145-.patch -Patch0002: 0002-multipath-tools-add-HPE-as-vendor-for-OPEN-XP8-array.patch -Patch0003: 0003-multipath-tools-add-HP-HSVX740-to-hwtable.patch -Patch0004: 0004-multipath-tools-add-DellEMC-ME5-PowerVault-ME5-to-ha.patch -Patch0005: 0005-multipath-tools-update-mpp-force_readonly-in-ev_add_.patch -Patch0006: 0006-RH-fixup-udev-rules-for-redhat.patch -Patch0007: 0007-RH-Remove-the-property-blacklist-exception-builtin.patch -Patch0008: 0008-RH-don-t-start-without-a-config-file.patch -Patch0009: 0009-RH-Fix-nvme-function-missing-argument.patch -Patch0010: 0010-RH-use-rpm-optflags-if-present.patch -Patch0011: 0011-RH-add-mpathconf.patch -Patch0012: 0012-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch -Patch0013: 0013-RH-reset-default-find_mutipaths-value-to-off.patch -Patch0014: 0014-RH-attempt-to-get-ANA-info-via-sysfs-first.patch -Patch0015: 0015-RH-make-parse_vpd_pg83-match-scsi_id-output.patch -Patch0016: 0016-RH-add-scsi-device-handlers-to-modules-load.d.patch +Patch0001: 0001-github-workflows-switch-to-fedora-36.patch +Patch0002: 0002-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch +Patch0003: 0003-multipath-tools-update-Huawei-OceanStor-NVMe-vendor-.patch +Patch0004: 0004-multipath-tools-update-Generic-NVMe-vendor-regex-in-.patch +Patch0005: 0005-libmultipath-unset-detect_checker-for-clariion-Unity.patch +Patch0006: 0006-libmultipath-fix-find_multipaths_timeout-for-unknown.patch +Patch0007: 0007-RH-fixup-udev-rules-for-redhat.patch +Patch0008: 0008-RH-Remove-the-property-blacklist-exception-builtin.patch +Patch0009: 0009-RH-don-t-start-without-a-config-file.patch +Patch0010: 0010-RH-Fix-nvme-function-missing-argument.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-reset-default-find_mutipaths-value-to-off.patch +Patch0015: 0015-RH-attempt-to-get-ANA-info-via-sysfs-first.patch +Patch0016: 0016-RH-make-parse_vpd_pg83-match-scsi_id-output.patch +Patch0017: 0017-RH-add-scsi-device-handlers-to-modules-load.d.patch # runtime Requires: %{name}-libs = %{version}-%{release} @@ -109,7 +110,7 @@ This package contains the files needed to develop applications that use device-mapper-multipath's libdmmp C API library %prep -%autosetup -n multipath-tools-0.8.9 -p1 +%autosetup -n multipath-tools-0.9.0 -p1 cp %{SOURCE1} . %build @@ -226,6 +227,17 @@ fi %{_pkgconfdir}/libdmmp.pc %changelog +* Wed Jul 13 2022 Benjamin Marzinski - 0.9.0-1 +- Update source to upstream version 0.9.0 + * Previous patches 0001-0005 are included in the commit. + * This version deprecates multiple options: mutlipath_dir, config_dir, and + getuid_callout, along with the "default_" prefixed alternate names for the + default section parameters. +- Add patches from upstream staging branch + * Patches 0001-0006 are from the upstream staging branch +- Rename redhat patches + * Previous patches 0006-0016 are now patches 0007-0017 + * Mon Mar 28 2022 Benjamin Marzinski - 0.8.9-1 - Update source to upstream version 0.8.9 * Previous patches 0001-0024 & 0035 are included in the commit. diff --git a/sources b/sources index 7a7f2cd..14c7342 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (multipath-tools-0.8.9.tgz) = 25f2a5d436af6a343804988cef45ca1574d4a981655a2b91563ddb89138619158befdf5af92d836a17c95d6dcf901072b614473c2129274e5dcdb1a1d64edb4d +SHA512 (multipath-tools-0.9.0.tgz) = 6c417f6d1d116fa43bedb9f77769ece9cbb7b35b78a9b3558c41df2360e52a65a07314b12ab7e4a7bbc867b9755250de9db96a2f7eb4a6a37f0b0b3f0bbc840e SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942