Skip to content

Conversation

@mwilck
Copy link
Collaborator

@mwilck mwilck commented Jan 20, 2026

multipath-tools 0.11.4, 2026/01

Bug fixes

  • Fix mpathpersist --report-capabilities output. Fixes 0.5.0.
  • Fix command descriptions in the multipathd man page. Fixes 0.9.2.
  • Fix an undefined symbol error with the LLVM lld linker.
    Fixes #132, 0.10.0.
  • Fix ISO C23 compatibility issue causing errors with new compilers.
  • Fix memory leak caused by not joining the "init unwinder" thread.
    Fixes 0.8.6.
  • Fix memory leaks in kpartx. Fixes any version.
  • Print the warning "setting scsi timeouts is unsupported for protocol" only
    once per protocol. Fixes 0.9.0.
  • Make sure multipath-tools is compiled with the compiler flag
    -fno-strict-aliasing. This turns out to be necessary because our code
    uses techniques like container_of() which don't work well with
    strict aliasing rules.
    Fixes #130.

Other changes

  • Hardware table: add Seagate Exos and Nytro series.
  • Avoid joining threads twice with liburcu 0.14.0 and newer.
  • CI updates (GitHub workflows).
  • Fix CI for cmocka 2.0 by adding the -Wno-error=deprecated-declarations
    compiler flag.
    Fixes #129
  • Add the ASAN=1 and OPT= make variables (see README.md).

bmarzins and others added 29 commits November 17, 2025 11:35
mpathpersist was incorrectly parsing the REPORT CAPABILITES service
action output. In reality, the type mask is two bytes where the type
information is stored in bits 7, 6, 5, 3, & 1 (0xea) of the first byte
and bit 0 (0x01) of the second byte. libmpathpersist was treating these
two bytes as a big endian 16 bit number, but mpathpersist was looking
for bits in that number as if it was little endian number.

Ideally, libmpathpersist would treat prin_capdescr.pr_type_mask as
two bytes, like it does for the flags. But we already expose this
as a 16 bit number, where we treated the input bytes as a big endian
number. There's no great reason to mess with the libmpathpersist API,
when we can just make mpathpersist treat this data like libmpathpersist
provides it. So, fix mpathpersist to print the data out correctly.

Additionally, instead of printing a 1 or a 0 to indicate if a type was
supported or not, it was printing the value of the type flag. Also,
Persist Through Power Loss Capable (PTPL_C) was being reported if any
bit in flags[0] was set. Fix these as well. Reformat all of the
capability printing lines, since it is less confusing than only
reformatting some of them.

Fixes: ae4e8a6 ("mpathpersist: Add new utility for managing persistent reservation on dm multipath device")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit c8ed5e6)
Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 541e36e)
Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 1dbc6ff)
"opensuse-leap" would use 15.6 already, but make this explicit.

Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 6e09ca1)
GitHub provides arm64 runners now [1]. Use them. The workflows
don't seem to run faster than before, but the tests should be more
realistic.

[1] https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 00cdcbc)
This will allow debugging CI failures (to some extent, as we compile
with optimization by default).

Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit aee2310)
Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 34746cd)
Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit f3bdfef)
Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit b854c7b)
The workflow files were using make's -j flag inconsistently.
Fix it.

Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit f24aca3)
Without it, the workflows will fail.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Fix the spelling CI complaints about "0xea01".

Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 7ef482e)
dm_get_multipath() is a static function, not a symbol that can be
exported. Clang is strict about not allowing undefined symbols in linker
scripts and therefore its presence prevents clang from building
libmultipath.

It looks like it's a linker error and it's thrown only by lld. lld enabled
--no-undefined-version as a default option [0].  Choice of a compiler (gcc,
clang) shouldn't matter.

One can reproduce the error on any system by specifying lld explicitly:

$ make LDFLAGS="-fuse-ld=lld"

Or by passing --no-undefined-version (and making the warning fatal), which
throws an error wyth any linker:

$ make LDFLAGS="-fuse-ld=mold -Wl,--no-undefined-version -Wl,--fatal-warnings".

[0] https://reviews.llvm.org/D135402

Fixes: opensvc#132
Fixes: bf3a4ad ("libmultipath: simplify dm_get_maps()")
Signed-off-by: Michal Rostecki <vad.sol@proton.me>
Reviewed-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit a298603)
In ISO C23, memchr, strchr, strpbrk, strrchr and strstr become
const-preserving macros [1], meaning that the return value
inherits the const qualifier from the function argument.

This has turned up a few glitches in our code.

[1] https://gustedt.gitlabpages.inria.fr/c23-library/#memchr

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit 9f611e2)
cmocka 2.0.0 introduces a couple of changes that require version-dependent
code to be used. Add macros to determine the cmocka version. If the version
can't be determined, assume 1.1.0.

Use a different approach here than in the stable branch, because the fix
there is rather large. Instead of replacing all deprecated macros, just
treat the respective warnings as non-fatal by adding the compiler flag
-Wno-error=deprecated-declarations for the CI code.

cmocka 2.0.1 added a macro to suppress these warnings altogether, but we
should also be able to build against 2.0.0.

Fixes: opensvc#129
Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 41807aa)
multipathd now has a fixed ordering of the keywords. Specifically, verbs
must come first. Fix the man page to reflect the ordering.

Fixes: f812466 ("multipathd: more robust command parsing")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit f3ba2e7)
Config from, opensvc#102:
https://www.seagate.com/content/dam/seagate/migrated-assets/www-content/support-content/raid-storage-systems/corvault/_shared/files/205042000-01-B_CORVAULT_SMG.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@lists.linux.dev>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 9889fae)
multipath is also supported by V3500 and V3700

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@lists.linux.dev>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 5bdafa5)
Currently it seems that urcu would already call pthread_join when
calling call_rcu_data_free since a couple of years ago (since version
v0.14.0)[0] so calling pthread_join on the just released one is
problematic under musl systems. It seems like under glibc this has
several checks in place before trying to dereference the thread but
under musl it has nothing in place to validate so this causes a coredump
on program shutdown.

This is currently present in all version when compiled under musl,
running multipathd -d and sending a SIGTERM to it, you can see the
coredump happening at this point in the code.

The patch runs only the old behaviour in urcu older than 0.14.0 to
maintain the same bahaviour. In higher versions its not neccesary so we
skip it.

[0] urcu/userspace-rcu@1cf55ba

Signed-off-by: Itxaka <itxaka@kairos.io>
Reviewed-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 5835dca)
This closes a minor memory leak (thread-local storage of the
dummy thread is never freed).

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit 29f262b)
These leaks were reported by LeakSanitizer.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit 8c39e60)
The variable mapname is sometimes allocated and sometimes not.
To avoid double-free and still free allocated memory cleanly,
introduce a helper pointer for storing possibly allocated memory.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit 02e0933)
The intention of this code was to warn only once for each unsupported
protocol. But the condition statement is missing.

Fixes: 6ad77db ("libmultipath: Set the scsi timeout parameters by path")
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit 958c826)
multipath-tools uses container_of() and similar macros, which imply
casts between different types, which isn't stricly compliant with
strict aliasing rules. The issue that lead to the previous commit
"libmpathutil: use union for bitfield" was one example where this
can fail. While that one could be fixed relatively easily, it shows
that surprises can happen any time when we compile our code with
strict aliasing enabled. This can be seen clearly when we compile
with "-fstrict-aliasing -Wstrict-aliasing=1" (note that the bitfield
problem is only reported by gcc with "-Wstrict-aliasing=1", other
levels of aliasing detection miss it with gcc 15).

Use -fno-strict-aliasing to disable it. The kernel does the same.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit 1ef540a)
This isn't necessary in practice, but it fixes a compile warning.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit c032ba1)
(cherry picked from commit cd81167)
(cherry picked from commit 6c4608c)
It's now possible to enable AddressSanitizer by passing the parameter
`ASAN=1` on the "make" command line.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit 5e5d210)
(cherry picked from commit 56a2bba)
(cherry picked from commit a6be30e)
Our OPTFLAGS variable contains stack protection options which are
intended to be overridable by distribution build scripts. When developers
just want to experiment with optimization levels, they often just want
to modify the `-O` level. Introduce a variable `OPT` that allows to do just
that by passing e.g. `OPT=-O0` to the `make` command line.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
(cherry picked from commit c94c65c)
(cherry picked from commit 47bee74)
(cherry picked from commit 7d45220)
The following warning has been observed with gcc 15.2.1 on Fedora Rawhide:

vpd.c: In function 'create_vpd83.constprop':
vpd.c:265:55: error: '%s' directive output truncated writing 64 bytes into a region of size 40 [-Werror=format-truncation=]
  265 |         len = snprintf((char *)(desc + 4), maxlen, "%s%s",
      |                                                       ^~
In file included from /usr/include/stdio.h:974,
                 from vpd.c:8:
In function 'snprintf',
    inlined from 'create_scsi_string_desc' at vpd.c:265:8,
    inlined from 'create_vpd83.constprop' at vpd.c:313:7:
/usr/include/bits/stdio2.h:68:10: note: '__builtin___snprintf_chk' output 65 or more bytes into a destination of size 40
   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   69 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   70 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fix it.

Signed-off-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit 888187e)
(cherry picked from commit 283b1c2)
(cherry picked from commit e76073e)
v2:
at Martin's suggestion:
- change round-robin description
- replace "I/Os" with "I/O requests"
- fix "dinamyc" typo
- remove all path selectors parameters

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@lists.linux.dev>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
(cherry picked from commit e9e3ee1)
@github-actions

This comment has been minimized.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Copy link
Collaborator

@bmarzins bmarzins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants