bh_submit(9)
π bh_submit(9) β like, the buffer head I/O starter pack
okay bestie, so this is a kernel API manual page, section 9 (that's the kernel API section, iykyk), and the star of the show is bh_submit. grab a snack, we're doing I/O π
β¨ NAME β¨
bh_submit β start I/O against a buffer head. that's it, that's the vibe π¦
β¨ SYNOPSIS β¨
void bh_submit (struct buffer_head *bh , blk_opf_t opf , bio_end_io_t
end_io );
like, it returns void, so don't go looking for a return value, there isn't one, periodt π
β¨ ARGUMENTS β¨
bhβ the buffer head you're doing the I/O on. this is literally the main character of the whole function πopfβ the operation and flags for the bio. all the "what are we even doing here" energy lives in this one πend_ioβ the routine that gets called when the I/O has completed. your little callback bestie that shows up once the work is done π«Ά
β¨ DESCRIPTION β¨
so here's the tea π β if you need to do I/O on an individual bh, instead of letting the page cache do the I/O on the folio that it's in, then you call this function. that's the whole thing. no cap, that's the entire description, and honestly? iconic. short, sweet, slays π
lowkey important: it's bh on its own, not the folio it lives inside. keep that distinction in your head, bestie, it's giving main character energy πΈ
β¨ SEE ALSO β¨
all the related lore, straight from the kernel files under ./fs/buffer.c β go read these next, they're the friend group π§
bio_endio_bh(9)end_buffer_read_sync(9)bh_end_read(9)bh_end_write(9)bh_end_async_write(9)mmb_sync(9)block_dirty_folio(9)mark_buffer_dirty(9)__brelse(9)__bforget(9)bdev_getblk(9)__bread_gfp(9)block_invalidate_folio(9)clean_bdev_aliases(9)try_to_free_buffers(9)bh_uptodate_or_lock(9)__bh_read(9)__bh_read_batch(9)
and that's the page, bestie!! π this one's from the ./fs corner of the kernel, dated October 2026 β so go forth, submit that buffer head I/O, and 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