jbd2_journal_abort(9)
β¨ NAME β¨
jbd2_journal_abort β shut the journal down immediately, like right now, no warning, bye π
πΈ SYNOPSIS πΈ
void jbd2_journal_abort (journal_t *journal , int errno );
π ARGUMENTS π
journalβ the journal you're about to shut down, bestie. like the actual one, hand it over π«Άerrnoβ an error number that gets recorded in the journal so everyone knows why we slammed the brakes. receipts, basically π§Ύ
π DESCRIPTION π
okay so this one is serious. jbd2_journal_abort performs a complete, immediate shutdown of the ENTIRE journal β not one single transaction, the whole thing. and likeβ¦ this cannot be undone unless you close the journal and reopen it. no take-backs. none. π
the whole point of this function is to back up higher-level error recovery stuff, for example the ext2/ext3 remount-readonly error mode. it's giving "the grown-ups will handle it from here" energy.
journal abort has very specific semantics, and you need to know them:
- any existing dirty, unjournaled buffers chillin' in the main filesystem will still get written to disk by
bdflushβ but the journaling mechanism itself is suspended immediately, and no further transaction commits will be honoured. periodt. - any dirty, journaled buffers get written back to disk without hitting the journal. atomicity cannot be guaranteed on an aborted filesystem β but we _do_ attempt to leave as much data as possible behind so
fsckcan use it for cleanup. doing the most for the cleanup crew fr fr π§ - any attempt to grab a new transaction handle on a journal sitting in
ABORTstate just returns an-EROFSerror. that's it, that's the answer. - a
jbd2_journal_stopon an existing handle will return-EIOif we've entered abort state during the update. - recursive transactions are not disturbed by journal abort until the final
jbd2_journal_stop, which is the one that receives the-EIOerror. so they find out last. iconic, honestly. - finally,
jbd2_journal_abortlets the caller supply anerrnothat gets recorded (if possible) in the journal superblock. this means a client can record failure conditions in the middle of a transaction without having to complete that transaction just to get the failure onto disk.ext3_error, for example, now uses this functionality. slay π
β οΈ real talk: this is a full shutdown of the entire journal. no undo without closing and reopening. treat it accordingly, ok?
π¦ SEE ALSO π¦
Kernel file ./fs/jbd2/journal.c β and all her friends:
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_flush(9)jbd2_journal_wipe(9)jbd2_journal_errno(9)jbd2_journal_clear_err(9)jbd2_journal_ack_err(9)
that's the whole page, bestie, no notes π mwah π
source location: ./fs/jbd2 Β· version/date situation: October 2026 Β· and she's filed under jbd2_journal_abort(9) β go forth and shut journals down responsibly πβ¨
π¦ 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