mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[SCSI] zfcp: Pass return code from fc_block_scsi_eh to scsi eh
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> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
2f2eb58762
commit
a1dbfddd02
1 changed files with 13 additions and 5 deletions
|
@ -175,7 +175,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
|
||||||
struct zfcp_fsf_req *old_req, *abrt_req;
|
struct zfcp_fsf_req *old_req, *abrt_req;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned long old_reqid = (unsigned long) scpnt->host_scribble;
|
unsigned long old_reqid = (unsigned long) scpnt->host_scribble;
|
||||||
int retval = SUCCESS;
|
int retval = SUCCESS, ret;
|
||||||
int retry = 3;
|
int retry = 3;
|
||||||
char *dbf_tag;
|
char *dbf_tag;
|
||||||
|
|
||||||
|
@ -200,7 +200,9 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
zfcp_erp_wait(adapter);
|
zfcp_erp_wait(adapter);
|
||||||
fc_block_scsi_eh(scpnt);
|
ret = fc_block_scsi_eh(scpnt);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
if (!(atomic_read(&adapter->status) &
|
if (!(atomic_read(&adapter->status) &
|
||||||
ZFCP_STATUS_COMMON_RUNNING)) {
|
ZFCP_STATUS_COMMON_RUNNING)) {
|
||||||
zfcp_dbf_scsi_abort("nres", adapter->dbf, scpnt, NULL,
|
zfcp_dbf_scsi_abort("nres", adapter->dbf, scpnt, NULL,
|
||||||
|
@ -231,7 +233,7 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags)
|
||||||
struct zfcp_unit *unit = scpnt->device->hostdata;
|
struct zfcp_unit *unit = scpnt->device->hostdata;
|
||||||
struct zfcp_adapter *adapter = unit->port->adapter;
|
struct zfcp_adapter *adapter = unit->port->adapter;
|
||||||
struct zfcp_fsf_req *fsf_req = NULL;
|
struct zfcp_fsf_req *fsf_req = NULL;
|
||||||
int retval = SUCCESS;
|
int retval = SUCCESS, ret;
|
||||||
int retry = 3;
|
int retry = 3;
|
||||||
|
|
||||||
while (retry--) {
|
while (retry--) {
|
||||||
|
@ -240,7 +242,10 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
zfcp_erp_wait(adapter);
|
zfcp_erp_wait(adapter);
|
||||||
fc_block_scsi_eh(scpnt);
|
ret = fc_block_scsi_eh(scpnt);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (!(atomic_read(&adapter->status) &
|
if (!(atomic_read(&adapter->status) &
|
||||||
ZFCP_STATUS_COMMON_RUNNING)) {
|
ZFCP_STATUS_COMMON_RUNNING)) {
|
||||||
zfcp_dbf_scsi_devreset("nres", tm_flags, unit, scpnt);
|
zfcp_dbf_scsi_devreset("nres", tm_flags, unit, scpnt);
|
||||||
|
@ -276,10 +281,13 @@ static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
|
||||||
{
|
{
|
||||||
struct zfcp_unit *unit = scpnt->device->hostdata;
|
struct zfcp_unit *unit = scpnt->device->hostdata;
|
||||||
struct zfcp_adapter *adapter = unit->port->adapter;
|
struct zfcp_adapter *adapter = unit->port->adapter;
|
||||||
|
int ret;
|
||||||
|
|
||||||
zfcp_erp_adapter_reopen(adapter, 0, "schrh_1", scpnt);
|
zfcp_erp_adapter_reopen(adapter, 0, "schrh_1", scpnt);
|
||||||
zfcp_erp_wait(adapter);
|
zfcp_erp_wait(adapter);
|
||||||
fc_block_scsi_eh(scpnt);
|
ret = fc_block_scsi_eh(scpnt);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue