summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
authorWu Bo <wubo40@huawei.com>2022-09-20 11:32:19 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2022-09-25 19:25:34 +0200
commit48517eefb20ec2d6595ebd77ae11f34b3540cd78 (patch)
treee801283900a81bd7e19aaa53368c246d5214c193 /drivers/scsi/scsi_error.c
parentscsi: qedf: Populate sysfs attributes for vport (diff)
downloadlinux-48517eefb20ec2d6595ebd77ae11f34b3540cd78.tar.xz
linux-48517eefb20ec2d6595ebd77ae11f34b3540cd78.zip
scsi: core: Add I/O timeout count for SCSI device
Currently struct scsi_device maintains counters for requests, completions, and errors but is missing a counter for timeouts. For better tracking of timeouts, add a suitable counter. Link: https://lore.kernel.org/r/1663666339-17560-1-git-send-email-wubo40@huawei.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Wu Bo <wubo40@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index b5fa2aad05f9..16bd0adc2339 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -334,6 +334,7 @@ enum blk_eh_timer_return scsi_timeout(struct request *req)
trace_scsi_dispatch_cmd_timeout(scmd);
scsi_log_completion(scmd, TIMEOUT_ERROR);
+ atomic_inc(&scmd->device->iotmo_cnt);
if (host->eh_deadline != -1 && !host->last_reset)
host->last_reset = jiffies;