blk_mq_queue_tag_busy_iter(9)
π blk_mq_queue_tag_busy_iter
okay so bestie, this is a page from the Kernel API Manual, and the function we're stanning today is blk_mq_queue_tag_busy_iter β it iterates over all requests with a driver tag. that's the whole vibe. let's get into it β¨
πΈ NAME πΈ
blk_mq_queue_tag_busy_iter β iterate over all requests with a driver tag π
π¦ SYNOPSIS π¦
void blk_mq_queue_tag_busy_iter (struct request_queue *q ,
busy_tag_iter_fn *fn , void *priv );
like, that's the whole signature. no cap, that's it π₯
β¨ ARGUMENTS β¨
qβ the request queue you wanna examine, bestie. that's the one you're looking at πfnβ a pointer to the function that's gonna get called for each request onq. and here's the thing βfngets called like this:fn(rq, priv), whererqis a pointer to a request andhctxpoints to the hardware queue associated with the request. iykyk π«Άprivβ this one is literally just gonna get passed as the second argument tofn. that's its whole job. king behavior honestly π
π NOTE π
okay so this is the important part, don't skip it π 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. so like, it's giving "surprise, you got more than you asked for" energy. be aware, bestie π
fr fr, re-read that one if you're sharing a tag set, because your callback is gonna be doing laps around queues you didn't even mention π
π SEE ALSO π
kernel file ./block/blk-mq-tag.c plus these iconic lil functions:
bt_for_each(9)bt_tags_for_each(9)blk_mq_all_tag_iter(9)blk_mq_tagset_busy_iter(9)blk_mq_tagset_wait_completed_request(9)blk_mq_unique_tag(9)
go read them, they're literally all related, periodt β
and that's the page, bestie π this came to you from ./block, dated October 2026, in the manual section blk_mq_queue_tag_busy_iter(9) β slay, go iterate some tags ππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms