scsi: scsi_dh_alua: Retry RTPG on a different path after failure
authorMartin Wilck <mwilck@suse.com>
Fri, 14 May 2021 15:32:14 +0000 (17:32 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 22 May 2021 03:06:29 +0000 (23:06 -0400)
commitee8868c5c78f16fb726775741aeab8a233373332
tree9add38ad000c99a58999a73f0cbe33ec780223b1
parentcb9eb11fd57215020c6649bbe884232fb0f80bdd
scsi: scsi_dh_alua: Retry RTPG on a different path after failure

If an RTPG fails, we can't infer anything wrt. the state of the ports in
the port group except that we were unable to reach the one port on which
the RTPG had failed. "offline" is just a secondary port state, which means
that we can't infer the state of any port in the PG from the failure (in
fact, even the failed port might still be in "active/optimized" primary
port access state).

Therefore, when we encounter an RTPG failure, we should retry the RTPG on a
different port. This avoids falsely setting port states to offline for
unreachable ports. To do this, ports on which an RTPG has failed are
temporarily set to "disabled" to avoid repeating the failed I/O on the same
target port. Once the RTPG has either succeeded on one port or failed on
all ports of the PG, the ports are enabled again.

Link: https://lore.kernel.org/r/20210514153214.5626-1-mwilck@suse.com
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/device_handler/scsi_dh_alua.c