aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fsf.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2008-05-19 06:17:37 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-06-05 10:27:13 -0400
commitd26ab06ede83287f99067fee3034c5455a75faf9 (patch)
tree6070ae50cded8086ceab61092348790b39876146 /drivers/s390/scsi/zfcp_fsf.c
parent15424921222f2bed0aa92ef1e8bc94f753d2c6ea (diff)
[SCSI] zfcp: receiving an unsolicted status can lead to I/O stall
Processing of an unsolicted status request can lead to a locking race of the request_queue's queue_lock during the recreation of the used up status read request while still in interrupt context of the response handler. Detaching the 'refill' of the long running status read requests from the handler to a scheduled work is solving this issue. In addition, each refill-run is trying to re-establish the full amount of status read requests, which might have failed in earlier runs. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 1e7136483c1..b344e8a72f1 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -1029,21 +1029,9 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1029 * FIXME: 1029 * FIXME:
1030 * allocation failure possible? (Is this code needed?) 1030 * allocation failure possible? (Is this code needed?)
1031 */ 1031 */
1032 retval = zfcp_fsf_status_read(adapter, 0); 1032
1033 if (retval < 0) { 1033 atomic_inc(&adapter->stat_miss);
1034 ZFCP_LOG_INFO("Failed to create unsolicited status read " 1034 schedule_work(&adapter->stat_work);
1035 "request for the adapter %s.\n",
1036 zfcp_get_busid_by_adapter(adapter));
1037 /* temporary fix to avoid status read buffer shortage */
1038 adapter->status_read_failed++;
1039 if ((ZFCP_STATUS_READS_RECOM - adapter->status_read_failed)
1040 < ZFCP_STATUS_READ_FAILED_THRESHOLD) {
1041 ZFCP_LOG_INFO("restart adapter %s due to status read "
1042 "buffer shortage\n",
1043 zfcp_get_busid_by_adapter(adapter));
1044 zfcp_erp_adapter_reopen(adapter, 0, 103, fsf_req);
1045 }
1046 }
1047 out: 1035 out:
1048 return retval; 1036 return retval;
1049} 1037}