blk_mq_unique_tag(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ blk_mq_unique_tag(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… this one's a lil function called blk_mq_unique_tag and honestly? it's giving "tiny function, big responsibility." let's get into it 🫢


🌸 NAME 🌸

blk_mq_unique_tag β€” return a tag that is unique queue-wide πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

u32 blk_mq_unique_tag (struct request *rq );

⭐ ARGUMENTS ⭐

  • rq β€” the request you want a unique tag computed for, like "here's my request, pls give me a tag bestie" πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

Okay so here's the vibe check πŸ‘‘ the tag field inside struct request is unique per hardware queue, but not across all hardware queues β€” which is lowkey a problem if you need a tag that's actually unique everywhere, y'know? 😭

So this function exists fr fr: it returns a tag where the hardware context index lives in the upper bits and the per hardware queue tag sits in the lower bits. Upper bits + lower bits = one iconic, queue-wide unique tag periodt πŸ’…βœ¨


πŸŽ€ NOTE πŸŽ€

Heads up bestie 🫢 when you call this for a request that's queued on a non-multiqueue request queue, the hardware context index gets set to zero. No cap, that's just how it is πŸ’€


🌈 SEE ALSO 🌈

Kernel file ./block/blk-mq-tag.c plus all these besties:


and that's the whole page, you ate that πŸ“πŸ’œ this lil gem lives under ./block in the source, dated October 2026, and it's part of the blk_mq_unique_tag(9) manual β€” go forth and tag things uniquely, queen πŸ‘‘πŸ’…

πŸ“¦ where this page comes from