]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix cross-endian interoperability of zstd
authorRich Ercolani <214141+rincebrain@users.noreply.github.com>
Mon, 30 Aug 2021 21:13:46 +0000 (17:13 -0400)
committerTony Hutter <hutter2@llnl.gov>
Tue, 14 Sep 2021 22:05:55 +0000 (15:05 -0700)
commit72a989cf60b4c7b9a46dc5854c0bd2561ce6b576
tree8133d7ee2002161fe3f3c20c7020d3d7c5b15e5c
parent6bb6410570e6aeb19ae82d9287922927432f8c74
Fix cross-endian interoperability of zstd

It turns out that layouts of union bitfields are a pain, and the
current code results in an inconsistent layout between BE and LE
systems, leading to zstd-active datasets on one erroring out on
the other.

Switch everyone over to the LE layout, and add compatibility code
to read both.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12008
Closes #12022
cmd/zdb/zdb.c
include/sys/zstd/zstd.h
module/zstd/Makefile.in
module/zstd/include/sparc_compat.h [new file with mode: 0644]
module/zstd/zfs_zstd.c
module/zstd/zstd_sparc.c [new file with mode: 0644]