scsi: trace: Print driver_tag and scheduler_tag in SCSI trace
authorChangyuan Lyu <changyuanl@google.com>
Tue, 21 Jun 2022 18:11:25 +0000 (18:11 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Jun 2022 01:43:23 +0000 (21:43 -0400)
commitcc06af0bbc21bcee40d57e3ee569d3a09741dafd
tree3311bccf12d23b364826e08369217b0a74fb29ec
parentbc98b503b111b92d1f51005b393615eaf689231f
scsi: trace: Print driver_tag and scheduler_tag in SCSI trace

Trace events like scsi_dispatch_cmd_start and scsi_dispatch_cmd_done are
useful for tracking a command throughout its lifetime. But for some ATA
passthrough commands, the information printed in current logs is not enough
to identify and match them. For example, if two threads send SMART cmd to
the same disk at the same time, their trace logs may look the same, which
makes it hard to match scsi_dispatch_cmd_done and scsi_dispatch_cmd_start.

Printing tags can help us solve the problem.  Further, if a command failed
for some reason and then is retried, its driver_tag will change. So
scheduler_tag is also included such that we can track the retries of a
command.

Link: https://lore.kernel.org/r/20220621181125.3211399-1-changyuanl@google.com
Reviewed-by: Vishakha Channapattan <vishakhavc@google.com>
Reviewed-by: Jolly Shah <jollys@google.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
include/trace/events/scsi.h