Skip to content

Commit ab11fe5

Browse files
committed
blk-mq-tag: document tag iteration helper return value
Document the fact that the strategy function passed in can control whether to continue iterating or not. Suggested-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent ae87991 commit ab11fe5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

block/blk-mq-tag.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ static bool bt_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
248248
* @fn: Pointer to the function that will be called for each request
249249
* associated with @hctx that has been assigned a driver tag.
250250
* @fn will be called as follows: @fn(@hctx, rq, @data, @reserved)
251-
* where rq is a pointer to a request.
251+
* where rq is a pointer to a request. Return true to continue
252+
* iterating tags, false to stop.
252253
* @data: Will be passed as third argument to @fn.
253254
* @reserved: Indicates whether @bt is the breserved_tags member or the
254255
* bitmap_tags member of struct blk_mq_tags.
@@ -301,7 +302,8 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
301302
* or the bitmap_tags member of struct blk_mq_tags.
302303
* @fn: Pointer to the function that will be called for each started
303304
* request. @fn will be called as follows: @fn(rq, @data,
304-
* @reserved) where rq is a pointer to a request.
305+
* @reserved) where rq is a pointer to a request. Return true
306+
* to continue iterating tags, false to stop.
305307
* @data: Will be passed as second argument to @fn.
306308
* @reserved: Indicates whether @bt is the breserved_tags member or the
307309
* bitmap_tags member of struct blk_mq_tags.
@@ -326,7 +328,8 @@ static void bt_tags_for_each(struct blk_mq_tags *tags, struct sbitmap_queue *bt,
326328
* @fn: Pointer to the function that will be called for each started
327329
* request. @fn will be called as follows: @fn(rq, @priv,
328330
* reserved) where rq is a pointer to a request. 'reserved'
329-
* indicates whether or not @rq is a reserved request.
331+
* indicates whether or not @rq is a reserved request. Return
332+
* true to continue iterating tags, false to stop.
330333
* @priv: Will be passed as second argument to @fn.
331334
*/
332335
static void blk_mq_all_tag_busy_iter(struct blk_mq_tags *tags,
@@ -343,7 +346,8 @@ static void blk_mq_all_tag_busy_iter(struct blk_mq_tags *tags,
343346
* @fn: Pointer to the function that will be called for each started
344347
* request. @fn will be called as follows: @fn(rq, @priv,
345348
* reserved) where rq is a pointer to a request. 'reserved'
346-
* indicates whether or not @rq is a reserved request.
349+
* indicates whether or not @rq is a reserved request. Return
350+
* true to continue iterating tags, false to stop.
347351
* @priv: Will be passed as second argument to @fn.
348352
*/
349353
void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,

0 commit comments

Comments
 (0)