scsi: Do not rely on blk-mq for double completions
authorKeith Busch <keith.busch@intel.com>
Mon, 26 Nov 2018 16:54:29 +0000 (09:54 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Nov 2018 17:34:26 +0000 (10:34 -0700)
commitf1342709d18af97b0e71449d5696b8873d1a456c
treebb820e311b26912b1eef37a53573d52fea6dfeb1
parent16c15eb16a793f2d81ae52f41f43fb6831b34212
scsi: Do not rely on blk-mq for double completions

The scsi timeout error handling had been directly updating the block
layer's request state to prevent a error handling and a natural completion
from completing the same request twice. Fix this layering violation
by having scsi control the fate of its commands with scsi owned flags
rather than use blk-mq's.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
include/scsi/scsi_cmnd.h