From owner-svn-src-head@freebsd.org Tue Oct 13 02:36:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 464E342F902; Tue, 13 Oct 2020 02:36:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C9KRj1B3hz40bQ; Tue, 13 Oct 2020 02:36:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1E7816163; Tue, 13 Oct 2020 02:36:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09D2aG4I059741; Tue, 13 Oct 2020 02:36:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09D2aG4h059738; Tue, 13 Oct 2020 02:36:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202010130236.09D2aG4h059738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Oct 2020 02:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366658 - in head: stand/libsa/zfs sys/cddl/boot/zfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: stand/libsa/zfs sys/cddl/boot/zfs X-SVN-Commit-Revision: 366658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2020 02:36:17 -0000 Author: imp Date: Tue Oct 13 02:36:16 2020 New Revision: 366658 URL: https://svnweb.freebsd.org/changeset/base/366658 Log: Turn off zstd on aarch64 loader support for zstd and zfs doesn't work for aarch64. Disable it to unbreak the build. Modified: head/stand/libsa/zfs/Makefile.inc head/stand/libsa/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfssubr.c Modified: head/stand/libsa/zfs/Makefile.inc ============================================================================== --- head/stand/libsa/zfs/Makefile.inc Mon Oct 12 22:19:07 2020 (r366657) +++ head/stand/libsa/zfs/Makefile.inc Tue Oct 13 02:36:16 2020 (r366658) @@ -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} Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Mon Oct 12 22:19:07 2020 (r366657) +++ head/stand/libsa/zfs/zfsimpl.c Tue Oct 13 02:36:16 2020 (r366658) @@ -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 Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Mon Oct 12 22:19:07 2020 (r366657) +++ head/sys/cddl/boot/zfs/zfssubr.c Tue Oct 13 02:36:16 2020 (r366658) @@ -105,10 +105,11 @@ 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"}, {{NULL, NULL}, NULL, NULL, 0, "on"}, @@ -183,7 +184,9 @@ static zio_compress_info_t zio_compress_table[ZIO_COMP {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