]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Gerald Schaefer <geraldsc@de.ibm.com> |
2 | Subject: zfcp: SCSI queue ERP deadlock | |
3 | References: bnc#487755,LTC#52401 | |
4 | ||
5 | Symptom: The I/O stalls if the an error injection is triggerd on | |
6 | the storage side. | |
7 | Problem: The ERP is waiting for the fc tranport class to finish a | |
8 | task which has triggered a task for the SCSI error handler | |
9 | which in turn is waiting for the ERP to finish ->deadlock. | |
10 | Solution: Don't let the ERP wait for anything and move the fulfillment | |
11 | check of the scheduled task to the async running job (scsi scan) | |
12 | ||
13 | Acked-by: John Jolly <jjolly@suse.de> | |
14 | ||
15 | --- | |
16 | drivers/s390/scsi/zfcp_erp.c | 1 - | |
17 | drivers/s390/scsi/zfcp_scsi.c | 6 +++++- | |
18 | 2 files changed, 5 insertions(+), 2 deletions(-) | |
19 | ||
20 | Index: linux-sles11/drivers/s390/scsi/zfcp_erp.c | |
21 | =================================================================== | |
22 | --- linux-sles11.orig/drivers/s390/scsi/zfcp_erp.c | |
23 | +++ linux-sles11/drivers/s390/scsi/zfcp_erp.c | |
24 | @@ -1192,7 +1192,6 @@ static void zfcp_erp_action_cleanup(stru | |
25 | ||
26 | switch (act->action) { | |
27 | case ZFCP_ERP_ACTION_REOPEN_UNIT: | |
28 | - flush_work(&port->rport_work); | |
29 | if ((result == ZFCP_ERP_SUCCEEDED) && !unit->device) { | |
30 | atomic_set_mask(ZFCP_STATUS_UNIT_REGISTERED, | |
31 | &unit->status); | |
32 | Index: linux-sles11/drivers/s390/scsi/zfcp_scsi.c | |
33 | =================================================================== | |
34 | --- linux-sles11.orig/drivers/s390/scsi/zfcp_scsi.c | |
35 | +++ linux-sles11/drivers/s390/scsi/zfcp_scsi.c | |
36 | @@ -592,7 +593,10 @@ void zfcp_scsi_scan(struct work_struct * | |
37 | { | |
38 | struct zfcp_unit *unit = container_of(work, struct zfcp_unit, | |
39 | scsi_work); | |
40 | - struct fc_rport *rport = unit->port->rport; | |
41 | + struct fc_rport *rport; | |
42 | + | |
43 | + flush_work(&unit->port->rport_work); | |
44 | + rport = unit->port->rport; | |
45 | ||
46 | if (rport && rport->port_state == FC_PORTSTATE_ONLINE) | |
47 | scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, |