Skip to content

Commit fea5569

Browse files
bvanasscheaxboe
authored andcommitted
blk-mq: Fix more tag iteration function documentation
Commit 8ab30a3 ("blk-mq: Drop busy_iter_fn blk_mq_hw_ctx argument") removed the hctx argument from the callback functions called by bt_for_each() and blk_mq_queue_tag_busy_iter(). Commit 2dd6532 ("blk-mq: Drop 'reserved' arg of busy_tag_iter_fn") removed the 'reserved' argument of the busy_tag_iter_fn function pointer type. Bring the documentation of the tag iteration functions in sync with these changes. Cc: John Garry <[email protected]> Cc: Ming Lei <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent a3835a4 commit fea5569

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

block/blk-mq-tag.c

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,15 @@ static bool bt_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
297297
/**
298298
* bt_for_each - iterate over the requests associated with a hardware queue
299299
* @hctx: Hardware queue to examine.
300-
* @q: Request queue to examine.
300+
* @q: Request queue @hctx is associated with (@hctx->queue).
301301
* @bt: sbitmap to examine. This is either the breserved_tags member
302302
* or the bitmap_tags member of struct blk_mq_tags.
303303
* @fn: Pointer to the function that will be called for each request
304304
* associated with @hctx that has been assigned a driver tag.
305-
* @fn will be called as follows: @fn(@hctx, rq, @data, @reserved)
306-
* where rq is a pointer to a request. Return true to continue
307-
* iterating tags, false to stop.
308-
* @data: Will be passed as third argument to @fn.
305+
* @fn will be called as follows: @fn(rq, @data) where rq is a
306+
* pointer to a request. Return %true to continue iterating tags;
307+
* %false to stop.
308+
* @data: Will be passed as second argument to @fn.
309309
* @reserved: Indicates whether @bt is the breserved_tags member or the
310310
* bitmap_tags member of struct blk_mq_tags.
311311
*/
@@ -371,9 +371,9 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
371371
* @bt: sbitmap to examine. This is either the breserved_tags member
372372
* or the bitmap_tags member of struct blk_mq_tags.
373373
* @fn: Pointer to the function that will be called for each started
374-
* request. @fn will be called as follows: @fn(rq, @data,
375-
* @reserved) where rq is a pointer to a request. Return true
376-
* to continue iterating tags, false to stop.
374+
* request. @fn will be called as follows: @fn(rq, @data) where rq
375+
* is a pointer to a request. Return %true to continue iterating
376+
* tags; %false to stop.
377377
* @data: Will be passed as second argument to @fn.
378378
* @flags: BT_TAG_ITER_*
379379
*/
@@ -406,10 +406,9 @@ static void __blk_mq_all_tag_iter(struct blk_mq_tags *tags,
406406
* blk_mq_all_tag_iter - iterate over all requests in a tag map
407407
* @tags: Tag map to iterate over.
408408
* @fn: Pointer to the function that will be called for each
409-
* request. @fn will be called as follows: @fn(rq, @priv,
410-
* reserved) where rq is a pointer to a request. 'reserved'
411-
* indicates whether or not @rq is a reserved request. Return
412-
* true to continue iterating tags, false to stop.
409+
* request. @fn will be called as follows: @fn(rq, @priv) where rq
410+
* is a pointer to a request. Return %true to continue iterating
411+
* tags; %false to stop.
413412
* @priv: Will be passed as second argument to @fn.
414413
*
415414
* Caller has to pass the tag map from which requests are allocated.
@@ -485,11 +484,10 @@ EXPORT_SYMBOL(blk_mq_tagset_wait_completed_request);
485484
* blk_mq_queue_tag_busy_iter - iterate over all requests with a driver tag
486485
* @q: Request queue to examine.
487486
* @fn: Pointer to the function that will be called for each request
488-
* on @q. @fn will be called as follows: @fn(hctx, rq, @priv,
489-
* reserved) where rq is a pointer to a request and hctx points
490-
* to the hardware queue associated with the request. 'reserved'
491-
* indicates whether or not @rq is a reserved request.
492-
* @priv: Will be passed as third argument to @fn.
487+
* on @q. @fn will be called as follows: @fn(rq, @priv) where rq
488+
* is a pointer to a request and hctx points to the hardware queue
489+
* associated with the request.
490+
* @priv: Will be passed as second argument to @fn.
493491
*
494492
* Note: if @q->tag_set is shared with other request queues then @fn will be
495493
* called for all requests on all queues that share that tag set and not only

0 commit comments

Comments
 (0)