Re: [PATCH V9 3/4] blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests

From: Jens Axboe
Date: Wed Dec 05 2018 - 21:13:10 EST


On 12/5/18 6:11 PM, jianchao.wang wrote:
>> And why aren't we just using the list_empty() check like before, and not
>> having to add the inval cookie value?
>
> Because we use 'bypass == false' here, so blk_mq_try_issue_directly
> will take over the request totally, so the request will always be
> removed from the list and finally, the list must be empty.
>
> There is another way to identify the result of blk_mq_try_issue_directly.
> Currently,
> for the 'bypass == true' case,
> it always return BLK_STS_OK,
> for the 'bypass == false' case,
> it return the actual result, except for 'force == true' case
> where the request has to be inserted into hctx dispatch list
> and return a BLK_STS_OK.
>
> We could let the 'bypass == true' case also return the actual result to
> show what has been done in the blk_mq_try_issue_directly and thus we could
> get the actual result of the last request.
>
> Would you mind we handle it like this ?

I like that, sounds better than adding a new qc type.

--
Jens Axboe