On Tue, 2018-05-22 at 14:44 -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 08:36:27PM +0000, Bart Van Assche wrote: > > > > Have you noticed that if blk_mq_complete_request() encounters a request with > > state MQ_RQ_TIMED_OUT that it doesn't call __blk_mq_complete_request()? I think > > the code in blk_mq_complete_request() together with the above code guarantees > > that __blk_mq_complete_request() is only called once per request generation. > > Okay, now to the BLK_EH_NOT_HANDLED case: that's supposedly the correct > status to return if the driver knows blk_mq_complete_request() was called > prior to returning from the timeout handler, so we need a similiar check > there, right? Good catch. To me that seems like the right place to handle that case. Bart.