summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-01-08 07:43:43 +0100
committerChristoph Hellwig <hch@lst.de>2015-01-09 15:44:28 +0100
commitaa66ab35f2b31e96f4b60e675b2d6ffc51d472eb (patch)
treeee992a720c4ae5f36c8e938f6272490fdf6b1e7c
parentded85c193a391a84076d5c6a7a5668fe164a490e (diff)
scsi: log request tag for scmd_printk()
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 <hch@lst.de> Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/scsi/scsi_logging.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_logging.c b/drivers/scsi/scsi_logging.c
index 09d65dea9d56..4d20132c897d 100644
--- a/drivers/scsi/scsi_logging.c
+++ b/drivers/scsi/scsi_logging.c
@@ -114,6 +114,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);