diff --git a/0017-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch b/0017-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch new file mode 100644 index 0000000000000000000000000000000000000000..dfb060895b9ca076cc26b68887f10e6c8be49188 --- /dev/null +++ b/0017-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch @@ -0,0 +1,38 @@ +From 003125b2f00aed8f0a1d8b5bd80fcbb1e8e2f13e Mon Sep 17 00:00:00 2001 +From: zhanchengbin +Date: Thu, 4 Aug 2022 18:33:39 +0800 +Subject: [PATCH] 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 +Signed-off-by: Zhiqiang Liu +Signed-off-by: liangyun +Signed-off-by: Theodore Ts'o +--- + debugfs/journal.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/debugfs/journal.c b/debugfs/journal.c +index 095fff00..5bac0d3b 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(); +-- +2.37.1 + diff --git a/e2fsprogs.spec b/e2fsprogs.spec index 4aca965c67bec2b7cc44421d80672271cab79e60..da016e4aba324624ea3346f96c77a332896032ee 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -1,6 +1,6 @@ Name: e2fsprogs Version: 1.46.4 -Release: 12 +Release: 13 Summary: Second extended file system management tools License: GPLv2+ and LGPLv2 and MIT URL: http://e2fsprogs.sourceforge.net/ @@ -23,6 +23,8 @@ Patch13: 0013-e2fsck-do-not-clean-up-file-acl-if-the-inode-is-trun.patch Patch14: 0014-e2fsck-handle-level-is-overflow-in-ext2fs_extent_get.patch Patch15: 0015-libext2fs-add-sanity-check-to-extent-manipulation.patch Patch16: 0016-e2fsprogs-add-sw64.patch +Patch17: 0017-tune2fs-do-not-change-j_tail_sequence-in-journal-sup.patch + BuildRequires: gcc pkgconfig texinfo BuildRequires: fuse-devel libblkid-devel libuuid-devel @@ -163,6 +165,9 @@ exit 0 %{_mandir}/man8/* %changelog +* Fri Aug 12 2022 zhanchengbin - 1.46.4-13 +- tune2fs: do not change j_tail_sequence in journal superblock + * Fri Jun 24 2022 wuzx - 1.46.4-12 - add sw64 patch