scsi: log request tag for scmd_printk()
authorHannes Reinecke <hare@suse.de>
Thu, 8 Jan 2015 06:43:43 +0000 (07:43 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 9 Jan 2015 14:44:28 +0000 (15:44 +0100)
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>
drivers/scsi/scsi_logging.c

index 09d65dea9d5626e10dc46412a51c0e3f793216db..4d20132c897d0d4abeab1222d225b5b06b4c5511 100644 (file)
@@ -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);