blk_put_queue(9)
π blk_put_queue β the blk_put_queue(9) glow-up π
Okay bestie, so this is a page from the Kernel API Manual and honestly? It's short, it's sweet, and it's iconic in its own lowkey way. Let's get into it π
β¨ NAME β¨
blk_put_queue β literally just decrements the request_queue refcount. That's the whole vibe. No cap. π«Ά
πΈ SYNOPSIS πΈ
void blk_put_queue (struct request_queue *q );
Bestie, look at that signature. It returns void β nothing comes back, it just happens. Main character energy fr fr. β¨
π¦ ARGUMENTS π¦
qβ therequest_queuestructure you're decrementing the refcount for. That's it, that's the whole argument. Give her a refcount and let her cook. π
π DESCRIPTION π
So here's the tea β: blk_put_queue decrements the refcount of the request_queue and then frees it when the refcount reaches 0.
That's it. That's the function. She said "I do one thing and I do it perfectly" and honestly? Slay. π
Like, think of the refcount as the queue's little support system β every put is one friend leaving the group chat, and when the count hits zero, the queue is officially free to go. Gone. Deallocated. Not me getting emotional about memory management π
No cap: this is the other half of the refcount story β there's a get that goes with it, and you'll find it down there in SEE ALSO if you want the full set π
π SEE ALSO π
Kernel file ./block/blk-core.c β that's where the magic lives, bestie ποΈ
And the whole friend group of related calls:
blk_queue_flag_set(9)blk_queue_flag_clear(9)blk_op_str(9)blk_sync_queue(9)blk_set_pm_only(9)blk_queue_enter(9)blk_get_queue(9)submit_bio_noacct(9)submit_bio(9)bio_poll(9)bio_start_io_acct(9)blk_lld_busy(9)blk_start_plug(9)blk_finish_plug(9)
iykyk β that's the whole block-layer squad right there. Go read blk_get_queue(9) next if you want the matching half of this refcount duo, it's giving complementary energies π§
Okay that's the page!! Shoutout to ./block for being the source and to October 2026 for the timestamp β this little manpage is dated and thriving, periodt πβπ
π¦ 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