소스 검색

[SCSI] zfcp: Fix tracing of requests with error status

When a FSF request is returned with an error it should be reported
through blktrace for the ziomon tools, but the latency information
should not be read. Fix this by also calling zfcp_fsf_req_trace for
the error case, but skip reading the latencies inside the function.

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>
Christof Schmitt 15 년 전
부모
커밋
5bbf297cc6
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      drivers/s390/scsi/zfcp_fsf.c

+ 3 - 3
drivers/s390/scsi/zfcp_fsf.c

@@ -2105,7 +2105,8 @@ static void zfcp_fsf_req_trace(struct zfcp_fsf_req *req, struct scsi_cmnd *scsi)
 	blktrc.inb_usage = req->qdio_req.qdio_inb_usage;
 	blktrc.inb_usage = req->qdio_req.qdio_inb_usage;
 	blktrc.outb_usage = req->qdio_req.qdio_outb_usage;
 	blktrc.outb_usage = req->qdio_req.qdio_outb_usage;
 
 
-	if (req->adapter->adapter_features & FSF_FEATURE_MEASUREMENT_DATA) {
+	if (req->adapter->adapter_features & FSF_FEATURE_MEASUREMENT_DATA &&
+	    !(req->status & ZFCP_STATUS_FSFREQ_ERROR)) {
 		blktrc.flags |= ZFCP_BLK_LAT_VALID;
 		blktrc.flags |= ZFCP_BLK_LAT_VALID;
 		blktrc.channel_lat = lat_in->channel_lat * ticks;
 		blktrc.channel_lat = lat_in->channel_lat * ticks;
 		blktrc.fabric_lat = lat_in->fabric_lat * ticks;
 		blktrc.fabric_lat = lat_in->fabric_lat * ticks;
@@ -2157,9 +2158,8 @@ static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req)
 	fcp_rsp = (struct fcp_resp_with_ext *) &req->qtcb->bottom.io.fcp_rsp;
 	fcp_rsp = (struct fcp_resp_with_ext *) &req->qtcb->bottom.io.fcp_rsp;
 	zfcp_fc_eval_fcp_rsp(fcp_rsp, scpnt);
 	zfcp_fc_eval_fcp_rsp(fcp_rsp, scpnt);
 
 
-	zfcp_fsf_req_trace(req, scpnt);
-
 skip_fsfstatus:
 skip_fsfstatus:
+	zfcp_fsf_req_trace(req, scpnt);
 	zfcp_dbf_scsi_result(req->adapter->dbf, scpnt, req);
 	zfcp_dbf_scsi_result(req->adapter->dbf, scpnt, req);
 
 
 	scpnt->host_scribble = NULL;
 	scpnt->host_scribble = NULL;