jbd2_journal_flush(9)
π jbd2_journal_flush(9) π
okay so bestie, welcome to the jbd2_journal_flush(9) page β that's the kernel API manual vibe, and honestly? it's a good one. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
jbd2_journal_flush β Flush journal. that's it, that's the whole name. iconic, concise, no notes. π
π¦ SYNOPSIS π¦
int jbd2_journal_flush (journal_t *journal , unsigned int flags );
like, look at her. two args, returns an int. main character energy fr fr. π
π ARGUMENTS π
journalβ the journal you're acting on. that's your girl. thejournal_t *you're flushing. πflagsβ optional operation on the journal blocks after the flush (see below π). yes, "after". order matters, bestie.
π₯ DESCRIPTION π₯
so what does she actually do? she flushes all data for a given journal to disk and then empties the journal. like a full reset of the vibe check on that journal. β¨
filesystems can use this when they're remounting readonly β the whole point is to make sure that recovery does not need to happen on remount. no surprise recoveries, no drama, we're not doing that today. π
and optionally, you can have a discard or a zeroout issued on the journal blocks after flushing. your choice, your moment.
now the flags themselves, because these are the actual keys to the kingdom:
JBD2_JOURNAL_FLUSH_DISCARDβ issues discards for the journal blocks π₯JBD2_JOURNAL_FLUSH_ZEROOUTβ issues zeroouts for the journal blocks πΈ
that's the whole flag menu. two options. both slay. pick your fighter. π
π SEE ALSO π
kernel file ./fs/jbd2/journal.c β and honestly the whole friend group shows up here, so let me list every single one because I refuse to leave anyone out π«Ά:
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_erase(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_wipe(9)jbd2_journal_abort(9)jbd2_journal_errno(9)jbd2_journal_clear_err(9)jbd2_journal_ack_err(9)
the whole squad. no cap. π
aaaand that's the page!! π this one came from ./fs/jbd2, dated October 2026, and it's literally titled jbd2_journal_flush(9) β so if you forget what you just read, the header and the footer both have you covered. mwah πβ¨
π¦ 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