__jbd2_journal_erase(9)
π __jbd2_journal_erase β the kernel API manual, bestie edition β¨
Okay so welcome to __jbd2_journal_erase(9), the page where we literally wipe journal blocks clean. Grab a snack, this one's short and cute π
πΈ NAME πΈ
__jbd2_journal_erase β the function that discards or zeroouts journal blocks (and like, not the superblock, she's exempt, she's booked and busy, main character energy π)
β¨ SYNOPSIS β¨
int __jbd2_journal_erase (journal_t *journal , unsigned int flags );
That's the whole vibe. An int comes back, you hand her a journal_t *journal and an unsigned int flags, and she handles it π«Ά
π ARGUMENTS π
journalβ the journal to erase. That's the one. The target. The moment πflagsβ okay so a discard/zeroout request gets sent for each physically contigous region of the journal. (yes, that's how the original spells "contiguous" β we do not fix, we respect β) EitherJBD2_JOURNAL_FLUSH_DISCARDorJBD2_JOURNAL_FLUSH_ZEROOUTmust be set, because that's literally how she knows which operation to perform. No flag, no vibe check passed, bestie π
π₯ NOTE π₯
JBD2_JOURNAL_FLUSH_ZEROOUT attempts to use hardware offload. But if there's no hardware offload available, the zeroes get explicitly written anyway β so it still slays, just manually. See blkdev_issue_zeroout for more details π
Fr fr though: no hardware offload β no zeros. She writes them herself. Iconic behaviour, no cap.
π SEE ALSO π
Kernel file ./fs/jbd2/journal.c β and here's the whole friend group, all of them listed, all of them linked, all of them invited to the group chat ππ
jbd2_journal_force_commit_nested(9)jbd2_journal_force_commit(9)jbd2_journal_shrink_scan(9)jbd2_journal_shrink_count(9)jbd2_journal_init_dev(9)jbd2_journal_init_inode(9)jbd2_journal_update_sb_log_tail(9)jbd2_mark_journal_empty(9)jbd2_journal_update_sb_errno(9)jbd2_journal_load(9)jbd2_journal_destroy(9)jbd2_journal_check_used_features(9)jbd2_journal_check_available_features(9)jbd2_journal_set_features(9)jbd2_journal_flush(9)jbd2_journal_wipe(9)jbd2_journal_abort(9)jbd2_journal_errno(9)jbd2_journal_clear_err(9)jbd2_journal_ack_err(9)
That's the page, bestie, you ate ππ¦
Source: ./fs/jbd2 Β· Date: October 2026 Β· Doc name: __jbd2_journal_erase(9) β mwah, kiss kiss, go erase some blocks πβ¨
π¦ 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