__bh_read_batch(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __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 of struct buffer_head. yes, plural, it's an array, she's handling the whole squad at once ✨
  • op_flags β€” the appending REQ_OP_* flags besides REQ_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: true means "bestie I need that lock, make it happen" and false means "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:

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