blk_mq_submit_bio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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


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