lkml.org 
[lkml]   [2023]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/4] blk-mq-tag: support queue filter in bt_tags_iter()
From
On 8/21/23 00:35, chengming.zhou@linux.dev wrote:
> @@ -417,7 +425,23 @@ static void __blk_mq_all_tag_iter(struct blk_mq_tags *tags,
> void blk_mq_all_tag_iter(struct blk_mq_tags *tags, busy_tag_iter_fn *fn,
> void *priv)
> {
> - __blk_mq_all_tag_iter(tags, fn, priv, BT_TAG_ITER_STATIC_RQS);
> + __blk_mq_all_tag_iter(tags, fn, priv, BT_TAG_ITER_STATIC_RQS, NULL);
> +}
> +
> +static void __blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,
> + busy_tag_iter_fn *fn, void *priv,
> + struct request_queue *q)
> +{
> + unsigned int flags = tagset->flags;
> + int i, nr_tags;
> +
> + nr_tags = blk_mq_is_shared_tags(flags) ? 1 : tagset->nr_hw_queues;
> +
> + for (i = 0; i < nr_tags; i++) {
> + if (tagset->tags && tagset->tags[i])
> + __blk_mq_all_tag_iter(tagset->tags[i], fn, priv,
> + BT_TAG_ITER_STARTED, q);
> + }
> }
>
> /**
> @@ -436,16 +460,7 @@ void blk_mq_all_tag_iter(struct blk_mq_tags *tags, busy_tag_iter_fn *fn,
> void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,
> busy_tag_iter_fn *fn, void *priv)
> {
> - unsigned int flags = tagset->flags;
> - int i, nr_tags;
> -
> - nr_tags = blk_mq_is_shared_tags(flags) ? 1 : tagset->nr_hw_queues;
> -
> - for (i = 0; i < nr_tags; i++) {
> - if (tagset->tags && tagset->tags[i])
> - __blk_mq_all_tag_iter(tagset->tags[i], fn, priv,
> - BT_TAG_ITER_STARTED);
> - }
> + __blk_mq_tagset_busy_iter(tagset, fn, priv, NULL);
> }
> EXPORT_SYMBOL(blk_mq_tagset_busy_iter);

One change per patch please. I think the introduction of __blk_mq_tagset_busy_iter()
should be a separate patch instead of happening in this patch.

Thanks,

Bart.

\
 
 \ /
  Last update: 2023-08-21 21:59    [W:0.083 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site