From 8daba4e74564a238ad17f0c0d12c893d4fe49896 Mon Sep 17 00:00:00 2001 From: Benjamin Marzinski Date: Wed, 16 Feb 2022 18:19:41 -0600 Subject: [PATCH] device-mapper-multipath-0.8.7-7 Add 0043-libmultipath-fix-printing-native-nvme-multipath-topo.patch Resolves: bz #2054839 --- ...-printing-native-nvme-multipath-topo.patch | 33 +++++++++++++++++++ device-mapper-multipath.spec | 7 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0043-libmultipath-fix-printing-native-nvme-multipath-topo.patch diff --git a/0043-libmultipath-fix-printing-native-nvme-multipath-topo.patch b/0043-libmultipath-fix-printing-native-nvme-multipath-topo.patch new file mode 100644 index 0000000..2b04627 --- /dev/null +++ b/0043-libmultipath-fix-printing-native-nvme-multipath-topo.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Wed, 16 Feb 2022 00:12:29 -0600 +Subject: [PATCH] libmultipath: fix printing native nvme multipath topology. + +Since commit 2f05df4 ("libmultipath: use strbuf in print.c"), when +multipath prints the topology of native nvme devices, instead of +printing the multipath device information, it prints "w [G]:d s". This +is because nvme_style() switched from calling snprintf(), which supports +format specifiers, to append_strbuf_str(), which doesn't, while still +keeping the same string, "%%w [%%G]:%%d %%s". Remove the extra percent +signs, since they don't need to be escaped in append_strbuf_str(). + +Fixes: 2f05df4 ("libmultipath: use strbuf in print.c") +Signed-off-by: Benjamin Marzinski +Reviewed-by: Martin Wilck +--- + libmultipath/foreign/nvme.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libmultipath/foreign/nvme.c b/libmultipath/foreign/nvme.c +index d40c0869..23355ca5 100644 +--- a/libmultipath/foreign/nvme.c ++++ b/libmultipath/foreign/nvme.c +@@ -335,7 +335,7 @@ static int snprint_nvme_pg(const struct gen_pathgroup *gmp, + static int nvme_style(__attribute__((unused)) const struct gen_multipath* gm, + struct strbuf *buf, __attribute__((unused)) int verbosity) + { +- return append_strbuf_str(buf, "%%w [%%G]:%%d %%s"); ++ return append_strbuf_str(buf, "%w [%G]:%d %s"); + } + + static const struct gen_multipath_ops nvme_map_ops = { diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index 77534ed..7a88f74 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,6 +1,6 @@ Name: device-mapper-multipath Version: 0.8.7 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Tools to manage multipath devices using device-mapper License: GPLv2 URL: http://christophe.varoqui.free.fr/ @@ -52,6 +52,7 @@ Patch0039: 0039-RH-add-support-to-mpathconf-for-setting-arbitrary-de.patch Patch0040: 0040-RH-add-support-to-mpathconf-for-setting-recheck_wwid.patch Patch0041: 0041-multipathd-handle-fpin-events.patch Patch0042: 0042-multipathd-disallow-changing-to-from-fpin-marginal-p.patch +Patch0043: 0043-libmultipath-fix-printing-native-nvme-multipath-topo.patch # runtime @@ -251,6 +252,10 @@ fi %{_pkgconfdir}/libdmmp.pc %changelog +* Wed Feb 16 2022 Benjamin Marzinski - 0.8.7-7 +- Add 0043-libmultipath-fix-printing-native-nvme-multipath-topo.patch +- Resolves: bz #2054839 + * Wed Feb 9 2022 Benjamin Marzinski - 0.8.7-6 - Add 0041-multipathd-handle-fpin-events.patch - Add 0042-multipathd-disallow-changing-to-from-fpin-marginal-p.patch