diff options
author | Zhang Yi <yi.zhang@huawei.com> | 2023-03-22 09:33:52 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-06-26 19:35:13 -0400 |
commit | 7294505824254da9cb5ee6cb12d783c9eeea030e (patch) | |
tree | 00141ab1bdde86a49580395ada10c0075eae48c2 /fs/ext4/super.c | |
parent | c7fc60555864c0e67f5e5754a9053986f8fb8491 (diff) | |
download | lwn-7294505824254da9cb5ee6cb12d783c9eeea030e.tar.gz lwn-7294505824254da9cb5ee6cb12d783c9eeea030e.zip |
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>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index fcc8dad6b661..433550e93561 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5738,6 +5738,11 @@ static void ext4_init_journal_params(struct super_block *sb, journal_t *journal) journal->j_flags |= JBD2_ABORT_ON_SYNCDATA_ERR; else journal->j_flags &= ~JBD2_ABORT_ON_SYNCDATA_ERR; + /* + * Always enable journal cycle record option, letting the journal + * records log transactions continuously between each mount. + */ + journal->j_flags |= JBD2_CYCLE_RECORD; write_unlock(&journal->j_state_lock); } |