jbd2_mark_journal_empty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… jbd2_mark_journal_empty(9) β€” a Kernel API Manual moment πŸŽ€

okay so bestie, welcome to the Kernel API Manual ✨ and today's main character is literally a function that tells the whole filesystem "yeah the journal? empty. nothing in it. we're clean." iconic behavior tbh 🫢


🌸 NAME 🌸

jbd2_mark_journal_empty β€” Mark on disk journal as empty. no cap, that's the whole vibe πŸ’–


✨ SYNOPSIS ✨

void jbd2_mark_journal_empty (journal_t *journal , blk_opf_t write_flags
);

it returns void btw β€” it does the thing and dips, no receipts 😌


πŸ¦‹ ARGUMENTS πŸ¦‹

  • journal β€” The journal to update. this is the one getting the glow-up πŸ’…
  • write_flags β€” Flags for the journal sb write operation. yk, the superblock write config πŸŽ€

πŸ’œ DESCRIPTION πŸ’œ

so what does it actually do? it updates a journal's dynamic superblock fields to show that the journal is empty 🧚 lowkey important, highkey cute.

then it writes that updated superblock to disk, and β€” and this is the part that matters β€” it waits for IO to complete 😭 like it's not just fire-and-forget, it's committed to the bit. it sits there until the write actually lands. main character energy fr fr πŸ’€βœ¨


🌈 SEE ALSO 🌈

the source lives in the kernel file ./fs/jbd2/journal.c πŸ“ and here's the whole friend group of sibling functions, all of them serving πŸ’…:


bestie reminder: this page is filed under ./fs/jbd2, dated October 2026, and it's officially jbd2_mark_journal_empty(9) β€” iykyk πŸ’–βœ¨ go forth and mark things empty, queen πŸ‘‘πŸ¦‹
πŸ“¦ where this page comes from