From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, Mike Christie <michaelc@cs.wisc.edu>,
Hannes Reinecke <hare@suse.de>,
Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 2/2] zfcp: Pass return code from fc_block_scsi_eh to scsi eh
Date: Thu, 01 Apr 2010 13:48:50 +0200 [thread overview]
Message-ID: <20100401115739.812781000@de.ibm.com> (raw)
In-Reply-To: 20100401114848.628357000@de.ibm.com
[-- Attachment #1: fast-fail-2-zfcp.diff --]
[-- Type: text/plain, Size: 2221 bytes --]
From: Christof Schmitt <christof.schmitt@de.ibm.com>
The return code FAST_IO_FAIL from fc_block_scsi_eh indicates that the
pending I/O requests have been terminated as a result of the
fast_io_fail_tmo. Pass this return code back to the scsi eh to stop
the scsi eh in this case.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/s390/scsi/zfcp_scsi.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
--- a/drivers/s390/scsi/zfcp_scsi.c 2010-03-23 10:59:09.000000000 +0100
+++ b/drivers/s390/scsi/zfcp_scsi.c 2010-03-23 11:21:10.000000000 +0100
@@ -174,7 +174,7 @@ static int zfcp_scsi_eh_abort_handler(st
struct zfcp_fsf_req *old_req, *abrt_req;
unsigned long flags;
unsigned long old_reqid = (unsigned long) scpnt->host_scribble;
- int retval = SUCCESS;
+ int retval = SUCCESS, ret;
int retry = 3;
char *dbf_tag;
@@ -199,7 +199,9 @@ static int zfcp_scsi_eh_abort_handler(st
break;
zfcp_erp_wait(adapter);
- fc_block_scsi_eh(scpnt);
+ ret = fc_block_scsi_eh(scpnt);
+ if (ret)
+ return ret;
if (!(atomic_read(&adapter->status) &
ZFCP_STATUS_COMMON_RUNNING)) {
zfcp_dbf_scsi_abort("nres", adapter->dbf, scpnt, NULL,
@@ -230,7 +232,7 @@ static int zfcp_task_mgmt_function(struc
struct zfcp_unit *unit = scpnt->device->hostdata;
struct zfcp_adapter *adapter = unit->port->adapter;
struct zfcp_fsf_req *fsf_req = NULL;
- int retval = SUCCESS;
+ int retval = SUCCESS, ret;
int retry = 3;
while (retry--) {
@@ -239,7 +241,10 @@ static int zfcp_task_mgmt_function(struc
break;
zfcp_erp_wait(adapter);
- fc_block_scsi_eh(scpnt);
+ ret = fc_block_scsi_eh(scpnt);
+ if (ret)
+ return ret;
+
if (!(atomic_read(&adapter->status) &
ZFCP_STATUS_COMMON_RUNNING)) {
zfcp_dbf_scsi_devreset("nres", tm_flags, unit, scpnt);
@@ -275,10 +280,13 @@ static int zfcp_scsi_eh_host_reset_handl
{
struct zfcp_unit *unit = scpnt->device->hostdata;
struct zfcp_adapter *adapter = unit->port->adapter;
+ int ret;
zfcp_erp_adapter_reopen(adapter, 0, "schrh_1", scpnt);
zfcp_erp_wait(adapter);
- fc_block_scsi_eh(scpnt);
+ ret = fc_block_scsi_eh(scpnt);
+ if (ret)
+ return ret;
return SUCCESS;
}
next prev parent reply other threads:[~2010-04-01 11:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 11:48 [patch 0/2] [PATCH/RESEND] Stop scsi eh when fast_io_fail_tmo fires Christof Schmitt
2010-04-01 11:48 ` [patch 1/2] scsi: Allow FC LLD to fast-fail scsi eh Christof Schmitt
2010-04-01 11:48 ` Christof Schmitt [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-03-24 15:50 [patch 0/2] Stop scsi eh when fast_io_fail_tmo fires Christof Schmitt
2010-03-24 15:50 ` [patch 2/2] zfcp: Pass return code from fc_block_scsi_eh to scsi eh 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=20100401115739.812781000@de.ibm.com \
--to=christof.schmitt@de.ibm.com \
--cc=James.Bottomley@suse.de \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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