public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fc_transport: make all rports wait dev_loss_tmo before removing them
@ 2007-03-13 16:06 James Smart
  2007-04-27 15:53 ` [PATCH][REPOST] " James Smart
  0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2007-03-13 16:06 UTC (permalink / raw)
  To: linux-scsi

Per the comment in the change - it's not always prudent to immediately
remove the rport upon first notice of a disconnect. Make all rports
wait dev_loss_tmo before being deleted (and each could have a separate
dev_loss_tmo value).

-- james s

Signed-off-by: James Smart <James.Smart@emulex.com>


diff -upNr a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
--- a/drivers/scsi/scsi_transport_fc.c	2007-03-12 13:56:16.000000000 -0500
+++ b/drivers/scsi/scsi_transport_fc.c	2007-03-12 14:25:58.000000000 -0500
@@ -2156,14 +2156,18 @@ fc_remote_port_delete(struct fc_rport  *
 
 	spin_lock_irqsave(shost->host_lock, flags);
 
-	/* If no scsi target id mapping, delete it */
-	if (rport->scsi_target_id == -1) {
-		list_del(&rport->peers);
-		rport->port_state = FC_PORTSTATE_DELETED;
-		fc_queue_work(shost, &rport->rport_delete_work);
-		spin_unlock_irqrestore(shost->host_lock, flags);
-		return;
-	}
+	/*
+	 * In the past, we if this was not an FCP-Target, we would 
+	 * unconditionally just jump to deleting the rport.
+	 * However, rports can be used as node containers by the LLDD,
+	 * and its not appropriate to just terminate the rport at the
+	 * first sign of a loss in connectivity. The LLDD may want to
+	 * send ELS traffic to re-validate the login. If the rport is
+	 * immediately deleted, it makes it inappropriate for a node
+	 * container.
+	 * So... we now unconditionally wait dev_loss_tmo before 
+	 * destroying an rport.
+	 */
 
 	rport->port_state = FC_PORTSTATE_BLOCKED;
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-27 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-13 16:06 [PATCH] fc_transport: make all rports wait dev_loss_tmo before removing them James Smart
2007-04-27 15:53 ` [PATCH][REPOST] " James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox