gfs2_write_log_header(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, buckle up β€” this is gfs2_write_log_header, straight out of the Kernel API Manual, section 9, and it's lowkey one of those little functions that keeps your whole GFS2 journal from falling apart πŸ’–

✨ NAME ✨

gfs2_write_log_header β€” writes a journal log header buffer at lblock πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

void gfs2_write_log_header (struct gfs2_sbd *sdp , struct gfs2_jdesc *jd
, u64 seq , u32 tail , u32 lblock , u32 flags , blk_opf_t op_flags );

🌸 ARGUMENTS 🌸

Like, seven whole arguments, no cap β€” here's the vibe check on every single one:

  • sdp β€” the GFS2 superblock πŸ‘‘
  • jd β€” the journal descriptor of the journal we're writing into, iykyk πŸ““
  • seq β€” the sequence number πŸ”’
  • tail β€” the tail of the log 🐾
  • lblock β€” the value for lh_blkno, which is the block number relative to the start of the journal (so not the absolute block, bestie, don't get it twisted) πŸ’…
  • flags β€” the log header flags, the GFS2_LOG_HEAD_* ones 🚩
  • op_flags β€” flags to pass to the bio 🌊

⭐ RETURN ⭐

The initialized log buffer descriptor, periodt ✨

ok yes it says void up in the synopsis and then the RETURN section hands you a descriptor β€” that's just literally what the docs say, I'm not the one who wrote it, I'm just the messenger πŸ™ˆ

🧚 SEE ALSO 🧚

The kernel file lives at ./fs/gfs2/log.c if you wanna go read it in its natural habitat 🫢

And it's literally surrounded by the whole journaling friend group:


and that's the whole page, bestie β€” go write some log headers πŸ’œ

this little masterpiece ships from ./fs/gfs2, dated October 2026, slay πŸŽ€βœ¨

πŸ“¦ where this page comes from