[PATCH 4/8] blk-mq: pass a tagset to blk_mq_wait_quiesce_done

Ming Lei ming.lei at redhat.com
Thu Oct 20 18:46:33 PDT 2022


On Thu, Oct 20, 2022 at 12:56:04PM +0200, Christoph Hellwig wrote:
> Noting in blk_mq_wait_quiesce_done needs the request_queue now, so just
> pass the tagset, and move the non-mq check into the only caller that
> needs it.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
>  block/blk-mq.c           | 10 +++++-----
>  drivers/nvme/host/core.c |  4 ++--
>  drivers/scsi/scsi_lib.c  |  2 +-
>  include/linux/blk-mq.h   |  2 +-
>  4 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 4a81a2da43328..cf8f9f9a96c35 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -254,15 +254,15 @@ EXPORT_SYMBOL_GPL(blk_mq_quiesce_queue_nowait);
>  
>  /**
>   * blk_mq_wait_quiesce_done() - wait until in-progress quiesce is done
> - * @q: request queue.
> + * @set: tag_set to wait on
>   *
>   * Note: it is driver's responsibility for making sure that quiesce has
>   * been started.
>   */
> -void blk_mq_wait_quiesce_done(struct request_queue *q)
> +void blk_mq_wait_quiesce_done(struct blk_mq_tag_set *set)

The change is fine, but the interface could confuse people, it
looks like it is waiting for whole tagset quiesced, but it needs
to mark all request queues as quiesced first, otherwise it is just
wait for one specific queue's quiesce.

So suggest to document such thing.


Thanks,
Ming




More information about the Linux-nvme mailing list