Skip to content
Commit 54249306 authored by Brian Bunker's avatar Brian Bunker Committed by Martin K. Petersen
Browse files

scsi: core: Allow the ALUA transitioning state enough time



The error path for the SCSI check condition of not ready, target in ALUA
state transition, will result in the failure of that path after the retries
are exhausted. In most cases that is well ahead of the transition timeout
established in the SCSI ALUA device handler.

Instead, reprep the command and re-add it to the queue after a 1 second
delay. This will allow the handler to take care of the timeout and only
fail the path if the target has exceeded the transition expiry timeout
(default 60 seconds). If the expiry timeout is exceeded, the handler will
change the path state from transitioning to standby leading to a path
failure eliminating the potential of this re-prep to continue endlessly. In
most cases the target will exit the transitioning state well before the
expiry timeout but after the retries are exhausted as mentioned.

Additionally remove the scsi_io_completion_reprep() function which provides
little value.

Link: https://lore.kernel.org/r/20220729214110.58576-1-brian@purestorage.com
Reviewed-by: default avatarMartin Wilck <mwilck@suse.com>
Acked-by: default avatarKrishna Kant <krishna.kant@purestorage.com>
Acked-by: default avatarSeamus Connor <sconnor@purestorage.com>
Signed-off-by: default avatarBrian Bunker <brian@purestorage.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 53661ded
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment