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
This commit is contained in:
parent
dad5d3a235
commit
652daa1a21
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,3 +24,4 @@ multipath-tools-091027.tar.gz
|
|||||||
/multipath-tools-0.8.6.tgz
|
/multipath-tools-0.8.6.tgz
|
||||||
/multipath-tools-0.8.7.tgz
|
/multipath-tools-0.8.7.tgz
|
||||||
/multipath-tools-0.8.9.tgz
|
/multipath-tools-0.8.9.tgz
|
||||||
|
/multipath-tools-0.9.0.tgz
|
||||||
|
29
0001-github-workflows-switch-to-fedora-36.patch
Normal file
29
0001-github-workflows-switch-to-fedora-36.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Wilck <mwilck@suse.com>
|
||||||
|
Date: Fri, 10 Jun 2022 22:44:11 +0200
|
||||||
|
Subject: [PATCH] github workflows: switch to fedora 36
|
||||||
|
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
.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:
|
@ -1,32 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Date: Thu, 24 Feb 2022 22:23:34 +0100
|
|
||||||
Subject: [PATCH] multipath-tools: add HPE as vendor for OPEN- (XP8 arrays)
|
|
||||||
|
|
||||||
Cc: Matthias Rudolph <Matthias.Rudolph@hitachivantara.com>
|
|
||||||
Cc: Martin Wilck <mwilck@suse.com>
|
|
||||||
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
|
||||||
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
|
||||||
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
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 <Matthias.Rudolph@hitachivantara.com>
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
- /* 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,
|
|
||||||
},
|
|
103
0002-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch
Normal file
103
0002-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: chengjike <chengjike.cheng@huawei.com>
|
||||||
|
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 <chengjike.cheng@huawei.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
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.
|
@ -1,31 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
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 <mwilck@suse.com>
|
|
||||||
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
|
||||||
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
|
||||||
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
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,
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
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: <chengjike.cheng@huawei.com>
|
||||||
|
Cc: <sunao.sun@huawei.com>
|
||||||
|
Cc: <jiangtao62@huawei.com>
|
||||||
|
Cc: Zhouweigang (Jack) <zhouweigang09@huawei.com>
|
||||||
|
Cc: Zou Ming <zouming.zouming@huawei.com>
|
||||||
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
||||||
|
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
||||||
|
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||||
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
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,
|
@ -1,37 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
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 <mwilck@suse.com>
|
|
||||||
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
|
|
||||||
Cc: DM-DEVEL ML <dm-devel@redhat.com>
|
|
||||||
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
|
||||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
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",
|
|
@ -1,7 +1,10 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
|
||||||
Date: Thu, 24 Feb 2022 22:06:08 +0100
|
Date: Sun, 10 Jul 2022 01:07:09 +0200
|
||||||
Subject: [PATCH] multipath-tools: identify more arrays under IBM/2145 ID
|
Subject: [PATCH] multipath-tools: update "Generic NVMe" vendor regex in
|
||||||
|
hwtable
|
||||||
|
|
||||||
|
to accept NVME and NVMe
|
||||||
|
|
||||||
Cc: Martin Wilck <mwilck@suse.com>
|
Cc: Martin Wilck <mwilck@suse.com>
|
||||||
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
Cc: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
@ -15,15 +18,15 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||||
index bd157103..643caa32 100644
|
index fc0252ba..c88fa09a 100644
|
||||||
--- a/libmultipath/hwtable.c
|
--- a/libmultipath/hwtable.c
|
||||||
+++ b/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 /
|
/* Generic NVMe */
|
||||||
- // FlashSystem V840/V9000/5000/5100/5200/7200/9100/9200/9200R
|
- .vendor = "NVME",
|
||||||
+ // FlashSystem V840/V9000/5000/5100/5200/7200/7300/9100/9200/9200R/9500
|
+ .vendor = "NVM[eE]",
|
||||||
.vendor = "IBM",
|
.product = ".*",
|
||||||
.product = "^2145",
|
.uid_attribute = DEFAULT_NVME_UID_ATTRIBUTE,
|
||||||
.no_path_retry = NO_PATH_RETRY_QUEUE,
|
.checker_name = NONE,
|
@ -0,0 +1,30 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
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 <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
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 */
|
@ -1,136 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Uday Shankar <ushankar@purestorage.com>
|
|
||||||
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 <ushankar@purestorage.com>
|
|
||||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
---
|
|
||||||
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)
|
|
||||||
{
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
|
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 <bmarzins@redhat.com>
|
||||||
|
---
|
||||||
|
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)";
|
@ -15,10 +15,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/Makefile.inc b/Makefile.inc
|
diff --git a/Makefile.inc b/Makefile.inc
|
||||||
index d24da43e..fb23635c 100644
|
index bcd2212a..40cfbd0c 100644
|
||||||
--- a/Makefile.inc
|
--- a/Makefile.inc
|
||||||
+++ b/Makefile.inc
|
+++ b/Makefile.inc
|
||||||
@@ -75,7 +75,7 @@ endif
|
@@ -76,7 +76,7 @@ endif
|
||||||
prefix =
|
prefix =
|
||||||
exec_prefix = $(prefix)
|
exec_prefix = $(prefix)
|
||||||
usr_prefix = $(prefix)
|
usr_prefix = $(prefix)
|
||||||
@ -40,10 +40,10 @@ index 1969dee0..d2b28233 100644
|
|||||||
|
|
||||||
LABEL="kpartx_end"
|
LABEL="kpartx_end"
|
||||||
diff --git a/multipath/Makefile b/multipath/Makefile
|
diff --git a/multipath/Makefile b/multipath/Makefile
|
||||||
index c930499d..2059a4f4 100644
|
index bcb04533..d2b3fd82 100644
|
||||||
--- a/multipath/Makefile
|
--- a/multipath/Makefile
|
||||||
+++ b/multipath/Makefile
|
+++ b/multipath/Makefile
|
||||||
@@ -22,7 +22,7 @@ install:
|
@@ -23,7 +23,7 @@ install:
|
||||||
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
||||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
|
||||||
$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(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) -d $(DESTDIR)$(modulesloaddir)
|
||||||
$(INSTALL_PROGRAM) -m 644 modules-load.conf $(DESTDIR)$(modulesloaddir)/multipath.conf
|
$(INSTALL_PROGRAM) -m 644 modules-load.conf $(DESTDIR)$(modulesloaddir)/multipath.conf
|
||||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir)
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir)
|
||||||
@@ -40,7 +40,7 @@ uninstall:
|
@@ -41,7 +41,7 @@ uninstall:
|
||||||
$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules
|
$(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules
|
||||||
$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf
|
$(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf
|
||||||
$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
|
$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
|
@ -43,10 +43,10 @@ index 8d15d2ea..eff690fd 100644
|
|||||||
udev_device_get_properties_list_entry(udev)) {
|
udev_device_get_properties_list_entry(udev)) {
|
||||||
|
|
||||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
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
|
--- a/multipath/multipath.conf.5
|
||||||
+++ b/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
|
Regular expression for an udev property. All
|
||||||
devices that have matching udev properties will be excluded/included.
|
devices that have matching udev properties will be excluded/included.
|
||||||
The handling of the \fIproperty\fR keyword is special,
|
The handling of the \fIproperty\fR keyword is special,
|
||||||
@ -62,7 +62,7 @@ index 605b46e0..1844a250 100644
|
|||||||
.
|
.
|
||||||
.RS
|
.RS
|
||||||
.PP
|
.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)
|
property specified by \fIuid_attribute\fR (e.g. \fIID_SERIAL\fR)
|
||||||
set. Previously, it was applied to every device, possibly causing devices to be
|
set. Previously, it was applied to every device, possibly causing devices to be
|
||||||
blacklisted because of temporary I/O error conditions.
|
blacklisted because of temporary I/O error conditions.
|
@ -21,13 +21,13 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
6 files changed, 19 insertions(+)
|
6 files changed, 19 insertions(+)
|
||||||
|
|
||||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||||
index c595e768..b193de5c 100644
|
index ab8b26e7..f06fcbf9 100644
|
||||||
--- a/libmultipath/config.c
|
--- a/libmultipath/config.c
|
||||||
+++ b/libmultipath/config.c
|
+++ b/libmultipath/config.c
|
||||||
@@ -894,6 +894,19 @@ int _init_config (const char *file, struct config *conf)
|
@@ -955,6 +955,19 @@ int _init_config (const char *file, struct config *conf)
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
factorize_hwtable(conf->hwtable, builtin_hwtable_size, file);
|
factorize_hwtable(conf->hwtable, builtin_hwtable_size, file);
|
||||||
|
validate_pctable(conf->overrides, 0, file);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
|
+ condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
|
||||||
+ if (conf->blist_devnode == NULL) {
|
+ if (conf->blist_devnode == NULL) {
|
||||||
@ -45,7 +45,7 @@ index c595e768..b193de5c 100644
|
|||||||
|
|
||||||
conf->processed_main_config = 1;
|
conf->processed_main_config = 1;
|
||||||
diff --git a/libmultipath/config.h b/libmultipath/config.h
|
diff --git a/libmultipath/config.h b/libmultipath/config.h
|
||||||
index c73389b5..69a01cb7 100644
|
index 36d40157..115b463b 100644
|
||||||
--- a/libmultipath/config.h
|
--- a/libmultipath/config.h
|
||||||
+++ b/libmultipath/config.h
|
+++ b/libmultipath/config.h
|
||||||
@@ -9,6 +9,7 @@
|
@@ -9,6 +9,7 @@
|
@ -9,27 +9,21 @@ still being generic.
|
|||||||
|
|
||||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||||
---
|
---
|
||||||
Makefile.inc | 26 +++++++++++++++++++-------
|
Makefile.inc | 24 ++++++++++++++++++------
|
||||||
1 file changed, 19 insertions(+), 7 deletions(-)
|
1 file changed, 18 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
diff --git a/Makefile.inc b/Makefile.inc
|
diff --git a/Makefile.inc b/Makefile.inc
|
||||||
index fb23635c..4511ab1f 100644
|
index 40cfbd0c..307b6b4d 100644
|
||||||
--- a/Makefile.inc
|
--- a/Makefile.inc
|
||||||
+++ b/Makefile.inc
|
+++ b/Makefile.inc
|
||||||
@@ -114,23 +114,35 @@ TEST_CC_OPTION = $(shell \
|
@@ -136,18 +136,30 @@ ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers
|
||||||
echo "$(2)"; \
|
|
||||||
fi)
|
|
||||||
|
|
||||||
-STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
|
|
||||||
ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,)
|
|
||||||
WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered -Wno-error=clobbered,)
|
WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered -Wno-error=clobbered,)
|
||||||
WFORMATOVERFLOW := $(call TEST_CC_OPTION,-Wformat-overflow=2,)
|
WFORMATOVERFLOW := $(call TEST_CC_OPTION,-Wformat-overflow=2,)
|
||||||
|
|
||||||
-OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4
|
-OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4
|
||||||
-WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \
|
-WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \
|
||||||
+ifndef RPM_OPT_FLAGS
|
+ifndef RPM_OPT_FLAGS
|
||||||
+ STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector)
|
+ OPTFLAGS := -O2 -g -Wall $(FORTIFY_OPT) -fexceptions \
|
||||||
+ OPTFLAGS := -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \
|
|
||||||
+ $(STACKPROT) -grecord-gcc-switches \
|
+ $(STACKPROT) -grecord-gcc-switches \
|
||||||
+ -fasynchronous-unwind-tables --param=ssp-buffer-size=4
|
+ -fasynchronous-unwind-tables --param=ssp-buffer-size=4
|
||||||
+ ifeq ($(shell test -f /usr/lib/rpm/redhat/redhat-hardened-cc1 && echo 1),1)
|
+ 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 \
|
+WARNFLAGS := -Werror -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \
|
||||||
-Werror=implicit-function-declaration -Werror=format-security \
|
-Werror=implicit-function-declaration -Werror=format-security \
|
||||||
- $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
|
- $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
|
||||||
-CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
|
-CPPFLAGS := $(FORTIFY_OPT) \
|
||||||
+ $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \
|
- -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \
|
||||||
+ -Wstrict-prototypes
|
+ $(WNOCLOBBERED) -Werror=cast-qual \
|
||||||
CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
|
+ $(ERROR_DISCARDED_QUALIFIERS) -Wstrict-prototypes
|
||||||
-DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
|
+CPPFLAGS := -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \
|
||||||
-MMD -MP
|
-DCONFIG_DIR=\"$(configdir)\" -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP
|
||||||
|
CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe
|
||||||
BIN_CFLAGS = -fPIE -DPIE
|
BIN_CFLAGS = -fPIE -DPIE
|
||||||
LIB_CFLAGS = -fPIC
|
LIB_CFLAGS = -fPIC
|
||||||
SHARED_FLAGS = -shared
|
SHARED_FLAGS = -shared
|
||||||
@ -58,12 +53,3 @@ index fb23635c..4511ab1f 100644
|
|||||||
BIN_LDFLAGS = -pie
|
BIN_LDFLAGS = -pie
|
||||||
|
|
||||||
# Check whether a function with name $1 has been declared in header file $2.
|
# 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 $< >$@
|
|
@ -21,11 +21,11 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
create mode 100644 multipath/mpathconf.8
|
create mode 100644 multipath/mpathconf.8
|
||||||
|
|
||||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||||
index b193de5c..a8ec3bf4 100644
|
index f06fcbf9..e2840839 100644
|
||||||
--- a/libmultipath/config.c
|
--- a/libmultipath/config.c
|
||||||
+++ b/libmultipath/config.c
|
+++ b/libmultipath/config.c
|
||||||
@@ -896,6 +896,8 @@ int _init_config (const char *file, struct config *conf)
|
@@ -957,6 +957,8 @@ int _init_config (const char *file, struct config *conf)
|
||||||
factorize_hwtable(conf->hwtable, builtin_hwtable_size, file);
|
validate_pctable(conf->overrides, 0, file);
|
||||||
} else {
|
} else {
|
||||||
condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
|
condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
|
||||||
+ condlog(0, "You can run \"/sbin/mpathconf --enable\" to create");
|
+ condlog(0, "You can run \"/sbin/mpathconf --enable\" to create");
|
||||||
@ -34,10 +34,10 @@ index b193de5c..a8ec3bf4 100644
|
|||||||
conf->blist_devnode = vector_alloc();
|
conf->blist_devnode = vector_alloc();
|
||||||
if (!conf->blist_devnode) {
|
if (!conf->blist_devnode) {
|
||||||
diff --git a/multipath/Makefile b/multipath/Makefile
|
diff --git a/multipath/Makefile b/multipath/Makefile
|
||||||
index 2059a4f4..e2ebe431 100644
|
index d2b3fd82..00e46a0d 100644
|
||||||
--- a/multipath/Makefile
|
--- a/multipath/Makefile
|
||||||
+++ b/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:
|
||||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||||
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
||||||
@ -45,7 +45,7 @@ index 2059a4f4..e2ebe431 100644
|
|||||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
|
||||||
$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
|
$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
|
||||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules
|
$(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) -m 644 $(EXEC).8 $(DESTDIR)$(man8dir)
|
||||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
|
||||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir)
|
$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir)
|
||||||
@ -53,7 +53,7 @@ index 2059a4f4..e2ebe431 100644
|
|||||||
ifneq ($(SCSI_DH_MODULES_PRELOAD),)
|
ifneq ($(SCSI_DH_MODULES_PRELOAD),)
|
||||||
$(INSTALL_PROGRAM) -m 644 scsi_dh.conf $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
|
$(INSTALL_PROGRAM) -m 644 scsi_dh.conf $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
|
||||||
for _x in $(SCSI_DH_MODULES_PRELOAD); do echo "$$_x"; done \
|
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)/multipath.conf
|
||||||
$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
|
$(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf
|
||||||
$(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
|
$(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
|
@ -20,7 +20,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
3 files changed, 59 insertions(+), 3 deletions(-)
|
3 files changed, 59 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/multipath/main.c b/multipath/main.c
|
diff --git a/multipath/main.c b/multipath/main.c
|
||||||
index d09f62db..0d786ee5 100644
|
index 034dd2f4..4c31820b 100644
|
||||||
--- a/multipath/main.c
|
--- a/multipath/main.c
|
||||||
+++ b/multipath/main.c
|
+++ b/multipath/main.c
|
||||||
@@ -120,7 +120,7 @@ usage (char * progname)
|
@@ -120,7 +120,7 @@ usage (char * progname)
|
@ -12,10 +12,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
|
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
|
||||||
index 7d95413d..4fe08991 100644
|
index 7979f208..78b3d938 100644
|
||||||
--- a/libmultipath/defaults.h
|
--- a/libmultipath/defaults.h
|
||||||
+++ b/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_NO_PATH_RETRY NO_PATH_RETRY_UNDEF
|
||||||
#define DEFAULT_VERBOSITY 2
|
#define DEFAULT_VERBOSITY 2
|
||||||
#define DEFAULT_REASSIGN_MAPS 0
|
#define DEFAULT_REASSIGN_MAPS 0
|
@ -14,10 +14,10 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
2 files changed, 8 insertions(+), 10 deletions(-)
|
2 files changed, 8 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||||
index b969fba1..d2f2a8cf 100644
|
index 0d8a558c..0c73b754 100644
|
||||||
--- a/libmultipath/discovery.c
|
--- a/libmultipath/discovery.c
|
||||||
+++ b/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;
|
good_len = 8;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -33,7 +33,7 @@ index b969fba1..d2f2a8cf 100644
|
|||||||
good_len = 8;
|
good_len = 8;
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
break;
|
||||||
case 0x8:
|
case 0x8:
|
||||||
/* SCSI Name: Prio 3 */
|
/* SCSI Name: Prio 3 */
|
@ -11,7 +11,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/Makefile.inc b/Makefile.inc
|
diff --git a/Makefile.inc b/Makefile.inc
|
||||||
index 4511ab1f..fec82b00 100644
|
index 307b6b4d..8f64c700 100644
|
||||||
--- a/Makefile.inc
|
--- a/Makefile.inc
|
||||||
+++ b/Makefile.inc
|
+++ b/Makefile.inc
|
||||||
@@ -11,7 +11,7 @@
|
@@ -11,7 +11,7 @@
|
||||||
@ -21,5 +21,5 @@ index 4511ab1f..fec82b00 100644
|
|||||||
-SCSI_DH_MODULES_PRELOAD :=
|
-SCSI_DH_MODULES_PRELOAD :=
|
||||||
+SCSI_DH_MODULES_PRELOAD := scsi_dh_alua scsi_dh_emc scsi_dh_rdac
|
+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
|
|
@ -1,5 +1,5 @@
|
|||||||
Name: device-mapper-multipath
|
Name: device-mapper-multipath
|
||||||
Version: 0.8.9
|
Version: 0.9.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Tools to manage multipath devices using device-mapper
|
Summary: Tools to manage multipath devices using device-mapper
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -7,25 +7,26 @@ URL: http://christophe.varoqui.free.fr/
|
|||||||
|
|
||||||
# The source for this package was pulled from upstream's git repo. Use the
|
# The source for this package was pulled from upstream's git repo. Use the
|
||||||
# following command to generate the tarball
|
# following command to generate the tarball
|
||||||
# curl -L https://github.com/opensvc/multipath-tools/archive/0.8.9.tar.gz -o 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.8.9.tgz
|
Source0: multipath-tools-0.9.0.tgz
|
||||||
Source1: multipath.conf
|
Source1: multipath.conf
|
||||||
Patch0001: 0001-multipath-tools-identify-more-arrays-under-IBM-2145-.patch
|
Patch0001: 0001-github-workflows-switch-to-fedora-36.patch
|
||||||
Patch0002: 0002-multipath-tools-add-HPE-as-vendor-for-OPEN-XP8-array.patch
|
Patch0002: 0002-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch
|
||||||
Patch0003: 0003-multipath-tools-add-HP-HSVX740-to-hwtable.patch
|
Patch0003: 0003-multipath-tools-update-Huawei-OceanStor-NVMe-vendor-.patch
|
||||||
Patch0004: 0004-multipath-tools-add-DellEMC-ME5-PowerVault-ME5-to-ha.patch
|
Patch0004: 0004-multipath-tools-update-Generic-NVMe-vendor-regex-in-.patch
|
||||||
Patch0005: 0005-multipath-tools-update-mpp-force_readonly-in-ev_add_.patch
|
Patch0005: 0005-libmultipath-unset-detect_checker-for-clariion-Unity.patch
|
||||||
Patch0006: 0006-RH-fixup-udev-rules-for-redhat.patch
|
Patch0006: 0006-libmultipath-fix-find_multipaths_timeout-for-unknown.patch
|
||||||
Patch0007: 0007-RH-Remove-the-property-blacklist-exception-builtin.patch
|
Patch0007: 0007-RH-fixup-udev-rules-for-redhat.patch
|
||||||
Patch0008: 0008-RH-don-t-start-without-a-config-file.patch
|
Patch0008: 0008-RH-Remove-the-property-blacklist-exception-builtin.patch
|
||||||
Patch0009: 0009-RH-Fix-nvme-function-missing-argument.patch
|
Patch0009: 0009-RH-don-t-start-without-a-config-file.patch
|
||||||
Patch0010: 0010-RH-use-rpm-optflags-if-present.patch
|
Patch0010: 0010-RH-Fix-nvme-function-missing-argument.patch
|
||||||
Patch0011: 0011-RH-add-mpathconf.patch
|
Patch0011: 0011-RH-use-rpm-optflags-if-present.patch
|
||||||
Patch0012: 0012-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
Patch0012: 0012-RH-add-mpathconf.patch
|
||||||
Patch0013: 0013-RH-reset-default-find_mutipaths-value-to-off.patch
|
Patch0013: 0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
||||||
Patch0014: 0014-RH-attempt-to-get-ANA-info-via-sysfs-first.patch
|
Patch0014: 0014-RH-reset-default-find_mutipaths-value-to-off.patch
|
||||||
Patch0015: 0015-RH-make-parse_vpd_pg83-match-scsi_id-output.patch
|
Patch0015: 0015-RH-attempt-to-get-ANA-info-via-sysfs-first.patch
|
||||||
Patch0016: 0016-RH-add-scsi-device-handlers-to-modules-load.d.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
|
# runtime
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
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
|
device-mapper-multipath's libdmmp C API library
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n multipath-tools-0.8.9 -p1
|
%autosetup -n multipath-tools-0.9.0 -p1
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -226,6 +227,17 @@ fi
|
|||||||
%{_pkgconfdir}/libdmmp.pc
|
%{_pkgconfdir}/libdmmp.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 13 2022 Benjamin Marzinski <bmarzins@redhat.com> - 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 <bmarzins@redhat.com> - 0.8.9-1
|
* Mon Mar 28 2022 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.9-1
|
||||||
- Update source to upstream version 0.8.9
|
- Update source to upstream version 0.8.9
|
||||||
* Previous patches 0001-0024 & 0035 are included in the commit.
|
* Previous patches 0001-0024 & 0035 are included in the commit.
|
||||||
|
2
sources
2
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
|
SHA512 (multipath.conf) = 71953dce5a68adcf60a942305f5a66023e6f4c4baf53b1bfdb4edf65ed5b8e03db804363c36d1dcfd85591f4766f52b515269904c53b84d7b076da0b80b09942
|
||||||
|
Loading…
Reference in New Issue
Block a user