checkers: add alua path checker
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | checkers: add alua path checkerlibmultipath/ libmultipath/ libmultipath/ +13 more | +716 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] checkers: add alua path checker
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 introduces an 'alua' path checker that uses RTPG as the path check command, providing two benefits:
1. For configurations where RTPG is needed for priority, this eliminates duplicate I/O by combining path checking and ALUA state retrieval into a single RTPG command.
2. RTPG provides 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
The richer state information is valuable even when sysfs is available, as TUR cannot distinguish between these ALUA-specific conditions.
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.
This patch sets the alua checker as the auto-detected default for ALUA devices to demonstrate its benefits. We recognize that adopting a new default checker requires careful consideration; the auto-detection can be adjusted or removed based on review feedback.
Brian Bunker (1):
checkers: add alua path checker
libmultipath/Makefile | 5 + libmultipath/checkers.c | 1 + libmultipath/checkers.h | 1 + libmultipath/checkers/Makefile | 3 +- libmultipath/checkers/alua.c | 426 ++++++++++++++++++++++++ libmultipath/checkers/alua.h | 15 + libmultipath/prio.c | 1 + libmultipath/prio.h | 1 + libmultipath/prioritizers/Makefile | 1 + libmultipath/prioritizers/alua_cached.c | 225 +++++++++++++ libmultipath/prioritizers/alua_rtpg.c | 12 +- libmultipath/prioritizers/alua_rtpg.h | 1 + libmultipath/prioritizers/sysfs.c | 7 +- libmultipath/propsel.c | 25 +- libmultipath/structs.c | 2 + libmultipath/structs.h | 3 + 16 files changed, 721 insertions(+), 8 deletions(-) create mode 100644 libmultipath/checkers/alua.c create mode 100644 libmultipath/checkers/alua.h create mode 100644 libmultipath/prioritizers/alua_cached.c
Signature · 1 line
2.50.1 (Apple Git-155)