bio_poll(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ bio_poll(9) ✨

okay so this is a page from the Kernel API Manual β€” it's bio_poll(9), bestie, and honestly it's shorter than my attention span so we can absolutely do this together 🫢


🌸 NAME 🌸

bio_poll β€” literally just poll for BIO completions, that's the whole vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int bio_poll (struct bio *bio , struct io_comp_batch *iob , unsigned int
flags );

that's the function signature, copy it exactly, no notes πŸŽ€


πŸ’– ARGUMENTS πŸ’–

  • bio β€” the bio you're polling for, the main character of this whole operation πŸ‘‘
  • iob β€” batches of IO, like a little group chat of IO instead of one-at-a-time DMs
  • flags β€” the BLK_POLL_* flags that control the behavior, aka the settings that decide how this thing acts 🌈

⭐ DESCRIPTION ⭐

So what does it do? It polls for completions on the queue associated with the bio πŸ”₯ And it returns the number of completed entries found β€” that's your count, bestie, no guessing πŸ’€


πŸŽ€ NOTE πŸŽ€

okay this part actually matters, pay attention fr fr 😭 the caller must either be the context that submitted bio, or be in a RCU critical section to prevent freeing of bio. those are your two options, there is no third option, do not invent one πŸ™ˆ

🌈 SEE ALSO 🌈

everything else in the family, gathered here for you 🧚:

Kernel file ./block/blk-core.c: blk_queue_flag_set(9), blk_queue_flag_clear(9), blk_op_str(9), blk_sync_queue(9), blk_set_pm_only(9), blk_put_queue(9), blk_queue_enter(9), blk_get_queue(9), submit_bio_noacct(9), submit_bio(9), bio_start_io_acct(9), blk_lld_busy(9), blk_start_plug(9), blk_finish_plug(9)


and that's the page!! πŸ’œ this one came out of ./block β€” dated October 2026, filed under bio_poll(9) β€” slay, you read the whole thing, I'm obsessed πŸ“βœ¨

πŸ“¦ where this page comes from