]> www.infradead.org Git - users/dwmw2/linux.git/commit
scsi: scsi_debug: Fix cmd duration calculation
authorDouglas Gilbert <dgilbert@interlog.com>
Thu, 4 Mar 2021 01:41:07 +0000 (20:41 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Mar 2021 22:37:03 +0000 (17:37 -0500)
commit771f712ba5b0c6a54534421db98f560526a238a4
treec4a5d26150835171be07daf845bef19eda8031bf
parent4309ea74b0c30f00c6a93b94db018ebb416dc14c
scsi: scsi_debug: Fix cmd duration calculation

In some cases, sdebug_defer::cmpl_ts (completion timestamp) wasn't being
properly set when REQ_HIPRI was given. Fix that and improve code to only
call ktime_get_boottime_ns() for commands with REQ_HIPRI set as cmpl_ts is
only used in that case.

Link: https://lore.kernel.org/r/20210304014107.307625-1-dgilbert@interlog.com
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c