Whamcloud - gitweb
e2fsck: fix portability problems caused by unaligned accesses
authorTheodore Ts'o <tytso@mit.edu>
Mon, 3 May 2021 19:37:33 +0000 (15:37 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 6 Jun 2021 15:17:45 +0000 (11:17 -0400)
commit40960a7118171498448870b26d1c867f92fa430e
tree3ceadca6a13fe9bcd7f0ff252dfa119bfc092b46
parent2a1df88c55df686f4665ee11787c684f13cde2c4
e2fsck: fix portability problems caused by unaligned accesses

The on-disk format for the ext4 journal can have unaigned 32-bit
integers.  This can happen when replaying a journal using a obsolete
checksum format (which was never popularly used, since the v3 format
replaced v2 while the metadata checksum feature was being stablized),
and in the fast commit feature (which landed in the 5.10 kernel,
although it is not enabled by default).

This commit fixes the following regression tests on some platforms
(such as running 32-bit arm architectures on a 64-bit arm kernel):
j_recover_csum2_32bit, j_recover_csum2_64bit, j_recover_fast_commit.

https://github.com/tytso/e2fsprogs/issues/65

Addresses-Debian-Bug: #987641
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/journal.c
e2fsck/recovery.c
tests/j_recover_fast_commit/script