aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-04-29 14:12:39 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-05-15 12:16:46 -0400
commit9a1a69a1f41cbefebf3172761f197db6aba71e68 (patch)
tree65a2a8fc525e66c50654b30602a8a43826827e36
parentc53a284f8be23735dc6b53929640a987055f2933 (diff)
[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>
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c2
-rw-r--r--include/scsi/scsi_transport_fc.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 09479545529..0a2ce7b6325 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -357,7 +357,7 @@ int iscsi_session_chkready(struct iscsi_cls_session *session)
357 err = 0; 357 err = 0;
358 break; 358 break;
359 case ISCSI_SESSION_FAILED: 359 case ISCSI_SESSION_FAILED:
360 err = DID_TRANSPORT_DISRUPTED << 16; 360 err = DID_IMM_RETRY << 16;
361 break; 361 break;
362 case ISCSI_SESSION_FREE: 362 case ISCSI_SESSION_FREE:
363 err = DID_TRANSPORT_FAILFAST << 16; 363 err = DID_TRANSPORT_FAILFAST << 16;
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index c9184f756ca..68a8d873bbd 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -680,7 +680,7 @@ fc_remote_port_chkready(struct fc_rport *rport)
680 if (rport->roles & FC_PORT_ROLE_FCP_TARGET) 680 if (rport->roles & FC_PORT_ROLE_FCP_TARGET)
681 result = 0; 681 result = 0;
682 else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) 682 else if (rport->flags & FC_RPORT_DEVLOSS_PENDING)
683 result = DID_TRANSPORT_DISRUPTED << 16; 683 result = DID_IMM_RETRY << 16;
684 else 684 else
685 result = DID_NO_CONNECT << 16; 685 result = DID_NO_CONNECT << 16;
686 break; 686 break;
@@ -688,7 +688,7 @@ fc_remote_port_chkready(struct fc_rport *rport)
688 if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT) 688 if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)
689 result = DID_TRANSPORT_FAILFAST << 16; 689 result = DID_TRANSPORT_FAILFAST << 16;
690 else 690 else
691 result = DID_TRANSPORT_DISRUPTED << 16; 691 result = DID_IMM_RETRY << 16;
692 break; 692 break;
693 default: 693 default:
694 result = DID_NO_CONNECT << 16; 694 result = DID_NO_CONNECT << 16;