Message ID | 20230322013353.1843306-3-yi.zhang@huaweicloud.com |
---|---|
State | Awaiting Upstream |
Headers | show |
Series | ext4, jbd2: journal cycled record transactions between each mount | expand |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 88f7b8a88c76..9b46adae241b 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5691,6 +5691,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); }