OSDN Git Service

scsi: scsi_debug: Simplify request tag decoding
authorBart Van Assche <bart.vanassche@wdc.com>
Fri, 26 Jan 2018 16:52:19 +0000 (08:52 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 14 Feb 2018 02:20:42 +0000 (21:20 -0500)
commit458df78b1c513de9311afd913bdf93777af2d157
tree5c96241d92f216a098e26c7008e3eb5aa051353c
parent34e81f7a720d8a638f46b18b35678712dbafb42d
scsi: scsi_debug: Simplify request tag decoding

Since commit 64d513ac31bd ("scsi: use host wide tags by default") all
SCSI requests have a tag, whether or not scsi-mq is enabled.

Additionally, it is safe to use blk_mq_unique_tag() and
blk_mq_unique_tag_to_hwq() for legacy SCSI queues. Since this means that
the sdebug_mq_active variable is superfluous, remove it.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c