gfs2_log_get_bio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– gfs2_log_get_bio(9) πŸ’–

okay so bestie, welcome to the glow-up of the Kernel API Manual page for gfs2_log_get_bio β€” yes that's the man page name, and yes we're gonna get into it. this is the function that's like "hey, do we already have a bio lying around or do we need a fresh one?" and honestly? it's giving logistics queen. πŸŽ€


✨ NAME ✨

gfs2_log_get_bio β€” get a cached log bio, or allocate a brand new one if there isn't one (fr fr, that's literally the whole vibe)


🌸 SYNOPSIS 🌸

struct bio * gfs2_log_get_bio (struct gfs2_sbd *sdp , u64 blkno , struct
bio **biop , blk_opf_t opf , bio_end_io_t *end_io , bool flush );

like look at that signature. six whole arguments. main character energy honestly πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sdp β€” the super block. yeah, that super block. your fave. πŸ’œ
  • blkno β€” the device block number we're trying to write to, i.e. the destination. know where you're going, bestie.
  • biop β€” the bio to get or allocate. it's a double pointer so it can hand you back the bio it found or made.
  • opf β€” REQ_OP | op_flags. that's the operation and its flags, mashed together with a bitwise or. iconic combo.
  • end_io β€” the bi_end_io callback. the little function that gets called when the I/O finishes. the afterparty, if you will. πŸŽ‰
  • flush β€” always flush the current bio and allocate a new one? yes/no. simple as that. true means "nah we're done with the old one, gimme fresh". πŸ™ˆ

⭐ DESCRIPTION ⭐

okay so here's the tea β˜•:

if there is a cached bio, then we check whether the next block number is sequential with the previous one β€” and if it is, we just return it. easy. slay. πŸ’…

but if it's not sequential? we flush the bio to the device. bye bestie, go write yourself to disk. πŸ¦‹

and if there's no cached bio at all, or we just flushed it in the previous step? then we allocate a new one. fresh bio, new era, periodt. ✨


πŸ”₯ RETURN πŸ”₯

the bio to use for log writes. that's it. that's the return value. go write your log, queen. πŸ‘‘


🌈 SEE ALSO 🌈

kernel file ./fs/gfs2/lops.c and also these absolute legends:

go read them. iykyk. 🫢


lowkey reminder that this whole page lives under ./fs/gfs2 in the kernel tree β€” that's the source, bestie, don't lose it πŸ’€

and that's the page!! brought to you by the ./fs/gfs2 source, the October 2026 date, and the manual entry gfs2_log_get_bio(9) β€” mwah, drink water, and may all your bios be sequential πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from