Commit e90ff5ef authored by Hillf Danton's avatar Hillf Danton Committed by James Bottomley

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

There seems accumulation needed.
Signed-off-by: default avatarHillf Danton <dhillf@gmail.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 530994d6
......@@ -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) {
fsp->req_flags = FC_SRB_READ;
stats->InputRequests++;
stats->InputMegabytes = fsp->data_len;
stats->InputMegabytes += fsp->data_len;
} else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) {
fsp->req_flags = FC_SRB_WRITE;
stats->OutputRequests++;
stats->OutputMegabytes = fsp->data_len;
stats->OutputMegabytes += fsp->data_len;
} else {
fsp->req_flags = 0;
stats->ControlRequests++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment