diff mbox

[v2,3/3] Show .retries and .jiffies_at_alloc in debugfs

Message ID 20170830000742.29653-4-bart.vanassche@wdc.com (mailing list archive)
State Superseded
Headers show

Commit Message

Bart Van Assche Aug. 30, 2017, 12:07 a.m. UTC
Make these two member variables available in debugfs such that
their value can be verified by kernel developers. An example of
the new output from a system with CONFIG_HZ=100:

ffff8804a41ed480 {.op=READ, .cmd_flags=META|PRIO, .rq_flags=MQ_INFLIGHT|IO_STAT, .atomic_flags=COMPLETE, .tag=17, .internal_tag=-1, .cmd=Read(10) 28 00 09 01 1f a0 00 00 08 00, .retries=0, .jiffies_at_alloc=-25647}

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/scsi_debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Christoph Hellwig Aug. 30, 2017, 8:30 a.m. UTC | #1
Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox

Patch

diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c
index a97c9507103d..282834935e07 100644
--- a/drivers/scsi/scsi_debugfs.c
+++ b/drivers/scsi/scsi_debugfs.c
@@ -9,5 +9,6 @@  void scsi_show_rq(struct seq_file *m, struct request *rq)
 	char buf[80];
 
 	__scsi_format_command(buf, sizeof(buf), cmd->cmnd, cmd->cmd_len);
-	seq_printf(m, ", .cmd=%s", buf);
+	seq_printf(m, ", .cmd=%s, .retries=%d, .jiffies_at_alloc=%ld", buf,
+		   cmd->retries, cmd->jiffies_at_alloc - jiffies);
 }