gfs2_log_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ gfs2_log_write πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for gfs2_log_write(9) β€” this is a kernel function, a real one, and we're gonna get through it together, no cap 🫢


🌸 NAME 🌸

gfs2_log_write β€” write to log ✍️


πŸ¦‹ SYNOPSIS πŸ¦‹

void gfs2_log_write (struct gfs2_sbd *sdp , struct gfs2_jdesc *jd ,
struct page *page , unsigned size , unsigned offset , u64 blkno ,
blk_opf_t opf );

like literally just copy that signature, do not touch it, it's perfect the way it is πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • sdp β€” the filesystem, the whole vibe holder 🌈
  • jd β€” the journal descriptor (yes, the journal descriptor, lowkey important)
  • page β€” the page we're writing, the main character of this operation πŸ‘‘
  • size β€” how much data we're writing, in case you were wondering
  • offset β€” the offset within the page, iykyk, don't mix these two up
  • blkno β€” block number of the log entry, the address basically
  • opf β€” REQ_OP | op_flags, exactly like that, no notes

πŸ’– DESCRIPTION πŸ’–

so here's the whole situation. it tries to add the page segment to the current bio β€” that's the dream, that's the goal, slay ✨

but if that fails? not me being dramatic, but we have a fallback plan fr fr. it submits the current bio to the device, creates a new one, and then adds the page segment to that new bio instead. iconic behavior honestly οΏ½οΏ½

so: try the current bio β†’ if that doesn't work β†’ submit it β†’ make a new bio β†’ add the segment to the new one. periodt πŸ’€


⭐ SEE ALSO ⭐

Kernel file ./fs/gfs2/lops.c β€” go read it, it's giving lore 🧚

and the whole friend group:


okay that's the whole page bestie, you ate that πŸ“ and just so you know where all this came from: source is ./fs/gfs2, dated October 2026 β€” mwah, ily, go write some logs πŸ’œπŸ¦‹

πŸ“¦ where this page comes from