jbd2__journal_restart(9)
π« jbd2__journal_restart(9) π«
okay so bestie, welcome to the Kernel API Manual β no seriously, that's the actual manual name, we're in the kernel docs era now π«Ά this one's all about jbd2__journal_restart, and she's lowkey a main character.
πΈ NAME πΈ
jbd2__journal_restart β restart a handle .
(yes, there's a lil space before the period, that's just how she is, we don't judge π )
β¨ SYNOPSIS β¨
int jbd2__journal_restart (handle_t *handle , int nblocks , int
revoke_records , gfp_t gfp_mask );
like, look at her. four args, returns an int, iconic behavior fr fr π
π ARGUMENTS π
handleβ the handle to restart. your girl. the one getting a glow-up β¨nblocksβ nr credits requested. that's how many credits you're asking for, no cap.revoke_recordsβ number of revoke record credits requested. separate credit pool, separate vibe π¦gfp_maskβ memory allocation flags (forstart_this_handle). this is the one that gets handed straight tostart_this_handle, iykyk.
π DESCRIPTION π
Restart a handle for a multi-transaction filesystem operation. literally what it says on the tin π«
so here's the situation, bestie. picture this: jbd2_journal_extend (the call above this one, the one that just tried and failed) did not manage to grant new buffer credits to a running handle. rough, i know π
when that happens, you call jbd2_journal_restart, and the way that this works is:
- it commits the handle's transaction so far β everything up to now, done, logged, bye π
- and then it reattaches the handle to a new transaction
- and that new transaction is one that can guarantee the requested number of credits. slay. that's the whole point π₯
and here's the cute lil detail: we preserve the reserved handle if there's any attached to the passed in handle. π₯Ί she doesn't get dropped, she gets carried over. periodt.
β οΈ heads up: this is the one you reach for after jbd2_journal_extend fails. don't skip the extend step and come crying to restart, that's not the vibe check she's here for π
π SEE ALSO π
Kernel file ./fs/jbd2/transaction.c β that's where the magic lives, go read it π§
and the whole squad, in order:
jbd2_journal_start(9)jbd2_journal_start_reserved(9)jbd2_journal_extend(9)jbd2_journal_lock_updates(9)jbd2_journal_unlock_updates(9)jbd2_journal_get_write_access(9)jbd2_journal_get_create_access(9)jbd2_journal_get_undo_access(9)jbd2_journal_set_triggers(9)jbd2_journal_dirty_metadata(9)jbd2_journal_forget(9)jbd2_journal_stop(9)jbd2_journal_try_to_free_buffers(9)jbd2_journal_invalidate_folio(9)
okay that's the whole page, you ate that π mwah π
this lil baddie lives in ./fs/jbd2 and she's dated October 2026 β mark your calendars bestie, she's from the future βπ and no i will not stop being obsessed with her.
π¦ 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