Return-Path: Subject: Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again To: Keith Busch Cc: Bart Van Assche , linux-block@vger.kernel.org, Christoph Hellwig , Tejun Heo , Jianchao Wang , Ming Lei , Sebastian Ott , Sagi Grimberg , Israel Rukshin , Max Gurtovoy References: <20180522162515.20650-1-bart.vanassche@wdc.com> <448d63e9-cfcd-0bc8-abf3-30296590f1d6@kernel.dk> <20180522202657.GA8961@localhost.localdomain> From: Jens Axboe Message-ID: Date: Tue, 22 May 2018 14:29:21 -0600 MIME-Version: 1.0 In-Reply-To: <20180522202657.GA8961@localhost.localdomain> Content-Type: text/plain; charset=utf-8 List-ID: 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