aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2020-10-17 00:05:34 +0000
committerMatt Macy <mmacy@FreeBSD.org>2020-10-17 00:05:34 +0000
commit0be360124f8f108f73365e31448e7550f877f3ac (patch)
tree78557e980720fdcfd76497e6630c29ce1688559c
parente2228bd99047bb6a0cef0da931147b1f28f155c2 (diff)
downloadsrc-0be360124f8f108f73365e31448e7550f877f3ac.tar.gz
src-0be360124f8f108f73365e31448e7550f877f3ac.zip
Update OpenZFS to 2.0.0-rc3-gbd565fvendor/openzfs/2.0.0-rc3-gfc5966vendor/openzfs
Notes
Notes: svn path=/vendor-sys/openzfs/dist/; revision=366774 svn path=/vendor-sys/openzfs/2.0.0-rc3-gfc5966/; revision=366775; tag=vendor/openzfs/2.0.0-rc3-gfc5966
-rw-r--r--CODE_OF_CONDUCT.md2
-rw-r--r--META4
-rw-r--r--README.md4
-rwxr-xr-xcmd/arc_summary/arc_summary22
-rwxr-xr-xcmd/arc_summary/arc_summary38
-rwxr-xr-xcmd/dbufstat/dbufstat.in17
-rw-r--r--cmd/zdb/zdb.c16
-rw-r--r--cmd/zdb/zdb_il.c41
-rw-r--r--cmd/zed/agents/zfs_agents.c6
-rw-r--r--cmd/zed/agents/zfs_mod.c4
-rw-r--r--cmd/zed/agents/zfs_retire.c2
-rw-r--r--cmd/zed/zed.c4
-rw-r--r--cmd/zed/zed.h4
-rw-r--r--cmd/zed/zed_conf.c4
-rw-r--r--cmd/zed/zed_conf.h4
-rw-r--r--cmd/zed/zed_event.c4
-rw-r--r--cmd/zed/zed_event.h4
-rw-r--r--cmd/zed/zed_exec.c4
-rw-r--r--cmd/zed/zed_exec.h4
-rw-r--r--cmd/zed/zed_file.c4
-rw-r--r--cmd/zed/zed_file.h4
-rw-r--r--cmd/zed/zed_log.c4
-rw-r--r--cmd/zed/zed_log.h4
-rw-r--r--cmd/zed/zed_strings.c4
-rw-r--r--cmd/zed/zed_strings.h4
-rw-r--r--cmd/zvol_id/Makefile.am2
-rw-r--r--config/kernel-bio.m42
-rw-r--r--configure.ac1
-rwxr-xr-xcontrib/dracut/90zfs/module-setup.sh.in3
-rw-r--r--contrib/pyzfs/README2
-rw-r--r--contrib/pyzfs/libzfs_core/__init__.py2
-rwxr-xr-xcopy-builtin4
-rw-r--r--etc/init.d/README.md2
-rw-r--r--include/os/freebsd/linux/compiler.h2
-rw-r--r--include/os/freebsd/spl/rpc/xdr.h4
-rw-r--r--include/os/freebsd/spl/sys/atomic.h11
-rw-r--r--include/os/freebsd/spl/sys/byteorder.h10
-rw-r--r--include/os/freebsd/spl/sys/ccompile.h12
-rw-r--r--include/os/freebsd/spl/sys/cmn_err.h9
-rw-r--r--include/os/freebsd/spl/sys/condvar.h1
-rw-r--r--include/os/freebsd/spl/sys/kmem.h10
-rw-r--r--include/os/freebsd/spl/sys/kmem_cache.h3
-rw-r--r--include/os/freebsd/spl/sys/kstat.h13
-rw-r--r--include/os/freebsd/spl/sys/proc.h3
-rw-r--r--include/os/freebsd/spl/sys/procfs_list.h6
-rw-r--r--include/os/freebsd/spl/sys/sig.h5
-rw-r--r--include/os/freebsd/spl/sys/simd_x86.h11
-rw-r--r--include/os/freebsd/spl/sys/sunddi.h1
-rw-r--r--include/os/freebsd/spl/sys/sysmacros.h7
-rw-r--r--include/os/freebsd/spl/sys/taskq.h9
-rw-r--r--include/os/freebsd/spl/sys/uio.h4
-rw-r--r--include/os/freebsd/zfs/sys/zfs_ctldir.h2
-rw-r--r--include/os/freebsd/zfs/sys/zfs_dir.h4
-rw-r--r--include/os/freebsd/zfs/sys/zfs_vfsops_os.h1
-rw-r--r--include/os/freebsd/zfs/sys/zfs_vnops.h14
-rw-r--r--include/os/linux/spl/rpc/xdr.h1
-rw-r--r--include/os/linux/spl/sys/acl.h1
-rw-r--r--include/os/linux/spl/sys/atomic.h1
-rw-r--r--include/os/linux/spl/sys/byteorder.h1
-rw-r--r--include/os/linux/spl/sys/callb.h1
-rw-r--r--include/os/linux/spl/sys/callo.h1
-rw-r--r--include/os/linux/spl/sys/cmn_err.h1
-rw-r--r--include/os/linux/spl/sys/condvar.h1
-rw-r--r--include/os/linux/spl/sys/console.h1
-rw-r--r--include/os/linux/spl/sys/cred.h1
-rw-r--r--include/os/linux/spl/sys/ctype.h1
-rw-r--r--include/os/linux/spl/sys/debug.h1
-rw-r--r--include/os/linux/spl/sys/disp.h1
-rw-r--r--include/os/linux/spl/sys/dkio.h1
-rw-r--r--include/os/linux/spl/sys/fcntl.h1
-rw-r--r--include/os/linux/spl/sys/file.h1
-rw-r--r--include/os/linux/spl/sys/inttypes.h1
-rw-r--r--include/os/linux/spl/sys/isa_defs.h1
-rw-r--r--include/os/linux/spl/sys/kmem.h1
-rw-r--r--include/os/linux/spl/sys/kmem_cache.h1
-rw-r--r--include/os/linux/spl/sys/kstat.h1
-rw-r--r--include/os/linux/spl/sys/list.h1
-rw-r--r--include/os/linux/spl/sys/mod_os.h1
-rw-r--r--include/os/linux/spl/sys/mutex.h1
-rw-r--r--include/os/linux/spl/sys/param.h1
-rw-r--r--include/os/linux/spl/sys/proc.h1
-rw-r--r--include/os/linux/spl/sys/processor.h1
-rw-r--r--include/os/linux/spl/sys/random.h1
-rw-r--r--include/os/linux/spl/sys/rwlock.h1
-rw-r--r--include/os/linux/spl/sys/shrinker.h1
-rw-r--r--include/os/linux/spl/sys/sid.h1
-rw-r--r--include/os/linux/spl/sys/signal.h1
-rw-r--r--include/os/linux/spl/sys/simd.h1
-rw-r--r--include/os/linux/spl/sys/stat.h1
-rw-r--r--include/os/linux/spl/sys/strings.h1
-rw-r--r--include/os/linux/spl/sys/sunddi.h1
-rw-r--r--include/os/linux/spl/sys/sysmacros.h1
-rw-r--r--include/os/linux/spl/sys/systeminfo.h1
-rw-r--r--include/os/linux/spl/sys/taskq.h1
-rw-r--r--include/os/linux/spl/sys/thread.h1
-rw-r--r--include/os/linux/spl/sys/time.h1
-rw-r--r--include/os/linux/spl/sys/timer.h1
-rw-r--r--include/os/linux/spl/sys/tsd.h1
-rw-r--r--include/os/linux/spl/sys/types.h1
-rw-r--r--include/os/linux/spl/sys/types32.h1
-rw-r--r--include/os/linux/spl/sys/uio.h1
-rw-r--r--include/os/linux/spl/sys/user.h1
-rw-r--r--include/os/linux/spl/sys/vfs.h1
-rw-r--r--include/os/linux/spl/sys/vmem.h1
-rw-r--r--include/os/linux/spl/sys/vmsystm.h1
-rw-r--r--include/os/linux/spl/sys/vnode.h1
-rw-r--r--include/os/linux/spl/sys/wait.h1
-rw-r--r--include/os/linux/spl/sys/zmod.h1
-rw-r--r--include/os/linux/spl/sys/zone.h1
-rw-r--r--include/os/linux/zfs/sys/zfs_ctldir.h18
-rw-r--r--include/os/linux/zfs/sys/zfs_vnops.h4
-rw-r--r--include/sys/dmu.h3
-rw-r--r--include/sys/mod.h1
-rw-r--r--include/sys/nvpair.h8
-rw-r--r--include/sys/pathname.h4
-rw-r--r--include/sys/spa.h6
-rw-r--r--include/sys/u8_textprep.h2
-rw-r--r--include/sys/zfs_context.h14
-rw-r--r--include/sys/zfs_ioctl.h1
-rw-r--r--include/sys/zfs_znode.h13
-rw-r--r--include/sys/zil.h4
-rw-r--r--lib/libspl/include/os/freebsd/sys/param.h4
-rw-r--r--lib/libspl/include/sys/acl.h66
-rw-r--r--lib/libspl/os/freebsd/getmntany.c4
-rw-r--r--lib/libzfs/libzfs_sendrecv.c25
-rw-r--r--lib/libzfs/libzfs_util.c3
-rw-r--r--lib/libzfs/os/freebsd/libzfs_compat.c21
-rw-r--r--lib/libzfsbootenv/libzfsbootenv.pc.in2
-rw-r--r--lib/libzutil/os/linux/zutil_import_os.c6
-rw-r--r--man/man1/raidz_test.12
-rw-r--r--man/man5/zfs-module-parameters.517
-rw-r--r--man/man8/zed.8.in3
-rw-r--r--man/man8/zfsprops.819
-rw-r--r--man/man8/zpool.82
-rw-r--r--module/Makefile.in2
-rw-r--r--module/os/freebsd/spl/list.c2
-rw-r--r--module/os/freebsd/spl/spl_kstat.c1
-rw-r--r--module/os/freebsd/spl/spl_taskq.c59
-rw-r--r--module/os/freebsd/zfs/kmod_core.c93
-rw-r--r--module/os/freebsd/zfs/sysctl_os.c5
-rw-r--r--module/os/freebsd/zfs/zfs_acl.c2
-rw-r--r--module/os/freebsd/zfs/zfs_ctldir.c15
-rw-r--r--module/os/freebsd/zfs/zfs_vfsops.c22
-rw-r--r--module/os/freebsd/zfs/zfs_vnops.c84
-rw-r--r--module/os/linux/spl/README.md2
-rw-r--r--module/os/linux/spl/spl-atomic.c1
-rw-r--r--module/os/linux/spl/spl-condvar.c1
-rw-r--r--module/os/linux/spl/spl-cred.c1
-rw-r--r--module/os/linux/spl/spl-err.c1
-rw-r--r--module/os/linux/spl/spl-generic.c1
-rw-r--r--module/os/linux/spl/spl-kmem-cache.c1
-rw-r--r--module/os/linux/spl/spl-kmem.c3
-rw-r--r--module/os/linux/spl/spl-kstat.c1
-rw-r--r--module/os/linux/spl/spl-proc.c1
-rw-r--r--module/os/linux/spl/spl-taskq.c1
-rw-r--r--module/os/linux/spl/spl-thread.c1
-rw-r--r--module/os/linux/spl/spl-tsd.c1
-rw-r--r--module/os/linux/spl/spl-vmem.c1
-rw-r--r--module/os/linux/spl/spl-xdr.c1
-rw-r--r--module/os/linux/spl/spl-zlib.c1
-rw-r--r--module/os/linux/zfs/zfs_acl.c2
-rw-r--r--module/os/linux/zfs/zfs_ctldir.c25
-rw-r--r--module/os/linux/zfs/zfs_dir.c9
-rw-r--r--module/os/linux/zfs/zfs_vfsops.c1
-rw-r--r--module/os/linux/zfs/zfs_vnops.c6
-rw-r--r--module/unicode/u8_textprep.c2
-rw-r--r--module/zcommon/zfs_prop.c19
-rw-r--r--module/zfs/dmu_objset.c2
-rw-r--r--module/zfs/dmu_redact.c2
-rw-r--r--module/zfs/dmu_traverse.c6
-rw-r--r--module/zfs/dmu_zfetch.c5
-rw-r--r--module/zfs/dsl_scan.c10
-rw-r--r--module/zfs/pathname.c8
-rw-r--r--module/zfs/range_tree.c2
-rw-r--r--module/zfs/spa.c10
-rw-r--r--module/zfs/vdev.c18
-rw-r--r--module/zfs/vdev_label.c5
-rw-r--r--module/zfs/vdev_removal.c24
-rw-r--r--module/zfs/zfeature.c2
-rw-r--r--module/zfs/zfs_ioctl.c41
-rw-r--r--module/zfs/zfs_log.c12
-rw-r--r--module/zfs/zil.c25
-rw-r--r--module/zstd/lib/zstd.c6
-rw-r--r--rpm/generic/zfs-dkms.spec.in2
-rw-r--r--rpm/generic/zfs-kmod.spec.in2
-rw-r--r--rpm/generic/zfs.spec.in4
-rw-r--r--rpm/redhat/zfs-kmod.spec.in2
-rwxr-xr-xscripts/zimport.sh8
-rw-r--r--tests/runfiles/common.run5
-rw-r--r--tests/runfiles/linux.run9
-rw-r--r--tests/zfs-tests/include/libtest.shlib26
-rw-r--r--tests/zfs-tests/tests/functional/acl/Makefile.am2
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix-sa/Makefile.am8
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix-sa/cleanup.ksh33
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix-sa/posix_001_pos.ksh1
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix-sa/posix_002_pos.ksh1
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix-sa/posix_003_pos.ksh1
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh1
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix-sa/setup.ksh52
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix/Makefile.am3
-rwxr-xr-xtests/zfs-tests/tests/functional/acl/posix/posix_003_pos.ksh1
-rw-r--r--tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh49
-rwxr-xr-xtests/zfs-tests/tests/functional/acl/posix/setup.ksh1
-rwxr-xr-xtests/zfs-tests/tests/functional/arc/dbufstats_001_pos.ksh12
-rwxr-xr-xtests/zfs-tests/tests/functional/arc/dbufstats_002_pos.ksh6
-rw-r--r--tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.zcp2
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_test_race.ksh2
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_sparse.ksh2
-rw-r--r--tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg4
-rwxr-xr-xtests/zfs-tests/tests/functional/history/history_002_pos.ksh9
-rwxr-xr-xtests/zfs-tests/tests/functional/nopwrite/nopwrite_recsize.ksh2
-rwxr-xr-xtests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh2
-rw-r--r--tests/zfs-tests/tests/functional/rsend/rsend.kshlib13
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/rsend_008_pos.ksh2
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh2
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh2
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh2
217 files changed, 885 insertions, 562 deletions
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index d314a66b4e2d..2dcc251e553d 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,2 +1,2 @@
The [OpenZFS Code of Conduct](http://www.open-zfs.org/wiki/Code_of_Conduct)
-applies to spaces associated with the ZFS on Linux project, including GitHub.
+applies to spaces associated with the OpenZFS project, including GitHub.
diff --git a/META b/META
index ab33031b2e2a..87ffae5f4c09 100644
--- a/META
+++ b/META
@@ -2,9 +2,9 @@ Meta: 1
Name: zfs
Branch: 1.0
Version: 2.0.0
-Release: rc2
+Release: rc3
Release-Tags: relext
License: CDDL
Author: OpenZFS
-Linux-Maximum: 5.8
+Linux-Maximum: 5.9
Linux-Minimum: 3.10
diff --git a/README.md b/README.md
index d215cd5d8ca5..31d99386e90e 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,8 @@ This repository contains the code for running OpenZFS on Linux and FreeBSD.
# Installation
-Full documentation for installing OpenZFS on your favorite Linux distribution can
-be found at the [ZoL Site](https://zfsonlinux.org/).
+Full documentation for installing OpenZFS on your favorite operating system can
+be found at the [Getting Started Page](https://openzfs.github.io/openzfs-docs/Getting%20Started/index.html).
# Contribute & Develop
diff --git a/cmd/arc_summary/arc_summary2 b/cmd/arc_summary/arc_summary2
index 5dc40d759dce..a925d32788ea 100755
--- a/cmd/arc_summary/arc_summary2
+++ b/cmd/arc_summary/arc_summary2
@@ -42,7 +42,7 @@
Provides basic information on the ARC, its efficiency, the L2ARC (if present),
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See the
in-source documentation and code at
-https://github.com/zfsonlinux/zfs/blob/master/module/zfs/arc.c for details.
+https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
"""
import getopt
diff --git a/cmd/arc_summary/arc_summary3 b/cmd/arc_summary/arc_summary3
index c920b8e5395d..83cbf0f1728d 100755
--- a/cmd/arc_summary/arc_summary3
+++ b/cmd/arc_summary/arc_summary3
@@ -32,7 +32,7 @@
Provides basic information on the ARC, its efficiency, the L2ARC (if present),
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See
the in-source documentation and code at
-https://github.com/zfsonlinux/zfs/blob/master/module/zfs/arc.c for details.
+https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
The original introduction to arc_summary can be found at
http://cuddletech.com/?p=454
"""
@@ -43,7 +43,7 @@ import subprocess
import sys
import time
-DESCRIPTION = 'Print ARC and other statistics for ZFS on Linux'
+DESCRIPTION = 'Print ARC and other statistics for OpenZFS'
INDENT = ' '*8
LINE_LENGTH = 72
DATE_FORMAT = '%a %b %d %H:%M:%S %Y'
@@ -831,7 +831,7 @@ def section_vdev(kstats_dict):
# Currently [Nov 2017] the VDEV cache is disabled, because it is actually
# harmful. When this is the case, we just skip the whole entry. See
- # https://github.com/zfsonlinux/zfs/blob/master/module/zfs/vdev_cache.c
+ # https://github.com/openzfs/zfs/blob/master/module/zfs/vdev_cache.c
# for details
tunables = get_vdev_params()
@@ -857,7 +857,7 @@ def section_vdev(kstats_dict):
def section_zil(kstats_dict):
"""Collect information on the ZFS Intent Log. Some of the information
- taken from https://github.com/zfsonlinux/zfs/blob/master/include/sys/zil.h
+ taken from https://github.com/openzfs/zfs/blob/master/include/sys/zil.h
"""
zil_stats = isolate_section('zil', kstats_dict)
diff --git a/cmd/dbufstat/dbufstat.in b/cmd/dbufstat/dbufstat.in
index 98eb79057388..1d4eb39d7242 100755
--- a/cmd/dbufstat/dbufstat.in
+++ b/cmd/dbufstat/dbufstat.in
@@ -113,6 +113,21 @@ cmd = ("Usage: dbufstat [-bdhnrtvx] [-i file] [-f fields] [-o file] "
raw = 0
+if sys.platform.startswith("freebsd"):
+ import io
+ # Requires py-sysctl on FreeBSD
+ import sysctl
+
+ def default_ifile():
+ dbufs = sysctl.filter("kstat.zfs.misc.dbufs")[0].value
+ sys.stdin = io.StringIO(dbufs)
+ return "-"
+
+elif sys.platform.startswith("linux"):
+ def default_ifile():
+ return "/proc/spl/kstat/zfs/dbufs"
+
+
def print_incompat_helper(incompat):
cnt = 0
for key in sorted(incompat):
@@ -645,7 +660,7 @@ def main():
sys.exit(1)
if not ifile:
- ifile = '/proc/spl/kstat/zfs/dbufs'
+ ifile = default_ifile()
if ifile is not "-":
try:
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index c070a1f8c4da..376b24db1eec 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -1120,7 +1120,21 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
(void) zap_lookup(os, object, attr.za_name,
attr.za_integer_length, attr.za_num_integers, prop);
if (attr.za_integer_length == 1) {
- (void) printf("%s", (char *)prop);
+ if (strcmp(attr.za_name,
+ DSL_CRYPTO_KEY_MASTER_KEY) == 0 ||
+ strcmp(attr.za_name,
+ DSL_CRYPTO_KEY_HMAC_KEY) == 0 ||
+ strcmp(attr.za_name, DSL_CRYPTO_KEY_IV) == 0 ||
+ strcmp(attr.za_name, DSL_CRYPTO_KEY_MAC) == 0 ||
+ strcmp(attr.za_name, DMU_POOL_CHECKSUM_SALT) == 0) {
+ uint8_t *u8 = prop;
+
+ for (i = 0; i < attr.za_num_integers; i++) {
+ (void) printf("%02x", u8[i]);
+ }
+ } else {
+ (void) printf("%s", (char *)prop);
+ }
} else {
for (i = 0; i < attr.za_num_integers; i++) {
switch (attr.za_integer_length) {
diff --git a/cmd/zdb/zdb_il.c b/cmd/zdb/zdb_il.c
index c12178effae0..553765b71716 100644
--- a/cmd/zdb/zdb_il.c
+++ b/cmd/zdb/zdb_il.c
@@ -62,9 +62,9 @@ print_log_bp(const blkptr_t *bp, const char *prefix)
/* ARGSUSED */
static void
-zil_prt_rec_create(zilog_t *zilog, int txtype, void *arg)
+zil_prt_rec_create(zilog_t *zilog, int txtype, const void *arg)
{
- lr_create_t *lr = arg;
+ const lr_create_t *lr = arg;
time_t crtime = lr->lr_crtime[0];
char *name, *link;
lr_attr_t *lrattr;
@@ -98,9 +98,9 @@ zil_prt_rec_create(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */
static void
-zil_prt_rec_remove(zilog_t *zilog, int txtype, void *arg)
+zil_prt_rec_remove(zilog_t *zilog, int txtype, const void *arg)
{
- lr_remove_t *lr = arg;
+ const lr_remove_t *lr = arg;
(void) printf("%sdoid %llu, name %s\n", tab_prefix,
(u_longlong_t)lr->lr_doid, (char *)(lr + 1));
@@ -108,9 +108,9 @@ zil_prt_rec_remove(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */
static void
-zil_prt_rec_link(zilog_t *zilog, int txtype, void *arg)
+zil_prt_rec_link(zilog_t *zilog, int txtype, const void *arg)
{
- lr_link_t *lr = arg;
+ const lr_link_t *lr = arg;
(void) printf("%sdoid %llu, link_obj %llu, name %s\n", tab_prefix,
(u_longlong_t)lr->lr_doid, (u_longlong_t)lr->lr_link_obj,
@@ -119,9 +119,9 @@ zil_prt_rec_link(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */
static void
-zil_prt_rec_rename(zilog_t *zilog, int txtype, void *arg)
+zil_prt_rec_rename(zilog_t *zilog, int txtype, const void *arg)
{
- lr_rename_t *lr = arg;
+ const lr_rename_t *lr = arg;
char *snm = (char *)(lr + 1);
char *tnm = snm + strlen(snm) + 1;
@@ -148,11 +148,11 @@ zil_prt_rec_write_cb(void *data, size_t len, void *unused)
/* ARGSUSED */
static void
-zil_prt_rec_write(zilog_t *zilog, int txtype, void *arg)
+zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
{
- lr_write_t *lr = arg;
+ const lr_write_t *lr = arg;
abd_t *data;
- blkptr_t *bp = &lr->lr_blkptr;
+ const blkptr_t *bp = &lr->lr_blkptr;
zbookmark_phys_t zb;
int verbose = MAX(dump_opt['d'], dump_opt['i']);
int error;
@@ -211,9 +211,9 @@ out:
/* ARGSUSED */
static void
-zil_prt_rec_truncate(zilog_t *zilog, int txtype, void *arg)
+zil_prt_rec_truncate(zilog_t *zilog, int txtype, const void *arg)
{
- lr_truncate_t *lr = arg;
+ const lr_truncate_t *lr = arg;
(void) printf("%sfoid %llu, offset 0x%llx, length 0x%llx\n", tab_prefix,
(u_longlong_t)lr->lr_foid, (longlong_t)lr->lr_offset,
@@ -222,9 +222,9 @@ zil_prt_rec_truncate(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */
static void
-zil_prt_rec_setattr(zilog_t *zilog, int txtype, void *arg)
+zil_prt_rec_setattr(zilog_t *zilog, int txtype, const void *arg)
{
- lr_setattr_t *lr = arg;
+ const lr_setattr_t *lr = arg;
time_t atime = (time_t)lr->lr_atime[0];
time_t mtime = (time_t)lr->lr_mtime[0];
@@ -268,15 +268,15 @@ zil_prt_rec_setattr(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */
static void
-zil_prt_rec_acl(zilog_t *zilog, int txtype, void *arg)
+zil_prt_rec_acl(zilog_t *zilog, int txtype, const void *arg)
{
- lr_acl_t *lr = arg;
+ const lr_acl_t *lr = arg;
(void) printf("%sfoid %llu, aclcnt %llu\n", tab_prefix,
(u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_aclcnt);
}
-typedef void (*zil_prt_rec_func_t)(zilog_t *, int, void *);
+typedef void (*zil_prt_rec_func_t)(zilog_t *, int, const void *);
typedef struct zil_rec_info {
zil_prt_rec_func_t zri_print;
const char *zri_name;
@@ -309,7 +309,7 @@ static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = {
/* ARGSUSED */
static int
-print_log_record(zilog_t *zilog, lr_t *lr, void *arg, uint64_t claim_txg)
+print_log_record(zilog_t *zilog, const lr_t *lr, void *arg, uint64_t claim_txg)
{
int txtype;
int verbose = MAX(dump_opt['d'], dump_opt['i']);
@@ -343,7 +343,8 @@ print_log_record(zilog_t *zilog, lr_t *lr, void *arg, uint64_t claim_txg)
/* ARGSUSED */
static int
-print_log_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
+print_log_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
+ uint64_t claim_txg)
{
char blkbuf[BP_SPRINTF_LEN + 10];
int verbose = MAX(dump_opt['d'], dump_opt['i']);
diff --git a/cmd/zed/agents/zfs_agents.c b/cmd/zed/agents/zfs_agents.c
index 006e0ab99f47..6c40470e83d7 100644
--- a/cmd/zed/agents/zfs_agents.c
+++ b/cmd/zed/agents/zfs_agents.c
@@ -177,9 +177,9 @@ zfs_agent_post_event(const char *class, const char *subclass, nvlist_t *nvl)
}
/*
- * On ZFS on Linux, we don't get the expected FM_RESOURCE_REMOVED
- * ereport from vdev_disk layer after a hot unplug. Fortunately we
- * get a EC_DEV_REMOVE from our disk monitor and it is a suitable
+ * On Linux, we don't get the expected FM_RESOURCE_REMOVED ereport
+ * from the vdev_disk layer after a hot unplug. Fortunately we do
+ * get an EC_DEV_REMOVE from our disk monitor and it is a suitable
* proxy so we remap it here for the benefit of the diagnosis engine.
*/
if ((strcmp(class, EC_DEV_REMOVE) == 0) &&
diff --git a/cmd/zed/agents/zfs_mod.c b/cmd/zed/agents/zfs_mod.c
index 8d0a3b420086..8190beb0c9e7 100644
--- a/cmd/zed/agents/zfs_mod.c
+++ b/cmd/zed/agents/zfs_mod.c
@@ -63,9 +63,7 @@
* If the device could not be replaced, then the second online attempt will
* trigger the FMA fault that we skipped earlier.
*
- * ZFS on Linux porting notes:
- * Linux udev provides a disk insert for both the disk and the partition
- *
+ * On Linux udev provides a disk insert for both the disk and the partition.
*/
#include <ctype.h>
diff --git a/cmd/zed/agents/zfs_retire.c b/cmd/zed/agents/zfs_retire.c
index 9e95e20d5683..ba8a6de3a66f 100644
--- a/cmd/zed/agents/zfs_retire.c
+++ b/cmd/zed/agents/zfs_retire.c
@@ -364,7 +364,7 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
return;
/*
- * Note: on zfsonlinux statechange events are more than just
+ * Note: on Linux statechange events are more than just
* healthy ones so we need to confirm the actual state value.
*/
if (strcmp(class, "resource.fs.zfs.statechange") == 0 &&
diff --git a/cmd/zed/zed.c b/cmd/zed/zed.c
index 0784e3834733..907b8af0d01f 100644
--- a/cmd/zed/zed.c
+++ b/cmd/zed/zed.c
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed.h b/cmd/zed/zed.h
index 3ac0e63141e8..be57f1136fea 100644
--- a/cmd/zed/zed.h
+++ b/cmd/zed/zed.h
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_conf.c b/cmd/zed/zed_conf.c
index 52370eb87b29..c15f01fecb41 100644
--- a/cmd/zed/zed_conf.c
+++ b/cmd/zed/zed_conf.c
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_conf.h b/cmd/zed/zed_conf.h
index 424cb2c01c8c..f44d20382968 100644
--- a/cmd/zed/zed_conf.h
+++ b/cmd/zed/zed_conf.h
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_event.c b/cmd/zed/zed_event.c
index 1c5d00e297ff..8892087d6e62 100644
--- a/cmd/zed/zed_event.c
+++ b/cmd/zed/zed_event.c
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_event.h b/cmd/zed/zed_event.h
index c1455c3a0629..264c377ed91a 100644
--- a/cmd/zed/zed_event.h
+++ b/cmd/zed/zed_event.h
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_exec.c b/cmd/zed/zed_exec.c
index 08b7b5568362..aae607a9b7de 100644
--- a/cmd/zed/zed_exec.c
+++ b/cmd/zed/zed_exec.c
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_exec.h b/cmd/zed/zed_exec.h
index 4153e5519a46..5eb9170abfe3 100644
--- a/cmd/zed/zed_exec.h
+++ b/cmd/zed/zed_exec.h
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_file.c b/cmd/zed/zed_file.c
index c3cf3d421c6f..b51b1ca9dcf6 100644
--- a/cmd/zed/zed_file.c
+++ b/cmd/zed/zed_file.c
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_file.h b/cmd/zed/zed_file.h
index 05f360d20efd..7dcae83810ef 100644
--- a/cmd/zed/zed_file.h
+++ b/cmd/zed/zed_file.h
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_log.c b/cmd/zed/zed_log.c
index 5a3f2dbdb832..948dad52adb8 100644
--- a/cmd/zed/zed_log.c
+++ b/cmd/zed/zed_log.c
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_log.h b/cmd/zed/zed_log.h
index a03a4f53967c..0daaad11df5c 100644
--- a/cmd/zed/zed_log.h
+++ b/cmd/zed/zed_log.h
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_strings.c b/cmd/zed/zed_strings.c
index 6b1c669d71f4..89964317e48c 100644
--- a/cmd/zed/zed_strings.c
+++ b/cmd/zed/zed_strings.c
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zed/zed_strings.h b/cmd/zed/zed_strings.h
index 37a84cad7ffc..63d776f9b48f 100644
--- a/cmd/zed/zed_strings.h
+++ b/cmd/zed/zed_strings.h
@@ -1,6 +1,6 @@
/*
- * This file is part of the ZFS Event Daemon (ZED)
- * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>.
+ * This file is part of the ZFS Event Daemon (ZED).
+ *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/cmd/zvol_id/Makefile.am b/cmd/zvol_id/Makefile.am
index a584875081eb..8f9f3053ce8e 100644
--- a/cmd/zvol_id/Makefile.am
+++ b/cmd/zvol_id/Makefile.am
@@ -1,7 +1,7 @@
include $(top_srcdir)/config/Rules.am
# Disable GCC stack protection for zvol_id. This is a kludge and should be
-# removed once https://github.com/zfsonlinux/zfs/issues/569 is resolved.
+# removed once https://github.com/openzfs/zfs/issues/569 is resolved.
AM_CFLAGS += -fno-stack-protector
udev_PROGRAMS = zvol_id
diff --git a/config/kernel-bio.m4 b/config/kernel-bio.m4
index afa1f1cabeb0..534282780d3e 100644
--- a/config/kernel-bio.m4
+++ b/config/kernel-bio.m4
@@ -344,7 +344,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKG_TRYGET], [
#include <linux/bio.h>
#include <linux/fs.h>
],[
- struct blkcg_gq blkg __attribute__ ((unused));
+ struct blkcg_gq blkg __attribute__ ((unused)) = {};
bool rc __attribute__ ((unused));
rc = blkg_tryget(&blkg);
], [], [$ZFS_META_LICENSE])
diff --git a/configure.ac b/configure.ac
index a1664151bc9a..9323aa7a0c28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,6 +237,7 @@ AC_CONFIG_FILES([
tests/zfs-tests/tests/functional/Makefile
tests/zfs-tests/tests/functional/acl/Makefile
tests/zfs-tests/tests/functional/acl/posix/Makefile
+ tests/zfs-tests/tests/functional/acl/posix-sa/Makefile
tests/zfs-tests/tests/functional/alloc_class/Makefile
tests/zfs-tests/tests/functional/arc/Makefile
tests/zfs-tests/tests/functional/atime/Makefile
diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in
index 5b746049fb23..db5670cd5253 100755
--- a/contrib/dracut/90zfs/module-setup.sh.in
+++ b/contrib/dracut/90zfs/module-setup.sh.in
@@ -41,7 +41,8 @@ install() {
dracut_install @bindir@/zgenhostid
dracut_install @sbindir@/zfs
dracut_install @sbindir@/zpool
- # Workaround for zfsonlinux/zfs#4749 by ensuring libgcc_s.so(.1) is included
+ # Workaround for https://github.com/openzfs/zfs/issues/4749 by
+ # ensuring libgcc_s.so(.1) is included
if [[ -n "$(ldd @sbindir@/zpool | grep -F 'libgcc_s.so')" ]]; then
# Dracut will have already tracked and included it
:;
diff --git a/contrib/pyzfs/README b/contrib/pyzfs/README
index 52983e5a90e0..bd224097951f 100644
--- a/contrib/pyzfs/README
+++ b/contrib/pyzfs/README
@@ -25,4 +25,4 @@ a temporary directory specified by, for instance, TMP environment
variable on a memory backed filesystem.
Package documentation: http://pyzfs.readthedocs.org
-Package development: https://github.com/zfsonlinux/zfs
+Package development: https://github.com/openzfs/zfs
diff --git a/contrib/pyzfs/libzfs_core/__init__.py b/contrib/pyzfs/libzfs_core/__init__.py
index 78e96738e29e..25ea3e495b02 100644
--- a/contrib/pyzfs/libzfs_core/__init__.py
+++ b/contrib/pyzfs/libzfs_core/__init__.py
@@ -32,7 +32,7 @@ of the error codes to the exceptions by interpreting a context
in which the error code is produced.
To submit an issue or contribute to development of this package
-please visit its `GitHub repository <https://github.com/zfsonlinux/zfs>`_.
+please visit its `GitHub repository <https://github.com/openzfs/zfs>`_.
.. data:: MAXNAMELEN
diff --git a/copy-builtin b/copy-builtin
index f42f4d1a4828..36e19545d9c4 100755
--- a/copy-builtin
+++ b/copy-builtin
@@ -35,9 +35,9 @@ config ZFS
select ZLIB_INFLATE
select ZLIB_DEFLATE
help
- This is the ZFS filesystem from the ZFS On Linux project.
+ This is the ZFS filesystem from the OpenZFS project.
- See https://zfsonlinux.org/
+ See https://github.com/openzfs/zfs
To compile this file system support as a module, choose M here.
diff --git a/etc/init.d/README.md b/etc/init.d/README.md
index ad7c053aacab..c14b01937db2 100644
--- a/etc/init.d/README.md
+++ b/etc/init.d/README.md
@@ -16,7 +16,7 @@ DESCRIPTION
SUPPORT
If you find that they don't work for your platform, please report this
- at the ZFS On Linux issue tracker at https://github.com/zfsonlinux/zfs/issues.
+ at the OpenZFS issue tracker at https://github.com/openzfs/zfs/issues.
Please include:
diff --git a/include/os/freebsd/linux/compiler.h b/include/os/freebsd/linux/compiler.h
index d76050378e83..05e93efa64d7 100644
--- a/include/os/freebsd/linux/compiler.h
+++ b/include/os/freebsd/linux/compiler.h
@@ -68,7 +68,7 @@
#define noinline __noinline
#define ____cacheline_aligned __aligned(CACHE_LINE_SIZE)
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_STANDALONE)
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#endif
diff --git a/include/os/freebsd/spl/rpc/xdr.h b/include/os/freebsd/spl/rpc/xdr.h
index 59d5e425bedb..c98466e9d16a 100644
--- a/include/os/freebsd/spl/rpc/xdr.h
+++ b/include/os/freebsd/spl/rpc/xdr.h
@@ -33,7 +33,7 @@
#include <rpc/types.h>
#include_next <rpc/xdr.h>
-#ifndef _KERNEL
+#if !defined(_KERNEL) && !defined(_STANDALONE)
#include <assert.h>
@@ -66,6 +66,6 @@ xdrmem_control(XDR *xdrs, int request, void *info)
xdrmem_control((xdrs), (req), (op)) : \
(*(xdrs)->x_ops->x_control)(xdrs, req, op))
-#endif /* !_KERNEL */
+#endif /* !_KERNEL && !_STANDALONE */
#endif /* !_OPENSOLARIS_RPC_XDR_H_ */
diff --git a/include/os/freebsd/spl/sys/atomic.h b/include/os/freebsd/spl/sys/atomic.h
index 4227e5f7d3ec..1a68bfc4de23 100644
--- a/include/os/freebsd/spl/sys/atomic.h
+++ b/include/os/freebsd/spl/sys/atomic.h
@@ -29,6 +29,8 @@
#ifndef _OPENSOLARIS_SYS_ATOMIC_H_
#define _OPENSOLARIS_SYS_ATOMIC_H_
+#ifndef _STANDALONE
+
#include <sys/types.h>
#include <machine/atomic.h>
@@ -179,4 +181,13 @@ atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
}
#endif /* !defined(COMPAT_32BIT) && defined(__LP64__) */
+#else /* _STANDALONE */
+/*
+ * sometimes atomic_add_64 is defined, sometimes not, but the
+ * following is always right for the boot loader.
+ */
+#undef atomic_add_64
+#define atomic_add_64(ptr, val) *(ptr) += val
+#endif /* !_STANDALONE */
+
#endif /* !_OPENSOLARIS_SYS_ATOMIC_H_ */
diff --git a/include/os/freebsd/spl/sys/byteorder.h b/include/os/freebsd/spl/sys/byteorder.h
index ae767242bd18..0b3d01eb3759 100644
--- a/include/os/freebsd/spl/sys/byteorder.h
+++ b/include/os/freebsd/spl/sys/byteorder.h
@@ -80,10 +80,11 @@
#define BE_64(x) BSWAP_64(x)
#endif
+#if !defined(_STANDALONE)
#if BYTE_ORDER == _BIG_ENDIAN
#define htonll(x) BMASK_64(x)
#define ntohll(x) BMASK_64(x)
-#else
+#else /* BYTE_ORDER == _LITTLE_ENDIAN */
#ifndef __LP64__
static __inline__ uint64_t
htonll(uint64_t n)
@@ -96,11 +97,12 @@ ntohll(uint64_t n)
{
return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32));
}
-#else
+#else /* !__LP64__ */
#define htonll(x) BSWAP_64(x)
#define ntohll(x) BSWAP_64(x)
-#endif
-#endif
+#endif /* __LP64__ */
+#endif /* BYTE_ORDER */
+#endif /* _STANDALONE */
#define BE_IN32(xa) htonl(*((uint32_t *)(void *)(xa)))
diff --git a/include/os/freebsd/spl/sys/ccompile.h b/include/os/freebsd/spl/sys/ccompile.h
index bffe6d21e31d..cf1e0a8a6376 100644
--- a/include/os/freebsd/spl/sys/ccompile.h
+++ b/include/os/freebsd/spl/sys/ccompile.h
@@ -113,9 +113,9 @@ extern "C" {
#define __VPRINTFLIKE(__n) __sun_attr__((__VPRINTFLIKE__(__n)))
#define __KPRINTFLIKE(__n) __sun_attr__((__KPRINTFLIKE__(__n)))
#define __KVPRINTFLIKE(__n) __sun_attr__((__KVPRINTFLIKE__(__n)))
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_STANDALONE)
#define __NORETURN __sun_attr__((__noreturn__))
-#endif
+#endif /* _KERNEL || _STANDALONE */
#define __CONST __sun_attr__((__const__))
#define __PURE __sun_attr__((__pure__))
@@ -174,7 +174,7 @@ typedef int enum_t;
#define __exit
#endif
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_STANDALONE)
#define param_set_charp(a, b) (0)
#define ATTR_UID AT_UID
#define ATTR_GID AT_GID
@@ -183,9 +183,15 @@ typedef int enum_t;
#define ATTR_CTIME AT_CTIME
#define ATTR_MTIME AT_MTIME
#define ATTR_ATIME AT_ATIME
+#if defined(_STANDALONE)
+#define vmem_free kmem_free
+#define vmem_zalloc kmem_zalloc
+#define vmem_alloc kmem_zalloc
+#else
#define vmem_free zfs_kmem_free
#define vmem_zalloc(size, flags) zfs_kmem_alloc(size, flags | M_ZERO)
#define vmem_alloc zfs_kmem_alloc
+#endif
#define MUTEX_NOLOCKDEP 0
#define RW_NOLOCKDEP 0
diff --git a/include/os/freebsd/spl/sys/cmn_err.h b/include/os/freebsd/spl/sys/cmn_err.h
index 00d686439f94..ba4cff37d5f3 100644
--- a/include/os/freebsd/spl/sys/cmn_err.h
+++ b/include/os/freebsd/spl/sys/cmn_err.h
@@ -52,42 +52,33 @@ extern "C" {
/*PRINTFLIKE2*/
extern void cmn_err(int, const char *, ...)
__KPRINTFLIKE(2);
-#pragma rarely_called(cmn_err)
extern void vzcmn_err(zoneid_t, int, const char *, __va_list)
__KVPRINTFLIKE(3);
-#pragma rarely_called(vzcmn_err)
extern void vcmn_err(int, const char *, __va_list)
__KVPRINTFLIKE(2);
-#pragma rarely_called(vcmn_err)
/*PRINTFLIKE3*/
extern void zcmn_err(zoneid_t, int, const char *, ...)
__KPRINTFLIKE(3);
-#pragma rarely_called(zcmn_err)
extern void vzprintf(zoneid_t, const char *, __va_list)
__KVPRINTFLIKE(2);
-#pragma rarely_called(vzprintf)
/*PRINTFLIKE2*/
extern void zprintf(zoneid_t, const char *, ...)
__KPRINTFLIKE(2);
-#pragma rarely_called(zprintf)
extern void vuprintf(const char *, __va_list)
__KVPRINTFLIKE(1);
-#pragma rarely_called(vuprintf)
/*PRINTFLIKE1*/
extern void panic(const char *, ...)
__KPRINTFLIKE(1) __NORETURN;
-#pragma rarely_called(panic)
extern void vpanic(const char *, __va_list)
__KVPRINTFLIKE(1) __NORETURN;
-#pragma rarely_called(vpanic)
#endif /* !_ASM */
diff --git a/include/os/freebsd/spl/sys/condvar.h b/include/os/freebsd/spl/sys/condvar.h
index a634ab6b6807..9b1893bcb84c 100644
--- a/include/os/freebsd/spl/sys/condvar.h
+++ b/include/os/freebsd/spl/sys/condvar.h
@@ -36,6 +36,7 @@
#include <sys/spl_condvar.h>
#include <sys/mutex.h>
#include <sys/time.h>
+#include <sys/errno.h>
/*
* cv_timedwait() is similar to cv_wait() except that it additionally expects
diff --git a/include/os/freebsd/spl/sys/kmem.h b/include/os/freebsd/spl/sys/kmem.h
index 28c65e74a250..dc3b4f5d7877 100644
--- a/include/os/freebsd/spl/sys/kmem.h
+++ b/include/os/freebsd/spl/sys/kmem.h
@@ -29,6 +29,7 @@
#ifndef _OPENSOLARIS_SYS_KMEM_H_
#define _OPENSOLARIS_SYS_KMEM_H_
+#ifdef _KERNEL
#include <sys/param.h>
#include <sys/malloc.h>
#include <sys/vmem.h>
@@ -93,5 +94,14 @@ void *calloc(size_t n, size_t s);
zfs_kmem_alloc((size), (kmflags) | M_ZERO)
#define kmem_free(buf, size) zfs_kmem_free((buf), (size))
+#endif /* _KERNEL */
+
+#ifdef _STANDALONE
+/*
+ * At the moment, we just need it for the type. We redirect the alloc/free
+ * routines to the usual Free and Malloc in that environment.
+ */
+typedef int kmem_cache_t;
+#endif /* _STANDALONE */
#endif /* _OPENSOLARIS_SYS_KMEM_H_ */
diff --git a/include/os/freebsd/spl/sys/kmem_cache.h b/include/os/freebsd/spl/sys/kmem_cache.h
index d8e0349e4ca3..9eec3b4585cb 100644
--- a/include/os/freebsd/spl/sys/kmem_cache.h
+++ b/include/os/freebsd/spl/sys/kmem_cache.h
@@ -30,6 +30,7 @@
#ifndef _SPL_KMEM_CACHE_H
#define _SPL_KMEM_CACHE_H
+#ifdef _KERNEL
#include <sys/taskq.h>
/* kmem move callback return values */
@@ -46,4 +47,6 @@ extern void spl_kmem_cache_set_move(kmem_cache_t *,
#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move)
+#endif /* _KERNEL */
+
#endif
diff --git a/include/os/freebsd/spl/sys/kstat.h b/include/os/freebsd/spl/sys/kstat.h
index 5ceb88b297d9..f5157c7f4fe3 100644
--- a/include/os/freebsd/spl/sys/kstat.h
+++ b/include/os/freebsd/spl/sys/kstat.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -24,8 +23,11 @@
#ifndef _SPL_KSTAT_H
#define _SPL_KSTAT_H
+
#include <sys/types.h>
+#ifndef _STANDALONE
#include <sys/sysctl.h>
+#endif
struct list_head {};
#include <sys/mutex.h>
#include <sys/proc.h>
@@ -129,9 +131,10 @@ struct kstat_s {
kstat_raw_ops_t ks_raw_ops; /* ops table for raw type */
char *ks_raw_buf; /* buf used for raw ops */
size_t ks_raw_bufsize; /* size of raw ops buffer */
+#ifndef _STANDALONE
struct sysctl_ctx_list ks_sysctl_ctx;
struct sysctl_oid *ks_sysctl_root;
-
+#endif /* _STANDALONE */
};
typedef struct kstat_named_s {
@@ -216,10 +219,16 @@ extern void kstat_runq_exit(kstat_io_t *);
__kstat_set_seq_raw_ops(k, h, d, a)
#define kstat_set_raw_ops(k, h, d, a) \
__kstat_set_raw_ops(k, h, d, a)
+#ifndef _STANDALONE
#define kstat_create(m, i, n, c, t, s, f) \
__kstat_create(m, i, n, c, t, s, f)
#define kstat_install(k) __kstat_install(k)
#define kstat_delete(k) __kstat_delete(k)
+#else
+#define kstat_create(m, i, n, c, t, s, f) ((kstat_t *)0)
+#define kstat_install(k)
+#define kstat_delete(k)
+#endif
#endif /* _SPL_KSTAT_H */
diff --git a/include/os/freebsd/spl/sys/proc.h b/include/os/freebsd/spl/sys/proc.h
index a455cfbab66f..8583df509b55 100644
--- a/include/os/freebsd/spl/sys/proc.h
+++ b/include/os/freebsd/spl/sys/proc.h
@@ -41,7 +41,7 @@
#include <sys/kmem.h>
#include <sys/malloc.h>
-
+#ifdef _KERNEL
#define CPU curcpu
#define minclsyspri PRIBIO
#define defclsyspri minclsyspri
@@ -111,4 +111,5 @@ zfs_proc_is_caller(proc_t *p)
return (p == curproc);
}
+#endif /* _KERNEL */
#endif /* _OPENSOLARIS_SYS_PROC_H_ */
diff --git a/include/os/freebsd/spl/sys/procfs_list.h b/include/os/freebsd/spl/sys/procfs_list.h
index da13f0387cb5..4bc603756ea4 100644
--- a/include/os/freebsd/spl/sys/procfs_list.h
+++ b/include/os/freebsd/spl/sys/procfs_list.h
@@ -25,6 +25,8 @@
#ifndef _SPL_PROCFS_LIST_H
#define _SPL_PROCFS_LIST_H
+#ifndef _STANDALONE
+
#include <sys/kstat.h>
#include <sys/mutex.h>
@@ -64,4 +66,8 @@ void procfs_list_uninstall(procfs_list_t *procfs_list);
void procfs_list_destroy(procfs_list_t *procfs_list);
void procfs_list_add(procfs_list_t *procfs_list, void *p);
+#else
+typedef int procfs_list_t;
+#endif /* !_STANDALONE */
+
#endif /* _SPL_PROCFS_LIST_H */
diff --git a/include/os/freebsd/spl/sys/sig.h b/include/os/freebsd/spl/sys/sig.h
index 426a9e827ecb..a4d440d38326 100644
--- a/include/os/freebsd/spl/sys/sig.h
+++ b/include/os/freebsd/spl/sys/sig.h
@@ -29,6 +29,8 @@
#ifndef _OPENSOLARIS_SYS_SIG_H_
#define _OPENSOLARIS_SYS_SIG_H_
+#ifndef _STANDALONE
+
#include_next <sys/signal.h>
#include <sys/param.h>
#include <sys/lock.h>
@@ -62,4 +64,7 @@ issig(int why)
}
return (0);
}
+
+#endif /* !_STANDALONE */
+
#endif /* _OPENSOLARIS_SYS_SIG_H_ */
diff --git a/include/os/freebsd/spl/sys/simd_x86.h b/include/os/freebsd/spl/sys/simd_x86.h
index 63d6017b79e0..480bfd28973b 100644
--- a/include/os/freebsd/spl/sys/simd_x86.h
+++ b/include/os/freebsd/spl/sys/simd_x86.h
@@ -26,15 +26,12 @@
* $FreeBSD$
*/
-#include <sys/cdefs.h>
#include <sys/types.h>
-#include <sys/systm.h>
+#include <sys/cdefs.h>
#include <sys/proc.h>
-#ifdef __i386__
-#include <x86/fpu.h>
-#else
-#include <machine/fpu.h>
-#endif
+#include <sys/systm.h>
+
+#include <machine/pcb.h>
#include <x86/x86_var.h>
#include <x86/specialreg.h>
diff --git a/include/os/freebsd/spl/sys/sunddi.h b/include/os/freebsd/spl/sys/sunddi.h
index 41d0f4512977..bfbc3e10a1d2 100644
--- a/include/os/freebsd/spl/sys/sunddi.h
+++ b/include/os/freebsd/spl/sys/sunddi.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/freebsd/spl/sys/sysmacros.h b/include/os/freebsd/spl/sys/sysmacros.h
index 5afca10447e7..2d0164cb129f 100644
--- a/include/os/freebsd/spl/sys/sysmacros.h
+++ b/include/os/freebsd/spl/sys/sysmacros.h
@@ -31,6 +31,7 @@
#define _SYS_SYSMACROS_H
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/isa_defs.h>
#include <sys/libkern.h>
#include <sys/zone.h>
@@ -71,7 +72,11 @@ extern "C" {
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#endif
+#ifdef _STANDALONE
+#define boot_ncpus 1
+#else /* _STANDALONE */
#define boot_ncpus mp_ncpus
+#endif /* _STANDALONE */
#define kpreempt_disable() critical_enter()
#define kpreempt_enable() critical_exit()
#define CPU_SEQID curcpu
@@ -319,7 +324,7 @@ extern unsigned char bcd_to_byte[256];
/* avoid any possibility of clashing with <stddef.h> version */
-#define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
+#define offsetof(type, field) __offsetof(type, field)
#endif
/*
diff --git a/include/os/freebsd/spl/sys/taskq.h b/include/os/freebsd/spl/sys/taskq.h
index 200f9e838b8d..3040549e043d 100644
--- a/include/os/freebsd/spl/sys/taskq.h
+++ b/include/os/freebsd/spl/sys/taskq.h
@@ -26,6 +26,8 @@
#ifndef _SYS_TASKQ_H
#define _SYS_TASKQ_H
+#ifdef _KERNEL
+
#include <sys/types.h>
#include <sys/proc.h>
#include <sys/taskqueue.h>
@@ -112,4 +114,11 @@ void taskq_resume(taskq_t *);
}
#endif
+#endif /* _KERNEL */
+
+#ifdef _STANDALONE
+typedef int taskq_ent_t;
+#define taskq_init_ent(x)
+#endif /* _STANDALONE */
+
#endif /* _SYS_TASKQ_H */
diff --git a/include/os/freebsd/spl/sys/uio.h b/include/os/freebsd/spl/sys/uio.h
index 2b4357a30b09..cb577df105e9 100644
--- a/include/os/freebsd/spl/sys/uio.h
+++ b/include/os/freebsd/spl/sys/uio.h
@@ -29,6 +29,8 @@
#ifndef _OPENSOLARIS_SYS_UIO_H_
#define _OPENSOLARIS_SYS_UIO_H_
+#ifndef _STANDALONE
+
#include_next <sys/uio.h>
#include <sys/_uio.h>
#include <sys/debug.h>
@@ -107,4 +109,6 @@ uio_index_at_offset(uio_t *uio, offset_t off, uint_t *vec_idx)
return (off);
}
+#endif /* !_STANDALONE */
+
#endif /* !_OPENSOLARIS_SYS_UIO_H_ */
diff --git a/include/os/freebsd/zfs/sys/zfs_ctldir.h b/include/os/freebsd/zfs/sys/zfs_ctldir.h
index 28a026603f07..da02863a78e6 100644
--- a/include/os/freebsd/zfs/sys/zfs_ctldir.h
+++ b/include/os/freebsd/zfs/sys/zfs_ctldir.h
@@ -48,7 +48,7 @@ int zfsctl_root(zfsvfs_t *, int, vnode_t **);
void zfsctl_init(void);
void zfsctl_fini(void);
boolean_t zfsctl_is_node(vnode_t *);
-int zfsctl_snapshot_unmount(char *snapname, int flags);
+int zfsctl_snapshot_unmount(const char *snapname, int flags);
int zfsctl_rename_snapshot(const char *from, const char *to);
int zfsctl_destroy_snapshot(const char *snapname, int force);
int zfsctl_umount_snapshots(vfs_t *, int, cred_t *);
diff --git a/include/os/freebsd/zfs/sys/zfs_dir.h b/include/os/freebsd/zfs/sys/zfs_dir.h
index f6f8ab5c4e69..4197e1188c9b 100644
--- a/include/os/freebsd/zfs/sys/zfs_dir.h
+++ b/include/os/freebsd/zfs/sys/zfs_dir.h
@@ -52,11 +52,7 @@ extern int zfs_dirent_lookup(znode_t *, const char *, znode_t **, int);
extern int zfs_link_create(znode_t *, const char *, znode_t *, dmu_tx_t *, int);
extern int zfs_link_destroy(znode_t *, const char *, znode_t *, dmu_tx_t *, int,
boolean_t *);
-#if 0
-extern int zfs_dirlook(vnode_t *, const char *, vnode_t **, int);
-#else
extern int zfs_dirlook(znode_t *, const char *name, znode_t **);
-#endif
extern void zfs_mknode(znode_t *, vattr_t *, dmu_tx_t *, cred_t *,
uint_t, znode_t **, zfs_acl_ids_t *);
extern void zfs_rmnode(znode_t *);
diff --git a/include/os/freebsd/zfs/sys/zfs_vfsops_os.h b/include/os/freebsd/zfs/sys/zfs_vfsops_os.h
index e816e393378a..c7f464d034bd 100644
--- a/include/os/freebsd/zfs/sys/zfs_vfsops_os.h
+++ b/include/os/freebsd/zfs/sys/zfs_vfsops_os.h
@@ -72,6 +72,7 @@ struct zfsvfs {
boolean_t z_fuid_dirty; /* need to sync fuid table ? */
struct zfs_fuid_info *z_fuid_replay; /* fuid info for replay */
zilog_t *z_log; /* intent log pointer */
+ uint_t z_acl_type; /* type of acl usable on this fs */
uint_t z_acl_mode; /* acl chmod/mode behavior */
uint_t z_acl_inherit; /* acl inheritance behavior */
zfs_case_t z_case; /* case-sense */
diff --git a/include/os/freebsd/zfs/sys/zfs_vnops.h b/include/os/freebsd/zfs/sys/zfs_vnops.h
index 6237372b905f..587650af6ce3 100644
--- a/include/os/freebsd/zfs/sys/zfs_vnops.h
+++ b/include/os/freebsd/zfs/sys/zfs_vnops.h
@@ -32,21 +32,21 @@ int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
uint64_t size, struct vm_page **ppa, dmu_tx_t *tx);
int dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count,
int *rbehind, int *rahead, int last_size);
-extern int zfs_remove(znode_t *dzp, char *name, cred_t *cr, int flags);
-extern int zfs_mkdir(znode_t *dzp, char *dirname, vattr_t *vap,
+extern int zfs_remove(znode_t *dzp, const char *name, cred_t *cr, int flags);
+extern int zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap,
znode_t **zpp, cred_t *cr, int flags, vsecattr_t *vsecp);
-extern int zfs_rmdir(znode_t *dzp, char *name, znode_t *cwd,
+extern int zfs_rmdir(znode_t *dzp, const char *name, znode_t *cwd,
cred_t *cr, int flags);
extern int zfs_setattr(znode_t *zp, vattr_t *vap, int flag, cred_t *cr);
-extern int zfs_rename(znode_t *sdzp, char *snm, znode_t *tdzp,
- char *tnm, cred_t *cr, int flags);
+extern int zfs_rename(znode_t *sdzp, const char *snm, znode_t *tdzp,
+ const char *tnm, cred_t *cr, int flags);
extern int zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
const char *link, znode_t **zpp, cred_t *cr, int flags);
extern int zfs_link(znode_t *tdzp, znode_t *sp,
- char *name, cred_t *cr, int flags);
+ const char *name, cred_t *cr, int flags);
extern int zfs_space(znode_t *zp, int cmd, struct flock *bfp, int flag,
offset_t offset, cred_t *cr);
-extern int zfs_create(znode_t *dzp, char *name, vattr_t *vap, int excl,
+extern int zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl,
int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp);
extern int zfs_setsecattr(znode_t *zp, vsecattr_t *vsecp, int flag,
cred_t *cr);
diff --git a/include/os/linux/spl/rpc/xdr.h b/include/os/linux/spl/rpc/xdr.h
index 0b39b46cf6a2..c62080a1178a 100644
--- a/include/os/linux/spl/rpc/xdr.h
+++ b/include/os/linux/spl/rpc/xdr.h
@@ -3,7 +3,6 @@
* Written by Ricardo Correia <Ricardo.M.Correia@Sun.COM>
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/acl.h b/include/os/linux/spl/sys/acl.h
index 9fc79c025caf..5a3d226c7664 100644
--- a/include/os/linux/spl/sys/acl.h
+++ b/include/os/linux/spl/sys/acl.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/atomic.h b/include/os/linux/spl/sys/atomic.h
index 51b5479235ab..2d21cbb3e140 100644
--- a/include/os/linux/spl/sys/atomic.h
+++ b/include/os/linux/spl/sys/atomic.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/byteorder.h b/include/os/linux/spl/sys/byteorder.h
index 70847edbc8a9..bb5e173ce5e4 100644
--- a/include/os/linux/spl/sys/byteorder.h
+++ b/include/os/linux/spl/sys/byteorder.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/callb.h b/include/os/linux/spl/sys/callb.h
index f1826bfd353a..19ba41ff9e25 100644
--- a/include/os/linux/spl/sys/callb.h
+++ b/include/os/linux/spl/sys/callb.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/callo.h b/include/os/linux/spl/sys/callo.h
index c43ac92e7c32..e93a15f7a0d4 100644
--- a/include/os/linux/spl/sys/callo.h
+++ b/include/os/linux/spl/sys/callo.h
@@ -5,7 +5,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/cmn_err.h b/include/os/linux/spl/sys/cmn_err.h
index be57358b0a8a..314bbbaf9e95 100644
--- a/include/os/linux/spl/sys/cmn_err.h
+++ b/include/os/linux/spl/sys/cmn_err.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/condvar.h b/include/os/linux/spl/sys/condvar.h
index fa321403bf74..ef405763ca56 100644
--- a/include/os/linux/spl/sys/condvar.h
+++ b/include/os/linux/spl/sys/condvar.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/console.h b/include/os/linux/spl/sys/console.h
index 33c8b3c6b4d7..6af395cc2d78 100644
--- a/include/os/linux/spl/sys/console.h
+++ b/include/os/linux/spl/sys/console.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/cred.h b/include/os/linux/spl/sys/cred.h
index 0b07c4369940..9cc85deb5c8a 100644
--- a/include/os/linux/spl/sys/cred.h
+++ b/include/os/linux/spl/sys/cred.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/ctype.h b/include/os/linux/spl/sys/ctype.h
index 18beb1daa5d9..351320600472 100644
--- a/include/os/linux/spl/sys/ctype.h
+++ b/include/os/linux/spl/sys/ctype.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/debug.h b/include/os/linux/spl/sys/debug.h
index e2dbd6804056..46da5c783397 100644
--- a/include/os/linux/spl/sys/debug.h
+++ b/include/os/linux/spl/sys/debug.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/disp.h b/include/os/linux/spl/sys/disp.h
index 413b623c8145..e106d3c5438e 100644
--- a/include/os/linux/spl/sys/disp.h
+++ b/include/os/linux/spl/sys/disp.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/dkio.h b/include/os/linux/spl/sys/dkio.h
index 49f166a9c4aa..a90b67d36702 100644
--- a/include/os/linux/spl/sys/dkio.h
+++ b/include/os/linux/spl/sys/dkio.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/fcntl.h b/include/os/linux/spl/sys/fcntl.h
index 3faa5dad78cb..a87fdcac7fce 100644
--- a/include/os/linux/spl/sys/fcntl.h
+++ b/include/os/linux/spl/sys/fcntl.h
@@ -5,7 +5,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/file.h b/include/os/linux/spl/sys/file.h
index 05dbc0814296..e0bbd6d98cba 100644
--- a/include/os/linux/spl/sys/file.h
+++ b/include/os/linux/spl/sys/file.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/inttypes.h b/include/os/linux/spl/sys/inttypes.h
index 92e76206ba52..c99973abd19e 100644
--- a/include/os/linux/spl/sys/inttypes.h
+++ b/include/os/linux/spl/sys/inttypes.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/isa_defs.h b/include/os/linux/spl/sys/isa_defs.h
index af064e567e13..2207ee20256c 100644
--- a/include/os/linux/spl/sys/isa_defs.h
+++ b/include/os/linux/spl/sys/isa_defs.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/kmem.h b/include/os/linux/spl/sys/kmem.h
index c09c40fa34b9..a93e87df8069 100644
--- a/include/os/linux/spl/sys/kmem.h
+++ b/include/os/linux/spl/sys/kmem.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/kmem_cache.h b/include/os/linux/spl/sys/kmem_cache.h
index ffb8c97c9c91..48006ec5d27e 100644
--- a/include/os/linux/spl/sys/kmem_cache.h
+++ b/include/os/linux/spl/sys/kmem_cache.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/kstat.h b/include/os/linux/spl/sys/kstat.h
index c93c53171d88..905d8257c8d3 100644
--- a/include/os/linux/spl/sys/kstat.h
+++ b/include/os/linux/spl/sys/kstat.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/list.h b/include/os/linux/spl/sys/list.h
index be38f328fc65..80300df15abe 100644
--- a/include/os/linux/spl/sys/list.h
+++ b/include/os/linux/spl/sys/list.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/mod_os.h b/include/os/linux/spl/sys/mod_os.h
index 8adf6212907f..bb43313d1869 100644
--- a/include/os/linux/spl/sys/mod_os.h
+++ b/include/os/linux/spl/sys/mod_os.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/mutex.h b/include/os/linux/spl/sys/mutex.h
index 93f3af8fe016..047607f826bc 100644
--- a/include/os/linux/spl/sys/mutex.h
+++ b/include/os/linux/spl/sys/mutex.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/param.h b/include/os/linux/spl/sys/param.h
index 4ef929151ae4..d8a12d532136 100644
--- a/include/os/linux/spl/sys/param.h
+++ b/include/os/linux/spl/sys/param.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/proc.h b/include/os/linux/spl/sys/proc.h
index fefce515eb24..fe4841407da8 100644
--- a/include/os/linux/spl/sys/proc.h
+++ b/include/os/linux/spl/sys/proc.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/processor.h b/include/os/linux/spl/sys/processor.h
index a70101fa2f90..5514f07c0b44 100644
--- a/include/os/linux/spl/sys/processor.h
+++ b/include/os/linux/spl/sys/processor.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/random.h b/include/os/linux/spl/sys/random.h
index 93e244f566be..1b8cb60d094f 100644
--- a/include/os/linux/spl/sys/random.h
+++ b/include/os/linux/spl/sys/random.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/rwlock.h b/include/os/linux/spl/sys/rwlock.h
index 60f5bfd986b4..ba7620a1f344 100644
--- a/include/os/linux/spl/sys/rwlock.h
+++ b/include/os/linux/spl/sys/rwlock.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/shrinker.h b/include/os/linux/spl/sys/shrinker.h
index cc34d8ab1931..e5b7a9c955dd 100644
--- a/include/os/linux/spl/sys/shrinker.h
+++ b/include/os/linux/spl/sys/shrinker.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/sid.h b/include/os/linux/spl/sys/sid.h
index 731b62c47e70..3cf27111b6d0 100644
--- a/include/os/linux/spl/sys/sid.h
+++ b/include/os/linux/spl/sys/sid.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/signal.h b/include/os/linux/spl/sys/signal.h
index 36b8b5d985a9..fd32f08b3489 100644
--- a/include/os/linux/spl/sys/signal.h
+++ b/include/os/linux/spl/sys/signal.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/simd.h b/include/os/linux/spl/sys/simd.h
index f2048d9e121c..6fb84d3a52c0 100644
--- a/include/os/linux/spl/sys/simd.h
+++ b/include/os/linux/spl/sys/simd.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/stat.h b/include/os/linux/spl/sys/stat.h
index 83018e89442f..5987849641fc 100644
--- a/include/os/linux/spl/sys/stat.h
+++ b/include/os/linux/spl/sys/stat.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/strings.h b/include/os/linux/spl/sys/strings.h
index 4fb80320635c..48e417d14605 100644
--- a/include/os/linux/spl/sys/strings.h
+++ b/include/os/linux/spl/sys/strings.h
@@ -4,7 +4,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/sunddi.h b/include/os/linux/spl/sys/sunddi.h
index 29a6fe00d1f4..8524ec9c300e 100644
--- a/include/os/linux/spl/sys/sunddi.h
+++ b/include/os/linux/spl/sys/sunddi.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/sysmacros.h b/include/os/linux/spl/sys/sysmacros.h
index 7314588bcf82..eb3494bc7904 100644
--- a/include/os/linux/spl/sys/sysmacros.h
+++ b/include/os/linux/spl/sys/sysmacros.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/systeminfo.h b/include/os/linux/spl/sys/systeminfo.h
index 2255691580f9..d4037a0900d0 100644
--- a/include/os/linux/spl/sys/systeminfo.h
+++ b/include/os/linux/spl/sys/systeminfo.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/taskq.h b/include/os/linux/spl/sys/taskq.h
index 7a1ee9ec4f1b..16f4349e78e4 100644
--- a/include/os/linux/spl/sys/taskq.h
+++ b/include/os/linux/spl/sys/taskq.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/thread.h b/include/os/linux/spl/sys/thread.h
index 72dcf9f05d0d..99d9c9bf3821 100644
--- a/include/os/linux/spl/sys/thread.h
+++ b/include/os/linux/spl/sys/thread.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/time.h b/include/os/linux/spl/sys/time.h
index 4309c300b268..fec85f8b8d13 100644
--- a/include/os/linux/spl/sys/time.h
+++ b/include/os/linux/spl/sys/time.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/timer.h b/include/os/linux/spl/sys/timer.h
index 40be12047ae4..02c3c7893477 100644
--- a/include/os/linux/spl/sys/timer.h
+++ b/include/os/linux/spl/sys/timer.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/tsd.h b/include/os/linux/spl/sys/tsd.h
index 39a291bf3dee..8cdb9e4ffe93 100644
--- a/include/os/linux/spl/sys/tsd.h
+++ b/include/os/linux/spl/sys/tsd.h
@@ -5,7 +5,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/types.h b/include/os/linux/spl/sys/types.h
index 719a44646e6b..b44c94518750 100644
--- a/include/os/linux/spl/sys/types.h
+++ b/include/os/linux/spl/sys/types.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/types32.h b/include/os/linux/spl/sys/types32.h
index c60ba8c97019..cb62c75e5a7a 100644
--- a/include/os/linux/spl/sys/types32.h
+++ b/include/os/linux/spl/sys/types32.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/uio.h b/include/os/linux/spl/sys/uio.h
index 0e631d6779a2..abcd90dd570c 100644
--- a/include/os/linux/spl/sys/uio.h
+++ b/include/os/linux/spl/sys/uio.h
@@ -7,7 +7,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/user.h b/include/os/linux/spl/sys/user.h
index b12cb240e39b..13a2edf5f6c7 100644
--- a/include/os/linux/spl/sys/user.h
+++ b/include/os/linux/spl/sys/user.h
@@ -4,7 +4,6 @@
* Written by Richard Yao <richard.yao@clusterhq.com>.
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/vfs.h b/include/os/linux/spl/sys/vfs.h
index 0d5e1d51d7aa..488f1827ec34 100644
--- a/include/os/linux/spl/sys/vfs.h
+++ b/include/os/linux/spl/sys/vfs.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/vmem.h b/include/os/linux/spl/sys/vmem.h
index a31b4728c367..e77af2a7a48c 100644
--- a/include/os/linux/spl/sys/vmem.h
+++ b/include/os/linux/spl/sys/vmem.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/vmsystm.h b/include/os/linux/spl/sys/vmsystm.h
index 8783231dcf2a..b3f121ecf0ca 100644
--- a/include/os/linux/spl/sys/vmsystm.h
+++ b/include/os/linux/spl/sys/vmsystm.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/vnode.h b/include/os/linux/spl/sys/vnode.h
index 07eac8e44173..6f17db89fe53 100644
--- a/include/os/linux/spl/sys/vnode.h
+++ b/include/os/linux/spl/sys/vnode.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/wait.h b/include/os/linux/spl/sys/wait.h
index 5311ff8b971b..65cd83e5ef12 100644
--- a/include/os/linux/spl/sys/wait.h
+++ b/include/os/linux/spl/sys/wait.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/zmod.h b/include/os/linux/spl/sys/zmod.h
index 5380bd6fd022..8d27b62f4712 100644
--- a/include/os/linux/spl/sys/zmod.h
+++ b/include/os/linux/spl/sys/zmod.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/spl/sys/zone.h b/include/os/linux/spl/sys/zone.h
index b2efd13b8e0d..00e30f690c38 100644
--- a/include/os/linux/spl/sys/zone.h
+++ b/include/os/linux/spl/sys/zone.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/os/linux/zfs/sys/zfs_ctldir.h b/include/os/linux/zfs/sys/zfs_ctldir.h
index 51933bc4fe47..beee34979b64 100644
--- a/include/os/linux/zfs/sys/zfs_ctldir.h
+++ b/include/os/linux/zfs/sys/zfs_ctldir.h
@@ -60,22 +60,22 @@ extern boolean_t zfsctl_is_snapdir(struct inode *ip);
extern int zfsctl_fid(struct inode *ip, fid_t *fidp);
/* zfsctl '.zfs' functions */
-extern int zfsctl_root_lookup(struct inode *dip, char *name,
+extern int zfsctl_root_lookup(struct inode *dip, const char *name,
struct inode **ipp, int flags, cred_t *cr, int *direntflags,
pathname_t *realpnp);
/* zfsctl '.zfs/snapshot' functions */
-extern int zfsctl_snapdir_lookup(struct inode *dip, char *name,
+extern int zfsctl_snapdir_lookup(struct inode *dip, const char *name,
struct inode **ipp, int flags, cred_t *cr, int *direntflags,
pathname_t *realpnp);
-extern int zfsctl_snapdir_rename(struct inode *sdip, char *sname,
- struct inode *tdip, char *tname, cred_t *cr, int flags);
-extern int zfsctl_snapdir_remove(struct inode *dip, char *name, cred_t *cr,
- int flags);
-extern int zfsctl_snapdir_mkdir(struct inode *dip, char *dirname, vattr_t *vap,
- struct inode **ipp, cred_t *cr, int flags);
+extern int zfsctl_snapdir_rename(struct inode *sdip, const char *sname,
+ struct inode *tdip, const char *tname, cred_t *cr, int flags);
+extern int zfsctl_snapdir_remove(struct inode *dip, const char *name,
+ cred_t *cr, int flags);
+extern int zfsctl_snapdir_mkdir(struct inode *dip, const char *dirname,
+ vattr_t *vap, struct inode **ipp, cred_t *cr, int flags);
extern int zfsctl_snapshot_mount(struct path *path, int flags);
-extern int zfsctl_snapshot_unmount(char *snapname, int flags);
+extern int zfsctl_snapshot_unmount(const char *snapname, int flags);
extern int zfsctl_snapshot_unmount_delay(spa_t *spa, uint64_t objsetid,
int delay);
extern int zfsctl_snapdir_vget(struct super_block *sb, uint64_t objsetid,
diff --git a/include/os/linux/zfs/sys/zfs_vnops.h b/include/os/linux/zfs/sys/zfs_vnops.h
index 24a2082d35d6..2b41f3863425 100644
--- a/include/os/linux/zfs/sys/zfs_vnops.h
+++ b/include/os/linux/zfs/sys/zfs_vnops.h
@@ -46,8 +46,8 @@ extern int zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr);
extern int zfs_write_simple(znode_t *zp, const void *data, size_t len,
loff_t pos, size_t *resid);
extern int zfs_access(struct inode *ip, int mode, int flag, cred_t *cr);
-extern int zfs_lookup(znode_t *dzp, char *nm, znode_t **zpp,
- int flags, cred_t *cr, int *direntflags, pathname_t *realpnp);
+extern int zfs_lookup(znode_t *dzp, char *nm, znode_t **zpp, int flags,
+ cred_t *cr, int *direntflags, pathname_t *realpnp);
extern int zfs_create(znode_t *dzp, char *name, vattr_t *vap, int excl,
int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp);
extern int zfs_tmpfile(struct inode *dip, vattr_t *vapzfs, int excl,
diff --git a/include/sys/dmu.h b/include/sys/dmu.h
index d6efe2595be0..54fdbc9ad227 100644
--- a/include/sys/dmu.h
+++ b/include/sys/dmu.h
@@ -337,7 +337,6 @@ int dmu_objset_clone(const char *name, const char *origin);
int dsl_destroy_snapshots_nvl(struct nvlist *snaps, boolean_t defer,
struct nvlist *errlist);
int dmu_objset_snapshot_one(const char *fsname, const char *snapname);
-int dmu_objset_snapshot_tmp(const char *, const char *, int);
int dmu_objset_find(const char *name, int func(const char *, void *), void *arg,
int flags);
void dmu_objset_byteswap(void *buf, size_t size);
@@ -1009,7 +1008,7 @@ extern int dmu_objset_blksize(objset_t *os);
extern int dmu_snapshot_list_next(objset_t *os, int namelen, char *name,
uint64_t *id, uint64_t *offp, boolean_t *case_conflict);
extern int dmu_snapshot_lookup(objset_t *os, const char *name, uint64_t *val);
-extern int dmu_snapshot_realname(objset_t *os, char *name, char *real,
+extern int dmu_snapshot_realname(objset_t *os, const char *name, char *real,
int maxlen, boolean_t *conflict);
extern int dmu_dir_list_next(objset_t *os, int namelen, char *name,
uint64_t *idp, uint64_t *offp);
diff --git a/include/sys/mod.h b/include/sys/mod.h
index 0ad7704afe99..a5a73ed0ee00 100644
--- a/include/sys/mod.h
+++ b/include/sys/mod.h
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/include/sys/nvpair.h b/include/sys/nvpair.h
index e8567933d2bc..b0be8bd7ada1 100644
--- a/include/sys/nvpair.h
+++ b/include/sys/nvpair.h
@@ -62,7 +62,7 @@ typedef enum {
DATA_TYPE_UINT8,
DATA_TYPE_BOOLEAN_ARRAY,
DATA_TYPE_INT8_ARRAY,
-#if !defined(_KERNEL)
+#if !defined(_KERNEL) && !defined(_STANDALONE)
DATA_TYPE_UINT8_ARRAY,
DATA_TYPE_DOUBLE
#else
@@ -191,7 +191,7 @@ int nvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, uint_t);
int nvlist_add_string_array(nvlist_t *, const char *, char *const *, uint_t);
int nvlist_add_nvlist_array(nvlist_t *, const char *, nvlist_t **, uint_t);
int nvlist_add_hrtime(nvlist_t *, const char *, hrtime_t);
-#if !defined(_KERNEL)
+#if !defined(_KERNEL) && !defined(_STANDALONE)
int nvlist_add_double(nvlist_t *, const char *, double);
#endif
@@ -228,7 +228,7 @@ int nvlist_lookup_nvlist_array(nvlist_t *, const char *,
nvlist_t ***, uint_t *);
int nvlist_lookup_hrtime(nvlist_t *, const char *, hrtime_t *);
int nvlist_lookup_pairs(nvlist_t *, int, ...);
-#if !defined(_KERNEL)
+#if !defined(_KERNEL) && !defined(_STANDALONE)
int nvlist_lookup_double(nvlist_t *, const char *, double *);
#endif
@@ -269,7 +269,7 @@ int nvpair_value_uint64_array(nvpair_t *, uint64_t **, uint_t *);
int nvpair_value_string_array(nvpair_t *, char ***, uint_t *);
int nvpair_value_nvlist_array(nvpair_t *, nvlist_t ***, uint_t *);
int nvpair_value_hrtime(nvpair_t *, hrtime_t *);
-#if !defined(_KERNEL)
+#if !defined(_KERNEL) && !defined(_STANDALONE)
int nvpair_value_double(nvpair_t *, double *);
#endif
diff --git a/include/sys/pathname.h b/include/sys/pathname.h
index d79cc5c01afd..52f21316c23d 100644
--- a/include/sys/pathname.h
+++ b/include/sys/pathname.h
@@ -54,10 +54,6 @@ extern "C" {
*/
typedef struct pathname {
char *pn_buf; /* underlying storage */
-#if 0 /* unused in ZoL */
- char *pn_path; /* remaining pathname */
- size_t pn_pathlen; /* remaining length */
-#endif
size_t pn_bufsize; /* total size of pn_buf */
} pathname_t;
diff --git a/include/sys/spa.h b/include/sys/spa.h
index ddce8cc914f8..045431c2096b 100644
--- a/include/sys/spa.h
+++ b/include/sys/spa.h
@@ -768,12 +768,12 @@ extern int spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props,
extern int spa_import(char *pool, nvlist_t *config, nvlist_t *props,
uint64_t flags);
extern nvlist_t *spa_tryimport(nvlist_t *tryconfig);
-extern int spa_destroy(char *pool);
+extern int spa_destroy(const char *pool);
extern int spa_checkpoint(const char *pool);
extern int spa_checkpoint_discard(const char *pool);
-extern int spa_export(char *pool, nvlist_t **oldconfig, boolean_t force,
+extern int spa_export(const char *pool, nvlist_t **oldconfig, boolean_t force,
boolean_t hardforce);
-extern int spa_reset(char *pool);
+extern int spa_reset(const char *pool);
extern void spa_async_request(spa_t *spa, int flag);
extern void spa_async_unrequest(spa_t *spa, int flag);
extern void spa_async_suspend(spa_t *spa);
diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h
index f8b5bed6e420..09ab13af268c 100644
--- a/include/sys/u8_textprep.h
+++ b/include/sys/u8_textprep.h
@@ -101,7 +101,7 @@ extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int);
#define U8_ILLEGAL_CHAR (-1)
#define U8_OUT_OF_RANGE_CHAR (-2)
-extern int u8_validate(char *, size_t, char **, int, int *);
+extern int u8_validate(const char *, size_t, char **, int, int *);
extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *);
extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t,
int *);
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index d9f5ed580ef1..9f637036ee71 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -32,7 +32,15 @@
extern "C" {
#endif
-#ifdef __KERNEL__
+/*
+ * This code compiles in three different contexts. When __KERNEL__ is defined,
+ * the code uses "unix-like" kernel interfaces. When _STANDALONE is defined, the
+ * code is running in a reduced capacity environment of the boot loader which is
+ * generally a subset of both POSIX and kernel interfaces (with a few unique
+ * interfaces too). When neither are defined, it's in a userland POSIX or
+ * similar environment.
+ */
+#if defined(__KERNEL__) || defined(_STANDALONE)
#include <sys/note.h>
#include <sys/types.h>
#include <sys/atomic.h>
@@ -65,7 +73,7 @@ extern "C" {
#include <sys/procfs_list.h>
#include <sys/mod.h>
#include <sys/zfs_context_os.h>
-#else /* _KERNEL */
+#else /* _KERNEL || _STANDALONE */
#define _SYS_MUTEX_H
#define _SYS_RWLOCK_H
@@ -759,7 +767,7 @@ extern int kmem_cache_reap_active(void);
#define __init
#define __exit
-#endif /* _KERNEL */
+#endif /* _KERNEL || _STANDALONE */
#ifdef __cplusplus
};
diff --git a/include/sys/zfs_ioctl.h b/include/sys/zfs_ioctl.h
index 53629cfc2c3f..afae576ea21a 100644
--- a/include/sys/zfs_ioctl.h
+++ b/include/sys/zfs_ioctl.h
@@ -68,6 +68,7 @@ extern "C" {
*/
#define ZFS_ACLTYPE_OFF 0
#define ZFS_ACLTYPE_POSIX 1
+#define ZFS_ACLTYPE_NFSV4 2
/*
* Field manipulation macros for the drr_versioninfo field of the
diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h
index d7823221eb77..4138f6eba0a0 100644
--- a/include/sys/zfs_znode.h
+++ b/include/sys/zfs_znode.h
@@ -262,19 +262,20 @@ extern boolean_t zfs_get_vfs_flag_unmounted(objset_t *os);
extern void zfs_znode_dmu_fini(znode_t *);
extern void zfs_log_create(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, znode_t *zp, char *name, vsecattr_t *, zfs_fuid_info_t *,
- vattr_t *vap);
+ znode_t *dzp, znode_t *zp, const char *name, vsecattr_t *,
+ zfs_fuid_info_t *, vattr_t *vap);
extern int zfs_log_create_txtype(zil_create_t, vsecattr_t *vsecp,
vattr_t *vap);
extern void zfs_log_remove(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, char *name, uint64_t foid, boolean_t unlinked);
+ znode_t *dzp, const char *name, uint64_t foid, boolean_t unlinked);
#define ZFS_NO_OBJECT 0 /* no object id */
extern void zfs_log_link(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, znode_t *zp, char *name);
+ znode_t *dzp, znode_t *zp, const char *name);
extern void zfs_log_symlink(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, znode_t *zp, char *name, char *link);
+ znode_t *dzp, znode_t *zp, const char *name, const char *link);
extern void zfs_log_rename(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *sdzp, char *sname, znode_t *tdzp, char *dname, znode_t *szp);
+ znode_t *sdzp, const char *sname, znode_t *tdzp, const char *dname,
+ znode_t *szp);
extern void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
znode_t *zp, offset_t off, ssize_t len, int ioflag,
zil_callback_t callback, void *callback_data);
diff --git a/include/sys/zil.h b/include/sys/zil.h
index 7e61a13301c0..ec89de38d443 100644
--- a/include/sys/zil.h
+++ b/include/sys/zil.h
@@ -462,9 +462,9 @@ extern zil_stats_t zil_stats;
#define ZIL_STAT_BUMP(stat) \
ZIL_STAT_INCR(stat, 1);
-typedef int zil_parse_blk_func_t(zilog_t *zilog, blkptr_t *bp, void *arg,
+typedef int zil_parse_blk_func_t(zilog_t *zilog, const blkptr_t *bp, void *arg,
uint64_t txg);
-typedef int zil_parse_lr_func_t(zilog_t *zilog, lr_t *lr, void *arg,
+typedef int zil_parse_lr_func_t(zilog_t *zilog, const lr_t *lr, void *arg,
uint64_t txg);
typedef int zil_replay_func_t(void *arg1, void *arg2, boolean_t byteswap);
typedef int zil_get_data_t(void *arg, lr_write_t *lr, char *dbuf,
diff --git a/lib/libspl/include/os/freebsd/sys/param.h b/lib/libspl/include/os/freebsd/sys/param.h
index 7c23b670591a..cb5260ea3d7e 100644
--- a/lib/libspl/include/os/freebsd/sys/param.h
+++ b/lib/libspl/include/os/freebsd/sys/param.h
@@ -45,10 +45,6 @@
*/
#define MAXNAMELEN 256
-#ifndef IN_BASE
-#define UID_NOBODY 60001 /* user ID no body */
-#define GID_NOBODY UID_NOBODY
-#endif
#define UID_NOACCESS 60002 /* user ID no access */
#define MAXUID UINT32_MAX /* max user id */
diff --git a/lib/libspl/include/sys/acl.h b/lib/libspl/include/sys/acl.h
index e6df864f850f..31168421b088 100644
--- a/lib/libspl/include/sys/acl.h
+++ b/lib/libspl/include/sys/acl.h
@@ -19,8 +19,12 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2017 RackTop Systems.
*/
#ifndef _SYS_ACL_H
@@ -75,23 +79,24 @@ typedef struct acl_info acl_t;
/*
* The following are defined for ace_t.
*/
-#define ACE_READ_DATA 0x00000001
-#define ACE_LIST_DIRECTORY 0x00000001
-#define ACE_WRITE_DATA 0x00000002
-#define ACE_ADD_FILE 0x00000002
-#define ACE_APPEND_DATA 0x00000004
-#define ACE_ADD_SUBDIRECTORY 0x00000004
-#define ACE_READ_NAMED_ATTRS 0x00000008
-#define ACE_WRITE_NAMED_ATTRS 0x00000010
-#define ACE_EXECUTE 0x00000020
-#define ACE_DELETE_CHILD 0x00000040
-#define ACE_READ_ATTRIBUTES 0x00000080
-#define ACE_WRITE_ATTRIBUTES 0x00000100
-#define ACE_DELETE 0x00010000
-#define ACE_READ_ACL 0x00020000
-#define ACE_WRITE_ACL 0x00040000
-#define ACE_WRITE_OWNER 0x00080000
-#define ACE_SYNCHRONIZE 0x00100000
+#define ACE_READ_DATA 0x00000001 /* file: read data */
+#define ACE_LIST_DIRECTORY 0x00000001 /* dir: list files */
+#define ACE_WRITE_DATA 0x00000002 /* file: write data */
+#define ACE_ADD_FILE 0x00000002 /* dir: create file */
+#define ACE_APPEND_DATA 0x00000004 /* file: append data */
+#define ACE_ADD_SUBDIRECTORY 0x00000004 /* dir: create subdir */
+#define ACE_READ_NAMED_ATTRS 0x00000008 /* FILE_READ_EA */
+#define ACE_WRITE_NAMED_ATTRS 0x00000010 /* FILE_WRITE_EA */
+#define ACE_EXECUTE 0x00000020 /* file: execute */
+#define ACE_TRAVERSE 0x00000020 /* dir: lookup name */
+#define ACE_DELETE_CHILD 0x00000040 /* dir: unlink child */
+#define ACE_READ_ATTRIBUTES 0x00000080 /* (all) stat, etc. */
+#define ACE_WRITE_ATTRIBUTES 0x00000100 /* (all) utimes, etc. */
+#define ACE_DELETE 0x00010000 /* (all) unlink self */
+#define ACE_READ_ACL 0x00020000 /* (all) getsecattr */
+#define ACE_WRITE_ACL 0x00040000 /* (all) setsecattr */
+#define ACE_WRITE_OWNER 0x00080000 /* (all) chown */
+#define ACE_SYNCHRONIZE 0x00100000 /* (all) */
#define ACE_FILE_INHERIT_ACE 0x0001
#define ACE_DIRECTORY_INHERIT_ACE 0x0002
@@ -116,8 +121,6 @@ typedef struct acl_info acl_t;
#define ACL_FLAGS_ALL (ACL_AUTO_INHERIT|ACL_PROTECTED| \
ACL_DEFAULTED)
-#ifdef _KERNEL
-
/*
* These are only applicable in a CIFS context.
*/
@@ -137,6 +140,8 @@ typedef struct acl_info acl_t;
#define ACE_ALL_TYPES 0x001F
+#if defined(_KERNEL)
+
typedef struct ace_object {
uid_t a_who; /* uid or gid */
uint32_t a_access_mask; /* read,write,... */
@@ -154,6 +159,21 @@ typedef struct ace_object {
ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \
ACE_WRITE_OWNER|ACE_SYNCHRONIZE)
+#define ACE_ALL_WRITE_PERMS (ACE_WRITE_DATA|ACE_APPEND_DATA| \
+ ACE_WRITE_ATTRIBUTES|ACE_WRITE_NAMED_ATTRS|ACE_WRITE_ACL| \
+ ACE_WRITE_OWNER|ACE_DELETE|ACE_DELETE_CHILD)
+
+#define ACE_READ_PERMS (ACE_READ_DATA|ACE_READ_ACL|ACE_READ_ATTRIBUTES| \
+ ACE_READ_NAMED_ATTRS)
+
+#define ACE_WRITE_PERMS (ACE_WRITE_DATA|ACE_APPEND_DATA|ACE_WRITE_ATTRIBUTES| \
+ ACE_WRITE_NAMED_ATTRS)
+
+#define ACE_MODIFY_PERMS (ACE_READ_DATA|ACE_LIST_DIRECTORY|ACE_WRITE_DATA| \
+ ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS| \
+ ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES| \
+ ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_SYNCHRONIZE)
+
/*
* The following flags are supported by both NFSv4 ACLs and ace_t.
*/
@@ -217,6 +237,7 @@ typedef struct ace_object {
#define ACL_APPEND_ID 0x1 /* append uid/gid to user/group entries */
#define ACL_COMPACT_FMT 0x2 /* build ACL in ls -V format */
#define ACL_NORESOLVE 0x4 /* don't do name service lookups */
+#define ACL_SID_FMT 0x8 /* use usersid/groupsid when appropriate */
/*
* Legacy aclcheck errors for aclent_t ACLs
@@ -272,13 +293,8 @@ extern int cmp2acls(void *, void *);
#endif /* !defined(_KERNEL) */
-#if defined(__STDC__)
extern int acl(const char *path, int cmd, int cnt, void *buf);
extern int facl(int fd, int cmd, int cnt, void *buf);
-#else /* !__STDC__ */
-extern int acl();
-extern int facl();
-#endif /* defined(__STDC__) */
#ifdef __cplusplus
}
diff --git a/lib/libspl/os/freebsd/getmntany.c b/lib/libspl/os/freebsd/getmntany.c
index b41e763cee43..0ef24059e84f 100644
--- a/lib/libspl/os/freebsd/getmntany.c
+++ b/lib/libspl/os/freebsd/getmntany.c
@@ -37,10 +37,6 @@
#include <sys/stat.h>
#include <unistd.h>
-#define BUFSIZE (MNT_LINE_MAX + 2)
-
-__thread char buf[BUFSIZE];
-
int
getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf)
{
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index b46a4f122c47..3de7d7d9cc26 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -2119,8 +2119,6 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
avl_tree_t *fsavl = NULL;
static uint64_t holdseq;
int spa_version;
- pthread_t tid = 0;
- int pipefd[2];
int featureflags = 0;
FILE *fout;
@@ -2172,10 +2170,7 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
/* dump each stream */
sdd.fromsnap = fromsnap;
sdd.tosnap = tosnap;
- if (tid != 0)
- sdd.outfd = pipefd[0];
- else
- sdd.outfd = outfd;
+ sdd.outfd = outfd;
sdd.replicate = flags->replicate;
sdd.doall = flags->doall;
sdd.fromorigin = flags->fromorigin;
@@ -2278,13 +2273,6 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
if (err == 0 && !sdd.seento)
err = ENOENT;
- if (tid != 0) {
- if (err != 0)
- (void) pthread_cancel(tid);
- (void) close(pipefd[0]);
- (void) pthread_join(tid, NULL);
- }
-
if (sdd.cleanup_fd != -1) {
VERIFY(0 == close(sdd.cleanup_fd));
sdd.cleanup_fd = -1;
@@ -2313,11 +2301,6 @@ err_out:
if (sdd.cleanup_fd != -1)
VERIFY(0 == close(sdd.cleanup_fd));
- if (tid != 0) {
- (void) pthread_cancel(tid);
- (void) close(pipefd[0]);
- (void) pthread_join(tid, NULL);
- }
return (err);
}
@@ -4108,7 +4091,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
char errbuf[1024];
const char *chopprefix;
boolean_t newfs = B_FALSE;
- boolean_t stream_wantsnewfs;
+ boolean_t stream_wantsnewfs, stream_resumingnewfs;
boolean_t newprops = B_FALSE;
uint64_t read_bytes = 0;
uint64_t errflags = 0;
@@ -4329,6 +4312,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
DMU_BACKUP_FEATURE_EMBED_DATA;
stream_wantsnewfs = (drrb->drr_fromguid == 0 ||
(drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && !resuming;
+ stream_resumingnewfs = (drrb->drr_fromguid == 0 ||
+ (drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && resuming;
if (stream_wantsnewfs) {
/*
@@ -4496,7 +4481,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
}
if (!flags->dryrun && zhp->zfs_type == ZFS_TYPE_FILESYSTEM &&
- stream_wantsnewfs) {
+ (stream_wantsnewfs || stream_resumingnewfs)) {
/* We can't do online recv in this case */
clp = changelist_gather(zhp, ZFS_PROP_NAME, 0,
flags->forceunmount ? MS_FORCE : 0);
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index 651bca2978ce..a457fbfd0639 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -1010,8 +1010,7 @@ libzfs_init(void)
int error;
char *env;
- error = libzfs_load_module();
- if (error) {
+ if ((error = libzfs_load_module()) != 0) {
errno = error;
return (NULL);
}
diff --git a/lib/libzfs/os/freebsd/libzfs_compat.c b/lib/libzfs/os/freebsd/libzfs_compat.c
index 037ba56efe1c..2de90c7ceea5 100644
--- a/lib/libzfs/os/freebsd/libzfs_compat.c
+++ b/lib/libzfs/os/freebsd/libzfs_compat.c
@@ -176,11 +176,26 @@ execvpe(const char *name, char * const argv[], char * const envp[])
return (execvPe(name, path, argv, envp));
}
+#define ERRBUFLEN 256
+
+__thread static char errbuf[ERRBUFLEN];
+
const char *
libzfs_error_init(int error)
{
+ char *msg = errbuf;
+ size_t len, msglen = ERRBUFLEN;
- return (strerror(error));
+ if (modfind("zfs") < 0) {
+ len = snprintf(msg, msglen, dgettext(TEXT_DOMAIN,
+ "Failed to load %s module: "), ZFS_KMOD);
+ msg += len;
+ msglen -= len;
+ }
+
+ (void) snprintf(msg, msglen, "%s", strerror(error));
+
+ return (errbuf);
}
int
@@ -193,10 +208,6 @@ zfs_ioctl(libzfs_handle_t *hdl, int request, zfs_cmd_t *zc)
* Verify the required ZFS_DEV device is available and optionally attempt
* to load the ZFS modules. Under normal circumstances the modules
* should already have been loaded by some external mechanism.
- *
- * Environment variables:
- * - ZFS_MODULE_LOADING="YES|yes|ON|on" - Attempt to load modules.
- * - ZFS_MODULE_TIMEOUT="<seconds>" - Seconds to wait for ZFS_DEV
*/
int
libzfs_load_module(void)
diff --git a/lib/libzfsbootenv/libzfsbootenv.pc.in b/lib/libzfsbootenv/libzfsbootenv.pc.in
index 61bafa66e3fd..50865050bbfb 100644
--- a/lib/libzfsbootenv/libzfsbootenv.pc.in
+++ b/lib/libzfsbootenv/libzfsbootenv.pc.in
@@ -6,7 +6,7 @@ includedir=@includedir@
Name: libzfsbootenv
Description: LibZFSBootENV library
Version: @VERSION@
-URL: https://zfsonlinux.org
+URL: https://github.com/openzfs/zfs
Requires: libzfs libnvpair
Cflags: -I${includedir}
Libs: -L${libdir} -lzfsbootenv
diff --git a/lib/libzutil/os/linux/zutil_import_os.c b/lib/libzutil/os/linux/zutil_import_os.c
index a4bf01749da8..519ab3a078e3 100644
--- a/lib/libzutil/os/linux/zutil_import_os.c
+++ b/lib/libzutil/os/linux/zutil_import_os.c
@@ -813,9 +813,9 @@ update_vdev_config_dev_strs(nvlist_t *nv)
* env ZFS_VDEV_DEVID_OPT_OUT=YES zpool import dozer
*
* explanation:
- * Older ZFS on Linux implementations had issues when attempting to
- * display pool config VDEV names if a "devid" NVP value is present
- * in the pool's config.
+ * Older OpenZFS implementations had issues when attempting to
+ * display pool config VDEV names if a "devid" NVP value is
+ * present in the pool's config.
*
* For example, a pool that originated on illumos platform would
* have a devid value in the config and "zpool status" would fail
diff --git a/man/man1/raidz_test.1 b/man/man1/raidz_test.1
index 63e9144ad201..94e48bf49bd7 100644
--- a/man/man1/raidz_test.1
+++ b/man/man1/raidz_test.1
@@ -94,4 +94,4 @@ Debugging option. Specify to attach gdb when SIGSEGV or SIGABRT are received.
.SH "SEE ALSO"
.BR "ztest (1)"
.SH "AUTHORS"
-vdev_raidz, created for ZFS on Linux by Gvozden Nešković <neskovic@gmail.com>
+vdev_raidz, created for OpenZFS by Gvozden Nešković <neskovic@gmail.com>
diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5
index a266d9a7e96c..1b1a0d56a3ab 100644
--- a/man/man5/zfs-module-parameters.5
+++ b/man/man5/zfs-module-parameters.5
@@ -809,9 +809,20 @@ Default value: \fB1,048,576\fR.
\fBzfetch_max_distance\fR (uint)
.ad
.RS 12n
-Max bytes to prefetch per stream (default 8MB).
+Max bytes to prefetch per stream.
.sp
-Default value: \fB8,388,608\fR.
+Default value: \fB8,388,608\fR (8MB).
+.RE
+
+.sp
+.ne 2
+.na
+\fBzfetch_max_idistance\fR (uint)
+.ad
+.RS 12n
+Max bytes to prefetch indirects for per stream.
+.sp
+Default vaule: \fB67,108,864\fR (64MB).
.RE
.sp
@@ -1555,7 +1566,7 @@ Default value: \fB500,000\fR.
.RS 12n
Disables requirement for IVset guids to be present and match when doing a raw
receive of encrypted datasets. Intended for users whose pools were created with
-ZFS on Linux pre-release versions and now have compatibility issues.
+OpenZFS pre-release versions and now have compatibility issues.
.sp
Default value: \fB0\fR.
.RE
diff --git a/man/man8/zed.8.in b/man/man8/zed.8.in
index 9d494d5e8ff4..3d36c33ac9ca 100644
--- a/man/man8/zed.8.in
+++ b/man/man8/zed.8.in
@@ -1,6 +1,5 @@
.\"
-.\" This file is part of the ZFS Event Daemon (ZED)
-.\" for ZFS on Linux (ZoL) <https://zfsonlinux.org/>.
+.\" This file is part of the ZFS Event Daemon (ZED).
.\" Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
.\" Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
.\" Refer to the ZoL git commit log for authoritative copyright attribution.
diff --git a/man/man8/zfsprops.8 b/man/man8/zfsprops.8
index 2c4a2af29480..88995db0cb0c 100644
--- a/man/man8/zfsprops.8
+++ b/man/man8/zfsprops.8
@@ -651,17 +651,28 @@ you must first remove all
.Tn ACL
entries which do not represent the current mode.
.El
-.It Sy acltype Ns = Ns Sy off Ns | Ns Sy posix
+.It Sy acltype Ns = Ns Sy off Ns | Ns Sy nfsv4 Ns | Ns Sy posix
Controls whether ACLs are enabled and if so what type of ACL to use.
-This property is not visible on FreeBSD yet.
+When this property is set to a type of ACL not supported by the current
+platform, the behavior is the same as if it were set to
+.Sy off .
.Bl -tag -width "posixacl"
.It Sy off
-default, when a file system has the
+default on Linux, when a file system has the
.Sy acltype
property set to off then ACLs are disabled.
.It Sy noacl
an alias for
.Sy off
+.It Sy nfsv4
+default on FreeBSD, indicates that NFSv4-style ZFS ACLs should be used.
+These ACLs can be managed with the
+.Xr getfacl 1
+and
+.Xr setfacl 1
+commands on FreeBSD. The
+.Sy nfsv4
+ZFS ACL type is not yet supported on Linux.
.It Sy posix
indicates POSIX ACLs should be used. POSIX ACLs are specific to Linux and are
not functional on other platforms. POSIX ACLs are stored as an extended
@@ -1794,7 +1805,7 @@ on platforms which do not support the
feature.
.Pp
The use of system attribute based xattrs is strongly encouraged for users of
-SELinux or POSIX ACLs. Both of these features heavily rely of extended
+SELinux or POSIX ACLs. Both of these features heavily rely on extended
attributes and benefit significantly from the reduced access time.
.Pp
The values
diff --git a/man/man8/zpool.8 b/man/man8/zpool.8
index 7c12798da49c..15e50838fee5 100644
--- a/man/man8/zpool.8
+++ b/man/man8/zpool.8
@@ -503,7 +503,7 @@ command line option.
.El
.Bl -tag -width "ZFS_VDEV_DEVID_OPT_OUT"
.It Ev ZFS_VDEV_DEVID_OPT_OUT
-Older ZFS on Linux implementations had issues when attempting to display pool
+Older OpenZFS implementations had issues when attempting to display pool
config VDEV names if a
.Sy devid
NVP value is present in the pool's config.
diff --git a/module/Makefile.in b/module/Makefile.in
index ead4ff1360b2..0ee2c447221a 100644
--- a/module/Makefile.in
+++ b/module/Makefile.in
@@ -96,7 +96,7 @@ modules_install: modules_install-@ac_system@
modules_uninstall-Linux:
@# Uninstall the kernel modules
- kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@ \
+ kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
for objdir in $(ZFS_MODULES); do \
$(RM) -R $$kmoddir/$(INSTALL_MOD_DIR)/$$objdir; \
done
diff --git a/module/os/freebsd/spl/list.c b/module/os/freebsd/spl/list.c
index 8796be4a98fb..0f5ae629126c 100644
--- a/module/os/freebsd/spl/list.c
+++ b/module/os/freebsd/spl/list.c
@@ -27,10 +27,10 @@
* Generic doubly-linked list implementation
*/
+#include <sys/param.h>
#include <sys/list.h>
#include <sys/list_impl.h>
#include <sys/types.h>
-#include <sys/sysmacros.h>
#include <sys/debug.h>
#define list_d2l(a, obj) ((list_node_t *)(((char *)obj) + (a)->list_offset))
diff --git a/module/os/freebsd/spl/spl_kstat.c b/module/os/freebsd/spl/spl_kstat.c
index 4cc77e20a4eb..b26753bacc21 100644
--- a/module/os/freebsd/spl/spl_kstat.c
+++ b/module/os/freebsd/spl/spl_kstat.c
@@ -231,6 +231,7 @@ restart:
}
free(ksp->ks_raw_buf, M_TEMP);
mutex_exit(ksp->ks_lock);
+ sbuf_trim(sb);
rc = sbuf_finish(sb);
if (rc == 0)
rc = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb));
diff --git a/module/os/freebsd/spl/spl_taskq.c b/module/os/freebsd/spl/spl_taskq.c
index cc025de959e3..3fa7939bdb3c 100644
--- a/module/os/freebsd/spl/spl_taskq.c
+++ b/module/os/freebsd/spl/spl_taskq.c
@@ -29,18 +29,21 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
#include <sys/param.h>
+#include <sys/ck.h>
+#include <sys/epoch.h>
#include <sys/kernel.h>
#include <sys/kmem.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/queue.h>
-#include <sys/taskqueue.h>
#include <sys/taskq.h>
+#include <sys/taskqueue.h>
#include <sys/zfs_context.h>
-#include <sys/ck.h>
-#include <sys/epoch.h>
+
+#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__)
+#include <machine/pcb.h>
+#endif
#include <vm/uma.h>
@@ -67,7 +70,7 @@ static unsigned long tqenthash;
static unsigned long tqenthashlock;
static struct sx *tqenthashtbl_lock;
-static uint32_t tqidnext = 1;
+static taskqid_t tqidnext;
#define TQIDHASH(tqid) (&tqenthashtbl[(tqid) & tqenthash])
#define TQIDHASHLOCK(tqid) (&tqenthashtbl_lock[((tqid) & tqenthashlock)])
@@ -90,7 +93,6 @@ system_taskq_init(void *arg)
M_TASKQ, M_WAITOK | M_ZERO);
for (i = 0; i < tqenthashlock + 1; i++)
sx_init_flags(&tqenthashtbl_lock[i], "tqenthash", SX_DUPOK);
- tqidnext = 1;
taskq_zone = uma_zcreate("taskq_zone", sizeof (taskq_ent_t),
NULL, NULL, NULL, NULL,
UMA_ALIGN_CACHE, 0);
@@ -121,6 +123,35 @@ system_taskq_fini(void *arg)
SYSUNINIT(system_taskq_fini, SI_SUB_CONFIGURE, SI_ORDER_ANY, system_taskq_fini,
NULL);
+#ifdef __LP64__
+static taskqid_t
+__taskq_genid(void)
+{
+ taskqid_t tqid;
+
+ /*
+ * Assume a 64-bit counter will not wrap in practice.
+ */
+ tqid = atomic_add_64_nv(&tqidnext, 1);
+ VERIFY(tqid);
+ return (tqid);
+}
+#else
+static taskqid_t
+__taskq_genid(void)
+{
+ taskqid_t tqid;
+
+ for (;;) {
+ tqid = atomic_add_32_nv(&tqidnext, 1);
+ if (__predict_true(tqid != 0))
+ break;
+ }
+ VERIFY(tqid);
+ return (tqid);
+}
+#endif
+
static taskq_ent_t *
taskq_lookup(taskqid_t tqid)
{
@@ -140,8 +171,9 @@ taskq_lookup(taskqid_t tqid)
static taskqid_t
taskq_insert(taskq_ent_t *ent)
{
- taskqid_t tqid = atomic_fetchadd_int(&tqidnext, 1);
+ taskqid_t tqid;
+ tqid = __taskq_genid();
ent->tqent_id = tqid;
ent->tqent_registered = B_TRUE;
sx_xlock(TQIDHASHLOCK(tqid));
@@ -289,7 +321,7 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg,
uint_t flags, clock_t expire_time)
{
taskq_ent_t *task;
- taskqid_t tid;
+ taskqid_t tqid;
clock_t timo;
int mflag;
@@ -310,13 +342,13 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg,
task->tqent_type = TIMEOUT_TASK;
task->tqent_cancelled = B_FALSE;
refcount_init(&task->tqent_rc, 1);
- tid = taskq_insert(task);
+ tqid = taskq_insert(task);
TIMEOUT_TASK_INIT(tq->tq_queue, &task->tqent_timeout_task, 0,
taskq_run, task);
taskqueue_enqueue_timeout(tq->tq_queue, &task->tqent_timeout_task,
timo);
- return (tid);
+ return (tqid);
}
taskqid_t
@@ -324,7 +356,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags)
{
taskq_ent_t *task;
int mflag, prio;
- taskqid_t tid;
+ taskqid_t tqid;
if ((flags & (TQ_SLEEP | TQ_NOQUEUE)) == TQ_SLEEP)
mflag = M_WAITOK;
@@ -344,11 +376,10 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags)
task->tqent_arg = arg;
task->tqent_cancelled = B_FALSE;
task->tqent_type = NORMAL_TASK;
- tid = taskq_insert(task);
+ tqid = taskq_insert(task);
TASK_INIT(&task->tqent_task, prio, taskq_run, task);
taskqueue_enqueue(tq->tq_queue, &task->tqent_task);
- VERIFY(tid);
- return (tid);
+ return (tqid);
}
static void
diff --git a/module/os/freebsd/zfs/kmod_core.c b/module/os/freebsd/zfs/kmod_core.c
index 3a13271aac6f..c11d4dbcf660 100644
--- a/module/os/freebsd/zfs/kmod_core.c
+++ b/module/os/freebsd/zfs/kmod_core.c
@@ -28,73 +28,68 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
#include <sys/param.h>
-#include <sys/systm.h>
+#include <sys/buf.h>
+#include <sys/cmn_err.h>
#include <sys/conf.h>
+#include <sys/dmu.h>
+#include <sys/dmu_impl.h>
+#include <sys/dmu_objset.h>
+#include <sys/dmu_send.h>
+#include <sys/dmu_tx.h>
+#include <sys/dsl_bookmark.h>
+#include <sys/dsl_crypt.h>
+#include <sys/dsl_dataset.h>
+#include <sys/dsl_deleg.h>
+#include <sys/dsl_destroy.h>
+#include <sys/dsl_dir.h>
+#include <sys/dsl_prop.h>
+#include <sys/dsl_scan.h>
+#include <sys/dsl_userhold.h>
+#include <sys/errno.h>
#include <sys/eventhandler.h>
+#include <sys/file.h>
+#include <sys/fm/util.h>
+#include <sys/fs/zfs.h>
#include <sys/kernel.h>
+#include <sys/kmem.h>
#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mount.h>
#include <sys/mutex.h>
+#include <sys/nvpair.h>
+#include <sys/policy.h>
#include <sys/proc.h>
-#include <sys/errno.h>
-#include <sys/uio.h>
-#include <sys/buf.h>
-#include <sys/file.h>
-#include <sys/kmem.h>
-#include <sys/conf.h>
-#include <sys/eventhandler.h>
-#include <sys/cmn_err.h>
-#include <sys/stat.h>
-#include <sys/zfs_ioctl.h>
-#include <sys/zfs_vfsops.h>
-#include <sys/zfs_znode.h>
-#include <sys/zap.h>
+#include <sys/sdt.h>
#include <sys/spa.h>
#include <sys/spa_impl.h>
-#include <sys/vdev.h>
-#include <sys/dmu.h>
-#include <sys/dsl_dir.h>
-#include <sys/dsl_dataset.h>
-#include <sys/dsl_prop.h>
-#include <sys/dsl_deleg.h>
-#include <sys/dmu_objset.h>
-#include <sys/dmu_impl.h>
-#include <sys/dmu_tx.h>
-#include <sys/fm/util.h>
+#include <sys/stat.h>
#include <sys/sunddi.h>
-#include <sys/policy.h>
-#include <sys/zone.h>
-#include <sys/nvpair.h>
-#include <sys/mount.h>
+#include <sys/systm.h>
#include <sys/taskqueue.h>
-#include <sys/sdt.h>
-#include <sys/fs/zfs.h>
-#include <sys/zfs_ctldir.h>
-#include <sys/zfs_dir.h>
-#include <sys/zfs_onexit.h>
-#include <sys/zvol.h>
-#include <sys/dsl_scan.h>
-#include <sys/dmu_objset.h>
-#include <sys/dmu_send.h>
-#include <sys/dsl_destroy.h>
-#include <sys/dsl_bookmark.h>
-#include <sys/dsl_userhold.h>
-#include <sys/zfeature.h>
-#include <sys/zcp.h>
-#include <sys/zio_checksum.h>
+#include <sys/uio.h>
+#include <sys/vdev.h>
#include <sys/vdev_removal.h>
-#include <sys/dsl_crypt.h>
+#include <sys/zap.h>
+#include <sys/zcp.h>
+#include <sys/zfeature.h>
#include <sys/zfs_context.h>
-
+#include <sys/zfs_ctldir.h>
+#include <sys/zfs_dir.h>
+#include <sys/zfs_ioctl.h>
#include <sys/zfs_ioctl_compat.h>
#include <sys/zfs_ioctl_impl.h>
+#include <sys/zfs_onexit.h>
+#include <sys/zfs_vfsops.h>
+#include <sys/zfs_znode.h>
+#include <sys/zio_checksum.h>
+#include <sys/zone.h>
+#include <sys/zvol.h>
+#include "zfs_comutil.h"
+#include "zfs_deleg.h"
#include "zfs_namecheck.h"
#include "zfs_prop.h"
-#include "zfs_deleg.h"
-#include "zfs_comutil.h"
SYSCTL_DECL(_vfs_zfs);
SYSCTL_DECL(_vfs_zfs_vdev);
@@ -122,7 +117,6 @@ extern zfsdev_state_t *zfsdev_state_list;
#define ZFS_MIN_KSTACK_PAGES 4
-
static int
zfsdev_ioctl(struct cdev *dev, ulong_t zcmd, caddr_t arg, int flag,
struct thread *td)
@@ -333,7 +327,6 @@ zfs_shutdown(void *arg __unused, int howto __unused)
zfs__fini();
}
-
static int
zfs_modevent(module_t mod, int type, void *unused __unused)
{
diff --git a/module/os/freebsd/zfs/sysctl_os.c b/module/os/freebsd/zfs/sysctl_os.c
index c9b350a540ea..1b37ce0d7f6b 100644
--- a/module/os/freebsd/zfs/sysctl_os.c
+++ b/module/os/freebsd/zfs/sysctl_os.c
@@ -300,8 +300,9 @@ SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_distance, CTLFLAG_RWTUN,
/* max bytes to prefetch indirects for per stream (default 64MB) */
extern uint32_t zfetch_max_idistance;
-SYSCTL_UINT(_vfs_zfs_prefetch, OID_AUTO, max_idistance, CTLFLAG_RWTUN,
- &zfetch_max_idistance, 0, "Max bytes to prefetch indirects for per stream");
+SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_idistance, CTLFLAG_RWTUN,
+ &zfetch_max_idistance, 0,
+ "Max bytes to prefetch indirects for per stream (LEGACY)");
/* dsl_pool.c */
diff --git a/module/os/freebsd/zfs/zfs_acl.c b/module/os/freebsd/zfs/zfs_acl.c
index 018120c82ab3..23b87de8bd0d 100644
--- a/module/os/freebsd/zfs/zfs_acl.c
+++ b/module/os/freebsd/zfs/zfs_acl.c
@@ -2494,7 +2494,7 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr)
/*
* Translate traditional unix VREAD/VWRITE/VEXEC mode into
- * native ACL format and call zfs_zaccess()
+ * NFSv4-style ZFS ACL format and call zfs_zaccess()
*/
int
zfs_zaccess_rwx(znode_t *zp, mode_t mode, int flags, cred_t *cr)
diff --git a/module/os/freebsd/zfs/zfs_ctldir.c b/module/os/freebsd/zfs/zfs_ctldir.c
index 0fe32b19520c..587c648a028a 100644
--- a/module/os/freebsd/zfs/zfs_ctldir.c
+++ b/module/os/freebsd/zfs/zfs_ctldir.c
@@ -314,7 +314,6 @@ sfs_readdir_common(uint64_t parent_id, uint64_t id, struct vop_readdir_args *ap,
static struct vop_vector zfsctl_ops_root;
static struct vop_vector zfsctl_ops_snapdir;
static struct vop_vector zfsctl_ops_snapshot;
-static struct vop_vector zfsctl_ops_shares_dir;
void
zfsctl_init(void)
@@ -331,8 +330,7 @@ zfsctl_is_node(vnode_t *vp)
{
return (vn_matchops(vp, zfsctl_ops_root) ||
vn_matchops(vp, zfsctl_ops_snapdir) ||
- vn_matchops(vp, zfsctl_ops_snapshot) ||
- vn_matchops(vp, zfsctl_ops_shares_dir));
+ vn_matchops(vp, zfsctl_ops_snapshot));
}
@@ -798,6 +796,9 @@ zfsctl_common_getacl(struct vop_getacl_args *ap)
static struct vop_vector zfsctl_ops_root = {
.vop_default = &default_vnodeops,
+#if __FreeBSD_version >= 1300121
+ .vop_fplookup_vexec = VOP_EAGAIN,
+#endif
.vop_open = zfsctl_common_open,
.vop_close = zfsctl_common_close,
.vop_ioctl = VOP_EINVAL,
@@ -1115,6 +1116,9 @@ zfsctl_snapdir_getattr(struct vop_getattr_args *ap)
static struct vop_vector zfsctl_ops_snapdir = {
.vop_default = &default_vnodeops,
+#if __FreeBSD_version >= 1300121
+ .vop_fplookup_vexec = VOP_EAGAIN,
+#endif
.vop_open = zfsctl_common_open,
.vop_close = zfsctl_common_close,
.vop_getattr = zfsctl_snapdir_getattr,
@@ -1216,6 +1220,9 @@ zfsctl_snapshot_vptocnp(struct vop_vptocnp_args *ap)
*/
static struct vop_vector zfsctl_ops_snapshot = {
.vop_default = NULL, /* ensure very restricted access */
+#if __FreeBSD_version >= 1300121
+ .vop_fplookup_vexec = VOP_EAGAIN,
+#endif
.vop_inactive = zfsctl_snapshot_inactive,
#if __FreeBSD_version >= 1300045
.vop_need_inactive = vop_stdneed_inactive,
@@ -1327,7 +1334,7 @@ zfsctl_umount_snapshots(vfs_t *vfsp, int fflags, cred_t *cr)
}
int
-zfsctl_snapshot_unmount(char *snapname, int flags __unused)
+zfsctl_snapshot_unmount(const char *snapname, int flags __unused)
{
vfs_t *vfsp = NULL;
zfsvfs_t *zfsvfs = NULL;
diff --git a/module/os/freebsd/zfs/zfs_vfsops.c b/module/os/freebsd/zfs/zfs_vfsops.c
index ec8303283414..4e437f5bacc1 100644
--- a/module/os/freebsd/zfs/zfs_vfsops.c
+++ b/module/os/freebsd/zfs/zfs_vfsops.c
@@ -592,6 +592,14 @@ acl_inherit_changed_cb(void *arg, uint64_t newval)
zfsvfs->z_acl_inherit = newval;
}
+static void
+acl_type_changed_cb(void *arg, uint64_t newval)
+{
+ zfsvfs_t *zfsvfs = arg;
+
+ zfsvfs->z_acl_type = newval;
+}
+
static int
zfs_register_callbacks(vfs_t *vfsp)
{
@@ -723,6 +731,8 @@ zfs_register_callbacks(vfs_t *vfsp)
error = error ? error : dsl_prop_register(ds,
zfs_prop_to_name(ZFS_PROP_SNAPDIR), snapdir_changed_cb, zfsvfs);
error = error ? error : dsl_prop_register(ds,
+ zfs_prop_to_name(ZFS_PROP_ACLTYPE), acl_type_changed_cb, zfsvfs);
+ error = error ? error : dsl_prop_register(ds,
zfs_prop_to_name(ZFS_PROP_ACLMODE), acl_mode_changed_cb, zfsvfs);
error = error ? error : dsl_prop_register(ds,
zfs_prop_to_name(ZFS_PROP_ACLINHERIT), acl_inherit_changed_cb,
@@ -797,6 +807,11 @@ zfsvfs_init(zfsvfs_t *zfsvfs, objset_t *os)
return (error);
zfsvfs->z_case = (uint_t)val;
+ error = zfs_get_zplprop(os, ZFS_PROP_ACLTYPE, &val);
+ if (error != 0)
+ return (error);
+ zfsvfs->z_acl_type = (uint_t)val;
+
/*
* Fold case on file systems that are always or sometimes case
* insensitive.
@@ -1232,6 +1247,10 @@ zfs_domount(vfs_t *vfsp, char *osname)
"xattr", &pval, NULL)))
goto out;
xattr_changed_cb(zfsvfs, pval);
+ if ((error = dsl_prop_get_integer(osname,
+ "acltype", &pval, NULL)))
+ goto out;
+ acl_type_changed_cb(zfsvfs, pval);
zfsvfs->z_issnap = B_TRUE;
zfsvfs->z_os->os_sync = ZFS_SYNC_DISABLED;
@@ -2220,6 +2239,9 @@ zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value)
case ZFS_PROP_CASE:
*value = ZFS_CASE_SENSITIVE;
break;
+ case ZFS_PROP_ACLTYPE:
+ *value = ZFS_ACLTYPE_NFSV4;
+ break;
default:
return (error);
}
diff --git a/module/os/freebsd/zfs/zfs_vnops.c b/module/os/freebsd/zfs/zfs_vnops.c
index 79202b60a6f0..18c71511fccd 100644
--- a/module/os/freebsd/zfs/zfs_vnops.c
+++ b/module/os/freebsd/zfs/zfs_vnops.c
@@ -104,14 +104,6 @@ VFS_SMR_DECLARE;
#define vm_page_wire_unlock(pp) vm_page_unlock(pp)
#endif
-static int
-zfs_u8_validate(const char *u8str, size_t n, char **list, int flag, int *errnum)
-{
-
- return (u8_validate(__DECONST(char *, u8str), n, list, flag, errnum));
-}
-#define u8_validate zfs_u8_validate
-
#ifdef DEBUG_VFS_LOCKS
#define VNCHECKREF(vp) \
VNASSERT((vp)->v_holdcnt > 0 && (vp)->v_usecount > 0, vp, \
@@ -1536,8 +1528,9 @@ zfs_lookup_lock(vnode_t *dvp, vnode_t *vp, const char *name, int lkflags)
*/
/* ARGSUSED */
static int
-zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp,
- int nameiop, cred_t *cr, kthread_t *td, int flags, boolean_t cached)
+zfs_lookup(vnode_t *dvp, const char *nm, vnode_t **vpp,
+ struct componentname *cnp, int nameiop, cred_t *cr, kthread_t *td,
+ int flags, boolean_t cached)
{
znode_t *zdp = VTOZ(dvp);
znode_t *zp;
@@ -1561,7 +1554,8 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp,
}
}
- DTRACE_PROBE2(zfs__fastpath__lookup__miss, vnode_t *, dvp, char *, nm);
+ DTRACE_PROBE2(zfs__fastpath__lookup__miss, vnode_t *, dvp,
+ const char *, nm);
ZFS_ENTER(zfsvfs);
ZFS_VERIFY_ZP(zdp);
@@ -1778,7 +1772,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp,
/* ARGSUSED */
int
-zfs_create(znode_t *dzp, char *name, vattr_t *vap, int excl, int mode,
+zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl, int mode,
znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp)
{
znode_t *zp;
@@ -1945,7 +1939,7 @@ out:
/*ARGSUSED*/
static int
-zfs_remove_(vnode_t *dvp, vnode_t *vp, char *name, cred_t *cr)
+zfs_remove_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
{
znode_t *dzp = VTOZ(dvp);
znode_t *zp;
@@ -2059,13 +2053,13 @@ out:
static int
-zfs_lookup_internal(znode_t *dzp, char *name, vnode_t **vpp,
+zfs_lookup_internal(znode_t *dzp, const char *name, vnode_t **vpp,
struct componentname *cnp, int nameiop)
{
zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
int error;
- cnp->cn_nameptr = name;
+ cnp->cn_nameptr = __DECONST(char *, name);
cnp->cn_namelen = strlen(name);
cnp->cn_nameiop = nameiop;
cnp->cn_flags = ISLASTCN | SAVENAME;
@@ -2096,7 +2090,7 @@ zfs_lookup_internal(znode_t *dzp, char *name, vnode_t **vpp,
}
int
-zfs_remove(znode_t *dzp, char *name, cred_t *cr, int flags)
+zfs_remove(znode_t *dzp, const char *name, cred_t *cr, int flags)
{
vnode_t *vp;
int error;
@@ -2131,8 +2125,8 @@ zfs_remove(znode_t *dzp, char *name, cred_t *cr, int flags)
*/
/*ARGSUSED*/
int
-zfs_mkdir(znode_t *dzp, char *dirname, vattr_t *vap, znode_t **zpp, cred_t *cr,
- int flags, vsecattr_t *vsecp)
+zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, znode_t **zpp,
+ cred_t *cr, int flags, vsecattr_t *vsecp)
{
znode_t *zp;
zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
@@ -2298,7 +2292,7 @@ zfs_mkdir(znode_t *dzp, char *dirname, vattr_t *vap, znode_t **zpp, cred_t *cr,
*/
/*ARGSUSED*/
static int
-zfs_rmdir_(vnode_t *dvp, vnode_t *vp, char *name, cred_t *cr)
+zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
{
znode_t *dzp = VTOZ(dvp);
znode_t *zp = VTOZ(vp);
@@ -2360,7 +2354,7 @@ out:
}
int
-zfs_rmdir(znode_t *dzp, char *name, znode_t *cwd, cred_t *cr, int flags)
+zfs_rmdir(znode_t *dzp, const char *name, znode_t *cwd, cred_t *cr, int flags)
{
struct componentname cn;
vnode_t *vp;
@@ -3907,6 +3901,19 @@ zfs_rename_check(znode_t *szp, znode_t *sdzp, znode_t *tdzp)
return (error);
}
+#if __FreeBSD_version < 1300110
+static void
+cache_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp,
+ struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp)
+{
+
+ cache_purge(fvp);
+ if (tvp != NULL)
+ cache_purge(tvp);
+ cache_purge_negative(tdvp);
+}
+#endif
+
/*
* Move an entry from the provided source directory to the target
* directory. Change the entry name as indicated.
@@ -3934,8 +3941,8 @@ zfs_rename_(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
znode_t *sdzp, *tdzp, *szp, *tzp;
zilog_t *zilog = NULL;
dmu_tx_t *tx;
- char *snm = scnp->cn_nameptr;
- char *tnm = tcnp->cn_nameptr;
+ const char *snm = scnp->cn_nameptr;
+ const char *tnm = tcnp->cn_nameptr;
int error = 0;
bool want_seqc_end __maybe_unused = false;
@@ -4165,10 +4172,7 @@ zfs_rename_(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
}
}
if (error == 0) {
- cache_purge(*svpp);
- if (*tvpp != NULL)
- cache_purge(*tvpp);
- cache_purge_negative(tdvp);
+ cache_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp);
}
}
@@ -4201,7 +4205,7 @@ out: /* original two vnodes are locked */
}
int
-zfs_rename(znode_t *sdzp, char *sname, znode_t *tdzp, char *tname,
+zfs_rename(znode_t *sdzp, const char *sname, znode_t *tdzp, const char *tname,
cred_t *cr, int flags)
{
struct componentname scn, tcn;
@@ -4360,8 +4364,7 @@ zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
*/
(void) zfs_link_create(dzp, name, zp, tx, ZNEW);
- zfs_log_symlink(zilog, tx, txtype, dzp, zp,
- __DECONST(char *, name), __DECONST(char *, link));
+ zfs_log_symlink(zilog, tx, txtype, dzp, zp, name, link);
*zpp = zp;
zfs_acl_ids_free(&acl_ids);
@@ -4432,7 +4435,7 @@ zfs_readlink(vnode_t *vp, uio_t *uio, cred_t *cr, caller_context_t *ct)
*/
/* ARGSUSED */
int
-zfs_link(znode_t *tdzp, znode_t *szp, char *name, cred_t *cr,
+zfs_link(znode_t *tdzp, znode_t *szp, const char *name, cred_t *cr,
int flags)
{
znode_t *tzp;
@@ -4741,6 +4744,8 @@ static int
zfs_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr,
caller_context_t *ct)
{
+ znode_t *zp;
+ zfsvfs_t *zfsvfs;
switch (cmd) {
case _PC_LINK_MAX:
@@ -4754,11 +4759,25 @@ zfs_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr,
*valp = (int)SPA_MINBLOCKSIZE;
return (0);
case _PC_ACL_EXTENDED:
+#if 0 /* POSIX ACLs are not implemented for ZFS on FreeBSD yet. */
+ zp = VTOZ(vp);
+ zfsvfs = zp->z_zfsvfs;
+ ZFS_ENTER(zfsvfs);
+ ZFS_VERIFY_ZP(zp);
+ *valp = zfsvfs->z_acl_type == ZFSACLTYPE_POSIX ? 1 : 0;
+ ZFS_EXIT(zfsvfs);
+#else
*valp = 0;
+#endif
return (0);
case _PC_ACL_NFS4:
- *valp = 1;
+ zp = VTOZ(vp);
+ zfsvfs = zp->z_zfsvfs;
+ ZFS_ENTER(zfsvfs);
+ ZFS_VERIFY_ZP(zp);
+ *valp = zfsvfs->z_acl_type == ZFS_ACLTYPE_NFSV4 ? 1 : 0;
+ ZFS_EXIT(zfsvfs);
return (0);
case _PC_ACL_PATH_MAX:
@@ -6622,6 +6641,9 @@ VFS_VOP_VECTOR_REGISTER(zfs_fifoops);
*/
struct vop_vector zfs_shareops = {
.vop_default = &default_vnodeops,
+#if __FreeBSD_version >= 1300121
+ .vop_fplookup_vexec = VOP_EAGAIN,
+#endif
.vop_access = zfs_freebsd_access,
.vop_inactive = zfs_freebsd_inactive,
.vop_reclaim = zfs_freebsd_reclaim,
diff --git a/module/os/linux/spl/README.md b/module/os/linux/spl/README.md
index 51166425f063..906530bcf2ad 100644
--- a/module/os/linux/spl/README.md
+++ b/module/os/linux/spl/README.md
@@ -1,5 +1,5 @@
The Solaris Porting Layer, SPL, is a Linux kernel module which provides a
-compatibility layer used by the [ZFS on Linux](https://zfsonlinux.org) project.
+compatibility layer used by the [OpenZFS](https://github.com/openzfs/zfs) project.
# Installation
diff --git a/module/os/linux/spl/spl-atomic.c b/module/os/linux/spl/spl-atomic.c
index 47ed1886e157..accf656fbcc6 100644
--- a/module/os/linux/spl/spl-atomic.c
+++ b/module/os/linux/spl/spl-atomic.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-condvar.c b/module/os/linux/spl/spl-condvar.c
index 49f48664503a..d0461a9f1298 100644
--- a/module/os/linux/spl/spl-condvar.c
+++ b/module/os/linux/spl/spl-condvar.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-cred.c b/module/os/linux/spl/spl-cred.c
index 6e93a32e60d7..8fe1cc30ba99 100644
--- a/module/os/linux/spl/spl-cred.c
+++ b/module/os/linux/spl/spl-cred.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-err.c b/module/os/linux/spl/spl-err.c
index 3c0bb71c0629..10b768d57360 100644
--- a/module/os/linux/spl/spl-err.c
+++ b/module/os/linux/spl/spl-err.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-generic.c b/module/os/linux/spl/spl-generic.c
index 820fb86c3c7d..1da7618185ec 100644
--- a/module/os/linux/spl/spl-generic.c
+++ b/module/os/linux/spl/spl-generic.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-kmem-cache.c b/module/os/linux/spl/spl-kmem-cache.c
index 15dc27624c55..6b3d559ffc1c 100644
--- a/module/os/linux/spl/spl-kmem-cache.c
+++ b/module/os/linux/spl/spl-kmem-cache.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-kmem.c b/module/os/linux/spl/spl-kmem.c
index f19421cfcc03..943966cbb17a 100644
--- a/module/os/linux/spl/spl-kmem.c
+++ b/module/os/linux/spl/spl-kmem.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -217,7 +216,7 @@ spl_kmem_alloc_impl(size_t size, int flags, int node)
!(flags & KM_VMEM)) {
printk(KERN_WARNING
"Large kmem_alloc(%lu, 0x%x), please file an issue at:\n"
- "https://github.com/zfsonlinux/zfs/issues/new\n",
+ "https://github.com/openzfs/zfs/issues/new\n",
(unsigned long)size, flags);
dump_stack();
}
diff --git a/module/os/linux/spl/spl-kstat.c b/module/os/linux/spl/spl-kstat.c
index b9eeb332ee57..dbbf72c8569d 100644
--- a/module/os/linux/spl/spl-kstat.c
+++ b/module/os/linux/spl/spl-kstat.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-proc.c b/module/os/linux/spl/spl-proc.c
index 6936db5d6466..3e58598d43f8 100644
--- a/module/os/linux/spl/spl-proc.c
+++ b/module/os/linux/spl/spl-proc.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-taskq.c b/module/os/linux/spl/spl-taskq.c
index 9cbf3e38137c..fafadffc751c 100644
--- a/module/os/linux/spl/spl-taskq.c
+++ b/module/os/linux/spl/spl-taskq.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-thread.c b/module/os/linux/spl/spl-thread.c
index 0352a31ea835..db23fb64a298 100644
--- a/module/os/linux/spl/spl-thread.c
+++ b/module/os/linux/spl/spl-thread.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-tsd.c b/module/os/linux/spl/spl-tsd.c
index b955ed65470f..546db9ab8bd7 100644
--- a/module/os/linux/spl/spl-tsd.c
+++ b/module/os/linux/spl/spl-tsd.c
@@ -5,7 +5,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-vmem.c b/module/os/linux/spl/spl-vmem.c
index 32372e6f2b60..cab3e9549cfe 100644
--- a/module/os/linux/spl/spl-vmem.c
+++ b/module/os/linux/spl/spl-vmem.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-xdr.c b/module/os/linux/spl/spl-xdr.c
index 1dd31ffc1483..5e763c25606f 100644
--- a/module/os/linux/spl/spl-xdr.c
+++ b/module/os/linux/spl/spl-xdr.c
@@ -3,7 +3,6 @@
* Written by Ricardo Correia <Ricardo.M.Correia@Sun.COM>
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/spl/spl-zlib.c b/module/os/linux/spl/spl-zlib.c
index db05e28925b5..589496da0c78 100644
--- a/module/os/linux/spl/spl-zlib.c
+++ b/module/os/linux/spl/spl-zlib.c
@@ -6,7 +6,6 @@
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
- * For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c
index 11b5559321ad..2628325c0ba9 100644
--- a/module/os/linux/zfs/zfs_acl.c
+++ b/module/os/linux/zfs/zfs_acl.c
@@ -2666,7 +2666,7 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr)
/*
* Translate traditional unix S_IRUSR/S_IWUSR/S_IXUSR mode into
- * native ACL format and call zfs_zaccess()
+ * NFSv4-style ZFS ACL format and call zfs_zaccess()
*/
int
zfs_zaccess_rwx(znode_t *zp, mode_t mode, int flags, cred_t *cr)
diff --git a/module/os/linux/zfs/zfs_ctldir.c b/module/os/linux/zfs/zfs_ctldir.c
index 26e785a0d422..c13a9771235d 100644
--- a/module/os/linux/zfs/zfs_ctldir.c
+++ b/module/os/linux/zfs/zfs_ctldir.c
@@ -131,7 +131,7 @@ static void zfsctl_snapshot_unmount_delay_impl(zfs_snapentry_t *se, int delay);
* the snapshot name and provided mount point. No reference is taken.
*/
static zfs_snapentry_t *
-zfsctl_snapshot_alloc(char *full_name, char *full_path, spa_t *spa,
+zfsctl_snapshot_alloc(const char *full_name, const char *full_path, spa_t *spa,
uint64_t objsetid, struct dentry *root_dentry)
{
zfs_snapentry_t *se;
@@ -261,13 +261,13 @@ snapentry_compare_by_objsetid(const void *a, const void *b)
* NULL will be returned.
*/
static zfs_snapentry_t *
-zfsctl_snapshot_find_by_name(char *snapname)
+zfsctl_snapshot_find_by_name(const char *snapname)
{
zfs_snapentry_t *se, search;
ASSERT(RW_LOCK_HELD(&zfs_snapshot_lock));
- search.se_name = snapname;
+ search.se_name = (char *)snapname;
se = avl_find(&zfs_snapshots_by_name, &search, NULL);
if (se)
zfsctl_snapshot_hold(se);
@@ -301,7 +301,7 @@ zfsctl_snapshot_find_by_objsetid(spa_t *spa, uint64_t objsetid)
* removed, renamed, and added back to the new correct location in the tree.
*/
static int
-zfsctl_snapshot_rename(char *old_snapname, char *new_snapname)
+zfsctl_snapshot_rename(const char *old_snapname, const char *new_snapname)
{
zfs_snapentry_t *se;
@@ -410,7 +410,7 @@ zfsctl_snapshot_unmount_delay(spa_t *spa, uint64_t objsetid, int delay)
* and zero when unmounted.
*/
static boolean_t
-zfsctl_snapshot_ismounted(char *snapname)
+zfsctl_snapshot_ismounted(const char *snapname)
{
zfs_snapentry_t *se;
boolean_t ismounted = B_FALSE;
@@ -751,7 +751,7 @@ out:
* Special case the handling of "..".
*/
int
-zfsctl_root_lookup(struct inode *dip, char *name, struct inode **ipp,
+zfsctl_root_lookup(struct inode *dip, const char *name, struct inode **ipp,
int flags, cred_t *cr, int *direntflags, pathname_t *realpnp)
{
zfsvfs_t *zfsvfs = ITOZSB(dip);
@@ -784,7 +784,7 @@ zfsctl_root_lookup(struct inode *dip, char *name, struct inode **ipp,
* snapshot if it exist, creating the pseudo filesystem inode as necessary.
*/
int
-zfsctl_snapdir_lookup(struct inode *dip, char *name, struct inode **ipp,
+zfsctl_snapdir_lookup(struct inode *dip, const char *name, struct inode **ipp,
int flags, cred_t *cr, int *direntflags, pathname_t *realpnp)
{
zfsvfs_t *zfsvfs = ITOZSB(dip);
@@ -815,8 +815,8 @@ zfsctl_snapdir_lookup(struct inode *dip, char *name, struct inode **ipp,
* to the '.zfs/snapshot' directory snapshots cannot be moved elsewhere.
*/
int
-zfsctl_snapdir_rename(struct inode *sdip, char *snm,
- struct inode *tdip, char *tnm, cred_t *cr, int flags)
+zfsctl_snapdir_rename(struct inode *sdip, const char *snm,
+ struct inode *tdip, const char *tnm, cred_t *cr, int flags)
{
zfsvfs_t *zfsvfs = ITOZSB(sdip);
char *to, *from, *real, *fsname;
@@ -893,7 +893,8 @@ out:
* the removal of the snapshot with the given name.
*/
int
-zfsctl_snapdir_remove(struct inode *dip, char *name, cred_t *cr, int flags)
+zfsctl_snapdir_remove(struct inode *dip, const char *name, cred_t *cr,
+ int flags)
{
zfsvfs_t *zfsvfs = ITOZSB(dip);
char *snapname, *real;
@@ -941,7 +942,7 @@ out:
* the creation of a new snapshot with the given name.
*/
int
-zfsctl_snapdir_mkdir(struct inode *dip, char *dirname, vattr_t *vap,
+zfsctl_snapdir_mkdir(struct inode *dip, const char *dirname, vattr_t *vap,
struct inode **ipp, cred_t *cr, int flags)
{
zfsvfs_t *zfsvfs = ITOZSB(dip);
@@ -1001,7 +1002,7 @@ exportfs_flush(void)
* it's in use, the unmount will fail harmlessly.
*/
int
-zfsctl_snapshot_unmount(char *snapname, int flags)
+zfsctl_snapshot_unmount(const char *snapname, int flags)
{
char *argv[] = { "/usr/bin/env", "umount", "-t", "zfs", "-n", NULL,
NULL };
diff --git a/module/os/linux/zfs/zfs_dir.c b/module/os/linux/zfs/zfs_dir.c
index 383657208df3..207a51d75bc9 100644
--- a/module/os/linux/zfs/zfs_dir.c
+++ b/module/os/linux/zfs/zfs_dir.c
@@ -60,8 +60,9 @@
* of names after deciding which is the appropriate lookup interface.
*/
static int
-zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, char *name, matchtype_t mt,
- boolean_t update, int *deflags, pathname_t *rpnp, uint64_t *zoid)
+zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, const char *name,
+ matchtype_t mt, boolean_t update, int *deflags, pathname_t *rpnp,
+ uint64_t *zoid)
{
boolean_t conflict = B_FALSE;
int error;
@@ -139,8 +140,8 @@ zfs_match_find(zfsvfs_t *zfsvfs, znode_t *dzp, char *name, matchtype_t mt,
* but return znode pointers to a single match.
*/
int
-zfs_dirent_lock(zfs_dirlock_t **dlpp, znode_t *dzp, char *name, znode_t **zpp,
- int flag, int *direntflags, pathname_t *realpnp)
+zfs_dirent_lock(zfs_dirlock_t **dlpp, znode_t *dzp, char *name,
+ znode_t **zpp, int flag, int *direntflags, pathname_t *realpnp)
{
zfsvfs_t *zfsvfs = ZTOZSB(dzp);
zfs_dirlock_t *dl;
diff --git a/module/os/linux/zfs/zfs_vfsops.c b/module/os/linux/zfs/zfs_vfsops.c
index 15ec7b91b001..b218237d07ff 100644
--- a/module/os/linux/zfs/zfs_vfsops.c
+++ b/module/os/linux/zfs/zfs_vfsops.c
@@ -352,6 +352,7 @@ acltype_changed_cb(void *arg, uint64_t newval)
zfsvfs_t *zfsvfs = arg;
switch (newval) {
+ case ZFS_ACLTYPE_NFSV4:
case ZFS_ACLTYPE_OFF:
zfsvfs->z_acl_type = ZFS_ACLTYPE_OFF;
zfsvfs->z_sb->s_flags &= ~SB_POSIXACL;
diff --git a/module/os/linux/zfs/zfs_vnops.c b/module/os/linux/zfs/zfs_vnops.c
index 2d104a5001ec..b668c7dff013 100644
--- a/module/os/linux/zfs/zfs_vnops.c
+++ b/module/os/linux/zfs/zfs_vnops.c
@@ -1234,8 +1234,8 @@ zfs_access(struct inode *ip, int mode, int flag, cred_t *cr)
*/
/* ARGSUSED */
int
-zfs_lookup(znode_t *zdp, char *nm, znode_t **zpp, int flags,
- cred_t *cr, int *direntflags, pathname_t *realpnp)
+zfs_lookup(znode_t *zdp, char *nm, znode_t **zpp, int flags, cred_t *cr,
+ int *direntflags, pathname_t *realpnp)
{
zfsvfs_t *zfsvfs = ZTOZSB(zdp);
int error = 0;
@@ -2543,7 +2543,7 @@ zfs_setattr_dir(znode_t *dzp)
zap_cursor_t zc;
zap_attribute_t zap;
zfs_dirlock_t *dl;
- znode_t *zp;
+ znode_t *zp = NULL;
dmu_tx_t *tx = NULL;
uint64_t uid, gid;
sa_bulk_attr_t bulk[4];
diff --git a/module/unicode/u8_textprep.c b/module/unicode/u8_textprep.c
index 65f555d88947..be816d728359 100644
--- a/module/unicode/u8_textprep.c
+++ b/module/unicode/u8_textprep.c
@@ -330,7 +330,7 @@ const uint8_t u8_valid_max_2nd_byte[0x100] = {
* specific to UTF-8 and Unicode.
*/
int
-u8_validate(char *u8str, size_t n, char **list, int flag, int *errnum)
+u8_validate(const char *u8str, size_t n, char **list, int flag, int *errnum)
{
uchar_t *ib;
uchar_t *ibtail;
diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c
index f3dbbc15d25e..0352b13aa240 100644
--- a/module/zcommon/zfs_prop.c
+++ b/module/zcommon/zfs_prop.c
@@ -254,6 +254,7 @@ zfs_prop_init(void)
static zprop_index_t acltype_table[] = {
{ "off", ZFS_ACLTYPE_OFF },
{ "posix", ZFS_ACLTYPE_POSIX },
+ { "nfsv4", ZFS_ACLTYPE_NFSV4 },
{ "disabled", ZFS_ACLTYPE_OFF }, /* bkwrd compatibility */
{ "noacl", ZFS_ACLTYPE_OFF }, /* bkwrd compatibility */
{ "posixacl", ZFS_ACLTYPE_POSIX }, /* bkwrd compatibility */
@@ -428,11 +429,15 @@ zfs_prop_init(void)
PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
"discard | groupmask | passthrough | restricted", "ACLMODE",
acl_mode_table);
-#ifndef __FreeBSD__
- zprop_register_index(ZFS_PROP_ACLTYPE, "acltype", ZFS_ACLTYPE_OFF,
- PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT,
- "off | posix", "ACLTYPE", acltype_table);
+ zprop_register_index(ZFS_PROP_ACLTYPE, "acltype",
+#ifdef __linux__
+ /* Linux doesn't natively support ZFS's NFSv4-style ACLs. */
+ ZFS_ACLTYPE_OFF,
+#else
+ ZFS_ACLTYPE_NFSV4,
#endif
+ PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT,
+ "off | nfsv4 | posix", "ACLTYPE", acltype_table);
zprop_register_index(ZFS_PROP_ACLINHERIT, "aclinherit",
ZFS_ACL_RESTRICTED, PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
"discard | noallow | restricted | passthrough | passthrough-x",
@@ -702,12 +707,6 @@ zfs_prop_init(void)
* that we don't have to change the values of the zfs_prop_t enum, or
* have NULL pointers in the zfs_prop_table[].
*/
-#ifdef __FreeBSD__
- zprop_register_impl(ZFS_PROP_ACLTYPE, "acltype", PROP_TYPE_INDEX,
- ZFS_ACLTYPE_OFF, NULL, PROP_INHERIT,
- ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT,
- "off | posix", "ACLTYPE", B_FALSE, B_FALSE, acltype_table);
-#endif
zprop_register_hidden(ZFS_PROP_REMAPTXG, "remaptxg", PROP_TYPE_NUMBER,
PROP_READONLY, ZFS_TYPE_DATASET, "REMAPTXG");
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c
index b1590d7dba91..af5935e2374d 100644
--- a/module/zfs/dmu_objset.c
+++ b/module/zfs/dmu_objset.c
@@ -2413,7 +2413,7 @@ dmu_objset_is_snapshot(objset_t *os)
}
int
-dmu_snapshot_realname(objset_t *os, char *name, char *real, int maxlen,
+dmu_snapshot_realname(objset_t *os, const char *name, char *real, int maxlen,
boolean_t *conflict)
{
dsl_dataset_t *ds = os->os_dsl_dataset;
diff --git a/module/zfs/dmu_redact.c b/module/zfs/dmu_redact.c
index c53fba75cc51..225ec40537ec 100644
--- a/module/zfs/dmu_redact.c
+++ b/module/zfs/dmu_redact.c
@@ -1062,9 +1062,9 @@ dmu_redact_snap(const char *snapname, nvlist_t *redactnvl,
}
}
- VERIFY3P(nvlist_next_nvpair(redactnvl, pair), ==, NULL);
if (err != 0)
goto out;
+ VERIFY3P(nvlist_next_nvpair(redactnvl, pair), ==, NULL);
boolean_t resuming = B_FALSE;
zfs_bookmark_phys_t bookmark;
diff --git a/module/zfs/dmu_traverse.c b/module/zfs/dmu_traverse.c
index 83830fe39279..31db49dae68c 100644
--- a/module/zfs/dmu_traverse.c
+++ b/module/zfs/dmu_traverse.c
@@ -73,7 +73,8 @@ static void prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *,
uint64_t objset, uint64_t object);
static int
-traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
+traverse_zil_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
+ uint64_t claim_txg)
{
traverse_data_t *td = arg;
zbookmark_phys_t zb;
@@ -93,7 +94,8 @@ traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
}
static int
-traverse_zil_record(zilog_t *zilog, lr_t *lrc, void *arg, uint64_t claim_txg)
+traverse_zil_record(zilog_t *zilog, const lr_t *lrc, void *arg,
+ uint64_t claim_txg)
{
traverse_data_t *td = arg;
diff --git a/module/zfs/dmu_zfetch.c b/module/zfs/dmu_zfetch.c
index 5935b5f995be..4d86863f30ea 100644
--- a/module/zfs/dmu_zfetch.c
+++ b/module/zfs/dmu_zfetch.c
@@ -377,7 +377,10 @@ ZFS_MODULE_PARAM(zfs_prefetch, zfetch_, min_sec_reap, UINT, ZMOD_RW,
"Min time before stream reclaim");
ZFS_MODULE_PARAM(zfs_prefetch, zfetch_, max_distance, UINT, ZMOD_RW,
- "Max bytes to prefetch per stream (default 8MB)");
+ "Max bytes to prefetch per stream");
+
+ZFS_MODULE_PARAM(zfs_prefetch, zfetch_, max_idistance, UINT, ZMOD_RW,
+ "Max bytes to prefetch indirects for per stream");
ZFS_MODULE_PARAM(zfs_prefetch, zfetch_, array_rd_sz, ULONG, ZMOD_RW,
"Number of bytes in a array_read");
diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c
index 0ebda2f77074..4704781bfa45 100644
--- a/module/zfs/dsl_scan.c
+++ b/module/zfs/dsl_scan.c
@@ -1375,7 +1375,8 @@ typedef struct zil_scan_arg {
/* ARGSUSED */
static int
-dsl_scan_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
+dsl_scan_zil_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
+ uint64_t claim_txg)
{
zil_scan_arg_t *zsa = arg;
dsl_pool_t *dp = zsa->zsa_dp;
@@ -1405,15 +1406,16 @@ dsl_scan_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
/* ARGSUSED */
static int
-dsl_scan_zil_record(zilog_t *zilog, lr_t *lrc, void *arg, uint64_t claim_txg)
+dsl_scan_zil_record(zilog_t *zilog, const lr_t *lrc, void *arg,
+ uint64_t claim_txg)
{
if (lrc->lrc_txtype == TX_WRITE) {
zil_scan_arg_t *zsa = arg;
dsl_pool_t *dp = zsa->zsa_dp;
dsl_scan_t *scn = dp->dp_scan;
zil_header_t *zh = zsa->zsa_zh;
- lr_write_t *lr = (lr_write_t *)lrc;
- blkptr_t *bp = &lr->lr_blkptr;
+ const lr_write_t *lr = (const lr_write_t *)lrc;
+ const blkptr_t *bp = &lr->lr_blkptr;
zbookmark_phys_t zb;
ASSERT(!BP_IS_REDACTED(bp));
diff --git a/module/zfs/pathname.c b/module/zfs/pathname.c
index 4766762f37d1..84ab7b7e1111 100644
--- a/module/zfs/pathname.c
+++ b/module/zfs/pathname.c
@@ -73,10 +73,6 @@ pn_alloc_sz(struct pathname *pnp, size_t sz)
{
pnp->pn_buf = kmem_alloc(sz, KM_SLEEP);
pnp->pn_bufsize = sz;
-#if 0 /* unused in ZoL */
- pnp->pn_path = pnp->pn_buf;
- pnp->pn_pathlen = 0;
-#endif
}
/*
@@ -89,8 +85,4 @@ pn_free(struct pathname *pnp)
kmem_free(pnp->pn_buf, pnp->pn_bufsize);
pnp->pn_buf = NULL;
pnp->pn_bufsize = 0;
-#if 0 /* unused in ZoL */
- pnp->pn_path = NULL;
- pnp->pn_pathlen = 0;
-#endif
}
diff --git a/module/zfs/range_tree.c b/module/zfs/range_tree.c
index 2ce0139c9137..5219fd079b73 100644
--- a/module/zfs/range_tree.c
+++ b/module/zfs/range_tree.c
@@ -314,7 +314,6 @@ range_tree_add_impl(void *arg, uint64_t start, uint64_t size, uint64_t fill)
return;
}
- zfs_btree_remove(&rt->rt_root, rs);
if (rt->rt_ops != NULL && rt->rt_ops->rtop_remove != NULL)
rt->rt_ops->rtop_remove(rt, rs, rt->rt_arg);
@@ -326,6 +325,7 @@ range_tree_add_impl(void *arg, uint64_t start, uint64_t size, uint64_t fill)
end = MAX(end, rend);
size = end - start;
+ zfs_btree_remove(&rt->rt_root, rs);
range_tree_add_impl(rt, start, size, fill);
return;
}
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 532f04b91ca1..9d1d4e0cca64 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -1260,7 +1260,7 @@ spa_activate(spa_t *spa, spa_mode_t mode)
/*
* This taskq is used to perform zvol-minor-related tasks
* asynchronously. This has several advantages, including easy
- * resolution of various deadlocks (zfsonlinux bug #3681).
+ * resolution of various deadlocks.
*
* The taskq must be single threaded to ensure tasks are always
* processed in the order in which they were dispatched.
@@ -6225,7 +6225,7 @@ spa_tryimport(nvlist_t *tryconfig)
* we don't sync the labels or remove the configuration cache.
*/
static int
-spa_export_common(char *pool, int new_state, nvlist_t **oldconfig,
+spa_export_common(const char *pool, int new_state, nvlist_t **oldconfig,
boolean_t force, boolean_t hardforce)
{
spa_t *spa;
@@ -6369,7 +6369,7 @@ export_spa:
* Destroy a storage pool.
*/
int
-spa_destroy(char *pool)
+spa_destroy(const char *pool)
{
return (spa_export_common(pool, POOL_STATE_DESTROYED, NULL,
B_FALSE, B_FALSE));
@@ -6379,7 +6379,7 @@ spa_destroy(char *pool)
* Export a storage pool.
*/
int
-spa_export(char *pool, nvlist_t **oldconfig, boolean_t force,
+spa_export(const char *pool, nvlist_t **oldconfig, boolean_t force,
boolean_t hardforce)
{
return (spa_export_common(pool, POOL_STATE_EXPORTED, oldconfig,
@@ -6391,7 +6391,7 @@ spa_export(char *pool, nvlist_t **oldconfig, boolean_t force,
* from the namespace in any way.
*/
int
-spa_reset(char *pool)
+spa_reset(const char *pool)
{
return (spa_export_common(pool, POOL_STATE_UNINITIALIZED, NULL,
B_FALSE, B_FALSE));
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index a94101485c94..6af61cdcd9bf 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -1286,9 +1286,9 @@ vdev_metaslab_group_create(vdev_t *vd)
spa->spa_alloc_count);
/*
- * The spa ashift values currently only reflect the
- * general vdev classes. Class destination is late
- * binding so ashift checking had to wait until now
+ * The spa ashift min/max only apply for the normal metaslab
+ * class. Class destination is late binding so ashift boundry
+ * setting had to wait until now.
*/
if (vd->vdev_top == vd && vd->vdev_ashift != 0 &&
mc == spa_normal_class(spa) && vd->vdev_aux == NULL) {
@@ -1953,18 +1953,6 @@ vdev_open(vdev_t *vd)
}
/*
- * Track the min and max ashift values for normal data devices.
- */
- if (vd->vdev_top == vd && vd->vdev_ashift != 0 &&
- vd->vdev_alloc_bias == VDEV_BIAS_NONE &&
- vd->vdev_islog == 0 && vd->vdev_aux == NULL) {
- if (vd->vdev_ashift > spa->spa_max_ashift)
- spa->spa_max_ashift = vd->vdev_ashift;
- if (vd->vdev_ashift < spa->spa_min_ashift)
- spa->spa_min_ashift = vd->vdev_ashift;
- }
-
- /*
* If this is a leaf vdev, assess whether a resilver is needed.
* But don't do this if we are doing a reopen for a scrub, since
* this would just restart the scrub we are already doing.
diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c
index 7fab7d0d7950..d063b77ea836 100644
--- a/module/zfs/vdev_label.c
+++ b/module/zfs/vdev_label.c
@@ -613,7 +613,8 @@ vdev_config_generate(spa_t *spa, vdev_t *vd, boolean_t getstats,
* as a single mapping.
*/
for (int i = 0; i < RANGE_TREE_HISTOGRAM_SIZE; i++) {
- if (1ULL << (i + 1) < vdev_removal_max_span) {
+ if (i + 1 < highbit64(vdev_removal_max_span)
+ - 1) {
to_alloc +=
vd->vdev_mg->mg_histogram[i] <<
(i + 1);
@@ -1433,7 +1434,7 @@ vdev_uberblock_compare(const uberblock_t *ub1, const uberblock_t *ub2)
/*
* If MMP_VALID(ub) && MMP_SEQ_VALID(ub) then the host has an MMP-aware
- * ZFS, e.g. zfsonlinux >= 0.7.
+ * ZFS, e.g. OpenZFS >= 0.7.
*
* If one ub has MMP and the other does not, they were written by
* different hosts, which matters for MMP. So we treat no MMP/no SEQ as
diff --git a/module/zfs/vdev_removal.c b/module/zfs/vdev_removal.c
index fdeca7ab3418..ed7d1d4b3030 100644
--- a/module/zfs/vdev_removal.c
+++ b/module/zfs/vdev_removal.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2019 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2020 by Delphix. All rights reserved.
* Copyright (c) 2019, loli10K <ezomori.nozomu@gmail.com>. All rights reserved.
*/
@@ -2031,6 +2031,15 @@ spa_vdev_remove_top_check(vdev_t *vd)
}
/*
+ * A removed special/dedup vdev must have same ashift as normal class.
+ */
+ ASSERT(!vd->vdev_islog);
+ if (vd->vdev_alloc_bias != VDEV_BIAS_NONE &&
+ vd->vdev_ashift != spa->spa_max_ashift) {
+ return (SET_ERROR(EINVAL));
+ }
+
+ /*
* All vdevs in normal class must have the same ashift
* and not be raidz.
*/
@@ -2038,7 +2047,18 @@ spa_vdev_remove_top_check(vdev_t *vd)
int num_indirect = 0;
for (uint64_t id = 0; id < rvd->vdev_children; id++) {
vdev_t *cvd = rvd->vdev_child[id];
- if (cvd->vdev_ashift != 0 && !cvd->vdev_islog)
+
+ /*
+ * A removed special/dedup vdev must have the same ashift
+ * across all vdevs in its class.
+ */
+ if (vd->vdev_alloc_bias != VDEV_BIAS_NONE &&
+ cvd->vdev_alloc_bias == vd->vdev_alloc_bias &&
+ cvd->vdev_ashift != vd->vdev_ashift) {
+ return (SET_ERROR(EINVAL));
+ }
+ if (cvd->vdev_ashift != 0 &&
+ cvd->vdev_alloc_bias == VDEV_BIAS_NONE)
ASSERT3U(cvd->vdev_ashift, ==, spa->spa_max_ashift);
if (cvd->vdev_ops == &vdev_indirect_ops)
num_indirect++;
diff --git a/module/zfs/zfeature.c b/module/zfs/zfeature.c
index 3757443a5a68..9d16fff81d0a 100644
--- a/module/zfs/zfeature.c
+++ b/module/zfs/zfeature.c
@@ -203,7 +203,7 @@ spa_features_check(spa_t *spa, boolean_t for_write,
supported = B_FALSE;
if (NULL != unsup_feat) {
- char *desc = "";
+ const char *desc = "";
if (zap_lookup(os, spa->spa_feat_desc_obj,
za->za_name, 1, MAXPATHLEN, buf) == 0)
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index eff66b32fcb1..94cd1a3dc834 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -270,7 +270,7 @@ static int zfs_ioc_userspace_upgrade(zfs_cmd_t *zc);
static int zfs_ioc_id_quota_upgrade(zfs_cmd_t *zc);
static int zfs_check_settable(const char *name, nvpair_t *property,
cred_t *cr);
-static int zfs_check_clearable(char *dataset, nvlist_t *props,
+static int zfs_check_clearable(const char *dataset, nvlist_t *props,
nvlist_t **errors);
static int zfs_fill_zplprops_root(uint64_t, nvlist_t *, nvlist_t *,
boolean_t *);
@@ -498,7 +498,7 @@ zfs_secpolicy_write_perms(const char *name, const char *perm, cred_t *cr)
* Returns 0 for success, non-zero for access and other errors.
*/
static int
-zfs_set_slabel_policy(const char *name, char *strval, cred_t *cr)
+zfs_set_slabel_policy(const char *name, const char *strval, cred_t *cr)
{
#ifdef HAVE_MLSLABEL
char ds_hexsl[MAXNAMELEN];
@@ -553,7 +553,7 @@ zfs_set_slabel_policy(const char *name, char *strval, cred_t *cr)
*/
if (strcasecmp(ds_hexsl, ZFS_MLSLABEL_DEFAULT) != 0) {
objset_t *os;
- static char *setsl_tag = "setsl_tag";
+ static const char *setsl_tag = "setsl_tag";
/*
* Try to own the dataset; abort if there is any error,
@@ -680,7 +680,7 @@ zfs_secpolicy_send(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{
dsl_pool_t *dp;
dsl_dataset_t *ds;
- char *cp;
+ const char *cp;
int error;
/*
@@ -1443,7 +1443,7 @@ zfs_ioc_pool_create(zfs_cmd_t *zc)
nvlist_t *rootprops = NULL;
nvlist_t *zplprops = NULL;
dsl_crypto_params_t *dcp = NULL;
- char *spa_name = zc->zc_name;
+ const char *spa_name = zc->zc_name;
boolean_t unload_wkey = B_TRUE;
if ((error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
@@ -1997,7 +1997,7 @@ static int
zfs_ioc_vdev_setpath(zfs_cmd_t *zc)
{
spa_t *spa;
- char *path = zc->zc_value;
+ const char *path = zc->zc_value;
uint64_t guid = zc->zc_guid;
int error;
@@ -2014,7 +2014,7 @@ static int
zfs_ioc_vdev_setfru(zfs_cmd_t *zc)
{
spa_t *spa;
- char *fru = zc->zc_value;
+ const char *fru = zc->zc_value;
uint64_t guid = zc->zc_guid;
int error;
@@ -2351,8 +2351,7 @@ zfs_prop_set_userquota(const char *dsname, nvpair_t *pair)
const char *propname = nvpair_name(pair);
uint64_t *valary;
unsigned int vallen;
- const char *domain;
- char *dash;
+ const char *dash, *domain;
zfs_userquota_prop_t type;
uint64_t rid;
uint64_t quota;
@@ -2405,7 +2404,7 @@ zfs_prop_set_special(const char *dsname, zprop_source_t source,
const char *propname = nvpair_name(pair);
zfs_prop_t prop = zfs_name_to_prop(propname);
uint64_t intval = 0;
- char *strval = NULL;
+ const char *strval = NULL;
int err = -1;
if (prop == ZPROP_INVAL) {
@@ -2531,7 +2530,7 @@ zfs_set_prop_nvlist(const char *dsname, zprop_source_t source, nvlist_t *nvl,
nvpair_t *propval;
int rv = 0;
uint64_t intval;
- char *strval;
+ const char *strval;
nvlist_t *genericnvl = fnvlist_alloc();
nvlist_t *retrynvl = fnvlist_alloc();
@@ -3349,7 +3348,7 @@ zfs_ioc_clone(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl)
{
int error = 0;
nvlist_t *nvprops = NULL;
- char *origin_name;
+ const char *origin_name;
origin_name = fnvlist_lookup_string(innvl, "origin");
(void) nvlist_lookup_nvlist(innvl, "props", &nvprops);
@@ -3475,10 +3474,10 @@ static const zfs_ioc_key_t zfs_keys_log_history[] = {
static int
zfs_ioc_log_history(const char *unused, nvlist_t *innvl, nvlist_t *outnvl)
{
- char *message;
+ const char *message;
+ char *poolname;
spa_t *spa;
int error;
- char *poolname;
/*
* The poolname in the ioctl is not set, we get it from the TSD,
@@ -3574,7 +3573,7 @@ zfs_unmount_snap(const char *snapname)
if (strchr(snapname, '@') == NULL)
return;
- (void) zfsctl_snapshot_unmount((char *)snapname, MNT_FORCE);
+ (void) zfsctl_snapshot_unmount(snapname, MNT_FORCE);
}
/* ARGSUSED */
@@ -4617,7 +4616,7 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
* pointed at by errlist is NULL.
*/
static int
-zfs_check_clearable(char *dataset, nvlist_t *props, nvlist_t **errlist)
+zfs_check_clearable(const char *dataset, nvlist_t *props, nvlist_t **errlist)
{
zfs_cmd_t *zc;
nvpair_t *pair, *next_pair;
@@ -6429,8 +6428,10 @@ send_space_sum(objset_t *os, void *buf, int len, void *arg)
* presence indicates DRR_WRITE_EMBEDDED records are permitted
* (optional) "compressok" -> (value ignored)
* presence indicates compressed DRR_WRITE records are permitted
- * (optional) "rawok" -> (value ignored)
+ * (optional) "rawok" -> (value ignored)
* presence indicates raw encrypted records should be used.
+ * (optional) "resume_object" and "resume_offset" -> (uint64)
+ * if present, resume send stream from specified object and offset.
* (optional) "fd" -> file descriptor to use as a cookie for progress
* tracking (int32)
* }
@@ -6448,9 +6449,9 @@ static const zfs_ioc_key_t zfs_keys_send_space[] = {
{"rawok", DATA_TYPE_BOOLEAN, ZK_OPTIONAL},
{"fd", DATA_TYPE_INT32, ZK_OPTIONAL},
{"redactbook", DATA_TYPE_STRING, ZK_OPTIONAL},
- {"resumeobj", DATA_TYPE_UINT64, ZK_OPTIONAL},
- {"resumeoff", DATA_TYPE_UINT64, ZK_OPTIONAL},
- {"bytes", DATA_TYPE_UINT64, ZK_OPTIONAL},
+ {"resume_object", DATA_TYPE_UINT64, ZK_OPTIONAL},
+ {"resume_offset", DATA_TYPE_UINT64, ZK_OPTIONAL},
+ {"bytes", DATA_TYPE_UINT64, ZK_OPTIONAL},
};
static int
diff --git a/module/zfs/zfs_log.c b/module/zfs/zfs_log.c
index fb44007fefc3..4bb529f78838 100644
--- a/module/zfs/zfs_log.c
+++ b/module/zfs/zfs_log.c
@@ -299,7 +299,7 @@ zfs_xattr_owner_unlinked(znode_t *zp)
*/
void
zfs_log_create(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, znode_t *zp, char *name, vsecattr_t *vsecp,
+ znode_t *dzp, znode_t *zp, const char *name, vsecattr_t *vsecp,
zfs_fuid_info_t *fuidp, vattr_t *vap)
{
itx_t *itx;
@@ -413,7 +413,7 @@ zfs_log_create(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
*/
void
zfs_log_remove(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, char *name, uint64_t foid, boolean_t unlinked)
+ znode_t *dzp, const char *name, uint64_t foid, boolean_t unlinked)
{
itx_t *itx;
lr_remove_t *lr;
@@ -448,7 +448,7 @@ zfs_log_remove(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
*/
void
zfs_log_link(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, znode_t *zp, char *name)
+ znode_t *dzp, znode_t *zp, const char *name)
{
itx_t *itx;
lr_link_t *lr;
@@ -471,7 +471,7 @@ zfs_log_link(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
*/
void
zfs_log_symlink(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *dzp, znode_t *zp, char *name, char *link)
+ znode_t *dzp, znode_t *zp, const char *name, const char *link)
{
itx_t *itx;
lr_create_t *lr;
@@ -502,8 +502,8 @@ zfs_log_symlink(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
* Handles TX_RENAME transactions.
*/
void
-zfs_log_rename(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
- znode_t *sdzp, char *sname, znode_t *tdzp, char *dname, znode_t *szp)
+zfs_log_rename(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, znode_t *sdzp,
+ const char *sname, znode_t *tdzp, const char *dname, znode_t *szp)
{
itx_t *itx;
lr_rename_t *lr;
diff --git a/module/zfs/zil.c b/module/zfs/zil.c
index 9dc20ba14f37..632fef29bff4 100644
--- a/module/zfs/zil.c
+++ b/module/zfs/zil.c
@@ -432,7 +432,8 @@ done:
/* ARGSUSED */
static int
-zil_clear_log_block(zilog_t *zilog, blkptr_t *bp, void *tx, uint64_t first_txg)
+zil_clear_log_block(zilog_t *zilog, const blkptr_t *bp, void *tx,
+ uint64_t first_txg)
{
ASSERT(!BP_IS_HOLE(bp));
@@ -454,13 +455,15 @@ zil_clear_log_block(zilog_t *zilog, blkptr_t *bp, void *tx, uint64_t first_txg)
/* ARGSUSED */
static int
-zil_noop_log_record(zilog_t *zilog, lr_t *lrc, void *tx, uint64_t first_txg)
+zil_noop_log_record(zilog_t *zilog, const lr_t *lrc, void *tx,
+ uint64_t first_txg)
{
return (0);
}
static int
-zil_claim_log_block(zilog_t *zilog, blkptr_t *bp, void *tx, uint64_t first_txg)
+zil_claim_log_block(zilog_t *zilog, const blkptr_t *bp, void *tx,
+ uint64_t first_txg)
{
/*
* Claim log block if not already committed and not already claimed.
@@ -476,7 +479,8 @@ zil_claim_log_block(zilog_t *zilog, blkptr_t *bp, void *tx, uint64_t first_txg)
}
static int
-zil_claim_log_record(zilog_t *zilog, lr_t *lrc, void *tx, uint64_t first_txg)
+zil_claim_log_record(zilog_t *zilog, const lr_t *lrc, void *tx,
+ uint64_t first_txg)
{
lr_write_t *lr = (lr_write_t *)lrc;
int error;
@@ -503,7 +507,8 @@ zil_claim_log_record(zilog_t *zilog, lr_t *lrc, void *tx, uint64_t first_txg)
/* ARGSUSED */
static int
-zil_free_log_block(zilog_t *zilog, blkptr_t *bp, void *tx, uint64_t claim_txg)
+zil_free_log_block(zilog_t *zilog, const blkptr_t *bp, void *tx,
+ uint64_t claim_txg)
{
zio_free(zilog->zl_spa, dmu_tx_get_txg(tx), bp);
@@ -511,7 +516,8 @@ zil_free_log_block(zilog_t *zilog, blkptr_t *bp, void *tx, uint64_t claim_txg)
}
static int
-zil_free_log_record(zilog_t *zilog, lr_t *lrc, void *tx, uint64_t claim_txg)
+zil_free_log_record(zilog_t *zilog, const lr_t *lrc, void *tx,
+ uint64_t claim_txg)
{
lr_write_t *lr = (lr_write_t *)lrc;
blkptr_t *bp = &lr->lr_blkptr;
@@ -3471,7 +3477,7 @@ typedef struct zil_replay_arg {
} zil_replay_arg_t;
static int
-zil_replay_error(zilog_t *zilog, lr_t *lr, int error)
+zil_replay_error(zilog_t *zilog, const lr_t *lr, int error)
{
char name[ZFS_MAX_DATASET_NAME_LEN];
@@ -3489,7 +3495,8 @@ zil_replay_error(zilog_t *zilog, lr_t *lr, int error)
}
static int
-zil_replay_log_record(zilog_t *zilog, lr_t *lr, void *zra, uint64_t claim_txg)
+zil_replay_log_record(zilog_t *zilog, const lr_t *lr, void *zra,
+ uint64_t claim_txg)
{
zil_replay_arg_t *zr = zra;
const zil_header_t *zh = zilog->zl_header;
@@ -3572,7 +3579,7 @@ zil_replay_log_record(zilog_t *zilog, lr_t *lr, void *zra, uint64_t claim_txg)
/* ARGSUSED */
static int
-zil_incr_blks(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg)
+zil_incr_blks(zilog_t *zilog, const blkptr_t *bp, void *arg, uint64_t claim_txg)
{
zilog->zl_replay_blks++;
diff --git a/module/zstd/lib/zstd.c b/module/zstd/lib/zstd.c
index 949b8e47ec27..acdd4d9dac9d 100644
--- a/module/zstd/lib/zstd.c
+++ b/module/zstd/lib/zstd.c
@@ -3074,7 +3074,7 @@ size_t FSE_decompress(void* dst, size_t dstCapacity, const void* cSrc, size_t cS
/*-*************************************
* Dependencies
***************************************/
-#ifdef __aarch64__
+#if !defined(ZSTD_NO_INTRINSICS) && defined(__ARM_NEON)
#include <arm_neon.h>
#endif
/**** skipping file: compiler.h ****/
@@ -6525,7 +6525,7 @@ static const U32 OF_defaultNormLog = OF_DEFAULTNORMLOG;
* Shared functions to include for inlining
*********************************************/
static void ZSTD_copy8(void* dst, const void* src) {
-#ifdef __aarch64__
+#if !defined(ZSTD_NO_INTRINSICS) && defined(__ARM_NEON)
vst1_u8((uint8_t*)dst, vld1_u8((const uint8_t*)src));
#else
memcpy(dst, src, 8);
@@ -6534,7 +6534,7 @@ static void ZSTD_copy8(void* dst, const void* src) {
#define COPY8(d,s) { ZSTD_copy8(d,s); d+=8; s+=8; }
static void ZSTD_copy16(void* dst, const void* src) {
-#ifdef __aarch64__
+#if !defined(ZSTD_NO_INTRINSICS) && defined(__ARM_NEON)
vst1q_u8((uint8_t*)dst, vld1q_u8((const uint8_t*)src));
#else
memcpy(dst, src, 16);
diff --git a/rpm/generic/zfs-dkms.spec.in b/rpm/generic/zfs-dkms.spec.in
index 5b05e1c332ab..6cdc224fcd89 100644
--- a/rpm/generic/zfs-dkms.spec.in
+++ b/rpm/generic/zfs-dkms.spec.in
@@ -18,7 +18,7 @@ Summary: Kernel module(s) (dkms)
Group: System Environment/Kernel
License: @ZFS_META_LICENSE@
-URL: https://zfsonlinux.org/
+URL: https://github.com/openzfs/zfs
Source0: %{module}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
diff --git a/rpm/generic/zfs-kmod.spec.in b/rpm/generic/zfs-kmod.spec.in
index bc033733afc4..782ad465e36d 100644
--- a/rpm/generic/zfs-kmod.spec.in
+++ b/rpm/generic/zfs-kmod.spec.in
@@ -48,7 +48,7 @@ Summary: Kernel module(s)
Group: System Environment/Kernel
License: @ZFS_META_LICENSE@
-URL: https://zfsonlinux.org/
+URL: https://github.com/openzfs/zfs
Source0: %{module}-%{version}.tar.gz
Source10: kmodtool
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n)
diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in
index c410620a8f9b..86e983718ee8 100644
--- a/rpm/generic/zfs.spec.in
+++ b/rpm/generic/zfs.spec.in
@@ -117,7 +117,7 @@ Summary: Commands to control the kernel modules and libraries
Group: System Environment/Kernel
License: @ZFS_META_LICENSE@
-URL: https://zfsonlinux.org/
+URL: https://github.com/openzfs/zfs
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: libzpool2 = %{version}
@@ -191,7 +191,7 @@ Summary: Solaris userland utility library for Linux
Group: System Environment/Kernel
%description -n libuutil1
-This library provides a variety of compatibility functions for ZFS on Linux:
+This library provides a variety of compatibility functions for OpenZFS:
* libspl: The Solaris Porting Layer userland library, which provides APIs
that make it possible to run Solaris user code in a Linux environment
with relatively minimal modification.
diff --git a/rpm/redhat/zfs-kmod.spec.in b/rpm/redhat/zfs-kmod.spec.in
index 6d928ec74ca7..9bc756c5aae6 100644
--- a/rpm/redhat/zfs-kmod.spec.in
+++ b/rpm/redhat/zfs-kmod.spec.in
@@ -8,7 +8,7 @@ Release: @RELEASE@%{?dist}
Summary: Kernel module(s)
Group: System Environment/Kernel
License: @ZFS_META_LICENSE@
-URL: https://zfsonlinux.org/
+URL: https://github.com/openzfs/zfs
BuildRequires: %kernel_module_package_buildreqs
Source0: @PACKAGE@-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
diff --git a/scripts/zimport.sh b/scripts/zimport.sh
index 304ab7623d42..56dfbadae47b 100755
--- a/scripts/zimport.sh
+++ b/scripts/zimport.sh
@@ -39,7 +39,7 @@
# -s "zfs-0.6.2 master installed" \
# -p "zevo-1.1.1 zol-0.6.2 zol-0.6.2-173 master installed"
#
-# --------------------- ZFS on Linux Source Versions --------------
+# ------------------------ OpenZFS Source Versions ----------------
# zfs-0.6.2 master 0.6.2-175_g36eb554
# -----------------------------------------------------------------
# Clone ZFS Local Local Skip
@@ -68,9 +68,9 @@ TEST_DIR=$(mktemp -u -d -p /var/tmp zimport.XXXXXXXX)
KEEP="no"
VERBOSE="no"
COLOR="yes"
-REPO="https://github.com/zfsonlinux"
+REPO="https://github.com/openzfs"
IMAGES_DIR="$SCRIPTDIR/zfs-images/"
-IMAGES_TAR="https://github.com/zfsonlinux/zfs-images/tarball/master"
+IMAGES_TAR="https://github.com/openzfs/zfs-images/tarball/master"
ERROR=0
CONFIG_LOG="configure.log"
@@ -365,7 +365,7 @@ if [ ! -d "$SRC_DIR" ]; then
fi
# Print a header for all tags which are being tested.
-echo "--------------------- ZFS on Linux Source Versions --------------"
+echo "------------------------ OpenZFS Source Versions ----------------"
printf "%-16s" " "
for TAG in $SRC_TAGS; do
src_set_vars "$TAG"
diff --git a/tests/runfiles/common.run b/tests/runfiles/common.run
index e06281648e70..d2e22f8681dc 100644
--- a/tests/runfiles/common.run
+++ b/tests/runfiles/common.run
@@ -30,6 +30,11 @@ tests = ['alloc_class_001_pos', 'alloc_class_002_neg', 'alloc_class_003_pos',
'alloc_class_013_pos']
tags = ['functional', 'alloc_class']
+[tests/functional/arc]
+tests = ['dbufstats_001_pos', 'dbufstats_002_pos', 'dbufstats_003_pos',
+ 'arcstats_runtime_tuning']
+tags = ['functional', 'arc']
+
[tests/functional/atime]
tests = ['atime_001_pos', 'atime_002_neg', 'root_atime_off', 'root_atime_on']
tags = ['functional', 'atime']
diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run
index b6508a5cb3cf..ac4d6af1cf42 100644
--- a/tests/runfiles/linux.run
+++ b/tests/runfiles/linux.run
@@ -23,13 +23,12 @@ outputdir = /var/tmp/test_results
tags = ['functional']
[tests/functional/acl/posix:Linux]
-tests = ['posix_001_pos', 'posix_002_pos', 'posix_003_pos']
+tests = ['posix_001_pos', 'posix_002_pos', 'posix_003_pos', 'posix_004_pos']
tags = ['functional', 'acl', 'posix']
-[tests/functional/arc:Linux]
-tests = ['dbufstats_001_pos', 'dbufstats_002_pos', 'dbufstats_003_pos',
- 'arcstats_runtime_tuning']
-tags = ['functional', 'arc']
+[tests/functional/acl/posix-sa:Linux]
+tests = ['posix_001_pos', 'posix_002_pos', 'posix_003_pos', 'posix_004_pos']
+tags = ['functional', 'acl', 'posix-sa']
[tests/functional/atime:Linux]
tests = ['atime_003_pos', 'root_relatime_on']
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index 1618c92bd57f..dec723e9a477 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -4154,18 +4154,36 @@ function ls_xattr # path
esac
}
+function kstat # stat flags?
+{
+ typeset stat=$1
+ typeset flags=${2-"-n"}
+
+ case $(uname) in
+ FreeBSD)
+ sysctl $flags kstat.zfs.misc.$stat
+ ;;
+ Linux)
+ typeset zfs_kstat="/proc/spl/kstat/zfs/$stat"
+ [[ -f "$zfs_kstat" ]] || return 1
+ cat $zfs_kstat
+ ;;
+ *)
+ false
+ ;;
+ esac
+}
+
function get_arcstat # stat
{
typeset stat=$1
case $(uname) in
FreeBSD)
- sysctl -n kstat.zfs.misc.arcstats.$stat
+ kstat arcstats.$stat
;;
Linux)
- typeset zfs_arcstats="/proc/spl/kstat/zfs/arcstats"
- [[ -f "$zfs_arcstats" ]] || return 1
- grep $stat $zfs_arcstats | awk '{print $3}'
+ kstat arcstats | awk "/$stat/ { print \$3 }"
;;
*)
false
diff --git a/tests/zfs-tests/tests/functional/acl/Makefile.am b/tests/zfs-tests/tests/functional/acl/Makefile.am
index 6086930e36fa..382bb5f064e1 100644
--- a/tests/zfs-tests/tests/functional/acl/Makefile.am
+++ b/tests/zfs-tests/tests/functional/acl/Makefile.am
@@ -3,4 +3,4 @@ dist_pkgdata_DATA = \
acl.cfg \
acl_common.kshlib
-SUBDIRS = posix
+SUBDIRS = posix posix-sa
diff --git a/tests/zfs-tests/tests/functional/acl/posix-sa/Makefile.am b/tests/zfs-tests/tests/functional/acl/posix-sa/Makefile.am
new file mode 100644
index 000000000000..31d1237ce265
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/acl/posix-sa/Makefile.am
@@ -0,0 +1,8 @@
+pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/acl/posix-sa
+dist_pkgdata_SCRIPTS = \
+ cleanup.ksh \
+ setup.ksh \
+ posix_001_pos.ksh \
+ posix_002_pos.ksh \
+ posix_003_pos.ksh \
+ posix_004_pos.ksh
diff --git a/tests/zfs-tests/tests/functional/acl/posix-sa/cleanup.ksh b/tests/zfs-tests/tests/functional/acl/posix-sa/cleanup.ksh
new file mode 100644
index 000000000000..bb58a8cf2e7b
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/acl/posix-sa/cleanup.ksh
@@ -0,0 +1,33 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# 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]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/acl/acl_common.kshlib
+
+cleanup_user_group
+
+default_cleanup
diff --git a/tests/zfs-tests/tests/functional/acl/posix-sa/posix_001_pos.ksh b/tests/zfs-tests/tests/functional/acl/posix-sa/posix_001_pos.ksh
new file mode 100644
index 000000000000..e6467b3470c8
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/acl/posix-sa/posix_001_pos.ksh
@@ -0,0 +1 @@
+../posix/posix_001_pos.ksh \ No newline at end of file
diff --git a/tests/zfs-tests/tests/functional/acl/posix-sa/posix_002_pos.ksh b/tests/zfs-tests/tests/functional/acl/posix-sa/posix_002_pos.ksh
new file mode 100644
index 000000000000..10140d0e87ec
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/acl/posix-sa/posix_002_pos.ksh
@@ -0,0 +1 @@
+../posix/posix_002_pos.ksh \ No newline at end of file
diff --git a/tests/zfs-tests/tests/functional/acl/posix-sa/posix_003_pos.ksh b/tests/zfs-tests/tests/functional/acl/posix-sa/posix_003_pos.ksh
new file mode 100644
index 000000000000..3f3db2807ddc
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/acl/posix-sa/posix_003_pos.ksh
@@ -0,0 +1 @@
+../posix/posix_003_pos.ksh \ No newline at end of file
diff --git a/tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh b/tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh
new file mode 100644
index 000000000000..2c2bab4477bd
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh
@@ -0,0 +1 @@
+../posix/posix_004_pos.ksh \ No newline at end of file
diff --git a/tests/zfs-tests/tests/functional/acl/posix-sa/setup.ksh b/tests/zfs-tests/tests/functional/acl/posix-sa/setup.ksh
new file mode 100644
index 000000000000..d8bf8a638e7b
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/acl/posix-sa/setup.ksh
@@ -0,0 +1,52 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# 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]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+#
+# Copyright (c) 2016 by Delphix. All rights reserved.
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/acl/acl_common.kshlib
+
+log_must getfacl --version
+log_must setfacl --version
+
+cleanup_user_group
+
+# Create staff group and add user to it
+log_must add_group $ZFS_ACL_STAFF_GROUP
+log_must add_user $ZFS_ACL_STAFF_GROUP $ZFS_ACL_STAFF1
+
+DISK=${DISKS%% *}
+default_setup_noexit $DISK
+log_must chmod 777 $TESTDIR
+
+# Use POSIX ACLs on filesystem
+log_must zfs set acltype=posix $TESTPOOL/$TESTFS
+log_must zfs set xattr=sa $TESTPOOL/$TESTFS
+
+log_pass
diff --git a/tests/zfs-tests/tests/functional/acl/posix/Makefile.am b/tests/zfs-tests/tests/functional/acl/posix/Makefile.am
index dcf278858090..e63f63185afe 100644
--- a/tests/zfs-tests/tests/functional/acl/posix/Makefile.am
+++ b/tests/zfs-tests/tests/functional/acl/posix/Makefile.am
@@ -4,4 +4,5 @@ dist_pkgdata_SCRIPTS = \
setup.ksh \
posix_001_pos.ksh \
posix_002_pos.ksh \
- posix_003_pos.ksh
+ posix_003_pos.ksh \
+ posix_004_pos.ksh
diff --git a/tests/zfs-tests/tests/functional/acl/posix/posix_003_pos.ksh b/tests/zfs-tests/tests/functional/acl/posix/posix_003_pos.ksh
index dc6ef0d2477d..1b04a024f2ad 100755
--- a/tests/zfs-tests/tests/functional/acl/posix/posix_003_pos.ksh
+++ b/tests/zfs-tests/tests/functional/acl/posix/posix_003_pos.ksh
@@ -25,7 +25,6 @@
#
# DESCRIPTION:
# Verify that ACLs survive remount.
-# Regression test for https://github.com/zfsonlinux/zfs/issues/4520
#
# STRATEGY:
# 1. Test presence of default and regular ACLs after remount
diff --git a/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh b/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh
new file mode 100644
index 000000000000..6c6b592fbb9e
--- /dev/null
+++ b/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh
@@ -0,0 +1,49 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# 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]
+#
+# CDDL HEADER END
+#
+
+#
+# Portions Copyright 2020 iXsystems, Inc.
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/acl/acl_common.kshlib
+
+#
+# DESCRIPTION:
+# Verify chown works with POSIX ACLs.
+# Regression test for https://github.com/openzfs/zfs/issues/10043
+#
+# STRATEGY:
+# 1. Prepare an appropriate ACL on the test directory
+# 2. Change the owner of the directory
+#
+
+verify_runnable "both"
+log_assert "Verify chown works with POSIX ACLs"
+
+log_must setfacl -d -m u:$ZFS_ACL_STAFF1:rwx $TESTDIR
+log_must setfacl -b $TESTDIR
+
+log_must chown $ZFS_ACL_STAFF1 $TESTDIR
+log_must chown 0 $TESTDIR
+
+log_pass "chown works with POSIX ACLs"
diff --git a/tests/zfs-tests/tests/functional/acl/posix/setup.ksh b/tests/zfs-tests/tests/functional/acl/posix/setup.ksh
index d8bf8a638e7b..526c78e17f1a 100755
--- a/tests/zfs-tests/tests/functional/acl/posix/setup.ksh
+++ b/tests/zfs-tests/tests/functional/acl/posix/setup.ksh
@@ -47,6 +47,5 @@ log_must chmod 777 $TESTDIR
# Use POSIX ACLs on filesystem
log_must zfs set acltype=posix $TESTPOOL/$TESTFS
-log_must zfs set xattr=sa $TESTPOOL/$TESTFS
log_pass
diff --git a/tests/zfs-tests/tests/functional/arc/dbufstats_001_pos.ksh b/tests/zfs-tests/tests/functional/arc/dbufstats_001_pos.ksh
index 4884f11bb811..0577a6b80c04 100755
--- a/tests/zfs-tests/tests/functional/arc/dbufstats_001_pos.ksh
+++ b/tests/zfs-tests/tests/functional/arc/dbufstats_001_pos.ksh
@@ -55,7 +55,13 @@ function testdbufstat # stat_name dbufstat_filter
[[ -n "$2" ]] && filter="-F $2"
- from_dbufstat=$(grep -w "$name" "$DBUFSTATS_FILE" | awk '{ print $3 }')
+ if is_linux; then
+ from_dbufstat=$(grep -w "$name" "$DBUFSTATS_FILE" |
+ awk '{ print $3 }')
+ else
+ from_dbufstat=$(awk "/dbufstats\.$name:/ { print \$2 }" \
+ "$DBUFSTATS_FILE")
+ fi
from_dbufs=$(dbufstat -bxn -i "$DBUFS_FILE" "$filter" | wc -l)
within_tolerance $from_dbufstat $from_dbufs 15 \
@@ -71,8 +77,8 @@ log_onexit cleanup
log_must file_write -o create -f "$TESTDIR/file" -b 1048576 -c 20 -d R
log_must zpool sync
-log_must eval "cat /proc/spl/kstat/zfs/dbufs > $DBUFS_FILE"
-log_must eval "cat /proc/spl/kstat/zfs/dbufstats > $DBUFSTATS_FILE"
+log_must eval "kstat dbufs > $DBUFS_FILE"
+log_must eval "kstat dbufstats '' > $DBUFSTATS_FILE"
for level in {0..11}; do
testdbufstat "cache_level_$level" "dbc=1,level=$level"
diff --git a/tests/zfs-tests/tests/functional/arc/dbufstats_002_pos.ksh b/tests/zfs-tests/tests/functional/arc/dbufstats_002_pos.ksh
index dc30b660656d..58d401539ed1 100755
--- a/tests/zfs-tests/tests/functional/arc/dbufstats_002_pos.ksh
+++ b/tests/zfs-tests/tests/functional/arc/dbufstats_002_pos.ksh
@@ -58,10 +58,10 @@ log_onexit cleanup
log_must file_write -o create -f "$TESTDIR/file" -b 1048576 -c 1 -d R
log_must zpool sync
-objid=$(stat --format="%i" "$TESTDIR/file")
+objid=$(get_objnum "$TESTDIR/file")
log_note "Object ID for $TESTDIR/file is $objid"
-log_must eval "cat /proc/spl/kstat/zfs/dbufs > $DBUFS_FILE"
+log_must eval "kstat dbufs > $DBUFS_FILE"
dbuf=$(dbufstat -bxn -i "$DBUFS_FILE" -F "object=$objid" | wc -l)
mru=$(dbufstat -bxn -i "$DBUFS_FILE" -F "object=$objid,list=1" | wc -l)
mfu=$(dbufstat -bxn -i "$DBUFS_FILE" -F "object=$objid,list=3" | wc -l)
@@ -70,7 +70,7 @@ verify_ne "0" "$mru" "mru count"
verify_eq "0" "$mfu" "mfu count"
log_must eval "cat $TESTDIR/file > /dev/null"
-log_must eval "cat /proc/spl/kstat/zfs/dbufs > $DBUFS_FILE"
+log_must eval "kstat dbufs > $DBUFS_FILE"
dbuf=$(dbufstat -bxn -i "$DBUFS_FILE" -F "object=$objid" | wc -l)
mru=$(dbufstat -bxn -i "$DBUFS_FILE" -F "object=$objid,list=1" | wc -l)
mfu=$(dbufstat -bxn -i "$DBUFS_FILE" -F "object=$objid,list=3" | wc -l)
diff --git a/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.zcp b/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.zcp
index 79969509be89..744230db0521 100644
--- a/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.zcp
+++ b/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.zcp
@@ -41,7 +41,7 @@ props['logicalused'] = {{true, nil}, {nil, nil}, {true, ni
props['logicalreferenced'] = {{true, nil}, {true, nil}, {true, nil}}
props['quota'] = {{true, 'default'}, {nil, nil}, {nil, nil}}
props['reservation'] = {{true, 'default'}, {nil, nil}, {true, 'default'}}
--- Note that zfsonlinux allows volsize for snapshot which differs from openzfs
+-- Note that OpenZFS allows volsize for snapshot
-- props['volsize'] = {{nil, nil}, {nil, nil}, {true, vol}}
props['refquota'] = {{true, 'default'}, {nil, nil}, {nil, nil}}
props['refreservation'] = {{true, 'default'}, {nil, nil}, {true, vol}}
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_test_race.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_test_race.ksh
index 404770b2727f..135b31354f07 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_test_race.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_test_race.ksh
@@ -26,7 +26,7 @@
# under race condition which resulted in undefined mount order. The purpose
# of this test is to verify `zfs unmount -a` succeeds (not `zfs mount -a`
# succeeds, it always does) after `zfs mount -a`, which could fail if threads
-# race. See github.com/zfsonlinux/zfs/issues/{8450,8833,8878} for details.
+# race. See github.com/openzfs/zfs/issues/{8450,8833,8878} for details.
#
# STRATEGY:
# 1. Create pools and filesystems.
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_sparse.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_sparse.ksh
index e37c3f28ae9d..4878c06108e4 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_sparse.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_sparse.ksh
@@ -24,7 +24,7 @@
# 1. Create sparse files of various size
# 2. Snapshot and send these sparse files
# 3. Verify these files are received correctly and we don't trigger any issue
-# like the one described in https://github.com/zfsonlinux/zfs/pull/6760
+# like the one described in https://github.com/openzfs/zfs/pull/6760
#
verify_runnable "both"
diff --git a/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg b/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg
index cd0cf771e1fb..1a96ff5d93fa 100644
--- a/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg
+++ b/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg
@@ -49,7 +49,7 @@ if is_linux; then
# these are an alternate set of property values
PROP_ALTVALS="\
- off off \
+ nfsv4 off \
fletcher4 lzjb off \
off /tmp/zfstest 100M off \
512 10m off \
@@ -74,7 +74,7 @@ elif is_freebsd; then
# these are an alternate set of property values
PROP_ALTVALS="\
- off off \
+ nfsv4 off \
fletcher4 lzjb off \
off /tmp/zfstest 100M off \
512 10m off \
diff --git a/tests/zfs-tests/tests/functional/history/history_002_pos.ksh b/tests/zfs-tests/tests/functional/history/history_002_pos.ksh
index b077603e828f..a53bcaf4ec64 100755
--- a/tests/zfs-tests/tests/functional/history/history_002_pos.ksh
+++ b/tests/zfs-tests/tests/functional/history/history_002_pos.ksh
@@ -73,7 +73,7 @@ props=(
mountpoint none compression lz4
compression on compression off
compression lzjb acltype off
- acltype posix xattr sa
+ acltype posix acltype nfsv4
atime on atime off
devices on devices off
exec on exec off
@@ -84,11 +84,11 @@ props=(
aclinherit discard aclinherit noallow
aclinherit secure aclinherit passthrough
canmount off canmount on
- xattr on xattr off
compression gzip compression gzip-$((RANDOM%9 + 1))
compression zstd compression zstd-$((RANDOM%9 + 1))
compression zstd-fast copies $((RANDOM%3 + 1))
- compression zstd-fast-$((RANDOM%9 + 1))
+ compression zstd-fast-$((RANDOM%9 + 1)) xattr sa
+ xattr on xattr off
)
elif is_freebsd; then
# property value property value
@@ -115,7 +115,8 @@ props=(
compression gzip compression gzip-$((RANDOM%9 + 1))
compression zstd compression zstd-$((RANDOM%9 + 1))
compression zstd-fast copies $((RANDOM%3 + 1))
- compression zstd-fast-$((RANDOM%9 + 1))
+ compression zstd-fast-$((RANDOM%9 + 1)) acltype off
+ acltype posix acltype nfsv4
)
else
# property value property value
diff --git a/tests/zfs-tests/tests/functional/nopwrite/nopwrite_recsize.ksh b/tests/zfs-tests/tests/functional/nopwrite/nopwrite_recsize.ksh
index 14caedbf204a..205b3357d8d0 100755
--- a/tests/zfs-tests/tests/functional/nopwrite/nopwrite_recsize.ksh
+++ b/tests/zfs-tests/tests/functional/nopwrite/nopwrite_recsize.ksh
@@ -50,7 +50,7 @@ log_must zfs clone $origin@a $origin/clone
for rs in 512 1024 2048 4096 8192 16384 32768 65536 131072 ; do
log_must zfs set recsize=$rs $origin/clone
dd if=/$TESTDIR/file of=/$TESTDIR/clone/file bs=1024k count=$MEGS \
- conv=notrunc > $TEST_BASE_DIR/null 2>&1 || log_fail "dd failed."
+ conv=notrunc >/dev/null 2>&1 || log_fail "dd failed."
log_must verify_nopwrite $origin $origin@a $origin/clone
done
diff --git a/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh b/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh
index 56b990be1bee..432460fa2fcd 100755
--- a/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh
+++ b/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh
@@ -56,6 +56,8 @@ done
log_mustnot zfs redact $sendfs@snap1
log_mustnot zfs redact $sendfs@snap1 book
log_mustnot zfs redact $sendfs#book1 book4 $clone1
+log_mustnot zfs redact $sendfs@snap1 book snap2 snap3
+log_mustnot zfs redact $sendfs@snap1 book @snap2 @snap3
log_mustnot eval "zfs send --redact $sendfs#book $sendfs@snap >/dev/null"
# Redaction snapshots not a descendant of tosnap
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
index c82b0f008e32..26755e87d0a5 100644
--- a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
+++ b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
@@ -635,12 +635,14 @@ function file_check
# $1 The ZFS send command
# $2 The filesystem where the streams are sent
# $3 The receive filesystem
+# $4 Test dry-run (optional)
#
function resume_test
{
- sendcmd=$1
- streamfs=$2
- recvfs=$3
+ typeset sendcmd=$1
+ typeset streamfs=$2
+ typeset recvfs=$3
+ typeset dryrun=${4:-1}
stream_num=1
log_must eval "$sendcmd >/$streamfs/$stream_num"
@@ -651,6 +653,11 @@ function resume_test
stream_num=$((stream_num+1))
token=$(zfs get -Hp -o value receive_resume_token $recvfs)
+
+ # Do a dry-run
+ [ $dryrun -ne 0 ] && \
+ log_must eval "zfs send -nvt $token > /dev/null"
+
log_must eval "zfs send -t $token >/$streamfs/$stream_num"
[[ -f /$streamfs/$stream_num ]] || \
log_fail "NO FILE /$streamfs/$stream_num"
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_008_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_008_pos.ksh
index 531478760457..8e1821d88a68 100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_008_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_008_pos.ksh
@@ -43,7 +43,7 @@
verify_runnable "both"
-# See issue: https://github.com/zfsonlinux/zfs/issues/6066
+# See issue: https://github.com/openzfs/zfs/issues/6066
log_unsupported "Occasionally hangs"
# Origin Clone
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
index 499c05fc9835..594357dc4b7a 100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
@@ -116,7 +116,7 @@ for fs in "$POOL" "$POOL/pclone" "$POOL/$FS" "$POOL/$FS/fs1" \
"$POOL/$FS/fs1/fs2" "$POOL/$FS/fs1/fclone" ; do
rand_set_prop $fs aclinherit "discard" "noallow" "secure" "passthrough"
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
- rand_set_prop $fs acltype "off" "posix" "noacl" "posixacl"
+ rand_set_prop $fs acltype "off" "posix" "nfsv4" "noacl" "posixacl"
rand_set_prop $fs atime "on" "off"
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
rand_set_prop $fs compression "${compress_prop_vals[@]}"
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
index 2d9fb01af10f..c44985ae8c1d 100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
@@ -46,7 +46,7 @@ log_onexit resume_cleanup $sendfs $streamfs
test_fs_setup $sendfs $recvfs $streamfs
log_must zfs unmount -f $sendfs
-resume_test "zfs send $sendfs" $streamfs $recvfs
+resume_test "zfs send $sendfs" $streamfs $recvfs 0
file_check $sendfs $recvfs
log_pass "Verify resumability of a full ZFS send/receive with the source " \
diff --git a/tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh b/tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh
index 6533352a9a14..925f667ee9a6 100755
--- a/tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh
@@ -21,7 +21,7 @@
#
# Description:
# Verify FREEOBJECTS record frees sequential objects (See
-# https://github.com/zfsonlinux/zfs/issues/6694)
+# https://github.com/openzfs/zfs/issues/6694)
#
# Strategy:
# 1. Create three files with sequential object numbers, f1 f2 and f3