aboutsummaryrefslogtreecommitdiffstats
path: root/tools/debugging/git:/ssh:/git@git.zx2c4.com
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2025-10-20 08:43:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-23 16:24:38 +0200
commit61e28f81d00a234069075fef79a31c29e7af8a34 (patch)
tree0671eb3e198729045334fcc918b203d044cdc35e /tools/debugging/git:/ssh:/git@git.zx2c4.com
parentxfs: rename the old_crc variable in xlog_recover_process (diff)
downloadlaptop-kernel-61e28f81d00a234069075fef79a31c29e7af8a34.tar.xz
laptop-kernel-61e28f81d00a234069075fef79a31c29e7af8a34.zip
xfs: fix log CRC mismatches between i386 and other architectures
[ Upstream commit e747883c7d7306acb4d683038d881528fbfbe749 ] When mounting file systems with a log that was dirtied on i386 on other architectures or vice versa, log recovery is unhappy: [ 11.068052] XFS (vdb): Torn write (CRC failure) detected at log block 0x2. Truncating head block from 0xc. This is because the CRCs generated by i386 and other architectures always diff. The reason for that is that sizeof(struct xlog_rec_header) returns different values for i386 vs the rest (324 vs 328), because the struct is not sizeof(uint64_t) aligned, and i386 has odd struct size alignment rules. This issue goes back to commit 13cdc853c519 ("Add log versioning, and new super block field for the log stripe") in the xfs-import tree, which adds log v2 support and the h_size field that causes the unaligned size. At that time it only mattered for the crude debug only log header checksum, but with commit 0e446be44806 ("xfs: add CRC checks to the log") it became a real issue for v5 file system, because now there is a proper CRC, and regular builds actually expect it match. Fix this by allowing checksums with and without the padding. Fixes: 0e446be44806 ("xfs: add CRC checks to the log") Cc: <stable@vger.kernel.org> # v3.8 Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/debugging/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions