On 5/22/18 2:26 PM, Keith Busch wrote: > On Tue, May 22, 2018 at 01:38:06PM -0600, Jens Axboe wrote: >> I guess it would be cleaner to actually do the transition, in >> blk_mq_rq_timed_out(): >> >> case BLK_EH_HANDLED: >> if (blk_mq_change_rq_state(req, MQ_RQ_TIMED_OUT, >> MQ_RQ_COMPLETE)) >> __blk_mq_complete_request(req); >> break; >> >> This works for me. > > Works for me as well on manual fault injection tests. > > I think this change above goes back to Christoph's point earlier on usage > of BLK_EH_HANDLED. Is the driver supposed to return BLK_EH_NOT_HANDLED > when the driver actually knows the request has been completed before > returning the status? If the driver knows it's completed, it'd have to return BLK_EH_NOT_HANDLED. Or BLK_EH_HANDLED would work too, since the above state transition would then fail. -- Jens Axboe