Skip to content

Commit af4de36

Browse files
Christof SchmittJames Bottomley
Christof Schmitt
authored and
James Bottomley
committed
[SCSI] zfcp: Block scsi_eh thread for rport state BLOCKED
In case the SCSI error recovery starts because of a SCSI command timeout, but then something else triggers the rport to be deleted, the SCSI error recovery will run to the end and set the SCSI device offline. To prevent this, call the FC transport function fc_block_scsi_eh which waits until the rport leaves the BLOCKED state. This guarantees that communication is possible if the rport is ONLINE, or the SCSI devices will be removed if the rport state switches to NOT_PRESENT. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
1 parent 4c571c6 commit af4de36

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/s390/scsi/zfcp_scsi.c

+3
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
209209
break;
210210

211211
zfcp_erp_wait(adapter);
212+
fc_block_scsi_eh(scpnt);
212213
if (!(atomic_read(&adapter->status) &
213214
ZFCP_STATUS_COMMON_RUNNING)) {
214215
zfcp_dbf_scsi_abort("nres", adapter->dbf, scpnt, NULL,
@@ -248,6 +249,7 @@ static int zfcp_task_mgmt_function(struct scsi_cmnd *scpnt, u8 tm_flags)
248249
break;
249250

250251
zfcp_erp_wait(adapter);
252+
fc_block_scsi_eh(scpnt);
251253
if (!(atomic_read(&adapter->status) &
252254
ZFCP_STATUS_COMMON_RUNNING)) {
253255
zfcp_dbf_scsi_devreset("nres", tm_flags, unit, scpnt);
@@ -289,6 +291,7 @@ static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
289291

290292
zfcp_erp_adapter_reopen(adapter, 0, "schrh_1", scpnt);
291293
zfcp_erp_wait(adapter);
294+
fc_block_scsi_eh(scpnt);
292295

293296
return SUCCESS;
294297
}

0 commit comments

Comments
 (0)