jbd2_journal_wipe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« jbd2_journal_wipe(9) πŸ’«

okay bestie, buckle up, we're in the kernel API manual rn β€” this is a page from the Kernel API Manual, and no cap it's actually kind of a big deal πŸŽ€


✨ NAME ✨

jbd2_journal_wipe β€” wipe journal contents, like, the whole thing πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int jbd2_journal_wipe (journal_t *journal , int write );

🌸 ARGUMENTS 🌸

  • journal β€” the journal you're acting on. main character, literally.
  • write β€” a flag, and bestie the details are right below πŸ‘‡

πŸ’– DESCRIPTION πŸ’–

So what this does is wipe out all of the contents of a journal. Safely. Iconic behavior honestly.

The way that it also produces a warning if the journal contains any valid recovery information. so like, heads up 🫢

🚨 fr fr: this must be called between journal_init_*() and jbd2_journal_load. don't be out here calling it whenever, that's not the vibe.

And here's the tea on the write flag:

  • If write is non-zero, then we wipe out the journal on disk. like, actually gone, on the disk, periodt.
  • Otherwise β€” if it's zero β€” we merely suppress recovery. way more chill, lowkey.

🌈 SEE ALSO 🌈

Kernel file ./fs/jbd2/journal.c πŸ’€ (yes, the whole file, she's listed)

like, the whole friend group, fr fr πŸ”₯


mwah πŸ’‹ that's the page! brought to you by ./fs/jbd2, dated October 2026, and yes the title at the top and bottom is jbd2_journal_wipe(9) the whole way through β€” iykyk πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from