[PATCH v5 2/6] block: wire-up support for passthrough plugging
Jens Axboe
axboe at kernel.dk
Thu May 12 05:31:18 PDT 2022
On 5/12/22 2:44 AM, Ming Lei wrote:
> On Thu, May 12, 2022 at 10:09:12AM +0200, Christoph Hellwig wrote:
>> On Thu, May 12, 2022 at 01:25:24PM +0800, Ming Lei wrote:
>>> This way may cause nested plugging, and breaks xfstests generic/131.
>>> Also may cause io hang since request can't be polled before flushing
>>> plug in blk_execute_rq().
>>
>> Looking at this again, yes blk_mq_request_bypass_insert is probably the
>> wrong place.
>>
>>> I'd suggest to apply the plug in blk_execute_rq_nowait(), such as:
>>
>> Do we really need the use_plug parameter and the extra helper? If
>> someone holds a plug over passthrough command submission I think
>> we can assume they actually do want to use it. Otherwise this does
>> indeed look like the better plan.
>
> use_plug is just for avoiding hang in blk_rq_poll_completion(), so
> I think we can bypass plug if one polled rq is executed inside
> blk_execute_rq().
Agree, and good catch. Do you want to send out a patch for this?
--
Jens Axboe
More information about the Linux-nvme
mailing list