bsg_queue_rq(9)
πΈ bsg_queue_rq(9) πΈ
ok so bestie, we're diving into the Kernel API Manual today and this one is literally the generic handler for bsg requests π it's short, it's sweet, it's giving "small function, big job" and honestly? obsessed.
β¨ NAME β¨
bsg_queue_rq β the generic handler for bsg requests π«Ά like that's her whole thing, that's the vibe.
π¦ SYNOPSIS π¦
blk_status_t bsg_queue_rq (struct blk_mq_hw_ctx *hctx , const struct blk_mq_queue_data *bd );
copy it exactly like that, no cap β return type blk_status_t, two args, go off π
π ARGUMENTS π
hctxβ the hardware queue π that's it, that's the whole description, she's a simple iconbdβ the queue data π again, minimal queen, no notes
π₯ DESCRIPTION π₯
ok so here's the tea, and this part is IMPORTANT so like, pay attention bestie:
On error, the create_bsg_job function should return a -Exyz error value, and that value gets set to ->result. periodt. π that's literally how the error info travels, so like don't be out here returning random nonsense, okay?
also β drivers/subsys should pass this to the queue init function. that's not a suggestion, that's the assignment, fr fr π
β SEE ALSO β
go touch these if you wanna keep the lore going, iykyk:
- Kernel file
./block/bsg-lib.cπ bsg_teardown_job(9)bsg_job_done(9)bsg_complete(9)bsg_prepare_job(9)bsg_setup_queue(9)
and that's the whole page bestie, told you it was a short one π§π it lives over in ./block, it's dated October 2026, and the page is bsg_queue_rq(9) β slay, bye πβ¨
π¦ 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