gfs2_log_write(9)
β¨ 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 wonderingoffsetβ the offset within the page, iykyk, don't mix these two upblknoβ block number of the log entry, the address basicallyopfβ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:
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_get_bio(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)
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
- 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