On Thu, 2018-07-19 at 09:56 -0600, Keith Busch wrote: +AD4- Even some scsi drivers are susceptible to losing their requests with the +AD4- reverted behavior: take virtio-scsi for example, which returns RESET+AF8-TIMER +AD4- from it's timeout handler. With the behavior everyone seems to want, +AD4- a natural completion at or around the same time is lost forever because +AD4- it was blocked from completion with no way to recover. The patch I had posted handles a completion that occurs while a timeout is being handled properly. From https://www.mail-archive.com/linux-block+AEA-vger.kernel.org/msg22196.html: void blk+AF8-mq+AF8-complete+AF8-request(struct request +ACo-rq) +AFs- ... +AF0- +- if (blk+AF8-mq+AF8-change+AF8-rq+AF8-state(rq, MQ+AF8-RQ+AF8-IN+AF8-FLIGHT, +- MQ+AF8-RQ+AF8-COMPLETE)) +AHs- +- +AF8AXw-blk+AF8-mq+AF8-complete+AF8-request(rq)+ADs- +- break+ADs- +- +AH0- +- if (blk+AF8-mq+AF8-change+AF8-rq+AF8-state(rq, MQ+AF8-RQ+AF8-TIMED+AF8-OUT, MQ+AF8-RQ+AF8-COMPLETE)) +- break+ADs- +AFs- ... +AF0- +AEAAQA- -838,25 +-838,42 +AEAAQA- static void blk+AF8-mq+AF8-rq+AF8-timed+AF8-out(struct request +ACo-req, bool reserved) +AFs- ... +AF0- case BLK+AF8-EH+AF8-RESET+AF8-TIMER: +AFs- ... +AF0- +- if (blk+AF8-mq+AF8-rq+AF8-state(req) +AD0APQ- MQ+AF8-RQ+AF8-COMPLETE) +AHs- +- +AF8AXw-blk+AF8-mq+AF8-complete+AF8-request(req)+ADs- +- break+ADs- +- +AH0- Bart.