mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
16c15eb16a
commit
f1342709d1
3 changed files with 27 additions and 12 deletions
|
|
@ -61,6 +61,9 @@ struct scsi_pointer {
|
|||
/* flags preserved across unprep / reprep */
|
||||
#define SCMD_PRESERVED_FLAGS (SCMD_UNCHECKED_ISA_DMA | SCMD_INITIALIZED)
|
||||
|
||||
/* for scmd->state */
|
||||
#define SCMD_STATE_COMPLETE (1 << 0)
|
||||
|
||||
struct scsi_cmnd {
|
||||
struct scsi_request req;
|
||||
struct scsi_device *device;
|
||||
|
|
@ -145,6 +148,7 @@ struct scsi_cmnd {
|
|||
|
||||
int result; /* Status code from lower level driver */
|
||||
int flags; /* Command flags */
|
||||
unsigned long state; /* Command completion state */
|
||||
|
||||
unsigned char tag; /* SCSI-II queued command tag */
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue