__bh_read_batch(9)
π __bh_read_batch β Kernel API Manual π
okay so bestie, this is the manual page for __bh_read_batch(9) and honestly it's giving "tiny function, big friend-group energy" πΈ like it doesn't do a million things, but what it does it does correctly, and we're gonna go through it together. grab a strawberry drink π and let's go.
β¨ NAME β¨
__bh_read_batch β submit read for a batch of unlocked buffers π
like, not one buffer. a whole batch. she's a group-chat girlie, she doesn't do solo DMs π«Ά
π¦ SYNOPSIS π¦
void __bh_read_batch (int nr , struct buffer_head *bhs[] , blk_opf_t
op_flags , bool force_lock );
four args, returns void, that's the whole vibe check π
π ARGUMENTS π
nrβ the entry number of the buffer batch, i.e. how many buffers you're throwing at her. count them, bestie, she trusts you π₯bhsβ a batch ofstruct buffer_head. yes, plural, it's an array, she's handling the whole squad at once β¨op_flagsβ the appendingREQ_OP_*flags besidesREQ_OP_READ. read is already implied, these are the lil extras you're stacking on top πforce_lockβ force to get a lock on the buffer if set; otherwise she drops any buffer that cannot lock. so:truemeans "bestie I need that lock, make it happen" andfalsemeans "no lock? no problem, we move on" π
π DESCRIPTION π
Returns zero on success or don't wait, and -EIO on error.
that's it. that's the whole description. no cap, the original is literally one line and I'm not gonna pad it out with lore that isn't there β zero means good (or "didn't wait"), -EIO means something went wrong on the I/O side π
π§ SEE ALSO π§
the whole ./fs/buffer.c family reunion, lowkey iconic π
kernel file ./fs/buffer.c, plus all these cuties:
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)bh_submit(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)
iykyk π
aaaand that's the page!! mwah π this one came out of ./fs in October 2026, so go hydrate and go read your buffers, bestie β slay periodt πβπ¦
π¦ 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