The request tag provides a concise identification of a SCSI
command, so we should be printing that out for scmd_printk().

Suggested-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 drivers/scsi/scsi_logging.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/scsi/scsi_logging.c b/drivers/scsi/scsi_logging.c
index 4a76796..dca45fe 100644
--- a/drivers/scsi/scsi_logging.c
+++ b/drivers/scsi/scsi_logging.c
@@ -109,6 +109,10 @@ int scmd_printk(const char *level, const struct scsi_cmnd 
*scmd,
        if (disk)
                off += scnprintf(logbuf + off, logbuf_len - off,
                                 "[%s] ", disk->disk_name);
+
+       if (scmd->request->tag >= 0)
+               off += scnprintf(logbuf + off, logbuf_len - off,
+                                "tag#%d ", scmd->request->tag);
        va_start(args, fmt);
        off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args);
        va_end(args);
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to