aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhanchengbin <zhanchengbin1@huawei.com>2022-08-04 18:33:39 +0800
committerTheodore Ts'o <tytso@mit.edu>2022-08-11 12:57:21 -0400
commit003125b2f00aed8f0a1d8b5bd80fcbb1e8e2f13e (patch)
tree4553bc0a2c91aaba6e32977a2779d0b16a0dc836
parent3a3f3f153372ae5daafad5fb68d84847e9f17e9c (diff)
downloade2fsprogs-003125b2f00aed8f0a1d8b5bd80fcbb1e8e2f13e.tar.gz
tune2fs: do not change j_tail_sequence in journal superblock
The function recover_ext3_journal() in debugfs/journal.c, if the log replay is over, the j_tail_sequence in journal superblock is not changed to the value of the last transaction sequence. This will cause subsequent log commitids to count from the commitid in last time. After tune2fs -e, the log commitid is counted from the commitid in last time, if the log ID of the current operation overlaps with that of the last operation, this will cause logs that were previously replayed by tune2fs to be replayed here. Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: liangyun <liangyun2@huawei.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--debugfs/journal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/debugfs/journal.c b/debugfs/journal.c
index 095fff008..5bac0d3b0 100644
--- a/debugfs/journal.c
+++ b/debugfs/journal.c
@@ -769,6 +769,8 @@ static errcode_t recover_ext3_journal(ext2_filsys fs)
mark_buffer_dirty(journal->j_sb_buffer);
}
+ journal->j_tail_sequence = journal->j_transaction_sequence;
+
errout:
jbd2_journal_destroy_revoke(journal);
jbd2_journal_destroy_revoke_record_cache();