public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Brian Bunker <brian@purestorage.com>, linux-scsi@vger.kernel.org
Cc: Krishna Kant <krishna.kant@purestorage.com>,
	Riya Savla <rsavla@purestorage.com>
Subject: Re: [PATCH v3 1/1] scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value
Date: Wed, 15 Apr 2026 07:59:09 +0200	[thread overview]
Message-ID: <26877b12-7c19-40af-9c1a-e96a84975acb@suse.de> (raw)
In-Reply-To: <20260414182748.39776-2-brian@purestorage.com>

On 4/14/26 20:27, 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 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 <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..8ef1eecf9f9c3 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		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
-- 
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

  reply	other threads:[~2026-04-15  5:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-14 18:27 [PATCH v3 0/1] scsi: scsi_dh_alua: increase default ALUA timeout to maximum spec value Brian Bunker
2026-04-14 18:27 ` [PATCH v3 1/1] " Brian Bunker
2026-04-15  5:59   ` Hannes Reinecke [this message]
2026-04-16  6:25     ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26877b12-7c19-40af-9c1a-e96a84975acb@suse.de \
    --to=hare@suse.de \
    --cc=brian@purestorage.com \
    --cc=krishna.kant@purestorage.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rsavla@purestorage.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox