scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value
v3 cover scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value
The ALUA handler already maps a 0 value (no implicit transition timeout provided by the target) to the ALUA_FAILOVER_TIMEOUT constant. This means the kernel is already saying it won't accept an infinite transition time - it substitutes a finite default instead.
It has been suggested that some arrays may take tens of minutes to complete transitions, but even today those would be broken by the current 0-to-60-second translation. The kernel currently caps this.
The SCSI specification allows the implicit transition timeout to be specified as a single byte, meaning the maximum explicit value is 255 seconds. This patch simply changes the default from an arbitrary 60 seconds to U8_MAX (255), the highest value that could be explicitly provided by the target per the spec.
This is a minimal, safe change: we're not removing the cap, just raising the default to match what the spec allows.
Brian Bunker (1):
scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec
value
drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.50.1 (Apple Git-155)
PATCH v3 1/1 scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value
The ALUA handler maps a 0 value (no implicit transition timeout provided by the target) to the ALUA_FAILOVER_TIMEOUT constant, currently 60 seconds. This means the kernel already does not accept an infinite transition time.
However, 60 seconds is insufficient for some arrays that may take longer to complete ALUA transitions. Since the highest value allowed by the SCSI specification for the implicit transition timeout is a single byte (255 seconds), change the default to U8_MAX. This way, when a target does not provide an explicit transition timeout, we default to the maximum value the spec allows rather than an arbitrary 60 second limit.
--- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/device_handler/scsi_dh_alua.c +1 -1
@@ -37,7 +37,7 @@#define TPGS_MODE_EXPLICIT 0x2#define ALUA_RTPG_SIZE 128 -#define ALUA_FAILOVER_TIMEOUT 60 +#define ALUA_FAILOVER_TIMEOUT U8_MAX#define ALUA_FAILOVER_RETRIES 5#define ALUA_RTPG_DELAY_MSECS 5#define ALUA_RTPG_RETRY_DELAY 2
Signature · 1 line
2.50.1 (Apple Git-155)
Quoted 25 lines · Brian Bunker
The ALUA handler maps a 0 value (no implicit transition timeout provided by the target) to the
ALUA_FAILOVER_TIMEOUTconstant, currently 60 seconds. This means the kernel already does not accept an infinite transition time.However, 60 seconds is insufficient for some arrays that may take longer to complete ALUA transitions. Since the highest value allowed by the SCSI specification for the implicit transition timeout is a single byte (255 seconds), change the default to
U8_MAX. This way, when a target does not provide an explicit transition timeout, we default to the maximum value the spec allows rather than an arbitrary 60 second limit.Signed-off-by Krishna Kant <[email protected]>Signed-off-by Riya Savla <[email protected]>Signed-off-by Brian Bunker <[email protected]>--- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/device_handler/scsi_dh_alua.c +0
-0
drivers/scsi/device_handler/scsi_dh_alua.c line 43
Quoted 8 lines
drivers/scsi/device_handler/scsi_dh_alua.c +1
-1@@ -37,7 +37,7 @@#define TPGS_MODE_EXPLICIT 0x2#define ALUA_RTPG_SIZE 128 -#define ALUA_FAILOVER_TIMEOUT 60 +#define ALUA_FAILOVER_TIMEOUT U8_MAX#define ALUA_FAILOVER_RETRIES 5#define ALUA_RTPG_DELAY_MSECS 5#define ALUA_RTPG_RETRY_DELAY 2
I'd rather use the numerical value (ie 255), and add a comment that the timeout is an 8-bit value to deter people from raising it further.
Otherwise looks good.
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Quoted 21 lines · Hannes Reinecke
Quoted 20 lines · Brian Bunker
The ALUA handler maps a 0 value (no implicit transition timeout provided by the target) to the
ALUA_FAILOVER_TIMEOUTconstant, currently 60 seconds. This means the kernel already does not accept an infinite transition time.However, 60 seconds is insufficient for some arrays that may take longer to complete ALUA transitions. Since the highest value allowed by the SCSI specification for the implicit transition timeout is a single byte (255 seconds), change the default to
U8_MAX. This way, when a target does not provide an explicit transition timeout, we default to the maximum value the spec allows rather than an arbitrary 60 second limit.Signed-off-by Krishna Kant <[email protected]>Signed-off-by Riya Savla <[email protected]>Signed-off-by Brian Bunker <[email protected]>---
drivers/scsi/device_handler/scsi_dh_alua.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
drivers/scsi/device_handler/scsi_dh_alua.c line 42
Quoted 12 lines
drivers/scsi/device_handler/scsi_dh_alua.c +1
-1@@ -37,7 +37,7 @@ #define TPGS_MODE_EXPLICIT 0x2 #define ALUA_RTPG_SIZE 128 -#define ALUA_FAILOVER_TIMEOUT 60 +#define ALUA_FAILOVER_TIMEOUT U8_MAX #define ALUA_FAILOVER_RETRIES 5 #define ALUA_RTPG_DELAY_MSECS 5 #define ALUA_RTPG_RETRY_DELAY 2I'd rather use the numerical value (ie 255), and add a comment that the timeout is an 8-bit value to deter people from raising it further.
(u8)-1
that'll have both properties. 255 and documenting it's a u8