OSDN Git Service

scsi: use external buffer for command logging
authorHannes Reinecke <hare@suse.de>
Thu, 8 Jan 2015 06:43:44 +0000 (07:43 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 9 Jan 2015 14:44:29 +0000 (15:44 +0100)
commit9e5ed2a5b3662c6f398023042c02aaa527099a3d
tree494155845e8fd696e96642bd08667e48038e31d8
parentaa66ab35f2b31e96f4b60e675b2d6ffc51d472eb
scsi: use external buffer for command logging

Use an external buffer for __scsi_print_command() and move command
logging over to use the per-cpu logging buffer.  With that we can
guarantee the command always will always be formatted in one line.
So we can even print out a variable length command correctly across
several lines. Finally rename __scsi_print_command() to
__scsi_format_comment() to better reflect the functionality.

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/ch.c
drivers/scsi/constants.c
drivers/scsi/scsi_logging.c
drivers/scsi/sr_ioctl.c
include/scsi/scsi.h
include/scsi/scsi_dbg.h