blk-mq: fix passthrough plugging
authorMing Lei <ming.lei@redhat.com>
Thu, 12 May 2022 14:00:10 +0000 (22:00 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 May 2022 14:45:39 +0000 (08:45 -0600)
commita327c341dc65e38af7a2398e7313e6f2c4a813db
tree81e27ebc624f83d86c06b5c3c1b960fcd348e7d9
parentf569add47119fa910ed7711b26b8d38e21f7ea77
blk-mq: fix passthrough plugging

First we can't add request into plug list in blk_mq_request_bypass_insert
which may be called when flushing plug list, so nested plug is caused.

Second if polled passthrough request is inserted via blk_execute_rq(),
it can't be added to plug list too since io polling needs the request
to be issued to driver.

Fixes the two by moving plugging into blk_execute_rq_no_wait().

Cc: Christoph Hellwig <hch@lst.de>
Fixes: 1c2d2fff6dc0 ("block: wire-up support for passthrough plugging")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220512140010.1458645-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c