Skip to content

alua path checker and prioritizer

Brian Bunker dm-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2checkers: add alua path checker and async checker frameworklibmultipath/Makefile libmultipath/async_checker.c libmultipath/async_checker.h +14 more+795 -3082 replies
2/2prioritizers: add alua_cached prioritizerlibmultipath/prio.c libmultipath/prio.h libmultipath/prioritizers/Makefile +3 more+214 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] alua path checker and prioritizer

For ALUA-capable storage arrays, multipath-tools currently uses TUR (Test Unit Ready) as the default path checker while a separate prioritizer determines ALUA state. When sysfs provides ALUA state (the common case), no RTPG command is needed for priority. However, if sysfs is unavailable or detect_prio is off, the prioritizer issues RTPG, resulting in two SCSI commands per path check cycle: TUR + RTPG.

This patch series introduces:

1. An 'alua' path checker that uses RTPG as the path check command, providing richer path state information than TUR:
* TRANSITIONING state detected and mapped to PATH_PENDING, preventing false all paths down during controller failover
* STANDBY state detected and mapped to PATH_GHOST
* UNAVAILABLE/OFFLINE states properly distinguished

2. An 'alua_cached' prioritizer that uses cached state from the alua checker, eliminating duplicate RTPG commands.

This design intentionally couples the checker and prioritizer: the alua_cached prioritizer consumes state cached by the alua checker. While this blurs the traditional separation between these components, for ALUA the path state and priority fundamentally derive from the same underlying data, making the coupling a natural fit.

The patches set the alua checker as the auto-detected default for ALUA devices. Explicitly configured checkers in the hardware table take precedence over auto-detection.

As part of this change, the common async threading infrastructure is extracted from the TUR checker into a new async_checker base class. Both TUR and ALUA checkers now extend this base, eliminating code duplication and establishing a pattern for future async checkers.

Brian Bunker (2):
checkers: add alua path checker and async checker framework
prioritizers: add alua_cached prioritizer

 libmultipath/Makefile                   |   2 +-
 libmultipath/async_checker.c            | 245 +++++++++++++++++++
 libmultipath/async_checker.h            | 122 ++++++++++
 libmultipath/checkers.c                 |   1 +
 libmultipath/checkers.h                 |   1 +
 libmultipath/checkers/Makefile          |   3 +-
 libmultipath/checkers/alua.c            | 256 ++++++++++++++++++++
 libmultipath/checkers/tur.c             | 302 +++---------------------
 libmultipath/libmultipath.version       |   8 +
 libmultipath/prio.c                     |   1 +
 libmultipath/prio.h                     |   1 +
 libmultipath/prioritizers/Makefile      |   1 +
 libmultipath/prioritizers/alua.c        |  30 ---
 libmultipath/prioritizers/alua.h        |   8 +
 libmultipath/prioritizers/alua_cached.c | 193 +++++++++++++++
 libmultipath/prioritizers/alua_rtpg.c   |  57 ++++-
 libmultipath/prioritizers/alua_rtpg.h   |   4 +
 libmultipath/prioritizers/sysfs.c       |   7 +-
 libmultipath/propsel.c                  |  29 ++-
 libmultipath/structs.c                  |   2 +
 libmultipath/structs.h                  |   3 +
 multipath/multipath.conf.5.in           |  23 +-
 22 files changed, 988 insertions(+), 311 deletions(-)
 create mode 100644 libmultipath/async_checker.c
 create mode 100644 libmultipath/async_checker.h
 create mode 100644 libmultipath/checkers/alua.c
 create mode 100644 libmultipath/prioritizers/alua_cached.c
Signature · 1 line
2.50.1 (Apple Git-155)