diff --git a/0061-libmultipath-fix-checker-detection-for-nvme-devices.patch b/0061-libmultipath-fix-checker-detection-for-nvme-devices.patch new file mode 100644 index 0000000000000000000000000000000000000000..ad731f7b43ba1f152bc044eb80f2769b438f15d4 --- /dev/null +++ b/0061-libmultipath-fix-checker-detection-for-nvme-devices.patch @@ -0,0 +1,62 @@ +From fbe939fb4e6aedb538b0a8ebd3ffbeb5524b248d Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 2 Jul 2020 19:38:27 -0500 +Subject: [PATCH] libmultipath: fix checker detection for nvme devices + +In order to fix hwhandler autodetection, commit 8794a776 made +detect_alua() differentiate between failures to detect whether alua was +supported, and successfully detecting that it was not supported. +However, this causes nvme devices to get the TUR checker assigned to +them. This is because there is nothing in detect_alua() to make it only +work on scsi devices, and select_checker wasn't updated to handle +detect_alua() failing without setting pp->tpgs to TPGS_NONE. + +detect_alua() should automatically set pp->tpgs to TPGS_NONE and exit on +non-scsi devices. Also, select_checker() should not assume that a +devices is ALUA, simply because if failed to detect if alua was +supported. + +Fixes: 8794a776 "libmultipath: fix ALUA autodetection when paths are + down" +Reviewed-by: Martin Wilck +Signed-off-by: Benjamin Marzinski +--- + libmultipath/discovery.c | 6 ++++++ + libmultipath/propsel.c | 4 +++- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c +index 83a41a4a..aa5942c3 100644 +--- a/libmultipath/discovery.c ++++ b/libmultipath/discovery.c +@@ -887,6 +887,12 @@ detect_alua(struct path * pp) + int tpgs; + unsigned int timeout; + ++ ++ if (pp->bus != SYSFS_BUS_SCSI) { ++ pp->tpgs = TPGS_NONE; ++ return; ++ } ++ + if (sysfs_get_timeout(pp, &timeout) <= 0) + timeout = DEF_TIMEOUT; + +diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c +index 897e48ca..d362beb4 100644 +--- a/libmultipath/propsel.c ++++ b/libmultipath/propsel.c +@@ -521,7 +521,9 @@ int select_checker(struct config *conf, struct path *pp) + if (check_rdac(pp)) { + ckr_name = RDAC; + goto out; +- } else if (path_get_tpgs(pp) != TPGS_NONE) { ++ } ++ path_get_tpgs(pp); ++ if (pp->tpgs != TPGS_NONE && pp->tpgs != TPGS_UNDEF) { + ckr_name = TUR; + goto out; + } +-- +2.43.0 + diff --git a/multipath-tools.spec b/multipath-tools.spec index e90cf6d79fd1ed983b8e955de25a68610615b4aa..d16c3f45ed09b11fe3f28c11c6376cb381e38cb8 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -2,7 +2,7 @@ Name: multipath-tools Version: 0.8.4 -Release: 36 +Release: 37 Summary: Tools to manage multipath devices with the device-mapper License: GPL-2.0-or-later and LGPL-2.0-only URL: http://christophe.varoqui.free.fr/ @@ -70,6 +70,7 @@ Patch57: 0057-multipathd-Stop-double-counting-map-failures-for-no_.patch Patch58: 0058-libmultipath-set-clear-handled-flag-only-in-coalesce.patch Patch59: 0059-11-dm-mpath.rules-fix-warnings-reported-by-udevadm-v.patch Patch60: 0060-dm-parts.rules-fix-warning-reported-by-udevadm-verif.patch +Patch61: 0061-libmultipath-fix-checker-detection-for-nvme-devices.patch BuildRequires: multipath-tools, libcmocka, libcmocka-devel BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 @@ -218,6 +219,9 @@ fi %changelog +* Sat Oct 11 2025 xueyamao - 0.8.4-37 +- libmultipath: fix checker detection for nvme devices + * Tue Sep 30 2025 xueyamao - 0.8.4-36 - fix warnings reported by udevadm verify