Re: [PATCH v2] blk-mq: Fix stall due to recursive flush plug
From: Jens Axboe
Date: Fri Jul 14 2023 - 15:44:51 EST
On Fri, 14 Jul 2023 11:11:06 +0100, Ross Lagerwall wrote:
> We have seen rare IO stalls as follows:
>
> * blk_mq_plug_issue_direct() is entered with an mq_list containing two
> requests.
> * For the first request, it sets last == false and enters the driver's
> queue_rq callback.
> * The driver queue_rq callback indirectly calls schedule() which calls
> blk_flush_plug(). This may happen if the driver has the
> BLK_MQ_F_BLOCKING flag set and is allowed to sleep in ->queue_rq.
> * blk_flush_plug() handles the remaining request in the mq_list. mq_list
> is now empty.
> * The original call to queue_rq resumes (with last == false).
> * The loop in blk_mq_plug_issue_direct() terminates because there are no
> remaining requests in mq_list.
>
> [...]
Applied, thanks!
[1/1] blk-mq: Fix stall due to recursive flush plug
commit: 70904263512a74a3b8941dd9e6e515ca6fc57821
Best regards,
--
Jens Axboe