From aa66ab35f2b31e96f4b60e675b2d6ffc51d472eb Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 8 Jan 2015 07:43:43 +0100 Subject: 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 Tested-by: Robert Elliott Reviewed-by: Robert Elliott Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_logging.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') 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); -- cgit v1.2.3-58-ga151