blk_mq_submit_bio(9)
π blk_mq_submit_bio(9) β the kernel API manual, bestie edition
Okay so bestie, welcome to the blk_mq_submit_bio(9) page β¨ β this is the kernel doc for the one function that takes your bio and actually yeets it toward a block device. Buckle up, it's short but it matters. π«Ά
π SYNOPSIS
void blk_mq_submit_bio (struct bio *bio );
πΈ ARGUMENTS
bioβ Bio pointer. That's it, that's the whole argument. One (1) pointer, and it's pointing at a bio. Iconic minimalism honestly. β¨
π DESCRIPTION
So what it does: it builds up a request structure from q and bio, and sends it off to the device. Main character energy π.
But β and this is the part where you need to pay attention, no cap β the request may not be queued directly to hardware if:
- This request can be merged with another one π
- We want to place request at plug queue for possible future merging π§
- There is an IO scheduler active at this queue π¦
And like, it also will not queue the request if there is an error with the bio, or at the request creation. So if the bio's cooked, nothing goes anywhere. π
ngl the merge/plug/scheduler thing is lowkey the whole personality of this function β sometimes "submit" means "hand to hardware right now" and sometimes it absolutely does not. Read the three bullets, love them, memorize them. π
π SEE ALSO
Kernel file ./block/blk-mq.c
blk_mq_wait_quiesce_done(9)blk_mq_quiesce_queue(9)blk_update_request(9)blk_mq_complete_request(9)blk_mq_start_request(9)blk_execute_rq_nowait(9)blk_execute_rq(9)blk_mq_delay_run_hw_queue(9)blk_mq_run_hw_queue(9)blk_mq_run_hw_queues(9)blk_mq_delay_run_hw_queues(9)blk_mq_request_bypass_insert(9)blk_mq_try_issue_directly(9)blk_insert_cloned_request(9)blk_rq_unprep_clone(9)blk_rq_prep_clone(9)blk_mq_destroy_queue(9)
and that's the page, bestie π go forth and submit those bios β¨
Sign-off time, fr fr: this one lives in ./block, and the date on it is October 2026. Slay. π
π¦ 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