Re: [PATCH v5 2/6] block: wire-up support for passthrough plugging

Ming Lei
2022-05-12T08:44:51Z

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().

Thanks,
Ming