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]>
Signed-off-by: Xose Vazquez Perez <[email protected]>
---
libmultipath/prioritizers/alua.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libmultipath/prioritizers/alua.c b/libmultipath/prioritizers/alua.c
index ec68f370..e9a0683e 100644
--- a/libmultipath/prioritizers/alua.c
+++ b/libmultipath/prioritizers/alua.c
@@ -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)
--
2.54.0