jbd2_journal_flush(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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. the journal_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 🫢:

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