linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 7/9] zfcp: Use forced_reopen in terminate_rport_io callback
Date: Thu, 08 Jul 2010 09:53:08 +0200	[thread overview]
Message-ID: <20100708080110.797418000@de.ibm.com> (raw)
In-Reply-To: 20100708075301.347904000@de.ibm.com

[-- Attachment #1: 713-zfcp-forced-reopen.diff --]
[-- Type: text/plain, Size: 1725 bytes --]

From: Christof Schmitt <christof.schmitt@de.ibm.com>

When running in non-NPIV mode, the port_reopen in terminate_rport_io
might succeed even though the remote port is not available. If the
same port connection is held open from another operating system, the
reopen is only a virtual operation and might not hit the SAN. Fix this
by changing the call to forced_reopen that forces a logout/login
operation in the SAN.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---

 drivers/s390/scsi/zfcp_scsi.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff -urpN linux-2.6/drivers/s390/scsi/zfcp_scsi.c linux-2.6-patched/drivers/s390/scsi/zfcp_scsi.c
--- linux-2.6/drivers/s390/scsi/zfcp_scsi.c	2010-07-06 09:22:14.000000000 +0200
+++ linux-2.6-patched/drivers/s390/scsi/zfcp_scsi.c	2010-07-06 09:22:14.000000000 +0200
@@ -506,8 +506,10 @@ static void zfcp_set_rport_dev_loss_tmo(
  * @rport: The FC rport where to teminate I/O
  *
  * Abort all pending SCSI commands for a port by closing the
- * port. Using a reopen avoiding a conflict with a shutdown
- * overwriting a reopen.
+ * port. Using a reopen avoids a conflict with a shutdown
+ * overwriting a reopen. The "forced" ensures that a disappeared port
+ * is not opened again as valid due to the cached plogi data in
+ * non-NPIV mode.
  */
 static void zfcp_scsi_terminate_rport_io(struct fc_rport *rport)
 {
@@ -519,7 +521,7 @@ static void zfcp_scsi_terminate_rport_io
 	port = zfcp_get_port_by_wwpn(adapter, rport->port_name);
 
 	if (port) {
-		zfcp_erp_port_reopen(port, 0, "sctrpi1", NULL);
+		zfcp_erp_port_forced_reopen(port, 0, "sctrpi1", NULL);
 		put_device(&port->dev);
 	}
 }

  parent reply	other threads:[~2010-07-08  7:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08  7:53 [patch 0/9] zfcp bug fixes for 2.6.35-rc4 Christof Schmitt
2010-07-08  7:53 ` [patch 1/9] zfcp: Fix check whether unchained ct_els is possible Christof Schmitt
2010-07-08  7:53 ` [patch 2/9] zfcp: Do not wait for SBALs on stopped queue Christof Schmitt
2010-07-08  7:53 ` [patch 3/9] zfcp: Update status read mempool Christof Schmitt
2010-07-08  7:53 ` [patch 4/9] zfcp: Do not unblock rport from REOPEN_PORT_FORCED Christof Schmitt
2010-07-08  7:53 ` [patch 5/9] zfcp: Do not try "forced close" when port is already closed Christof Schmitt
2010-07-08  7:53 ` [patch 6/9] zfcp: Register SCSI devices after successful fc_remote_port_add Christof Schmitt
2010-07-08  7:53 ` Christof Schmitt [this message]
2010-07-08  7:53 ` [patch 8/9] zfcp: Fail erp after timeout Christof Schmitt
2010-07-08  7:53 ` [patch 9/9] zfcp: Fix retry after failed "open port" erp action Christof Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100708080110.797418000@de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Bottomley@suse.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).