* [PATCH v4 0/1] scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value
@ 2026-04-16 16:55 Brian Bunker
2026-04-16 16:55 ` [PATCH v4] " Brian Bunker
0 siblings, 1 reply; 3+ messages in thread
From: Brian Bunker @ 2026-04-16 16:55 UTC (permalink / raw)
To: linux-scsi, hare; +Cc: Brian Bunker
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 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(-)
--
2.50.1 (Apple Git-155)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v4] scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value
2026-04-16 16:55 [PATCH v4 0/1] scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value Brian Bunker
@ 2026-04-16 16:55 ` Brian Bunker
2026-04-17 5:32 ` Hannes Reinecke
0 siblings, 1 reply; 3+ messages in thread
From: Brian Bunker @ 2026-04-16 16:55 UTC (permalink / raw)
To: linux-scsi, hare; +Cc: Brian Bunker, Krishna Kant, Riya Savla
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 255. 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 <krishna.kant@purestorage.com>
Signed-off-by: Riya Savla <rsavla@purestorage.com>
Signed-off-by: Brian Bunker <brian@purestorage.com>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index efb08b9b145a1..80ab0ff921d43 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -37,7 +37,7 @@
#define TPGS_MODE_EXPLICIT 0x2
#define ALUA_RTPG_SIZE 128
-#define ALUA_FAILOVER_TIMEOUT 60
+#define ALUA_FAILOVER_TIMEOUT 255 /* max 255 (8-bit value) */
#define ALUA_FAILOVER_RETRIES 5
#define ALUA_RTPG_DELAY_MSECS 5
#define ALUA_RTPG_RETRY_DELAY 2
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4] scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value
2026-04-16 16:55 ` [PATCH v4] " Brian Bunker
@ 2026-04-17 5:32 ` Hannes Reinecke
0 siblings, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2026-04-17 5:32 UTC (permalink / raw)
To: Brian Bunker, linux-scsi; +Cc: Krishna Kant, Riya Savla
On 4/16/26 18:55, Brian Bunker wrote:
> 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 255. 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 <krishna.kant@purestorage.com>
> Signed-off-by: Riya Savla <rsavla@purestorage.com>
> Signed-off-by: Brian Bunker <brian@purestorage.com>
> ---
> drivers/scsi/device_handler/scsi_dh_alua.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
> index efb08b9b145a1..80ab0ff921d43 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -37,7 +37,7 @@
> #define TPGS_MODE_EXPLICIT 0x2
>
> #define ALUA_RTPG_SIZE 128
> -#define ALUA_FAILOVER_TIMEOUT 60
> +#define ALUA_FAILOVER_TIMEOUT 255 /* max 255 (8-bit value) */
> #define ALUA_FAILOVER_RETRIES 5
> #define ALUA_RTPG_DELAY_MSECS 5
> #define ALUA_RTPG_RETRY_DELAY 2
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-17 5:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 16:55 [PATCH v4 0/1] scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value Brian Bunker
2026-04-16 16:55 ` [PATCH v4] " Brian Bunker
2026-04-17 5:32 ` Hannes Reinecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox