enter_journa...ad_only_mode(9)
β¨ enter_journal_read_only_mode(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's short and honestly a little dramatic β it's the function that slams the door and puts the journal in read-only mode. think of it as the "we're closed, go home" of recovery journals π
π NAME π
enter_journal_read_only_mode β Put the journal in read-only mode.
like, literally that. the vibe check failed, the journal goes read-only, periodt.
πΈ SYNOPSIS πΈ
void enter_journal_read_only_mode (struct recovery_journal *journal ,
int error_code );
returns nothing, takes two things, no cap. void β it just does the thing and dips π¦
π ARGUMENTS π
journalβ The journal which has failed. that's the one we're putting into read-only mode, poor thing πerror_codeβ The error result triggering this call. like, the reason we're here in the first place, the receipts of what went wrong.
π₯ DESCRIPTION π₯
okay bestie, here's the whole thing, and it's giving "closing time" energy:
All attempts to add entries after this function is called will fail. all of them. not some β all. so don't bother, the door is locked, the sign says closed, we're not letting anything in π«β¨
And all VIOs waiting for commits will be awakened with an error. yep, every single one of those poor waiting VIOs gets woken up just to be handed an error π brutal but honest β at least they're not stuck waiting forever, iykyk π«Ά
ngl, this is the "everything is on fire so we're shutting the whole thing down" function. it's not fixing anything β it's containing the damage π
π¦ SEE ALSO π¦
Kernel file ./drivers/md/dm-vdo/recovery-journal.c (that's where all the magic lives, main character energy fr fr) plus the whole squad:
Lock Counters.(9)get_zone_count_ptr(9)get_counter(9)is_journal_zone_locked(9)vdo_release_recovery_journal_block_reference(9)pop_free_list(9)is_block_dirty(9)is_block_empty(9)is_block_full(9)assert_on_journal_thread(9)continue_waiter(9)has_block_waiters(9)suspend_lock_counter(9)check_for_drain_complete(9)notify_recovery_journal_of_read_only_mode(9)vdo_get_recovery_journal_current_sequence_number(9)get_recovery_journal_head(9)compute_recovery_count_byte(9)check_slab_journal_commit_threshold(9)finish_reaping(9)complete_reaping(9)handle_flush_error(9)initialize_journal_state(9)vdo_get_recovery_journal_length(9)reap_recovery_journal_callback(9)initialize_lock_counter(9)set_journal_tail(9)initialize_recovery_block(9)vdo_decode_recovery_journal(9)vdo_free_recovery_journal(9)vdo_initialize_recovery_journal_post_repair(9)vdo_get_journal_block_map_data_blocks_used(9)vdo_get_recovery_journal_thread_id(9)vdo_open_recovery_journal(9)vdo_record_recovery_journal(9)get_block_header(9)set_active_sector(9)advance_tail(9)initialize_lock_count(9)prepare_to_assign_entry(9)schedule_block_write(9)release_journal_block_reference(9)assign_entry(9)recycle_journal_block(9)continue_committed_waiter(9)notify_commit_waiters(9)recycle_journal_blocks(9)complete_write(9)add_queued_recovery_entries(9)write_block(9)write_blocks(9)vdo_add_recovery_journal_entry(9)is_lock_locked(9)reap_recovery_journal(9)vdo_acquire_recovery_journal_block_reference(9)vdo_release_journal_entry_lock(9)vdo_drain_recovery_journal(9)resume_lock_counter(9)vdo_resume_recovery_journal(9)vdo_get_recovery_journal_logical_blocks_used(9)vdo_get_recovery_journal_statistics(9)dump_recovery_block(9)vdo_dump_recovery_journal_statistics(9)
that's the whole page bestie, go read the rest of the squad when you get a sec π§π
source: ./drivers/md/dm-vdo Β· October 2026 Β· enter_journa...ad_only_mode(9) β mwah, hope this helped, ily, stay hydrated and don't add entries after calling this ππ
π¦ 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