diff mbox series

[v2,6/6] blk-mq-tag: fix blk_mq_queue_tag_busy_iter() documentation

Message ID 20230823090441.3986631-7-chengming.zhou@linux.dev (mailing list archive)
State New, archived
Headers show
Series blk-mq-tag: remove bt_for_each() | expand

Commit Message

Chengming Zhou Aug. 23, 2023, 9:04 a.m. UTC
From: Chengming Zhou <zhouchengming@bytedance.com>

The blk_mq_queue_tag_busy_iter() is only used to iterate over reqeusts
of the specified queue, fix the documentation. And add documentation
for the new added parameter @q.

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
 block/blk-mq-tag.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bart Van Assche Aug. 23, 2023, 2:46 p.m. UTC | #1
On 8/23/23 02:04, chengming.zhou@linux.dev wrote:
> diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
> index 087ea6b232f6..69b156750559 100644
> --- a/block/blk-mq-tag.c
> +++ b/block/blk-mq-tag.c
> @@ -312,6 +312,7 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
>    *		tags, false to stop.
>    * @data:	Will be passed as second argument to @fn.
>    * @flags:	BT_TAG_ITER_*
> + * @q:		Only iterate over requests of this queue.
>    */

Please integrate this change in patch 2/6 since the argument 'q' is added by that
patch.

> @@ -432,8 +433,7 @@ EXPORT_SYMBOL(blk_mq_tagset_wait_completed_request);
>    * @priv:	Will be passed as second argument to @fn.
>    *
>    * Note: if @q->tag_set is shared with other request queues then @fn will be
> - * called for all requests on all queues that share that tag set and not only
> - * for requests associated with @q.
> + * called only for requests associated with @q.
>    */
>   void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_tag_iter_fn *fn,
>   		void *priv)

Please consider adding the following to this change:

Fixes: c7b1bf5cca76 ("blk-mq: Document the functions that iterate over requests")
Chengming Zhou Aug. 23, 2023, 3:03 p.m. UTC | #2
On 2023/8/23 22:46, Bart Van Assche wrote:
> On 8/23/23 02:04, chengming.zhou@linux.dev wrote:
>> diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
>> index 087ea6b232f6..69b156750559 100644
>> --- a/block/blk-mq-tag.c
>> +++ b/block/blk-mq-tag.c
>> @@ -312,6 +312,7 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
>>    *        tags, false to stop.
>>    * @data:    Will be passed as second argument to @fn.
>>    * @flags:    BT_TAG_ITER_*
>> + * @q:        Only iterate over requests of this queue.
>>    */
> 
> Please integrate this change in patch 2/6 since the argument 'q' is added by that
> patch.

Ok, right.

> 
>> @@ -432,8 +433,7 @@ EXPORT_SYMBOL(blk_mq_tagset_wait_completed_request);
>>    * @priv:    Will be passed as second argument to @fn.
>>    *
>>    * Note: if @q->tag_set is shared with other request queues then @fn will be
>> - * called for all requests on all queues that share that tag set and not only
>> - * for requests associated with @q.
>> + * called only for requests associated with @q.
>>    */
>>   void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_tag_iter_fn *fn,
>>           void *priv)
> 
> Please consider adding the following to this change:
> 
> Fixes: c7b1bf5cca76 ("blk-mq: Document the functions that iterate over requests")
> 

Ok, will update.

Thanks!
diff mbox series

Patch

diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 087ea6b232f6..69b156750559 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -312,6 +312,7 @@  static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
  *		tags, false to stop.
  * @data:	Will be passed as second argument to @fn.
  * @flags:	BT_TAG_ITER_*
+ * @q:		Only iterate over requests of this queue.
  */
 static void bt_tags_for_each(struct blk_mq_tags *tags, struct sbitmap_queue *bt,
 			     busy_tag_iter_fn *fn, void *data, unsigned int flags,
@@ -432,8 +433,7 @@  EXPORT_SYMBOL(blk_mq_tagset_wait_completed_request);
  * @priv:	Will be passed as second argument to @fn.
  *
  * Note: if @q->tag_set is shared with other request queues then @fn will be
- * called for all requests on all queues that share that tag set and not only
- * for requests associated with @q.
+ * called only for requests associated with @q.
  */
 void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_tag_iter_fn *fn,
 		void *priv)