From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 22 May 2018 14:26:58 -0600 From: Keith Busch To: Jens Axboe 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 Subject: Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again Message-ID: <20180522202657.GA8961@localhost.localdomain> References: <20180522162515.20650-1-bart.vanassche@wdc.com> <448d63e9-cfcd-0bc8-abf3-30296590f1d6@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: List-ID: 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?