[PATCHv2 01/10] blk-mq: Wake tasks entering queue on dying

Jens Axboe axboe at fb.com
Wed Jan 7 08:18:56 PST 2015


On 01/06/2015 07:57 PM, Keith Busch wrote:
> When the queue is set to dying, wake up tasks that are waiting on frozen
> queue so they realize it is dying and abandon their request.
>
> Signed-off-by: Keith Busch <keith.busch at intel.com>
> ---
>   block/blk-mq.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 1a41d7a..6d83ee6 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -160,6 +160,7 @@ void blk_mq_wake_waiters(struct request_queue *q)
>   	queue_for_each_hw_ctx(q, hctx, i)
>   		if (blk_mq_hw_queue_mapped(hctx))
>   			blk_mq_tag_wakeup_all(hctx->tags, true);
> +	wake_up_all(&q->mq_freeze_wq);
>   }
>
>   bool blk_mq_can_queue(struct blk_mq_hw_ctx *hctx)

That looks sane, thanks.

-- 
Jens Axboe




More information about the Linux-nvme mailing list