STRUCT BLK_MQ_CTX(9)
π struct blk_mq_ctx(9) π
okay so this is from the Kernel API Manual, bestie β deep lore from the block layer, and you're gonna get it, i promise π«Ά
β¨ NAME β¨
struct blk_mq_ctx β the state for a software queue that faces the submitting CPUs π«
like, that's literally its whole job description. software queue. facing the CPUs that submit. state. that's the vibe π
π¦ SYNOPSIS π¦
here's the whole shape of it, character for character, no cap:
struct blk_mq_ctx {
struct {
spinlock_t lock;
struct list_head rq_lists[HCTX_MAX_TYPES];
};
unsigned int cpu;
unsigned short index_hw[HCTX_MAX_TYPES];
struct blk_mq_hw_ctx *hctxs[HCTX_MAX_TYPES];
struct request_queue *queue;
struct blk_mq_ctxs *ctxs;
struct kobject kobj;
};
look at that anonymous little nested struct just vibing at the top with its lock and its rq_lists[HCTX_MAX_TYPES] β main character energy fr fr πΈ
π Members π
{unnamed_struct}β anonymous π that's it, that's the entry. it's anonymous, it has no name, it simply is. iconic.
π₯ SEE ALSO π₯
- the kernel file
./block/blk-mq.hβ go read it, iykyk π
ngl bestie, everything you need is right here in this struct β don't go inventing extra fields, the source of truth is the source π§
that's the whole page!! π and for the receipts: it comes to you from ./block, dated October 2026, and the page is struct blk_mq_ctx(9). slay, go touch some block layer β¨π
π¦ 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