blk_mq_queue_tag_busy_iter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 on q. and here's the thing β€” fn gets called like this: fn(rq, priv), where rq is a pointer to a request and hctx points to the hardware queue associated with the request. iykyk 🫢
  • priv β€” this one is literally just gonna get passed as the second argument to fn. 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:

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