Skip to contentSkip to conversation

multipath-tools: align ALUA state strings with kernel scsi_sysfs

PATCH In review Xose Vazquez Perez 2 participants 2 messages May 31 – Jun 5 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: align ALUA state strings with kernel scsi_sysfs

Update ALUA asymmetric access state descriptions in the prioritizer to match the shorter names defined in the SCSI kernel subsystem:

   $ grep  "{ SCSI_ACCESS_STATE_"  linux/drivers/scsi/scsi_sysfs.c 
        { SCSI_ACCESS_STATE_OPTIMAL, "active/optimized" },
        { SCSI_ACCESS_STATE_ACTIVE, "active/non-optimized" },
        { SCSI_ACCESS_STATE_STANDBY, "standby" },
        { SCSI_ACCESS_STATE_UNAVAILABLE, "unavailable" },
        { SCSI_ACCESS_STATE_LBA, "lba-dependent" },
        { SCSI_ACCESS_STATE_OFFLINE, "offline" },
        { SCSI_ACCESS_STATE_TRANSITIONING, "transitioning" },

This unifies diagnostic strings across the stack and replaces the misleading "ARRAY BUG: invalid TPGs state!" message with the standard SPC "reserved" designation. These codes are explicitly reserved for future standard definitions rather than being treated as malformed states.

Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc DM_DEVEL-ML <[email protected]>
---
 libmultipath/prioritizers/alua.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
libmultipath/prioritizers/alua.c +3 -3
index ec68f370..e9a0683e 100644
@@ -31,10 +31,10 @@ static const char * aas_string[] = {
 	[AAS_NON_OPTIMIZED]	= "active/non-optimized",
 	[AAS_STANDBY]		= "standby",
 	[AAS_UNAVAILABLE]	= "unavailable",
-	[AAS_LBA_DEPENDENT]	= "logical block dependent",
-	[AAS_RESERVED]		= "ARRAY BUG: invalid TPGs state!",
+	[AAS_LBA_DEPENDENT]	= "lba-dependent",
+	[AAS_RESERVED]		= "reserved",
 	[AAS_OFFLINE]		= "offline",
-	[AAS_TRANSITIONING]	= "transitioning between states",
+	[AAS_TRANSITIONING]	= "transitioning",
 };
 
 static const char *aas_print_string(int rc)
Signature · 1 line
2.54.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Xose Vazquez Perez

Update ALUA asymmetric access state descriptions in the prioritizer to
match the shorter names defined in the SCSI kernel subsystem:

   $ grep  "{ SCSI_ACCESS_STATE_"  linux/drivers/scsi/scsi_sysfs.c 
        { SCSI_ACCESS_STATE_OPTIMAL, "active/optimized" },
        { SCSI_ACCESS_STATE_ACTIVE, "active/non-optimized" },
        { SCSI_ACCESS_STATE_STANDBY, "standby" },
        { SCSI_ACCESS_STATE_UNAVAILABLE, "unavailable" },
        { SCSI_ACCESS_STATE_LBA, "lba-dependent" },
        { SCSI_ACCESS_STATE_OFFLINE, "offline" },
        { SCSI_ACCESS_STATE_TRANSITIONING, "transitioning" },

This unifies diagnostic strings across the stack and replaces the misleading
"ARRAY BUG: invalid TPGs state!" message with the standard SPC "reserved"
designation. These codes are explicitly reserved for future standard definitions rather than being treated as malformed states.

Quoted 5 lines
Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc DM_DEVEL-ML <[email protected]>