mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[SCSI] fc-transport: Close state transition-window during rport deletion.
Andrew Vasquez wrote: > fc-transport: Close state transition-window during rport deletion. > > After an rport's state has transitioned to FC_PORTSTATE_BLOCKED, > but, prior to making the upcall to 'block' the scsi-target > associated with an rport, queued commands can recycle and > ultimately run out of retries causing failures to propagate to > upper-level drivers. Close this transition-window by returning > the non-'retries' modifying DID_IMM_RETRY status for submitted > I/Os. The same can happen for iscsi when transitioning from logged in to failed and blocking the sdevs. This patch converts iscsi and fc's transitions back to use DID_IMM_RETRY instead of DID_TRANSPORT_DISRUPTED which has a limited number of retries that we do not want to use for handling this race. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> [Addition of iscsi and fc port online devloss case conversion by Mike Christie] Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
parent
c53a284f8b
commit
9a1a69a1f4
2 changed files with 3 additions and 3 deletions
|
@ -357,7 +357,7 @@ int iscsi_session_chkready(struct iscsi_cls_session *session)
|
|||
err = 0;
|
||||
break;
|
||||
case ISCSI_SESSION_FAILED:
|
||||
err = DID_TRANSPORT_DISRUPTED << 16;
|
||||
err = DID_IMM_RETRY << 16;
|
||||
break;
|
||||
case ISCSI_SESSION_FREE:
|
||||
err = DID_TRANSPORT_FAILFAST << 16;
|
||||
|
|
|
@ -680,7 +680,7 @@ fc_remote_port_chkready(struct fc_rport *rport)
|
|||
if (rport->roles & FC_PORT_ROLE_FCP_TARGET)
|
||||
result = 0;
|
||||
else if (rport->flags & FC_RPORT_DEVLOSS_PENDING)
|
||||
result = DID_TRANSPORT_DISRUPTED << 16;
|
||||
result = DID_IMM_RETRY << 16;
|
||||
else
|
||||
result = DID_NO_CONNECT << 16;
|
||||
break;
|
||||
|
@ -688,7 +688,7 @@ fc_remote_port_chkready(struct fc_rport *rport)
|
|||
if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)
|
||||
result = DID_TRANSPORT_FAILFAST << 16;
|
||||
else
|
||||
result = DID_TRANSPORT_DISRUPTED << 16;
|
||||
result = DID_IMM_RETRY << 16;
|
||||
break;
|
||||
default:
|
||||
result = DID_NO_CONNECT << 16;
|
||||
|
|
Loading…
Reference in a new issue