Re: [PATCH 1/2] scsi: Do not rely on blk-mq for double completions

2018-11-13 Thread Jens Axboe
On 11/13/18 12:45 PM, Keith Busch wrote: > On Tue, Nov 13, 2018 at 12:20:46PM -0700, Jens Axboe wrote: >> On 11/13/18 11:57 AM, Keith Busch wrote: >>> static void scsi_mq_done(struct scsi_cmnd *cmd) >>> { >>> + if (test_and_set_bit(__SCMD_COMPLETE, &cmd->flags)) >>> + return; >>>

Re: [PATCH 1/2] scsi: Do not rely on blk-mq for double completions

2018-11-13 Thread Keith Busch
On Tue, Nov 13, 2018 at 12:20:46PM -0700, Jens Axboe wrote: > On 11/13/18 11:57 AM, Keith Busch wrote: > > static void scsi_mq_done(struct scsi_cmnd *cmd) > > { > > + if (test_and_set_bit(__SCMD_COMPLETE, &cmd->flags)) > > + return; > > trace_scsi_dispatch_cmd_done(cmd); > > b

Re: [PATCH 1/2] scsi: Do not rely on blk-mq for double completions

2018-11-13 Thread Jens Axboe
On 11/13/18 11:57 AM, Keith Busch wrote: > The scsi timeout error handling had been directly updating the request > state to prevent a natural completion and error handling from completing > the same request twice. Fix this layering violation by having scsi > control the fate of its commands with s