gfs2_log_commit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« gfs2_log_commit(9) πŸ’«

okay so this is a page straight outta the Kernel API Manual, and it's all about one little function that does a very important job β€” committing your transaction to the log. no cap, it's giving main character energy in fs/gfs2/log.c. πŸŽ€


✨ NAME ✨

gfs2_log_commit β€” literally just: Commit a transaction to the log. that's it. that's the vibe. πŸ’…


🌸 SYNOPSIS 🌸

void gfs2_log_commit (struct gfs2_sbd *sdp , struct gfs2_trans *tr );

bestie it returns void, so don't go looking for a return value, there isn't one. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sdp β€” the filesystem. yes, the whole entire filesystem, wrapped up in a struct gfs2_sbd. iconic.
  • tr β€” the transaction. the thing you're committing. the moment. ⭐

πŸ”₯ DESCRIPTION πŸ”₯

so here's what actually goes down: we wake up gfs2_logd if either of these two things happens πŸ‘‘

  • the number of pinned blocks exceeds thresh1, or
  • the total number of used blocks β€” which is pinned blocks plus AIL blocks, don't forget the AIL part β€” is greater than thresh2.

and where do those thresholds come from? at mount time, that's when they get set:

  • thresh1 is 2/5ths of journal size πŸ“
  • thresh2 is 4/5ths of journal size 🌈

so like… 40% and 80%, basically. the logd gets poked awake before things get too crowded. very mindful, very demure of it ngl.


πŸ’œ RETURN πŸ’œ

errno β€” that's what the original says, and I'm not gonna lie to you about it. that's the answer. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file lives at ./fs/gfs2/log.c, and it comes with a whole friend group of functions, so let's introduce them all, no one gets left out πŸ™ˆ:

like, that's the whole group chat right there. iykyk. πŸ’–


aaaand that's the page!! sourced from ./fs/gfs2, dated October 2026, and filed under gfs2_log_commit(9) β€” mwah, sending you off with a kiss and a clean log πŸ§šπŸ’…πŸŒΈ

πŸ“¦ where this page comes from