summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2020-08-28 18:41:28 +0000
committerMatt Macy <mmacy@FreeBSD.org>2020-08-28 18:41:28 +0000
commit93ddd0259dd285fbac5cc5086a039a22f1b046a1 (patch)
tree248859aabe87f6fcc4ca762453975d10ea659781
parent3b0ce0e28db46d0403929aba45c682285e1ac217 (diff)
Notes
-rw-r--r--META8
-rw-r--r--NEWS2
-rw-r--r--cmd/zpool/zpool_main.c9
-rw-r--r--include/libzfs_impl.h1
-rw-r--r--include/os/freebsd/spl/sys/acl_impl.h2
-rw-r--r--include/os/freebsd/spl/sys/cmn_err.h2
-rw-r--r--include/os/freebsd/spl/sys/extdirent.h2
-rw-r--r--include/os/freebsd/spl/sys/list.h2
-rw-r--r--include/os/freebsd/spl/sys/list_impl.h2
-rw-r--r--include/os/freebsd/spl/sys/zmod.h2
-rw-r--r--include/sys/fs/zfs.h8
-rw-r--r--lib/libspl/include/os/freebsd/sys/mount.h6
-rw-r--r--lib/libzfs/libzfs_sendrecv.c38
-rw-r--r--lib/libzfs/libzfs_util.c10
-rw-r--r--man/man1/arcstat.12
-rw-r--r--man/man1/cstyle.12
-rw-r--r--man/man1/raidz_test.12
-rw-r--r--man/man1/zhack.12
-rw-r--r--man/man1/ztest.12
-rw-r--r--man/man5/spl-module-parameters.54
-rw-r--r--man/man5/vdev_id.conf.52
-rw-r--r--man/man5/zfs-events.52
-rw-r--r--man/man5/zfs-module-parameters.520
-rw-r--r--man/man5/zpool-features.52
-rw-r--r--man/man8/fsck.zfs.82
-rw-r--r--man/man8/mount.zfs.82
-rw-r--r--man/man8/vdev_id.82
-rw-r--r--man/man8/zed.8.in2
-rw-r--r--man/man8/zfs-mount-generator.8.in2
-rw-r--r--man/man8/zfs.836
-rw-r--r--man/man8/zinject.82
-rw-r--r--man/man8/zpool-iostat.84
-rw-r--r--man/man8/zpool.837
-rw-r--r--man/man8/zstreamdump.82
-rw-r--r--module/Makefile.bsd2
-rw-r--r--module/lua/setjmp/setjmp_ppc.S10
-rw-r--r--module/os/freebsd/spl/list.c2
-rw-r--r--module/os/linux/zfs/zfs_ctldir.c19
-rw-r--r--module/zcommon/zfs_fletcher.c2
-rw-r--r--module/zfs/arc.c27
-rw-r--r--module/zfs/dmu.c1
-rw-r--r--module/zfs/dnode_sync.c14
-rw-r--r--module/zfs/dsl_dir.c23
-rw-r--r--module/zfs/sa.c1
-rw-r--r--module/zfs/spa.c3
-rw-r--r--module/zfs/vdev_raidz_math.c2
-rw-r--r--module/zstd/Makefile.in3
-rw-r--r--tests/runfiles/common.run2
-rw-r--r--tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am1
-rw-r--r--tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh77
50 files changed, 320 insertions, 94 deletions
diff --git a/META b/META
index 49d8bd73d5161..4660386a656fe 100644
--- a/META
+++ b/META
@@ -1,10 +1,10 @@
Meta: 1
Name: zfs
Branch: 1.0
-Version: 0.8.0
-Release: 1
+Version: 2.0.0
+Release: rc1
Release-Tags: relext
License: CDDL
-Author: OpenZFS on Linux
-Linux-Maximum: 5.6
+Author: OpenZFS
+Linux-Maximum: 5.8
Linux-Minimum: 3.10
diff --git a/NEWS b/NEWS
index bbdc2b69bbfe0..3907ce5326ecc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,3 @@
Descriptions of all releases can be found on github:
-https://github.com/zfsonlinux/zfs/releases
+https://github.com/openzfs/zfs/releases
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index f3756a5d95470..adbb78a8effda 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -2816,7 +2816,8 @@ show_import(nvlist_t *config)
if (msgid != NULL) {
(void) printf(gettext(
- " see: https://zfsonlinux.org/msg/%s\n"), msgid);
+ " see: https://openzfs.github.io/openzfs-docs/msg/%s\n"),
+ msgid);
}
(void) printf(gettext(" config:\n\n"));
@@ -7804,7 +7805,7 @@ print_dedup_stats(nvlist_t *config)
* pool: tank
* status: DEGRADED
* reason: One or more devices ...
- * see: https://zfsonlinux.org/msg/ZFS-xxxx-01
+ * see: https://openzfs.github.io/openzfs-docs/msg/ZFS-xxxx-01
* config:
* mirror DEGRADED
* c1t0d0 OK
@@ -8193,7 +8194,9 @@ status_callback(zpool_handle_t *zhp, void *data)
if (msgid != NULL) {
printf(" ");
printf_color(ANSI_BOLD, gettext("see:"));
- printf(gettext(" https://zfsonlinux.org/msg/%s\n"), msgid);
+ printf(gettext(
+ " https://openzfs.github.io/openzfs-docs/msg/%s\n"),
+ msgid);
}
if (config != NULL) {
diff --git a/include/libzfs_impl.h b/include/libzfs_impl.h
index 0f111679764f4..26e042964739b 100644
--- a/include/libzfs_impl.h
+++ b/include/libzfs_impl.h
@@ -71,6 +71,7 @@ struct libzfs_handle {
char libzfs_chassis_id[256];
boolean_t libzfs_prop_debug;
regex_t libzfs_urire;
+ uint64_t libzfs_max_nvlist;
};
struct zfs_handle {
diff --git a/include/os/freebsd/spl/sys/acl_impl.h b/include/os/freebsd/spl/sys/acl_impl.h
index 8718f5bcf63fa..1efbd6d73bd03 100644
--- a/include/os/freebsd/spl/sys/acl_impl.h
+++ b/include/os/freebsd/spl/sys/acl_impl.h
@@ -26,8 +26,6 @@
#ifndef _SYS_ACL_IMPL_H
#define _SYS_ACL_IMPL_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/os/freebsd/spl/sys/cmn_err.h b/include/os/freebsd/spl/sys/cmn_err.h
index a75471f647eb5..00d686439f948 100644
--- a/include/os/freebsd/spl/sys/cmn_err.h
+++ b/include/os/freebsd/spl/sys/cmn_err.h
@@ -31,8 +31,6 @@
#ifndef _SYS_CMN_ERR_H
#define _SYS_CMN_ERR_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#if !defined(_ASM)
#include <sys/_stdarg.h>
#endif
diff --git a/include/os/freebsd/spl/sys/extdirent.h b/include/os/freebsd/spl/sys/extdirent.h
index 65ba11f345d2e..b22e8e8563a2c 100644
--- a/include/os/freebsd/spl/sys/extdirent.h
+++ b/include/os/freebsd/spl/sys/extdirent.h
@@ -26,8 +26,6 @@
#ifndef _SYS_EXTDIRENT_H
#define _SYS_EXTDIRENT_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/os/freebsd/spl/sys/list.h b/include/os/freebsd/spl/sys/list.h
index 8339b6226d119..6db92ed42955e 100644
--- a/include/os/freebsd/spl/sys/list.h
+++ b/include/os/freebsd/spl/sys/list.h
@@ -26,8 +26,6 @@
#ifndef _SYS_LIST_H
#define _SYS_LIST_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/list_impl.h>
#ifdef __cplusplus
diff --git a/include/os/freebsd/spl/sys/list_impl.h b/include/os/freebsd/spl/sys/list_impl.h
index 9c42f88320231..a6614f9a38c20 100644
--- a/include/os/freebsd/spl/sys/list_impl.h
+++ b/include/os/freebsd/spl/sys/list_impl.h
@@ -27,8 +27,6 @@
#ifndef _SYS_LIST_IMPL_H
#define _SYS_LIST_IMPL_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#ifdef __cplusplus
diff --git a/include/os/freebsd/spl/sys/zmod.h b/include/os/freebsd/spl/sys/zmod.h
index ba0267203ce34..c606b1db5f61b 100644
--- a/include/os/freebsd/spl/sys/zmod.h
+++ b/include/os/freebsd/spl/sys/zmod.h
@@ -27,8 +27,6 @@
#ifndef _ZMOD_H
#define _ZMOD_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h
index d3acd674a6c6a..f6f633a95b7e9 100644
--- a/include/sys/fs/zfs.h
+++ b/include/sys/fs/zfs.h
@@ -1013,10 +1013,10 @@ typedef struct vdev_rebuild_stat {
} vdev_rebuild_stat_t;
/*
- * Errata described by https://zfsonlinux.org/msg/ZFS-8000-ER. The ordering
- * of this enum must be maintained to ensure the errata identifiers map to
- * the correct documentation. New errata may only be appended to the list
- * and must contain corresponding documentation at the above link.
+ * Errata described by https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-ER.
+ * The ordering of this enum must be maintained to ensure the errata identifiers
+ * map to the correct documentation. New errata may only be appended to the
+ * list and must contain corresponding documentation at the above link.
*/
typedef enum zpool_errata {
ZPOOL_ERRATA_NONE,
diff --git a/lib/libspl/include/os/freebsd/sys/mount.h b/lib/libspl/include/os/freebsd/sys/mount.h
index b4023910005b3..e995185712703 100644
--- a/lib/libspl/include/os/freebsd/sys/mount.h
+++ b/lib/libspl/include/os/freebsd/sys/mount.h
@@ -35,12 +35,8 @@
#include <string.h>
#include <stdlib.h>
-/*
- * Some old glibc headers don't define BLKGETSIZE64
- * and we don't want to require the kernel headers
- */
#if !defined(BLKGETSIZE64)
-#define BLKGETSIZE64 _IOR(0x12, 114, size_t)
+#define BLKGETSIZE64 DIOCGMEDIASIZE
#endif
/*
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index f1524c384febd..b17b105ca34b8 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -610,6 +610,18 @@ send_iterate_fs(zfs_handle_t *zhp, void *arg)
fnvlist_free(sd->snapprops);
fnvlist_free(sd->snapholds);
+ /* Do not allow the size of the properties list to exceed the limit */
+ if ((fnvlist_size(nvfs) + fnvlist_size(sd->fss)) >
+ zhp->zfs_hdl->libzfs_max_nvlist) {
+ (void) fprintf(stderr, dgettext(TEXT_DOMAIN,
+ "warning: cannot send %s@%s: the size of the list of "
+ "snapshots and properties is too large to be received "
+ "successfully.\n"
+ "Select a smaller number of snapshots to send.\n"),
+ zhp->zfs_name, sd->tosnap);
+ rv = EZFS_NOSPC;
+ goto out;
+ }
/* add this fs to nvlist */
(void) snprintf(guidstring, sizeof (guidstring),
"0x%llx", (longlong_t)guid);
@@ -2015,6 +2027,21 @@ send_prelim_records(zfs_handle_t *zhp, const char *from, int fd,
return (zfs_error(zhp->zfs_hdl, EZFS_BADBACKUP,
errbuf));
}
+ /*
+ * Do not allow the size of the properties list to exceed
+ * the limit
+ */
+ if ((fnvlist_size(fss) + fnvlist_size(hdrnv)) >
+ zhp->zfs_hdl->libzfs_max_nvlist) {
+ (void) snprintf(errbuf, sizeof (errbuf),
+ dgettext(TEXT_DOMAIN, "warning: cannot send '%s': "
+ "the size of the list of snapshots and properties "
+ "is too large to be received successfully.\n"
+ "Select a smaller number of snapshots to send.\n"),
+ zhp->zfs_name);
+ return (zfs_error(zhp->zfs_hdl, EZFS_NOSPC,
+ errbuf));
+ }
fnvlist_add_nvlist(hdrnv, "fss", fss);
VERIFY0(nvlist_pack(hdrnv, &packbuf, &buflen, NV_ENCODE_XDR,
0));
@@ -2578,8 +2605,6 @@ recv_read(libzfs_handle_t *hdl, int fd, void *buf, int ilen,
int rv;
int len = ilen;
- assert(ilen <= SPA_MAXBLOCKSIZE);
-
do {
rv = read(fd, cp, len);
cp += rv;
@@ -2613,6 +2638,11 @@ recv_read_nvlist(libzfs_handle_t *hdl, int fd, int len, nvlist_t **nvp,
if (buf == NULL)
return (ENOMEM);
+ if (len > hdl->libzfs_max_nvlist) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "nvlist too large"));
+ return (ENOMEM);
+ }
+
err = recv_read(hdl, fd, buf, len, byteswap, zc);
if (err != 0) {
free(buf);
@@ -3783,6 +3813,7 @@ recv_skip(libzfs_handle_t *hdl, int fd, boolean_t byteswap)
}
payload_size =
DRR_WRITE_PAYLOAD_SIZE(&drr->drr_u.drr_write);
+ assert(payload_size <= SPA_MAXBLOCKSIZE);
(void) recv_read(hdl, fd, buf,
payload_size, B_FALSE, NULL);
break;
@@ -4819,7 +4850,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
case ZFS_ERR_FROM_IVSET_GUID_MISSING:
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"IV set guid missing. See errata %u at "
- "https://zfsonlinux.org/msg/ZFS-8000-ER."),
+ "https://openzfs.github.io/openzfs-docs/msg/"
+ "ZFS-8000-ER."),
ZPOOL_ERRATA_ZOL_8308_ENCRYPTION);
(void) zfs_error(hdl, EZFS_BADSTREAM, errbuf);
break;
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index c43c6bb1fe9b0..301c8ddbab114 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -1008,6 +1008,7 @@ libzfs_init(void)
{
libzfs_handle_t *hdl;
int error;
+ char *env;
error = libzfs_load_module();
if (error) {
@@ -1055,6 +1056,15 @@ libzfs_init(void)
if (getenv("ZFS_PROP_DEBUG") != NULL) {
hdl->libzfs_prop_debug = B_TRUE;
}
+ if ((env = getenv("ZFS_SENDRECV_MAX_NVLIST")) != NULL) {
+ if ((error = zfs_nicestrtonum(hdl, env,
+ &hdl->libzfs_max_nvlist))) {
+ errno = error;
+ return (NULL);
+ }
+ } else {
+ hdl->libzfs_max_nvlist = (SPA_MAXBLOCKSIZE * 4);
+ }
/*
* For testing, remove some settable properties and features
diff --git a/man/man1/arcstat.1 b/man/man1/arcstat.1
index 9113b76af46c2..7fe1e0bfb14af 100644
--- a/man/man1/arcstat.1
+++ b/man/man1/arcstat.1
@@ -13,7 +13,7 @@
.\" Copyright (c) 2015 by Delphix. All rights reserved.
.\" Copyright (c) 2020 by AJ Jordan. All rights reserved.
.\"
-.TH ARCSTAT 1 "May 7, 2020"
+.TH ARCSTAT 1 "Aug 24, 2020" OpenZFS
.SH NAME
arcstat \- report ZFS ARC and L2ARC statistics
.SH SYNOPSIS
diff --git a/man/man1/cstyle.1 b/man/man1/cstyle.1
index f77d534507a4b..14175838a4fd3 100644
--- a/man/man1/cstyle.1
+++ b/man/man1/cstyle.1
@@ -20,7 +20,7 @@
.\"
.\" CDDL HEADER END
.\"
-.TH cstyle 1 "28 March 2005"
+.TH CSTYLE 1 "Aug 24, 2020" OpenZFS
.SH NAME
.I cstyle
\- check for some common stylistic errors in C source files
diff --git a/man/man1/raidz_test.1 b/man/man1/raidz_test.1
index 423177a1b8397..63e9144ad2013 100644
--- a/man/man1/raidz_test.1
+++ b/man/man1/raidz_test.1
@@ -22,7 +22,7 @@
.\"
.\" Copyright (c) 2016 Gvozden Nešković. All rights reserved.
.\"
-.TH raidz_test 1 "2016" "ZFS on Linux" "User Commands"
+.TH RAIDZ_TEST 1 "Aug 24, 2020" OpenZFS
.SH NAME
\fBraidz_test\fR \- raidz implementation verification and benchmarking tool
diff --git a/man/man1/zhack.1 b/man/man1/zhack.1
index 11d300b700148..3126007a5e0d1 100644
--- a/man/man1/zhack.1
+++ b/man/man1/zhack.1
@@ -22,7 +22,7 @@
.\"
.\" Copyright 2013 Darik Horn <dajhorn@vanadac.com>. All rights reserved.
.\"
-.TH zhack 1 "2013 MAR 16" "ZFS on Linux" "User Commands"
+.TH ZHACK 1 "Aug 24, 2020" OpenZFS
.SH NAME
zhack \- libzpool debugging tool
diff --git a/man/man1/ztest.1 b/man/man1/ztest.1
index 84e56c822d130..68c978ca0968c 100644
--- a/man/man1/ztest.1
+++ b/man/man1/ztest.1
@@ -24,7 +24,7 @@
.\" Copyright (c) 2009 Michael Gebetsroither <michael.geb@gmx.at>. All rights
.\" reserved.
.\"
-.TH ztest 1 "2009 NOV 01" "ZFS on Linux" "User Commands"
+.TH ZTEST 1 "Aug 24, 2020" OpenZFS
.SH NAME
\fBztest\fR \- was written by the ZFS Developers as a ZFS unit test.
diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5
index 2dce5b2963d67..5e28e694e04c0 100644
--- a/man/man5/spl-module-parameters.5
+++ b/man/man5/spl-module-parameters.5
@@ -2,7 +2,7 @@
.\"
.\" Copyright 2013 Turbo Fredriksson <turbo@bayour.com>. All rights reserved.
.\"
-.TH SPL-MODULE-PARAMETERS 5 "Oct 28, 2017"
+.TH SPL-MODULE-PARAMETERS 5 "Aug 24, 2020" OpenZFS
.SH NAME
spl\-module\-parameters \- SPL module parameters
.SH DESCRIPTION
@@ -225,7 +225,7 @@ Default value: \fB/etc/hostid\fR
\fBspl_panic_halt\fR (uint)
.ad
.RS 12n
-Cause a kernel panic on assertion failures. When not enabled, the thread is
+Cause a kernel panic on assertion failures. When not enabled, the thread is
halted to facilitate further debugging.
.sp
Set to a non-zero value to enable.
diff --git a/man/man5/vdev_id.conf.5 b/man/man5/vdev_id.conf.5
index 89c5ee9610943..9ae3865f7d3db 100644
--- a/man/man5/vdev_id.conf.5
+++ b/man/man5/vdev_id.conf.5
@@ -1,4 +1,4 @@
-.TH vdev_id.conf 5
+.TH VDEV_ID.CONF 5 "Aug 24, 2020" OpenZFS
.SH NAME
vdev_id.conf \- Configuration file for vdev_id
.SH DESCRIPTION
diff --git a/man/man5/zfs-events.5 b/man/man5/zfs-events.5
index 4a28be71e685c..0d0e1a9593d57 100644
--- a/man/man5/zfs-events.5
+++ b/man/man5/zfs-events.5
@@ -13,7 +13,7 @@
.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
.\" own identifying information:
.\" Portions Copyright [yyyy] [name of copyright owner]
-.TH ZFS-EVENTS 5 "Oct 24, 2018"
+.TH ZFS-EVENTS 5 "Aug 24, 2020" OpenZFS
.SH NAME
zfs\-events \- Events created by the ZFS filesystem.
.SH DESCRIPTION
diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5
index 853e8fc9442c8..893bbf65220df 100644
--- a/man/man5/zfs-module-parameters.5
+++ b/man/man5/zfs-module-parameters.5
@@ -14,7 +14,7 @@
.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
.\" own identifying information:
.\" Portions Copyright [yyyy] [name of copyright owner]
-.TH ZFS-MODULE-PARAMETERS 5 "Feb 15, 2019"
+.TH ZFS-MODULE-PARAMETERS 5 "Aug 24, 2020" OpenZFS
.SH NAME
zfs\-module\-parameters \- ZFS module parameters
.SH DESCRIPTION
@@ -201,6 +201,20 @@ Default value: \fB200\fR%.
.sp
.ne 2
.na
+\fBl2arc_meta_percent\fR (int)
+.ad
+.RS 12n
+Percent of ARC size allowed for L2ARC-only headers.
+Since L2ARC buffers are not evicted on memory pressure, too large amount of
+headers on system with irrationaly large L2ARC can render it slow or unusable.
+This parameter limits L2ARC writes and rebuild to achieve it.
+.sp
+Default value: \fB33\fR%.
+.RE
+
+.sp
+.ne 2
+.na
\fBl2arc_trim_ahead\fR (ulong)
.ad
.RS 12n
@@ -426,7 +440,7 @@ Default value: \fB16,777,216\fR (16MB)
.RS 12n
If we are not searching forward (due to metaslab_df_max_search,
metaslab_df_free_pct, or metaslab_df_alloc_threshold), this tunable controls
-what segment is used. If it is set, we will use the largest free segment.
+what segment is used. If it is set, we will use the largest free segment.
If it is not set, we will use a segment of exactly the requested size (or
larger).
.sp
@@ -3256,7 +3270,7 @@ Default value: \fB25\fR.
\fBzfs_sync_pass_dont_compress\fR (int)
.ad
.RS 12n
-Starting in this sync pass, we disable compression (including of metadata).
+Starting in this sync pass, we disable compression (including of metadata).
With the default setting, in practice, we don't have this many sync passes,
so this has no effect.
.sp
diff --git a/man/man5/zpool-features.5 b/man/man5/zpool-features.5
index f65ef40a7e799..36c4343a1388e 100644
--- a/man/man5/zpool-features.5
+++ b/man/man5/zpool-features.5
@@ -16,7 +16,7 @@
.\" Portions Copyright [yyyy] [name of copyright owner]
.\" Copyright (c) 2019, Klara Inc.
.\" Copyright (c) 2019, Allan Jude
-.TH ZPOOL-FEATURES 5 "Jun 8, 2018"
+.TH ZPOOL-FEATURES 5 "Aug 24, 2020" OpenZFS
.SH NAME
zpool\-features \- ZFS pool feature descriptions
.SH DESCRIPTION
diff --git a/man/man8/fsck.zfs.8 b/man/man8/fsck.zfs.8
index 80e7a1ebb35f4..f681c2502ebef 100644
--- a/man/man8/fsck.zfs.8
+++ b/man/man8/fsck.zfs.8
@@ -22,7 +22,7 @@
.\"
.\" Copyright 2013 Darik Horn <dajhorn@vanadac.com>. All rights reserved.
.\"
-.TH fsck.zfs 8 "2013 MAR 16" "ZFS on Linux" "System Administration Commands"
+.TH FSCK.ZFS 8 "Aug 24, 2020" OpenZFS
.SH NAME
fsck.zfs \- Dummy ZFS filesystem checker.
diff --git a/man/man8/mount.zfs.8 b/man/man8/mount.zfs.8
index 4b71367e23e9a..016a909c26a03 100644
--- a/man/man8/mount.zfs.8
+++ b/man/man8/mount.zfs.8
@@ -22,7 +22,7 @@
.\"
.\" Copyright 2013 Darik Horn <dajhorn@vanadac.com>. All rights reserved.
.\"
-.TH mount.zfs 8 "2013 FEB 28" "ZFS on Linux" "System Administration Commands"
+.TH MOUNT.ZFS 8 "Aug 24, 2020" OpenZFS
.SH NAME
mount.zfs \- mount a ZFS filesystem
diff --git a/man/man8/vdev_id.8 b/man/man8/vdev_id.8
index 70956c634f031..6de3d18fe575c 100644
--- a/man/man8/vdev_id.8
+++ b/man/man8/vdev_id.8
@@ -1,4 +1,4 @@
-.TH vdev_id 8
+.TH VDEV_ID 8 "Aug 24, 2020" OpenZFS
.SH NAME
vdev_id \- generate user-friendly names for JBOD disks
.SH SYNOPSIS
diff --git a/man/man8/zed.8.in b/man/man8/zed.8.in
index 2ca3935724d71..9d494d5e8ff44 100644
--- a/man/man8/zed.8.in
+++ b/man/man8/zed.8.in
@@ -11,7 +11,7 @@
.\" "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>.
.\" You may not use this file except in compliance with the license.
.\"
-.TH ZED 8 "Octember 1, 2013" "ZFS on Linux" "System Administration Commands"
+.TH ZED 8 "Aug 24, 2020" OpenZFS
.SH NAME
ZED \- ZFS Event Daemon
diff --git a/man/man8/zfs-mount-generator.8.in b/man/man8/zfs-mount-generator.8.in
index 41a2999f0f0ad..3b8c9c3ae2460 100644
--- a/man/man8/zfs-mount-generator.8.in
+++ b/man/man8/zfs-mount-generator.8.in
@@ -22,7 +22,7 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-.TH "ZFS\-MOUNT\-GENERATOR" "8" "2020-01-19" "ZFS" "zfs-mount-generator" "\""
+.TH ZFS-MOUNT-GENERATOR 8 "Aug 24, 2020" OpenZFS
.SH "NAME"
zfs\-mount\-generator \- generates systemd mount units for ZFS
diff --git a/man/man8/zfs.8 b/man/man8/zfs.8
index 92135c986e870..4cff97792a9fa 100644
--- a/man/man8/zfs.8
+++ b/man/man8/zfs.8
@@ -736,6 +736,42 @@ to mount zfs datasets. This option is provided for backwards compatibility with
.Xr mount 8 ,
.Xr net 8 ,
.Xr selinux 8 ,
+.Xr zfs-allow 8 ,
+.Xr zfs-bookmark 8 ,
+.Xr zfs-change-key 8 ,
+.Xr zfs-clone 8 ,
+.Xr zfs-create 8 ,
+.Xr zfs-destroy 8 ,
+.Xr zfs-diff 8 ,
+.Xr zfs-get 8 ,
+.Xr zfs-groupspace 8 ,
+.Xr zfs-hold 8 ,
+.Xr zfs-inherit 8 ,
+.Xr zfs-jail 8 ,
+.Xr zfs-list 8 ,
+.Xr zfs-load-key 8 ,
+.Xr zfs-mount 8 ,
+.Xr zfs-program 8 ,
+.Xr zfs-project 8 ,
+.Xr zfs-projectspace 8 ,
+.Xr zfs-promote 8 ,
+.Xr zfs-receive 8 ,
+.Xr zfs-redact 8 ,
+.Xr zfs-release 8 ,
+.Xr zfs-rename 8 ,
+.Xr zfs-rollback 8 ,
+.Xr zfs-send 8 ,
+.Xr zfs-set 8 ,
+.Xr zfs-share 8 ,
+.Xr zfs-snapshot 8 ,
+.Xr zfs-unallow 8 ,
+.Xr zfs-unjail 8 ,
+.Xr zfs-unload-key 8 ,
+.Xr zfs-unmount 8 ,
+.Xr zfs-unshare 8 ,
+.Xr zfs-upgrade 8 ,
+.Xr zfs-userspace 8 ,
+.Xr zfs-wait 8 ,
.Xr zfsconcepts 8 ,
.Xr zfsprops 8 ,
.Xr zpool 8
diff --git a/man/man8/zinject.8 b/man/man8/zinject.8
index f02e78ca207e1..ee6776fe76416 100644
--- a/man/man8/zinject.8
+++ b/man/man8/zinject.8
@@ -22,7 +22,7 @@
.\"
.\" Copyright 2013 Darik Horn <dajhorn@vanadac.com>. All rights reserved.
.\"
-.TH zinject 8 "2013 FEB 28" "ZFS on Linux" "System Administration Commands"
+.TH ZINJECT 8 "Aug 24, 2020" OpenZFS
.SH NAME
zinject \- ZFS Fault Injector
diff --git a/man/man8/zpool-iostat.8 b/man/man8/zpool-iostat.8
index c318dcd7478ca..f91e55c3b01a2 100644
--- a/man/man8/zpool-iostat.8
+++ b/man/man8/zpool-iostat.8
@@ -65,9 +65,9 @@ When given an
.Ar interval ,
the statistics are printed every
.Ar interval
-seconds until ^C is pressed. If
+seconds until ^C is pressed. If
.Fl n
-flag is specified the headers are displayed only once, otherwise they are
+flag is specified the headers are displayed only once, otherwise they are
displayed periodically. If count is specified, the command exits
after count reports are printed. The first report printed is always
the statistics since boot regardless of whether
diff --git a/man/man8/zpool.8 b/man/man8/zpool.8
index 0fe6866f33dad..7c12798da49c8 100644
--- a/man/man8/zpool.8
+++ b/man/man8/zpool.8
@@ -559,10 +559,41 @@ is not set, it is assumed that the user is allowed to run
.Sh INTERFACE STABILITY
.Sy Evolving
.Sh SEE ALSO
-.Xr zpoolconcepts 8 ,
-.Xr zpoolprops 8 ,
.Xr zfs-events 5 ,
.Xr zfs-module-parameters 5 ,
.Xr zpool-features 5 ,
.Xr zed 8 ,
-.Xr zfs 8
+.Xr zfs 8 ,
+.Xr zpool-add 8 ,
+.Xr zpool-attach 8 ,
+.Xr zpool-checkpoint 8 ,
+.Xr zpool-clear 8 ,
+.Xr zpool-create 8 ,
+.Xr zpool-destroy 8 ,
+.Xr zpool-detach 8 ,
+.Xr zpool-events 8 ,
+.Xr zpool-export 8 ,
+.Xr zpool-get 8 ,
+.Xr zpool-history 8 ,
+.Xr zpool-import 8 ,
+.Xr zpool-initialize 8 ,
+.Xr zpool-iostat 8 ,
+.Xr zpool-labelclear 8 ,
+.Xr zpool-list 8 ,
+.Xr zpool-offline 8 ,
+.Xr zpool-online 8 ,
+.Xr zpool-reguid 8 ,
+.Xr zpool-remove 8 ,
+.Xr zpool-reopen 8 ,
+.Xr zpool-replace 8 ,
+.Xr zpool-resilver 8 ,
+.Xr zpool-scrub 8 ,
+.Xr zpool-set 8 ,
+.Xr zpool-split 8 ,
+.Xr zpool-status 8 ,
+.Xr zpool-sync 8 ,
+.Xr zpool-trim 8 ,
+.Xr zpool-upgrade 8 ,
+.Xr zpool-wait 8 ,
+.Xr zpoolconcepts 8 ,
+.Xr zpoolprops 8
diff --git a/man/man8/zstreamdump.8 b/man/man8/zstreamdump.8
index 33cd047f5d783..f499be442a476 100644
--- a/man/man8/zstreamdump.8
+++ b/man/man8/zstreamdump.8
@@ -3,7 +3,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH zstreamdump 8 "29 Aug 2012" "ZFS pool 28, filesystem 5" "System Administration Commands"
+.TH ZSTREAMDUMP 8 "Aug 24, 2020" OpenZFS
.SH NAME
zstreamdump \- filter data in zfs send stream
.SH SYNOPSIS
diff --git a/module/Makefile.bsd b/module/Makefile.bsd
index 53b97dafd9e9c..4feb9e1eaf0ce 100644
--- a/module/Makefile.bsd
+++ b/module/Makefile.bsd
@@ -356,4 +356,4 @@ CFLAGS.zil.c= -Wno-cast-qual
CFLAGS.zio.c= -Wno-cast-qual
CFLAGS.zrlock.c= -Wno-cast-qual
CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith
-CFLAGS.zstd.c= -fno-tree-vectorize
+CFLAGS.zstd.c= -fno-tree-vectorize -U__BMI__
diff --git a/module/lua/setjmp/setjmp_ppc.S b/module/lua/setjmp/setjmp_ppc.S
index f787ef3491365..72aa5d5ab5b05 100644
--- a/module/lua/setjmp/setjmp_ppc.S
+++ b/module/lua/setjmp/setjmp_ppc.S
@@ -56,7 +56,7 @@
#define ENTRY(name) \
.align 2 ; \
.type name,@function; \
- .globl name; \
+ .weak name; \
name:
#else /* PPC64_ELF_ABI_v1 */
@@ -65,8 +65,8 @@ name:
#define GLUE(a,b) XGLUE(a,b)
#define ENTRY(name) \
.align 2 ; \
- .globl name; \
- .globl GLUE(.,name); \
+ .weak name; \
+ .weak GLUE(.,name); \
.pushsection ".opd","aw"; \
name: \
.quad GLUE(.,name); \
@@ -83,8 +83,8 @@ GLUE(.,name):
#define ENTRY(name) \
.text; \
.p2align 4; \
- .globl name; \
- .type name,@function; \
+ .weak name; \
+ .type name,@function; \
name:
#endif /* __powerpc64__ */
diff --git a/module/os/freebsd/spl/list.c b/module/os/freebsd/spl/list.c
index 21230b2adddbb..8796be4a98fb5 100644
--- a/module/os/freebsd/spl/list.c
+++ b/module/os/freebsd/spl/list.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Generic doubly-linked list implementation
*/
diff --git a/module/os/linux/zfs/zfs_ctldir.c b/module/os/linux/zfs/zfs_ctldir.c
index c2748ce450b4a..26e785a0d422c 100644
--- a/module/os/linux/zfs/zfs_ctldir.c
+++ b/module/os/linux/zfs/zfs_ctldir.c
@@ -31,6 +31,7 @@
* Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
* Copyright (c) 2018 George Melikov. All Rights Reserved.
* Copyright (c) 2019 Datto, Inc. All rights reserved.
+ * Copyright (c) 2020 The MathWorks, Inc. All rights reserved.
*/
/*
@@ -978,6 +979,22 @@ out:
}
/*
+ * Flush everything out of the kernel's export table and such.
+ * This is needed as once the snapshot is used over NFS, its
+ * entries in svc_export and svc_expkey caches hold reference
+ * to the snapshot mount point. There is no known way of flushing
+ * only the entries related to the snapshot.
+ */
+static void
+exportfs_flush(void)
+{
+ char *argv[] = { "/usr/sbin/exportfs", "-f", NULL };
+ char *envp[] = { NULL };
+
+ (void) call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
+}
+
+/*
* Attempt to unmount a snapshot by making a call to user space.
* There is no assurance that this can or will succeed, is just a
* best effort. In the case where it does fail, perhaps because
@@ -999,6 +1016,8 @@ zfsctl_snapshot_unmount(char *snapname, int flags)
}
rw_exit(&zfs_snapshot_lock);
+ exportfs_flush();
+
if (flags & MNT_FORCE)
argv[4] = "-fn";
argv[5] = se->se_path;
diff --git a/module/zcommon/zfs_fletcher.c b/module/zcommon/zfs_fletcher.c
index 18998bceeadac..3e0632a32864e 100644
--- a/module/zcommon/zfs_fletcher.c
+++ b/module/zcommon/zfs_fletcher.c
@@ -187,7 +187,7 @@ static const fletcher_4_ops_t *fletcher_4_impls[] = {
#if defined(__x86_64) && defined(HAVE_AVX512BW)
&fletcher_4_avx512bw_ops,
#endif
-#if defined(__aarch64__)
+#if defined(__aarch64__) && !defined(__FreeBSD__)
&fletcher_4_aarch64_neon_ops,
#endif
};
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index bd1a993dca92f..70565cc250115 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -823,6 +823,7 @@ unsigned long l2arc_feed_min_ms = L2ARC_FEED_MIN_MS; /* min interval msecs */
int l2arc_noprefetch = B_TRUE; /* don't cache prefetch bufs */
int l2arc_feed_again = B_TRUE; /* turbo warmup */
int l2arc_norw = B_FALSE; /* no reads during writes */
+int l2arc_meta_percent = 33; /* limit on headers size */
/*
* L2ARC Internals
@@ -4988,9 +4989,6 @@ arc_adapt(int bytes, arc_state_t *state)
int64_t mrug_size = zfs_refcount_count(&arc_mru_ghost->arcs_size);
int64_t mfug_size = zfs_refcount_count(&arc_mfu_ghost->arcs_size);
- if (state == arc_l2c_only)
- return;
-
ASSERT(bytes > 0);
/*
* Adapt the target size of the MRU list:
@@ -9144,6 +9142,15 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz)
return (write_asize);
}
+static boolean_t
+l2arc_hdr_limit_reached(void)
+{
+ int64_t s = aggsum_upper_bound(&astat_l2_hdr_size);
+
+ return (arc_reclaim_needed() || (s > arc_meta_limit * 3 / 4) ||
+ (s > (arc_warm ? arc_c : arc_c_max) * l2arc_meta_percent / 100));
+}
+
/*
* This thread feeds the L2ARC at regular intervals. This is the beating
* heart of the L2ARC.
@@ -9211,7 +9218,7 @@ l2arc_feed_thread(void *unused)
/*
* Avoid contributing to memory pressure.
*/
- if (arc_reclaim_needed()) {
+ if (l2arc_hdr_limit_reached()) {
ARCSTAT_BUMP(arcstat_l2_abort_lowmem);
spa_config_exit(spa, SCL_L2ARC, dev);
continue;
@@ -9662,7 +9669,7 @@ l2arc_rebuild(l2arc_dev_t *dev)
* online the L2ARC dev at a later time (or re-import the pool)
* to reconstruct it (when there's less memory pressure).
*/
- if (arc_reclaim_needed()) {
+ if (l2arc_hdr_limit_reached()) {
ARCSTAT_BUMP(arcstat_l2_rebuild_abort_lowmem);
cmn_err(CE_NOTE, "System running low on memory, "
"aborting L2ARC rebuild.");
@@ -10002,6 +10009,13 @@ l2arc_log_blk_restore(l2arc_dev_t *dev, const l2arc_log_blk_phys_t *lb,
uint64_t size = 0, asize = 0;
uint64_t log_entries = dev->l2ad_log_entries;
+ /*
+ * Usually arc_adapt() is called only for data, not headers, but
+ * since we may allocate significant amount of memory here, let ARC
+ * grow its arc_c.
+ */
+ arc_adapt(log_entries * HDR_L2ONLY_SIZE, arc_l2c_only);
+
for (int i = log_entries - 1; i >= 0; i--) {
/*
* Restore goes in the reverse temporal direction to preserve
@@ -10538,6 +10552,9 @@ ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, feed_again, INT, ZMOD_RW,
ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, norw, INT, ZMOD_RW,
"No reads during writes");
+ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, meta_percent, INT, ZMOD_RW,
+ "Percent of ARC size allowed for L2ARC-only headers");
+
ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, rebuild_enabled, INT, ZMOD_RW,
"Rebuild the L2ARC when importing a pool");
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
index 06d6df6187480..2c96645214f82 100644
--- a/module/zfs/dmu.c
+++ b/module/zfs/dmu.c
@@ -2458,6 +2458,7 @@ EXPORT_SYMBOL(dmu_object_set_blocksize);
EXPORT_SYMBOL(dmu_object_set_maxblkid);
EXPORT_SYMBOL(dmu_object_set_checksum);
EXPORT_SYMBOL(dmu_object_set_compress);
+EXPORT_SYMBOL(dmu_offset_next);
EXPORT_SYMBOL(dmu_write_policy);
EXPORT_SYMBOL(dmu_sync);
EXPORT_SYMBOL(dmu_request_arcbuf);
diff --git a/module/zfs/dnode_sync.c b/module/zfs/dnode_sync.c
index eafea3403c711..ae44cb69765c3 100644
--- a/module/zfs/dnode_sync.c
+++ b/module/zfs/dnode_sync.c
@@ -23,6 +23,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 by Delphix. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright 2020 Oxide Computer Company
*/
#include <sys/zfs_context.h>
@@ -762,13 +763,22 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
dsfra.dsfra_dnode = dn;
dsfra.dsfra_tx = tx;
dsfra.dsfra_free_indirects = freeing_dnode;
+ mutex_enter(&dn->dn_mtx);
if (freeing_dnode) {
ASSERT(range_tree_contains(dn->dn_free_ranges[txgoff],
0, dn->dn_maxblkid + 1));
}
- mutex_enter(&dn->dn_mtx);
- range_tree_vacate(dn->dn_free_ranges[txgoff],
+ /*
+ * Because dnode_sync_free_range() must drop dn_mtx during its
+ * processing, using it as a callback to range_tree_vacate() is
+ * not safe. No other operations (besides destroy) are allowed
+ * once range_tree_vacate() has begun, and dropping dn_mtx
+ * would leave a window open for another thread to observe that
+ * invalid (and unsafe) state.
+ */
+ range_tree_walk(dn->dn_free_ranges[txgoff],
dnode_sync_free_range, &dsfra);
+ range_tree_vacate(dn->dn_free_ranges[txgoff], NULL, NULL);
range_tree_destroy(dn->dn_free_ranges[txgoff]);
dn->dn_free_ranges[txgoff] = NULL;
mutex_exit(&dn->dn_mtx);
diff --git a/module/zfs/dsl_dir.c b/module/zfs/dsl_dir.c
index 73b7943b8f99f..29672e9a613e5 100644
--- a/module/zfs/dsl_dir.c
+++ b/module/zfs/dsl_dir.c
@@ -121,13 +121,6 @@
* and updated by dsl_fs_ss_count_adjust(). A new limit value is setup in
* dsl_dir_activate_fs_ss_limit() and the counts are adjusted, if necessary, by
* dsl_dir_init_fs_ss_count().
- *
- * There is a special case when we receive a filesystem that already exists. In
- * this case a temporary clone name of %X is created (see dmu_recv_begin). We
- * never update the filesystem counts for temporary clones.
- *
- * Likewise, we do not update the snapshot counts for temporary snapshots,
- * such as those created by zfs diff.
*/
extern inline dsl_dir_phys_t *dsl_dir_phys(dsl_dir_t *dd);
@@ -593,11 +586,9 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, dmu_tx_t *tx)
&chld_dd));
/*
- * Ignore hidden ($FREE, $MOS & $ORIGIN) objsets and
- * temporary datasets.
+ * Ignore hidden ($FREE, $MOS & $ORIGIN) objsets.
*/
- if (chld_dd->dd_myname[0] == '$' ||
- chld_dd->dd_myname[0] == '%') {
+ if (chld_dd->dd_myname[0] == '$') {
dsl_dir_rele(chld_dd, FTAG);
continue;
}
@@ -910,14 +901,12 @@ dsl_fs_ss_count_adjust(dsl_dir_t *dd, int64_t delta, const char *prop,
strcmp(prop, DD_FIELD_SNAPSHOT_COUNT) == 0);
/*
- * When we receive an incremental stream into a filesystem that already
- * exists, a temporary clone is created. We don't count this temporary
- * clone, whose name begins with a '%'. We also ignore hidden ($FREE,
- * $MOS & $ORIGIN) objsets.
+ * We don't do accounting for hidden ($FREE, $MOS & $ORIGIN) objsets.
*/
- if ((dd->dd_myname[0] == '%' || dd->dd_myname[0] == '$') &&
- strcmp(prop, DD_FIELD_FILESYSTEM_COUNT) == 0)
+ if (dd->dd_myname[0] == '$' && strcmp(prop,
+ DD_FIELD_FILESYSTEM_COUNT) == 0) {
return;
+ }
/*
* e.g. if renaming a dataset with no snapshots, count adjustment is 0
diff --git a/module/zfs/sa.c b/module/zfs/sa.c
index 977e729fe4683..83a10e7b45484 100644
--- a/module/zfs/sa.c
+++ b/module/zfs/sa.c
@@ -39,7 +39,6 @@
#include <sys/sa.h>
#include <sys/sunddi.h>
#include <sys/sa_impl.h>
-#include <sys/dnode.h>
#include <sys/errno.h>
#include <sys/zfs_context.h>
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 1e3728d93cee1..75ff398d17c70 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -3201,7 +3201,8 @@ spa_verify_host(spa_t *spa, nvlist_t *mos_config)
cmn_err(CE_WARN, "pool '%s' could not be "
"loaded as it was last accessed by "
"another system (host: %s hostid: 0x%llx). "
- "See: http://illumos.org/msg/ZFS-8000-EY",
+ "See: https://openzfs.github.io/openzfs-docs/msg/"
+ "ZFS-8000-EY",
spa_name(spa), hostname, (u_longlong_t)hostid);
spa_load_failed(spa, "hostid verification failed: pool "
"last accessed by host: %s (hostid: 0x%llx)",
diff --git a/module/zfs/vdev_raidz_math.c b/module/zfs/vdev_raidz_math.c
index aa92cb83d301d..9595a7b952514 100644
--- a/module/zfs/vdev_raidz_math.c
+++ b/module/zfs/vdev_raidz_math.c
@@ -61,7 +61,7 @@ const raidz_impl_ops_t *raidz_all_maths[] = {
#if defined(__x86_64) && defined(HAVE_AVX512BW) /* only x86_64 for now */
&vdev_raidz_avx512bw_impl,
#endif
-#if defined(__aarch64__)
+#if defined(__aarch64__) && !defined(__FreeBSD__)
&vdev_raidz_aarch64_neon_impl,
&vdev_raidz_aarch64_neonx2_impl,
#endif
diff --git a/module/zstd/Makefile.in b/module/zstd/Makefile.in
index eea749ea8a5a2..f67db710f0971 100644
--- a/module/zstd/Makefile.in
+++ b/module/zstd/Makefile.in
@@ -20,6 +20,9 @@ ccflags-y += -O3
# Set it for other compilers, too.
$(obj)/lib/zstd.o: c_flags += -fno-tree-vectorize
+# SSE register return with SSE disabled if -march=znverX is passed
+$(obj)/lib/zstd.o: c_flags += -U__BMI__
+
# Quiet warnings about frame size due to unused code in unmodified zstd lib
$(obj)/lib/zstd.o: c_flags += -Wframe-larger-than=20480
diff --git a/tests/runfiles/common.run b/tests/runfiles/common.run
index 615c4efc461ba..851488602f85d 100644
--- a/tests/runfiles/common.run
+++ b/tests/runfiles/common.run
@@ -216,7 +216,7 @@ tests = ['zfs_receive_001_pos', 'zfs_receive_002_pos', 'zfs_receive_003_pos',
'zfs_receive_016_pos', 'receive-o-x_props_override',
'zfs_receive_from_encrypted', 'zfs_receive_to_encrypted',
'zfs_receive_raw', 'zfs_receive_raw_incremental', 'zfs_receive_-e',
- 'zfs_receive_raw_-d', 'zfs_receive_from_zstd']
+ 'zfs_receive_raw_-d', 'zfs_receive_from_zstd', 'zfs_receive_new_props']
tags = ['functional', 'cli_root', 'zfs_receive']
[tests/functional/cli_root/zfs_rename]
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
index f13a955d8373f..2b281e71c210a 100644
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
@@ -21,6 +21,7 @@ dist_pkgdata_SCRIPTS = \
receive-o-x_props_override.ksh \
zfs_receive_from_encrypted.ksh \
zfs_receive_from_zstd.ksh \
+ zfs_receive_new_props.ksh \
zfs_receive_to_encrypted.ksh \
zfs_receive_raw.ksh \
zfs_receive_raw_incremental.ksh \
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh
new file mode 100644
index 0000000000000..54f13355f5e89
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh
@@ -0,0 +1,77 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2020 by Delphix. All rights reserved.
+#
+
+. $STF_SUITE/include/libtest.shlib
+
+#
+# DESCRIPTION:
+# ZFS receive test to handle Issue #10698
+#
+# STRATEGY:
+# 1. Create a pool with filesystem_limits disabled
+# 2. Create a filesystem on that pool
+# 3. Enable filesystem limits on that pool
+# 4. On a pool with filesystem limits enabled, create a filesystem and set a
+# limit
+# 5. Snapshot limited filesystem
+# 6. send -R limited filesystem and receive over filesystem with limits disabled
+#
+
+verify_runnable "both"
+
+function cleanup
+{
+ destroy_pool "$poolname"
+ destroy_pool "$rpoolname"
+ log_must rm -f "$vdevfile"
+ log_must rm -f "$rvdevfile"
+ log_must rm -f "$streamfile"
+}
+
+log_onexit cleanup
+
+log_assert "ZFS should handle receiving streams with filesystem limits on \
+ pools where the feature was recently enabled"
+
+poolname=sendpool
+rpoolname=recvpool
+vdevfile="$TEST_BASE_DIR/vdevfile.$$"
+rvdevfile="$TEST_BASE_DIR/rvdevfile.$$"
+sendfs="$poolname/fs"
+recvfs="$rpoolname/rfs"
+streamfile="$TEST_BASE_DIR/streamfile.$$"
+
+log_must truncate -s $MINVDEVSIZE "$rvdevfile"
+log_must truncate -s $MINVDEVSIZE "$vdevfile"
+log_must zpool create -O mountpoint=none -o feature@filesystem_limits=disabled \
+ "$rpoolname" "$rvdevfile"
+log_must zpool create -O mountpoint=none "$poolname" "$vdevfile"
+
+log_must zfs create "$recvfs"
+log_must zpool set feature@filesystem_limits=enabled "$rpoolname"
+
+log_must zfs create -o filesystem_limit=100 "$sendfs"
+log_must zfs snapshot "$sendfs@a"
+
+log_must zfs send -R "$sendfs@a" >"$streamfile"
+log_must eval "zfs recv -svuF $recvfs <$streamfile"
+
+log_pass "ZFS can handle receiving streams with filesystem limits on \
+ pools where the feature was recently enabled"