Turn off zstd on aarch64

loader support for zstd and zfs doesn't work for aarch64. Disable it
to unbreak the build.
This commit is contained in:
Warner Losh 2020-10-13 02:36:16 +00:00
parent 2fec3ae896
commit 9257c69b1c
3 changed files with 15 additions and 2 deletions

View File

@ -4,7 +4,11 @@
.PATH: ${SYSDIR}/crypto/skein
.PATH: ${ZFSOSSRC}/spl
.PATH: ${OZFS}/module/zstd/lib
ZFSSRC= zfs.c nvlist.c skein.c skein_block.c list.c zstd_shim.c zstd.c
ZFSSRC= zfs.c nvlist.c skein.c skein_block.c list.c
.if ${MACHINE_ARCH} != aarch64
ZFSSRC+= zstd_shim.c zstd.c
CFLAGS+= -DHAS_ZSTD_ZFS
.endif
SRCS+= ${ZFSSRC}
CFLAGS+= -I${LDRSRC}

View File

@ -42,7 +42,9 @@ __FBSDID("$FreeBSD$");
#include "zfsimpl.h"
#include "zfssubr.c"
#ifdef HAS_ZSTD_ZFS
extern int zstd_init(void);
#endif
struct zfsmount {
const spa_t *spa;
@ -130,7 +132,9 @@ static const char *features_for_read[] = {
"com.delphix:device_removal",
"com.delphix:obsolete_counts",
"com.intel:allocation_classes",
#ifdef HAS_ZSTD_ZFS
"org.freebsd:zstd_compress",
#endif
NULL
};
@ -171,7 +175,9 @@ zfs_init(void)
dnode_cache_buf = malloc(SPA_MAXBLOCKSIZE);
zfs_init_crc();
#ifdef HAS_ZSTD_ZFS
zstd_init();
#endif
}
static int

View File

@ -105,9 +105,10 @@ typedef struct zio_checksum_info {
#include "sha256.c"
#include "skein_zfs.c"
#ifdef HAS_ZSTD_ZFS
extern int zfs_zstd_decompress(void *s_start, void *d_start, size_t s_len,
size_t d_len, int n);
#endif
static zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = {
{{NULL, NULL}, NULL, NULL, 0, "inherit"},
@ -183,7 +184,9 @@ static zio_compress_info_t zio_compress_table[ZIO_COMPRESS_FUNCTIONS] = {
{NULL, NULL, 9, "gzip-9"},
{NULL, zle_decompress, 64, "zle"},
{NULL, lz4_decompress, 0, "lz4"},
#ifdef HAS_ZSTD_ZFS
{NULL, zfs_zstd_decompress, ZIO_ZSTD_LEVEL_DEFAULT, "zstd"}
#endif
};
static void