Skip to content

Commit 7294505

Browse files
zhangyi089tytso
authored andcommitted
ext4: add journal cycled recording support
Always enable 'JBD2_CYCLE_RECORD' journal option on ext4, letting the jbd2 continue to record new journal transactions from the recovered journal head or the checkpointed transactions in the previous mount. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230322013353.1843306-3-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent c7fc605 commit 7294505

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

fs/ext4/super.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5738,6 +5738,11 @@ static void ext4_init_journal_params(struct super_block *sb, journal_t *journal)
57385738
journal->j_flags |= JBD2_ABORT_ON_SYNCDATA_ERR;
57395739
else
57405740
journal->j_flags &= ~JBD2_ABORT_ON_SYNCDATA_ERR;
5741+
/*
5742+
* Always enable journal cycle record option, letting the journal
5743+
* records log transactions continuously between each mount.
5744+
*/
5745+
journal->j_flags |= JBD2_CYCLE_RECORD;
57415746
write_unlock(&journal->j_state_lock);
57425747
}
57435748

0 commit comments

Comments
 (0)