gfs2_log_commit(9)
π« 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 astruct 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:
thresh1is 2/5ths of journal size πthresh2is 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 π:
gfs2_struct2blk(9)gfs2_remove_from_ail(9)gfs2_ail1_start_one(9)gfs2_ail1_flush(9)gfs2_ail1_start(9)gfs2_ail1_empty_one(9)gfs2_ail1_empty(9)gfs2_log_is_empty(9)gfs2_log_release_revokes(9)gfs2_log_release(9)__gfs2_log_try_reserve(9)__gfs2_log_reserve(9)gfs2_log_try_reserve(9)gfs2_log_reserve(9)log_distance(9)calc_reserved(9)gfs2_flush_revokes(9)gfs2_write_log_header(9)log_write_header(9)gfs2_ail_drain(9)empty_ail1_list(9)gfs2_trans_drain(9)__gfs2_log_flush(9)gfs2_merge_trans(9)gfs2_log_shutdown(9)gfs2_logd(9)
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
- 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