]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9d858dd627602f0f3d676b23ff73fa3e4399f708
tree3311bccf12d23b364826e08369217b0a74fb29ec
parenta048aeb4e2d32543c962fd3a09ec94deb21804a9
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