提交 e90ff5ef 编写于 作者: H Hillf Danton 提交者: James Bottomley

[SCSI] libfc: fix stats computation in fc_queuecommand()

There seems accumulation needed.
Signed-off-by: NHillf Danton <dhillf@gmail.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 530994d6
...@@ -1820,11 +1820,11 @@ static int fc_queuecommand_lck(struct scsi_cmnd *sc_cmd, void (*done)(struct scs ...@@ -1820,11 +1820,11 @@ static int fc_queuecommand_lck(struct scsi_cmnd *sc_cmd, void (*done)(struct scs
if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) { if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) {
fsp->req_flags = FC_SRB_READ; fsp->req_flags = FC_SRB_READ;
stats->InputRequests++; stats->InputRequests++;
stats->InputMegabytes = fsp->data_len; stats->InputMegabytes += fsp->data_len;
} else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) { } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) {
fsp->req_flags = FC_SRB_WRITE; fsp->req_flags = FC_SRB_WRITE;
stats->OutputRequests++; stats->OutputRequests++;
stats->OutputMegabytes = fsp->data_len; stats->OutputMegabytes += fsp->data_len;
} else { } else {
fsp->req_flags = 0; fsp->req_flags = 0;
stats->ControlRequests++; stats->ControlRequests++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册