gfs2_log_get_bio(9)
π 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β thebi_end_iocallback. 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:
gfs2_pin(9)gfs2_unpin(9)gfs2_end_log_write_bh(9)gfs2_end_log_write(9)gfs2_log_submit_write(9)gfs2_log_alloc_bio(9)gfs2_log_write(9)gfs2_log_write_bh(9)gfs2_log_write_page(9)gfs2_end_log_read(9)gfs2_jhead_folio_search(9)gfs2_jhead_process_page(9)gfs2_find_jhead(9)databuf_lo_before_commit(9)
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
- 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