mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
zfs: merge openzfs/zfs@59493b63c (master)
Notable upstream pull request merges:
#13782 Fix setting the large_block feature after receiving a snapshot
#14157 FreeBSD: stop using buffer cache-only routines on sync
#14172 zed: post a udev change event from spa_vdev_attach()
#14181 zed: unclean disk attachment faults the vdev
#14190 Bump checksum error counter before reporting to ZED
#14196 Remove atomics from zh_refcount
#14197 Don't leak packed recieved proprties
#14198 Switch dnode stats to wmsums
#14199 Remove few pointer dereferences in dbuf_read()
#14200 Micro-optimize zrl_remove()
#14204 Lua: Fix bad bitshift in lua_strx2number()
#14212 Zstd fixes
#14218 Avoid a null pointer dereference in zfs_mount() on FreeBSD
#14235 nopwrites on dmu_sync-ed blocks can result in a panic
#14236 zio can deadlock during device removal
#14247 Micro-optimize fletcher4 calculations
#14261 FreeBSD: zfs_register_callbacks() must implement error check
correctly
Obtained from: OpenZFS
OpenZFS commit: 59493b63c1
This commit is contained in:
commit
bb2d13b686
131 changed files with 1221 additions and 576 deletions
|
|
@ -23,10 +23,11 @@ libelf-dev
|
|||
libffi-dev
|
||||
libmount-dev
|
||||
libpam0g-dev
|
||||
libselinux-dev
|
||||
libselinux1-dev
|
||||
libssl-dev
|
||||
libtool
|
||||
libudev-dev
|
||||
linux-headers-generic
|
||||
lsscsi
|
||||
mdadm
|
||||
nfs-kernel-server
|
||||
|
|
@ -36,8 +37,9 @@ python3
|
|||
python3-cffi
|
||||
python3-dev
|
||||
python3-packaging
|
||||
python3-pip
|
||||
python3-setuptools
|
||||
rng-tools
|
||||
rng-tools-debian
|
||||
rsync
|
||||
samba
|
||||
sysstat
|
||||
|
|
|
|||
5
sys/contrib/openzfs/.github/workflows/checkstyle-dependencies.txt
vendored
Normal file
5
sys/contrib/openzfs/.github/workflows/checkstyle-dependencies.txt
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
cppcheck
|
||||
devscripts
|
||||
mandoc
|
||||
pax-utils
|
||||
shellcheck
|
||||
|
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
checkstyle:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
|
@ -14,8 +14,9 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -qq upgrade
|
||||
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
||||
sudo apt-get install -qq mandoc cppcheck pax-utils devscripts
|
||||
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/checkstyle-dependencies.txt apt-get install -qq
|
||||
sudo python3 -m pip install --quiet flake8
|
||||
sudo apt-get clean
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ jobs:
|
|||
language: [ 'cpp', 'python' ]
|
||||
|
||||
steps:
|
||||
- name: Set make jobs
|
||||
run: |
|
||||
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [18.04, 20.04]
|
||||
os: [20.04, 22.04]
|
||||
runs-on: ubuntu-${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
@ -21,7 +21,8 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt sudo apt-get install -qq
|
||||
sudo apt-get -qq upgrade
|
||||
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
||||
sudo apt-get clean
|
||||
- name: Autogen.sh
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
|
@ -17,7 +17,8 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt sudo apt-get install -qq
|
||||
sudo apt-get -qq upgrade
|
||||
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
||||
sudo apt-get clean
|
||||
- name: Autogen.sh
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
TEST_DIR: /var/tmp/zloop
|
||||
steps:
|
||||
|
|
@ -16,7 +16,8 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt sudo apt-get install -qq
|
||||
sudo apt-get -qq upgrade
|
||||
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
||||
sudo apt-get clean
|
||||
- name: Autogen.sh
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ automake --version | awk '{print $NF; exit}' | (
|
|||
dir="${dir%/Makefile.am}"
|
||||
grep -q '%[CD]%' "$dir/Makefile.am" || continue
|
||||
|
||||
reldir="${dir#$root}"
|
||||
reldir="${dir#"$root"}"
|
||||
reldir="${reldir#/}"
|
||||
|
||||
canon_reldir="$(printf '%s' "$reldir" | tr -C 'a-zA-Z0-9@_' '_')"
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ static void
|
|||
verify_livelist_allocs(metaslab_verify_t *mv, uint64_t txg,
|
||||
uint64_t offset, uint64_t size)
|
||||
{
|
||||
sublivelist_verify_block_t svb;
|
||||
sublivelist_verify_block_t svb = {{{0}}};
|
||||
DVA_SET_VDEV(&svb.svb_dva, mv->mv_vdid);
|
||||
DVA_SET_OFFSET(&svb.svb_dva, offset);
|
||||
DVA_SET_ASIZE(&svb.svb_dva, size);
|
||||
|
|
|
|||
|
|
@ -535,6 +535,7 @@ typedef struct dev_data {
|
|||
boolean_t dd_islabeled;
|
||||
uint64_t dd_pool_guid;
|
||||
uint64_t dd_vdev_guid;
|
||||
uint64_t dd_new_vdev_guid;
|
||||
const char *dd_new_devid;
|
||||
} dev_data_t;
|
||||
|
||||
|
|
@ -545,6 +546,7 @@ zfs_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *data)
|
|||
char *path = NULL;
|
||||
uint_t c, children;
|
||||
nvlist_t **child;
|
||||
uint64_t guid = 0;
|
||||
|
||||
/*
|
||||
* First iterate over any children.
|
||||
|
|
@ -572,17 +574,14 @@ zfs_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *data)
|
|||
/* once a vdev was matched and processed there is nothing left to do */
|
||||
if (dp->dd_found)
|
||||
return;
|
||||
(void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID, &guid);
|
||||
|
||||
/*
|
||||
* Match by GUID if available otherwise fallback to devid or physical
|
||||
*/
|
||||
if (dp->dd_vdev_guid != 0) {
|
||||
uint64_t guid;
|
||||
|
||||
if (nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID,
|
||||
&guid) != 0 || guid != dp->dd_vdev_guid) {
|
||||
if (guid != dp->dd_vdev_guid)
|
||||
return;
|
||||
}
|
||||
zed_log_msg(LOG_INFO, " zfs_iter_vdev: matched on %llu", guid);
|
||||
dp->dd_found = B_TRUE;
|
||||
|
||||
|
|
@ -592,6 +591,12 @@ zfs_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *data)
|
|||
* illumos, substring matching is not required to accommodate
|
||||
* the partition suffix. An exact match will be present in
|
||||
* the dp->dd_compare value.
|
||||
* If the attached disk already contains a vdev GUID, it means
|
||||
* the disk is not clean. In such a scenario, the physical path
|
||||
* would be a match that makes the disk faulted when trying to
|
||||
* online it. So, we would only want to proceed if either GUID
|
||||
* matches with the last attached disk or the disk is in clean
|
||||
* state.
|
||||
*/
|
||||
if (nvlist_lookup_string(nvl, dp->dd_prop, &path) != 0 ||
|
||||
strcmp(dp->dd_compare, path) != 0) {
|
||||
|
|
@ -599,6 +604,12 @@ zfs_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *data)
|
|||
__func__, dp->dd_compare, path);
|
||||
return;
|
||||
}
|
||||
if (dp->dd_new_vdev_guid != 0 && dp->dd_new_vdev_guid != guid) {
|
||||
zed_log_msg(LOG_INFO, " %s: no match (GUID:%llu"
|
||||
" != vdev GUID:%llu)", __func__,
|
||||
dp->dd_new_vdev_guid, guid);
|
||||
return;
|
||||
}
|
||||
|
||||
zed_log_msg(LOG_INFO, " zfs_iter_vdev: matched %s on %s",
|
||||
dp->dd_prop, path);
|
||||
|
|
@ -680,7 +691,7 @@ zfs_iter_pool(zpool_handle_t *zhp, void *data)
|
|||
*/
|
||||
static boolean_t
|
||||
devphys_iter(const char *physical, const char *devid, zfs_process_func_t func,
|
||||
boolean_t is_slice)
|
||||
boolean_t is_slice, uint64_t new_vdev_guid)
|
||||
{
|
||||
dev_data_t data = { 0 };
|
||||
|
||||
|
|
@ -690,6 +701,7 @@ devphys_iter(const char *physical, const char *devid, zfs_process_func_t func,
|
|||
data.dd_found = B_FALSE;
|
||||
data.dd_islabeled = is_slice;
|
||||
data.dd_new_devid = devid; /* used by auto replace code */
|
||||
data.dd_new_vdev_guid = new_vdev_guid;
|
||||
|
||||
(void) zpool_iter(g_zfshdl, zfs_iter_pool, &data);
|
||||
|
||||
|
|
@ -858,7 +870,7 @@ zfs_deliver_add(nvlist_t *nvl)
|
|||
if (devid_iter(devid, zfs_process_add, is_slice))
|
||||
return (0);
|
||||
if (devpath != NULL && devphys_iter(devpath, devid, zfs_process_add,
|
||||
is_slice))
|
||||
is_slice, vdev_guid))
|
||||
return (0);
|
||||
if (vdev_guid != 0)
|
||||
(void) guid_iter(pool_guid, vdev_guid, devid, zfs_process_add,
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ get_usage(zfs_help_t idx)
|
|||
case HELP_RELEASE:
|
||||
return (gettext("\trelease [-r] <tag> <snapshot> ...\n"));
|
||||
case HELP_DIFF:
|
||||
return (gettext("\tdiff [-FHt] <snapshot> "
|
||||
return (gettext("\tdiff [-FHth] <snapshot> "
|
||||
"[snapshot|filesystem]\n"));
|
||||
case HELP_BOOKMARK:
|
||||
return (gettext("\tbookmark <snapshot|bookmark> "
|
||||
|
|
@ -548,7 +548,7 @@ usage(boolean_t requested)
|
|||
show_properties = B_TRUE;
|
||||
|
||||
if (show_properties) {
|
||||
(void) fprintf(fp,
|
||||
(void) fprintf(fp, "%s",
|
||||
gettext("\nThe following properties are supported:\n"));
|
||||
|
||||
(void) fprintf(fp, "\n\t%-14s %s %s %s\n\n",
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ usage(boolean_t requested)
|
|||
(strcmp(current_command->name, "get") == 0) ||
|
||||
(strcmp(current_command->name, "list") == 0))) {
|
||||
|
||||
(void) fprintf(fp,
|
||||
(void) fprintf(fp, "%s",
|
||||
gettext("\nthe following properties are supported:\n"));
|
||||
|
||||
(void) fprintf(fp, "\n\t%-19s %s %s\n\n",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
# ShellCheck can't follow non-constant source. Use a directive to specify location. [SC1090]
|
||||
# Not following: a was not specified as input (see shellcheck -x). [SC1091]
|
||||
# Prefer putting braces around variable references even when not strictly required. [SC2250]
|
||||
# Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore). [SC2312]
|
||||
# In POSIX sh, 'local' is undefined. [SC2039] # older ShellCheck versions
|
||||
# In POSIX sh, 'local' is undefined. [SC3043] # newer ShellCheck versions
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ PHONY += shellcheck
|
|||
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
||||
shellcheck-here-%:
|
||||
if HAVE_SHELLCHECK
|
||||
shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
|
||||
shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC2312,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
|
||||
else
|
||||
@echo "skipping shellcheck of" $(_STGT) "because shellcheck is not installed"
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -227,6 +227,62 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION], [
|
|||
AC_SUBST([INFINITE_RECURSION])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if kernel cc supports -Winfinite-recursion option.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION], [
|
||||
AC_MSG_CHECKING([whether $KERNEL_CC supports -Winfinite-recursion])
|
||||
|
||||
saved_cc="$CC"
|
||||
saved_flags="$CFLAGS"
|
||||
CC="gcc"
|
||||
CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
|
||||
|
||||
AS_IF([ test -n "$KERNEL_CC" ], [
|
||||
CC="$KERNEL_CC"
|
||||
])
|
||||
AS_IF([ test -n "$KERNEL_LLVM" ], [
|
||||
CC="clang"
|
||||
])
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
KERNEL_INFINITE_RECURSION=-Winfinite-recursion
|
||||
AC_DEFINE([HAVE_KERNEL_INFINITE_RECURSION], 1,
|
||||
[Define if compiler supports -Winfinite-recursion])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
KERNEL_INFINITE_RECURSION=
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
CC="$saved_cc"
|
||||
CFLAGS="$saved_flags"
|
||||
AC_SUBST([KERNEL_INFINITE_RECURSION])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if cc supports -Wformat-overflow option.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW], [
|
||||
AC_MSG_CHECKING([whether $CC supports -Wformat-overflow])
|
||||
|
||||
saved_flags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wformat-overflow"
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
FORMAT_OVERFLOW=-Wformat-overflow
|
||||
AC_DEFINE([HAVE_FORMAT_OVERFLOW], 1,
|
||||
[Define if compiler supports -Wformat-overflow])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
FORMAT_OVERFLOW=
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
CFLAGS="$saved_flags"
|
||||
AC_SUBST([FORMAT_OVERFLOW])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if cc supports -fno-omit-frame-pointer option.
|
||||
dnl #
|
||||
|
|
@ -268,3 +324,34 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_IPA_SRA], [
|
|||
CFLAGS="$saved_flags"
|
||||
AC_SUBST([NO_IPA_SRA])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if kernel cc supports -fno-ipa-sra option.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_IPA_SRA], [
|
||||
AC_MSG_CHECKING([whether $KERNEL_CC supports -fno-ipa-sra])
|
||||
|
||||
saved_cc="$CC"
|
||||
saved_flags="$CFLAGS"
|
||||
CC="gcc"
|
||||
CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
|
||||
|
||||
AS_IF([ test -n "$KERNEL_CC" ], [
|
||||
CC="$KERNEL_CC"
|
||||
])
|
||||
AS_IF([ test -n "$KERNEL_LLVM" ], [
|
||||
CC="clang"
|
||||
])
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
KERNEL_NO_IPA_SRA=-fno-ipa-sra
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
KERNEL_NO_IPA_SRA=
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
CC="$saved_cc"
|
||||
CFLAGS="$saved_flags"
|
||||
AC_SUBST([KERNEL_NO_IPA_SRA])
|
||||
])
|
||||
|
|
|
|||
|
|
@ -46,6 +46,16 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYZFS], [
|
|||
])
|
||||
AC_SUBST(DEFINE_PYZFS)
|
||||
|
||||
dnl #
|
||||
dnl # Autodetection disables pyzfs if kernel or srpm config
|
||||
dnl #
|
||||
AS_IF([test "x$enable_pyzfs" = xcheck], [
|
||||
AS_IF([test "x$ZFS_CONFIG" = xkernel -o "x$ZFS_CONFIG" = xsrpm ], [
|
||||
enable_pyzfs=no
|
||||
AC_MSG_NOTICE([Disabling pyzfs for kernel/srpm config])
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Python "packaging" (or, failing that, "distlib") module is required to build and install pyzfs
|
||||
dnl #
|
||||
|
|
|
|||
|
|
@ -165,31 +165,16 @@ variable to configure. See ``configure --help'' for reference.
|
|||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Check if you have distutils, else fail
|
||||
#
|
||||
AC_MSG_CHECKING([for the distutils Python package])
|
||||
if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
m4_ifvaln([$2],[$2],[
|
||||
AC_MSG_ERROR([cannot import Python module "distutils".
|
||||
Please check your Python installation. The error was:
|
||||
$ac_distutils_result])
|
||||
PYTHON_VERSION=""
|
||||
])
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for Python include path
|
||||
#
|
||||
#
|
||||
AC_MSG_CHECKING([for Python include path])
|
||||
if test -z "$PYTHON_CPPFLAGS"; then
|
||||
python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_python_inc ());"`
|
||||
plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
|
||||
python_path=`$PYTHON -c "import sysconfig; \
|
||||
print (sysconfig.get_path('include'));"`
|
||||
plat_python_path=`$PYTHON -c "import sysconfig; \
|
||||
print (sysconfig.get_path('platinclude'));"`
|
||||
if test -n "${python_path}"; then
|
||||
if test "${plat_python_path}" != "${python_path}"; then
|
||||
python_path="-I$python_path -I$plat_python_path"
|
||||
|
|
@ -213,7 +198,7 @@ $ac_distutils_result])
|
|||
|
||||
# join all versioning strings, on some systems
|
||||
# major/minor numbers could be in different list elements
|
||||
from distutils.sysconfig import *
|
||||
from sysconfig import *
|
||||
e = get_config_var('VERSION')
|
||||
if e is not None:
|
||||
print(e)
|
||||
|
|
@ -236,8 +221,8 @@ EOD`
|
|||
ac_python_libdir=`cat<<EOD | $PYTHON -
|
||||
|
||||
# There should be only one
|
||||
import distutils.sysconfig
|
||||
e = distutils.sysconfig.get_config_var('LIBDIR')
|
||||
import sysconfig
|
||||
e = sysconfig.get_config_var('LIBDIR')
|
||||
if e is not None:
|
||||
print (e)
|
||||
EOD`
|
||||
|
|
@ -245,8 +230,8 @@ EOD`
|
|||
# Now, for the library:
|
||||
ac_python_library=`cat<<EOD | $PYTHON -
|
||||
|
||||
import distutils.sysconfig
|
||||
c = distutils.sysconfig.get_config_vars()
|
||||
import sysconfig
|
||||
c = sysconfig.get_config_vars()
|
||||
if 'LDVERSION' in c:
|
||||
print ('python'+c[['LDVERSION']])
|
||||
else:
|
||||
|
|
@ -265,9 +250,9 @@ EOD`
|
|||
else
|
||||
# old way: use libpython from python_configdir
|
||||
ac_python_libdir=`$PYTHON -c \
|
||||
"from distutils.sysconfig import get_python_lib as f; \
|
||||
"import sysconfig; \
|
||||
import os; \
|
||||
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
|
||||
print (os.path.join(sysconfig.get_path('platstdlib'), 'config'));"`
|
||||
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||
fi
|
||||
|
||||
|
|
@ -289,7 +274,9 @@ EOD`
|
|||
AC_MSG_CHECKING([for Python site-packages path])
|
||||
if test -z "$PYTHON_SITE_PKG"; then
|
||||
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_python_lib(0,0));"`
|
||||
print (distutils.sysconfig.get_python_lib(0,0));" 2>/dev/null || \
|
||||
$PYTHON -c "import sysconfig; \
|
||||
print (sysconfig.get_path('purelib'));"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_SITE_PKG])
|
||||
AC_SUBST([PYTHON_SITE_PKG])
|
||||
|
|
@ -299,8 +286,8 @@ EOD`
|
|||
#
|
||||
AC_MSG_CHECKING(python extra libraries)
|
||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import sysconfig; \
|
||||
conf = sysconfig.get_config_var; \
|
||||
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
|
||||
|
|
@ -311,8 +298,8 @@ EOD`
|
|||
#
|
||||
AC_MSG_CHECKING(python extra linking flags)
|
||||
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import sysconfig; \
|
||||
conf = sysconfig.get_config_var; \
|
||||
print (conf('LINKFORSHARED'))"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ AC_DEFUN([ZFS_AC_DEBUG], [
|
|||
AC_DEFUN([ZFS_AC_DEBUGINFO_ENABLE], [
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -g -fno-inline $NO_IPA_SRA"
|
||||
|
||||
KERNEL_DEBUG_CFLAGS="$KERNEL_DEBUG_CFLAGS -fno-inline $NO_IPA_SRA"
|
||||
KERNEL_DEBUG_CFLAGS="$KERNEL_DEBUG_CFLAGS -fno-inline $KERNEL_NO_IPA_SRA"
|
||||
KERNEL_MAKE="$KERNEL_MAKE CONFIG_DEBUG_INFO=y"
|
||||
|
||||
DEBUGINFO_ZFS="_with_debuginfo"
|
||||
|
|
@ -211,12 +211,15 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
|||
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
|
||||
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_IPA_SRA
|
||||
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_IPA_SRA
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_ASAN
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_UBSAN
|
||||
ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD
|
||||
|
|
@ -529,6 +532,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
|||
VENDOR=alpine ;
|
||||
elif test -f /bin/freebsd-version ; then
|
||||
VENDOR=freebsd ;
|
||||
elif test -f /etc/openEuler-release ; then
|
||||
VENDOR=openeuler ;
|
||||
else
|
||||
VENDOR= ;
|
||||
fi],
|
||||
|
|
@ -553,6 +558,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
|||
ubuntu) DEFAULT_PACKAGE=deb ;;
|
||||
debian) DEFAULT_PACKAGE=deb ;;
|
||||
freebsd) DEFAULT_PACKAGE=pkg ;;
|
||||
openeuler) DEFAULT_PACKAGE=rpm ;;
|
||||
*) DEFAULT_PACKAGE=rpm ;;
|
||||
esac
|
||||
AC_MSG_RESULT([$DEFAULT_PACKAGE])
|
||||
|
|
@ -566,31 +572,14 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
|||
AC_MSG_RESULT([$initdir])
|
||||
AC_SUBST(initdir)
|
||||
|
||||
AC_MSG_CHECKING([default init script type and shell])
|
||||
case "$VENDOR" in
|
||||
toss) DEFAULT_INIT_SCRIPT=redhat ;;
|
||||
redhat) DEFAULT_INIT_SCRIPT=redhat ;;
|
||||
fedora) DEFAULT_INIT_SCRIPT=fedora ;;
|
||||
gentoo) DEFAULT_INIT_SCRIPT=openrc ;;
|
||||
alpine) DEFAULT_INIT_SCRIPT=openrc ;;
|
||||
arch) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
sles) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
slackware) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
lunar) DEFAULT_INIT_SCRIPT=lunar ;;
|
||||
ubuntu) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
debian) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
freebsd) DEFAULT_INIT_SCRIPT=freebsd;;
|
||||
*) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([default shell])
|
||||
case "$VENDOR" in
|
||||
gentoo) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
|
||||
alpine) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
|
||||
*) DEFAULT_INIT_SHELL="/bin/sh" ;;
|
||||
esac
|
||||
|
||||
AC_MSG_RESULT([$DEFAULT_INIT_SCRIPT:$DEFAULT_INIT_SHELL])
|
||||
AC_SUBST(DEFAULT_INIT_SCRIPT)
|
||||
AC_MSG_RESULT([$DEFAULT_INIT_SHELL])
|
||||
AC_SUBST(DEFAULT_INIT_SHELL)
|
||||
|
||||
AC_MSG_CHECKING([default nfs server init script])
|
||||
|
|
@ -609,6 +598,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
|||
redhat) initconfdir=/etc/sysconfig ;;
|
||||
fedora) initconfdir=/etc/sysconfig ;;
|
||||
sles) initconfdir=/etc/sysconfig ;;
|
||||
openeuler) initconfdir=/etc/sysconfig ;;
|
||||
ubuntu) initconfdir=/etc/default ;;
|
||||
debian) initconfdir=/etc/default ;;
|
||||
freebsd) initconfdir=$sysconfdir/rc.conf.d;;
|
||||
|
|
|
|||
|
|
@ -63,11 +63,11 @@ __zfs_list_filesystems()
|
|||
__zfs_match_snapshot()
|
||||
{
|
||||
local base_dataset="${cur%@*}"
|
||||
if [ "$base_dataset" != "$cur" ]
|
||||
if [[ "$base_dataset" != "$cur" ]]
|
||||
then
|
||||
$__ZFS_CMD list -H -o name -s name -t snapshot -d 1 "$base_dataset"
|
||||
else
|
||||
if [ "$cur" != "" ] && __zfs_list_datasets "$cur" &> /dev/null
|
||||
if [[ "$cur" != "" ]] && __zfs_list_datasets "$cur" &> /dev/null
|
||||
then
|
||||
$__ZFS_CMD list -H -o name -s name -t filesystem,volume -r "$cur" | tail -n +2
|
||||
# We output the base dataset name even though we might be
|
||||
|
|
@ -104,7 +104,7 @@ __zfs_match_snapshot()
|
|||
__zfs_match_snapshot_or_bookmark()
|
||||
{
|
||||
local base_dataset="${cur%[#@]*}"
|
||||
if [ "$base_dataset" != "$cur" ]
|
||||
if [[ "$base_dataset" != "$cur" ]]
|
||||
then
|
||||
if [[ $cur == *@* ]]
|
||||
then
|
||||
|
|
@ -114,7 +114,7 @@ __zfs_match_snapshot_or_bookmark()
|
|||
fi
|
||||
else
|
||||
$__ZFS_CMD list -H -o name -s name -t filesystem,volume
|
||||
if [ -e "$cur" ] && $__ZFS_CMD list -H -o name -s name -t filesystem,volume "$cur" &> /dev/null
|
||||
if [[ -e "$cur" ]] && $__ZFS_CMD list -H -o name -s name -t filesystem,volume "$cur" &> /dev/null
|
||||
then
|
||||
echo "$cur@"
|
||||
echo "$cur#"
|
||||
|
|
@ -126,10 +126,10 @@ __zfs_match_multiple_snapshots()
|
|||
{
|
||||
local existing_opts
|
||||
existing_opts="$(expr "$cur" : '\(.*\)[%,]')"
|
||||
if [ -e "$existing_opts" ]
|
||||
if [[ -e "$existing_opts" ]]
|
||||
then
|
||||
local base_dataset="${cur%@*}"
|
||||
if [ "$base_dataset" != "$cur" ]
|
||||
if [[ "$base_dataset" != "$cur" ]]
|
||||
then
|
||||
local cur="${cur##*,}"
|
||||
if [[ $cur =~ ^%|%.*% ]]
|
||||
|
|
@ -199,7 +199,7 @@ __zfs_complete_multiple_options()
|
|||
|
||||
mapfile -t COMPREPLY < <(compgen -W "$options" -- "${cur##*,}")
|
||||
existing_opts=$(expr "$cur" : '\(.*,\)')
|
||||
if [ -n "$existing_opts" ]
|
||||
if [[ -n "$existing_opts" ]]
|
||||
then
|
||||
COMPREPLY=( "${COMPREPLY[@]/#/${existing_opts}}" )
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define KM_NOSLEEP 0x0001 /* cannot block for memory; may fail */
|
||||
|
||||
#define UMEM_DEFAULT 0x0000 /* normal -- may fail */
|
||||
#define UMEM_NOFAIL 0x0100 /* Never fails */
|
||||
|
||||
|
|
@ -173,7 +175,7 @@ spl_kmem_alloc(size_t sz, int fl, const char *func, int line)
|
|||
if (condition1)
|
||||
__coverity_sleep__();
|
||||
|
||||
if ((fl == 0) || condition0) {
|
||||
if (((fl & KM_NOSLEEP) != KM_NOSLEEP) || condition0) {
|
||||
void *buf = __coverity_alloc__(sz);
|
||||
__coverity_mark_as_uninitialized_buffer__(buf);
|
||||
__coverity_mark_as_afm_allocated__(buf, "spl_kmem_free");
|
||||
|
|
@ -194,7 +196,7 @@ spl_kmem_zalloc(size_t sz, int fl, const char *func, int line)
|
|||
if (condition1)
|
||||
__coverity_sleep__();
|
||||
|
||||
if ((fl == 0) || condition0) {
|
||||
if (((fl & KM_NOSLEEP) != KM_NOSLEEP) || condition0) {
|
||||
void *buf = __coverity_alloc__(sz);
|
||||
__coverity_writeall0__(buf);
|
||||
__coverity_mark_as_afm_allocated__(buf, "spl_kmem_free");
|
||||
|
|
@ -276,7 +278,7 @@ spl_vmem_alloc(size_t sz, int fl, const char *func, int line)
|
|||
if (condition1)
|
||||
__coverity_sleep__();
|
||||
|
||||
if ((fl == 0) || condition0) {
|
||||
if (((fl & KM_NOSLEEP) != KM_NOSLEEP) || condition0) {
|
||||
void *buf = __coverity_alloc__(sz);
|
||||
__coverity_mark_as_uninitialized_buffer__(buf);
|
||||
__coverity_mark_as_afm_allocated__(buf, "spl_vmem_free");
|
||||
|
|
@ -295,7 +297,7 @@ spl_vmem_zalloc(size_t sz, int fl, const char *func, int line)
|
|||
if (condition1)
|
||||
__coverity_sleep__();
|
||||
|
||||
if ((fl == 0) || condition0) {
|
||||
if (((fl & KM_NOSLEEP) != KM_NOSLEEP) || condition0) {
|
||||
void *buf = __coverity_alloc__(sz);
|
||||
__coverity_writeall0__(buf);
|
||||
__coverity_mark_as_afm_allocated__(buf, "spl_vmem_free");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
get_devtype() {
|
||||
local typ
|
||||
typ=$(udevadm info --query=property --name="$1" | sed -n 's|^ID_FS_TYPE=||p')
|
||||
if [ -z "$typ" ] ; then
|
||||
if [[ -z "$typ" ]] ; then
|
||||
typ=$(blkid -c /dev/null "$1" -o value -s TYPE)
|
||||
fi
|
||||
echo "$typ"
|
||||
|
|
@ -22,7 +22,7 @@ get_pool_devices() {
|
|||
else
|
||||
awk -F '\t' '/\t\/dev/ { print $2 }' "$poolconfigtemp" | \
|
||||
while read -r pooldev ; do
|
||||
if [ -e "$pooldev" ] ; then
|
||||
if [[ -e "$pooldev" ]] ; then
|
||||
resolved="$(readlink -f "$pooldev")"
|
||||
dinfo "zfsexpandknowledge: pool $1 has device $pooldev (which resolves to $resolved)"
|
||||
echo "$resolved"
|
||||
|
|
@ -38,15 +38,15 @@ find_zfs_block_devices() {
|
|||
local fstype
|
||||
local _
|
||||
numfields="$(awk '{print NF; exit}' /proc/self/mountinfo)"
|
||||
if [ "$numfields" = "10" ] ; then
|
||||
if [[ "$numfields" = "10" ]] ; then
|
||||
fields="_ _ _ _ mp _ _ fstype dev _"
|
||||
else
|
||||
fields="_ _ _ _ mp _ _ _ fstype dev _"
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
while read -r ${fields?} ; do
|
||||
[ "$fstype" = "zfs" ] || continue
|
||||
[ "$mp" = "$1" ] && get_pool_devices "${dev%%/*}"
|
||||
[[ "$fstype" = "zfs" ]] || continue
|
||||
[[ "$mp" = "$1" ]] && get_pool_devices "${dev%%/*}"
|
||||
done < /proc/self/mountinfo
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ check() {
|
|||
local _depdevtype
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [ -n "$hostonly" ]; then
|
||||
if [[ -n "$hostonly" ]]; then
|
||||
|
||||
for mp in \
|
||||
"/" \
|
||||
|
|
@ -92,7 +92,7 @@ if [ -n "$hostonly" ]; then
|
|||
mp=$(readlink -f "$mp")
|
||||
mountpoint "$mp" >/dev/null 2>&1 || continue
|
||||
blockdevs=$(find_zfs_block_devices "$mp")
|
||||
if [ -z "$blockdevs" ] ; then continue ; fi
|
||||
if [[ -z "$blockdevs" ]] ; then continue ; fi
|
||||
dinfo "zfsexpandknowledge: block devices backing ZFS dataset $mp: ${blockdevs//$'\n'/ }"
|
||||
for dev in $blockdevs
|
||||
do
|
||||
|
|
@ -100,9 +100,9 @@ if [ -n "$hostonly" ]; then
|
|||
fstype=$(get_devtype "$dev")
|
||||
host_fs_types["$dev"]="$fstype"
|
||||
majmin=$(get_maj_min "$dev")
|
||||
if [ -d "/sys/dev/block/$majmin/slaves" ] ; then
|
||||
if [[ -d "/sys/dev/block/$majmin/slaves" ]] ; then
|
||||
for _depdev in "/sys/dev/block/$majmin/slaves"/*; do
|
||||
[ -f "$_depdev/dev" ] || continue
|
||||
[[ -f "$_depdev/dev" ]] || continue
|
||||
_depdev="/dev/${_depdev##*/}"
|
||||
_depdevname=$(udevadm info --query=property --name="$_depdev" | sed -n 's|^DEVNAME=||p')
|
||||
_depdevtype=$(get_devtype "$_depdevname")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
check() {
|
||||
# We depend on udev-rules being loaded
|
||||
[ "${1}" = "-d" ] && return 0
|
||||
[[ "${1}" = "-d" ]] && return 0
|
||||
|
||||
# Verify the zfs tool chain
|
||||
for tool in "zgenhostid" "zpool" "zfs" "mount.zfs"; do
|
||||
|
|
@ -50,7 +50,7 @@ install() {
|
|||
fi
|
||||
|
||||
inst_hook cmdline 95 "${moddir}/parse-zfs.sh"
|
||||
if [ -n "${systemdutildir}" ]; then
|
||||
if [[ -n "${systemdutildir}" ]]; then
|
||||
inst_script "${moddir}/zfs-generator.sh" "${systemdutildir}/system-generators/dracut-zfs-generator"
|
||||
fi
|
||||
inst_hook pre-mount 90 "${moddir}/zfs-load-key.sh"
|
||||
|
|
@ -68,7 +68,7 @@ install() {
|
|||
|
||||
# Synchronize initramfs and system hostid
|
||||
if ! inst_simple -H @sysconfdir@/hostid; then
|
||||
if HOSTID="$(hostid 2>/dev/null)" && [ "${HOSTID}" != "00000000" ]; then
|
||||
if HOSTID="$(hostid 2>/dev/null)" && [[ "${HOSTID}" != "00000000" ]]; then
|
||||
zgenhostid -o "${initdir}@sysconfdir@/hostid" "${HOSTID}"
|
||||
mark_hostonly @sysconfdir@/hostid
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -640,8 +640,8 @@ setup_snapshot_booting()
|
|||
# rpool/ROOT/debian/boot@snap2 => rpool/ROOT/debian_snap2/boot
|
||||
# rpool/ROOT/debian/usr@snap2 => rpool/ROOT/debian_snap2/usr
|
||||
# rpool/ROOT/debian/var@snap2 => rpool/ROOT/debian_snap2/var
|
||||
subfs="${s##$rootfs}"
|
||||
subfs="${subfs%%@$snapname}"
|
||||
subfs="${s##"$rootfs"}"
|
||||
subfs="${subfs%%@"$snapname"}"
|
||||
|
||||
destfs="${rootfs}_${snapname}" # base fs.
|
||||
[ -n "$subfs" ] && destfs="${destfs}$subfs" # + sub fs.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ DefaultDependencies=no
|
|||
Requires=systemd-udev-settle.service
|
||||
After=systemd-udev-settle.service
|
||||
After=cryptsetup.target
|
||||
After=multipathd.target
|
||||
After=multipathd.service
|
||||
After=systemd-remount-fs.service
|
||||
Before=zfs-import.target
|
||||
ConditionFileNotEmpty=@sysconfdir@/zfs/zpool.cache
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ DefaultDependencies=no
|
|||
Requires=systemd-udev-settle.service
|
||||
After=systemd-udev-settle.service
|
||||
After=cryptsetup.target
|
||||
After=multipathd.target
|
||||
After=multipathd.service
|
||||
Before=zfs-import.target
|
||||
ConditionFileNotEmpty=!@sysconfdir@/zfs/zpool.cache
|
||||
ConditionPathIsDirectory=/sys/module/zfs
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include <sys/dmu_zfetch.h>
|
||||
#include <sys/zrlock.h>
|
||||
#include <sys/multilist.h>
|
||||
#include <sys/wmsum.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -587,10 +588,42 @@ typedef struct dnode_stats {
|
|||
kstat_named_t dnode_move_active;
|
||||
} dnode_stats_t;
|
||||
|
||||
typedef struct dnode_sums {
|
||||
wmsum_t dnode_hold_dbuf_hold;
|
||||
wmsum_t dnode_hold_dbuf_read;
|
||||
wmsum_t dnode_hold_alloc_hits;
|
||||
wmsum_t dnode_hold_alloc_misses;
|
||||
wmsum_t dnode_hold_alloc_interior;
|
||||
wmsum_t dnode_hold_alloc_lock_retry;
|
||||
wmsum_t dnode_hold_alloc_lock_misses;
|
||||
wmsum_t dnode_hold_alloc_type_none;
|
||||
wmsum_t dnode_hold_free_hits;
|
||||
wmsum_t dnode_hold_free_misses;
|
||||
wmsum_t dnode_hold_free_lock_misses;
|
||||
wmsum_t dnode_hold_free_lock_retry;
|
||||
wmsum_t dnode_hold_free_refcount;
|
||||
wmsum_t dnode_hold_free_overflow;
|
||||
wmsum_t dnode_free_interior_lock_retry;
|
||||
wmsum_t dnode_allocate;
|
||||
wmsum_t dnode_reallocate;
|
||||
wmsum_t dnode_buf_evict;
|
||||
wmsum_t dnode_alloc_next_chunk;
|
||||
wmsum_t dnode_alloc_race;
|
||||
wmsum_t dnode_alloc_next_block;
|
||||
wmsum_t dnode_move_invalid;
|
||||
wmsum_t dnode_move_recheck1;
|
||||
wmsum_t dnode_move_recheck2;
|
||||
wmsum_t dnode_move_special;
|
||||
wmsum_t dnode_move_handle;
|
||||
wmsum_t dnode_move_rwlock;
|
||||
wmsum_t dnode_move_active;
|
||||
} dnode_sums_t;
|
||||
|
||||
extern dnode_stats_t dnode_stats;
|
||||
extern dnode_sums_t dnode_sums;
|
||||
|
||||
#define DNODE_STAT_INCR(stat, val) \
|
||||
atomic_add_64(&dnode_stats.stat.value.ui64, (val));
|
||||
wmsum_add(&dnode_sums.stat, (val))
|
||||
#define DNODE_STAT_BUMP(stat) \
|
||||
DNODE_STAT_INCR(stat, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ extern int zfs_zaccess(struct znode *, int, int, boolean_t, cred_t *,
|
|||
zuserns_t *);
|
||||
int zfs_fastaccesschk_execute(struct znode *, cred_t *);
|
||||
extern int zfs_zaccess_rwx(struct znode *, mode_t, int, cred_t *, zuserns_t *);
|
||||
extern int zfs_zaccess_unix(struct znode *, mode_t, cred_t *);
|
||||
extern int zfs_zaccess_unix(void *, int, cred_t *);
|
||||
extern int zfs_acl_access(struct znode *, int, cred_t *);
|
||||
int zfs_acl_chmod_setattr(struct znode *, zfs_acl_t **, uint64_t);
|
||||
int zfs_zaccess_delete(struct znode *, struct znode *, cred_t *, zuserns_t *);
|
||||
|
|
|
|||
|
|
@ -242,9 +242,9 @@ zfs_enter_verify_zp(zfsvfs_t *zfsvfs, znode_t *zp, const char *tag)
|
|||
|
||||
typedef struct znode_hold {
|
||||
uint64_t zh_obj; /* object id */
|
||||
kmutex_t zh_lock; /* lock serializing object access */
|
||||
avl_node_t zh_node; /* avl tree linkage */
|
||||
zfs_refcount_t zh_refcount; /* active consumer reference count */
|
||||
kmutex_t zh_lock; /* lock serializing object access */
|
||||
int zh_refcount; /* active consumer reference count */
|
||||
} znode_hold_t;
|
||||
|
||||
static inline uint64_t
|
||||
|
|
|
|||
|
|
@ -199,6 +199,17 @@ nvprint_##type_and_variant(nvlist_prtctl_t pctl, void *private, \
|
|||
return (1); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Workaround for GCC 12+ with UBSan enabled deficencies.
|
||||
*
|
||||
* GCC 12+ invoked with -fsanitize=undefined incorrectly reports the code
|
||||
* below as violating -Wformat-overflow.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
#endif
|
||||
NVLIST_PRTFUNC(boolean, int, int, "%d")
|
||||
NVLIST_PRTFUNC(boolean_value, boolean_t, int, "%d")
|
||||
NVLIST_PRTFUNC(byte, uchar_t, uchar_t, "0x%2.2x")
|
||||
|
|
@ -213,6 +224,10 @@ NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx")
|
|||
NVLIST_PRTFUNC(double, double, double, "0x%f")
|
||||
NVLIST_PRTFUNC(string, char *, char *, "%s")
|
||||
NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx")
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Generate functions to print array-valued nvlist members.
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ nfs_init_tmpfile(const char *prefix, const char *mdir, struct tmpfile *tmpf)
|
|||
mkdir(mdir, 0755) < 0 &&
|
||||
errno != EEXIST) {
|
||||
fprintf(stderr, "failed to create %s: %s\n",
|
||||
// cppcheck-suppress uninitvar
|
||||
mdir, strerror(errno));
|
||||
return (B_FALSE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include "thread_pool_impl.h"
|
||||
|
||||
static pthread_mutex_t thread_pool_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
|
|
|||
|
|
@ -1007,8 +1007,23 @@ send_print_verbose(FILE *fout, const char *tosnap, const char *fromsnap,
|
|||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"incremental\t%s\t%s"), fromsnap, tosnap);
|
||||
} else {
|
||||
/*
|
||||
* Workaround for GCC 12+ with UBSan enabled deficencies.
|
||||
*
|
||||
* GCC 12+ invoked with -fsanitize=undefined incorrectly reports the code
|
||||
* below as violating -Wformat-overflow.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
#endif
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"full\t%s"), tosnap);
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
(void) fprintf(fout, "\t%llu", (longlong_t)size);
|
||||
} else {
|
||||
|
|
@ -1028,8 +1043,23 @@ send_print_verbose(FILE *fout, const char *tosnap, const char *fromsnap,
|
|||
if (size != 0) {
|
||||
char buf[16];
|
||||
zfs_nicebytes(size, buf, sizeof (buf));
|
||||
/*
|
||||
* Workaround for GCC 12+ with UBSan enabled deficencies.
|
||||
*
|
||||
* GCC 12+ invoked with -fsanitize=undefined incorrectly reports the code
|
||||
* below as violating -Wformat-overflow.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
#endif
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
" estimated size is %s"), buf);
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
}
|
||||
(void) fprintf(fout, "\n");
|
||||
|
|
|
|||
|
|
@ -73,33 +73,30 @@ build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val,
|
|||
*iovlen = ++i;
|
||||
}
|
||||
|
||||
static int
|
||||
do_mount_(const char *spec, const char *dir, int mflag,
|
||||
char *dataptr, int datalen, const char *optptr, int optlen)
|
||||
int
|
||||
do_mount(zfs_handle_t *zhp, const char *mntpt, const char *opts, int flags)
|
||||
{
|
||||
struct iovec *iov;
|
||||
char *optstr, *p, *tofree;
|
||||
int iovlen, rv;
|
||||
const char *spec = zfs_get_name(zhp);
|
||||
|
||||
assert(spec != NULL);
|
||||
assert(dir != NULL);
|
||||
assert(dataptr == NULL), (void) dataptr;
|
||||
assert(datalen == 0), (void) datalen;
|
||||
assert(optptr != NULL);
|
||||
assert(optlen > 0), (void) optlen;
|
||||
assert(mntpt != NULL);
|
||||
assert(opts != NULL);
|
||||
|
||||
tofree = optstr = strdup(optptr);
|
||||
tofree = optstr = strdup(opts);
|
||||
assert(optstr != NULL);
|
||||
|
||||
iov = NULL;
|
||||
iovlen = 0;
|
||||
if (strstr(optstr, MNTOPT_REMOUNT) != NULL)
|
||||
build_iovec(&iov, &iovlen, "update", NULL, 0);
|
||||
if (mflag & MS_RDONLY)
|
||||
if (flags & MS_RDONLY)
|
||||
build_iovec(&iov, &iovlen, "ro", NULL, 0);
|
||||
build_iovec(&iov, &iovlen, "fstype", __DECONST(char *, MNTTYPE_ZFS),
|
||||
(size_t)-1);
|
||||
build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, dir),
|
||||
build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, mntpt),
|
||||
(size_t)-1);
|
||||
build_iovec(&iov, &iovlen, "from", __DECONST(char *, spec), (size_t)-1);
|
||||
while ((p = strsep(&optstr, ",/")) != NULL)
|
||||
|
|
@ -109,14 +106,7 @@ do_mount_(const char *spec, const char *dir, int mflag,
|
|||
if (rv < 0)
|
||||
return (errno);
|
||||
return (rv);
|
||||
}
|
||||
|
||||
int
|
||||
do_mount(zfs_handle_t *zhp, const char *mntpt, const char *opts, int flags)
|
||||
{
|
||||
|
||||
return (do_mount_(zfs_get_name(zhp), mntpt, flags, NULL, 0,
|
||||
opts, sizeof (mntpt)));
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -1105,7 +1105,8 @@ recv_impl(const char *snapname, nvlist_t *recvdprops, nvlist_t *localprops,
|
|||
fnvlist_free(outnvl);
|
||||
} else {
|
||||
zfs_cmd_t zc = {"\0"};
|
||||
char *packed = NULL;
|
||||
char *rp_packed = NULL;
|
||||
char *lp_packed = NULL;
|
||||
size_t size;
|
||||
|
||||
ASSERT3S(g_refcount, >, 0);
|
||||
|
|
@ -1114,14 +1115,14 @@ recv_impl(const char *snapname, nvlist_t *recvdprops, nvlist_t *localprops,
|
|||
(void) strlcpy(zc.zc_value, snapname, sizeof (zc.zc_value));
|
||||
|
||||
if (recvdprops != NULL) {
|
||||
packed = fnvlist_pack(recvdprops, &size);
|
||||
zc.zc_nvlist_src = (uint64_t)(uintptr_t)packed;
|
||||
rp_packed = fnvlist_pack(recvdprops, &size);
|
||||
zc.zc_nvlist_src = (uint64_t)(uintptr_t)rp_packed;
|
||||
zc.zc_nvlist_src_size = size;
|
||||
}
|
||||
|
||||
if (localprops != NULL) {
|
||||
packed = fnvlist_pack(localprops, &size);
|
||||
zc.zc_nvlist_conf = (uint64_t)(uintptr_t)packed;
|
||||
lp_packed = fnvlist_pack(localprops, &size);
|
||||
zc.zc_nvlist_conf = (uint64_t)(uintptr_t)lp_packed;
|
||||
zc.zc_nvlist_conf_size = size;
|
||||
}
|
||||
|
||||
|
|
@ -1156,8 +1157,10 @@ recv_impl(const char *snapname, nvlist_t *recvdprops, nvlist_t *localprops,
|
|||
zc.zc_nvlist_dst_size, errors, KM_SLEEP));
|
||||
}
|
||||
|
||||
if (packed != NULL)
|
||||
fnvlist_pack_free(packed, size);
|
||||
if (rp_packed != NULL)
|
||||
fnvlist_pack_free(rp_packed, size);
|
||||
if (lp_packed != NULL)
|
||||
fnvlist_pack_free(lp_packed, size);
|
||||
free((void *)(uintptr_t)zc.zc_nvlist_dst);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ get_zfs_ioctl_version(void)
|
|||
int ver = ZFS_IOCVER_NONE;
|
||||
|
||||
ver_size = sizeof (ver);
|
||||
sysctlbyname("vfs.zfs.version.ioctl", &ver, &ver_size, NULL, 0);
|
||||
(void) sysctlbyname("vfs.zfs.version.ioctl", &ver, &ver_size, NULL, 0);
|
||||
|
||||
return (ver);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <libzutil.h>
|
||||
#include <sys/crypto/icp.h>
|
||||
#include <sys/processor.h>
|
||||
|
|
|
|||
|
|
@ -134,7 +134,8 @@ ARC grow disabled
|
|||
.It Sy need
|
||||
ARC reclaim needed
|
||||
.It Sy free
|
||||
The ARC's idea of how much free memory there is, which includes evictable memory in the page cache.
|
||||
The ARC's idea of how much free memory there is, which includes evictable memory
|
||||
in the page cache.
|
||||
Since the ARC tries to keep
|
||||
.Sy avail
|
||||
above zero,
|
||||
|
|
@ -142,7 +143,8 @@ above zero,
|
|||
is usually more instructive to observe than
|
||||
.Sy free .
|
||||
.It Sy avail
|
||||
The ARC's idea of how much free memory is available to it, which is a bit less than
|
||||
The ARC's idea of how much free memory is available to it, which is a bit less
|
||||
than
|
||||
.Sy free .
|
||||
May temporarily be negative, in which case the ARC will reduce the target size
|
||||
.Sy c .
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ one directory.
|
|||
The options specified on the command line or in a
|
||||
.Ar runfile
|
||||
apply to individual tests in the group.
|
||||
The exception is options pertaining to pre and post scripts, which act on all tests as a group.
|
||||
The exception is options pertaining to pre and post scripts, which act on all
|
||||
tests as a group.
|
||||
Rather than running before and after each test,
|
||||
these scripts are run only once each at the start and end of the test group.
|
||||
.Ss Test Execution
|
||||
|
|
@ -254,7 +255,7 @@ Execute the post script as
|
|||
.
|
||||
.Sh EXAMPLES
|
||||
.Bl -tag -width "-h"
|
||||
.It Sy Example 1 : No Running ad-hoc tests.
|
||||
.It Sy Example 1 : No Running ad-hoc tests .
|
||||
This example demonstrates the simplest invocation of
|
||||
.Nm .
|
||||
.Bd -literal
|
||||
|
|
@ -270,7 +271,7 @@ Running Time: 00:00:07
|
|||
Percent passed: 100.0%
|
||||
Log directory: /var/tmp/test_results/20120923T180654
|
||||
.Ed
|
||||
.It Sy Example 2 : No Creating a Ar runfile No for future use.
|
||||
.It Sy Example 2 : No Creating a Ar runfile No for future use .
|
||||
This example demonstrates creating a
|
||||
.Ar runfile
|
||||
with non-default options.
|
||||
|
|
|
|||
|
|
@ -100,7 +100,8 @@ feature is now required to read the pool MOS.
|
|||
.Cm label repair
|
||||
.Ar device
|
||||
.Xc
|
||||
Repair corrupted labels by rewriting the checksum using the presumed valid contents of the label.
|
||||
Repair corrupted labels by rewriting the checksum using the presumed valid
|
||||
contents of the label.
|
||||
.El
|
||||
.
|
||||
.Sh GLOBAL OPTIONS
|
||||
|
|
|
|||
|
|
@ -114,15 +114,15 @@ Print a help summary.
|
|||
Number of vdevs.
|
||||
.It Fl s , -vdev-size Ns = (default: Sy 64M )
|
||||
Size of each vdev.
|
||||
.It Fl a , -alignment-shift Ns = (default: Sy 9 ) No (use Sy 0 No for random)
|
||||
.It Fl a , -alignment-shift Ns = (default: Sy 9 ) No (use Sy 0 No for random )
|
||||
Alignment shift used in test.
|
||||
.It Fl m , -mirror-copies Ns = (default: Sy 2 )
|
||||
Number of mirror copies.
|
||||
.It Fl r , -raid-disks Ns = (default: Sy 4 No for raidz/ Ns Sy 16 No for draid)
|
||||
.It Fl r , -raid-disks Ns = (default: Sy 4 No for raidz/ Ns Sy 16 No for draid )
|
||||
Number of raidz/draid disks.
|
||||
.It Fl R , -raid-parity Ns = (default: Sy 1 )
|
||||
Raid parity (raidz & draid).
|
||||
.It Fl K , -raid-kind Ns = Ns Sy raidz Ns | Ns Sy draid Ns | Ns Sy random No (default: Sy random )
|
||||
.It Fl K , -raid-kind Ns = Ns Sy raidz Ns | Ns Sy draid Ns | Ns Sy random No (default : Sy random )
|
||||
The kind of RAID config to use.
|
||||
With
|
||||
.Sy random
|
||||
|
|
@ -159,7 +159,8 @@ Max loops in
|
|||
.It Fl B , -alt-ztest Ns =
|
||||
Path to alternate ("older")
|
||||
.Nm ztest
|
||||
to drive, which will be used to initialise the pool, and, a stochastic half the time, to run the tests.
|
||||
to drive, which will be used to initialise the pool, and, a stochastic half the
|
||||
time, to run the tests.
|
||||
The parallel
|
||||
.Pa lib
|
||||
directory is prepended to
|
||||
|
|
@ -168,7 +169,7 @@ i.e. given
|
|||
.Fl B Pa ./chroots/lenny/usr/bin/ Ns Nm ,
|
||||
.Pa ./chroots/lenny/usr/lib
|
||||
will be loaded.
|
||||
.It Fl C , -vdev-class-state Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy random No (default: Sy random )
|
||||
.It Fl C , -vdev-class-state Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy random No (default : Sy random )
|
||||
The vdev allocation class state.
|
||||
.It Fl o , -option Ns = Ns Ar variable Ns = Ns Ar value
|
||||
Set global
|
||||
|
|
|
|||
|
|
@ -177,7 +177,8 @@ This is used to control
|
|||
how quickly taskqs ramp up the number of threads processing the queue.
|
||||
Because Linux thread creation and destruction are relatively inexpensive a
|
||||
small default value has been selected.
|
||||
This means that normally threads will be created aggressively which is desirable.
|
||||
This means that normally threads will be created aggressively which is
|
||||
desirable.
|
||||
Increasing this value will
|
||||
result in a slower thread creation rate which may be preferable for some
|
||||
configurations.
|
||||
|
|
|
|||
|
|
@ -354,7 +354,8 @@ When a vdev is added, target this number of metaslabs per top-level vdev.
|
|||
Default limit for metaslab size.
|
||||
.
|
||||
.It Sy zfs_vdev_max_auto_ashift Ns = Ns Sy 14 Pq uint
|
||||
Maximum ashift used when optimizing for logical \[->] physical sector size on new
|
||||
Maximum ashift used when optimizing for logical \[->] physical sector size on
|
||||
new
|
||||
top-level vdevs.
|
||||
May be increased up to
|
||||
.Sy ASHIFT_MAX Po 16 Pc ,
|
||||
|
|
@ -397,7 +398,8 @@ Note, that both this many milliseconds and
|
|||
TXGs must pass before unloading will occur.
|
||||
.
|
||||
.It Sy reference_history Ns = Ns Sy 3 Pq uint
|
||||
Maximum reference holders being tracked when reference_tracking_enable is active.
|
||||
Maximum reference holders being tracked when reference_tracking_enable is
|
||||
active.
|
||||
.
|
||||
.It Sy reference_tracking_enable Ns = Ns Sy 0 Ns | Ns 1 Pq int
|
||||
Track reference holders to
|
||||
|
|
@ -425,7 +427,8 @@ may wish to specify a more realistic inflation factor,
|
|||
particularly if they operate close to quota or capacity limits.
|
||||
.
|
||||
.It Sy spa_load_print_vdev_tree Ns = Ns Sy 0 Ns | Ns 1 Pq int
|
||||
Whether to print the vdev tree in the debugging message buffer during pool import.
|
||||
Whether to print the vdev tree in the debugging message buffer during pool
|
||||
import.
|
||||
.
|
||||
.It Sy spa_load_verify_data Ns = Ns Sy 1 Ns | Ns 0 Pq int
|
||||
Whether to traverse data blocks during an "extreme rewind"
|
||||
|
|
@ -655,7 +658,8 @@ which indicates that a percentage based on
|
|||
.Sy zfs_arc_meta_limit_percent
|
||||
of the ARC may be used for metadata.
|
||||
.Pp
|
||||
This value my be changed dynamically, except that must be set to an explicit value
|
||||
This value my be changed dynamically, except that must be set to an explicit
|
||||
value
|
||||
.Pq cannot be set back to Sy 0 .
|
||||
.
|
||||
.It Sy zfs_arc_meta_limit_percent Ns = Ns Sy 75 Ns % Pq u64
|
||||
|
|
@ -778,7 +782,7 @@ If nonzero, this will update
|
|||
with the new value.
|
||||
.Sy arc_p_min_shift No is used as a shift of Sy arc_c
|
||||
when calculating the minumum
|
||||
.Sy arc_p No size.
|
||||
.Sy arc_p No size .
|
||||
.
|
||||
.It Sy zfs_arc_p_dampener_disable Ns = Ns Sy 1 Ns | Ns 0 Pq int
|
||||
Disable
|
||||
|
|
@ -851,7 +855,8 @@ milliseconds during mapping generation.
|
|||
Intended for use with the test suite to throttle vdev removal speed.
|
||||
.
|
||||
.It Sy zfs_condense_indirect_obsolete_pct Ns = Ns Sy 25 Ns % Pq uint
|
||||
Minimum percent of obsolete bytes in vdev mapping required to attempt to condense
|
||||
Minimum percent of obsolete bytes in vdev mapping required to attempt to
|
||||
condense
|
||||
.Pq see Sy zfs_condense_indirect_vdevs_enable .
|
||||
Intended for use with the test suite
|
||||
to facilitate triggering condensing as needed.
|
||||
|
|
@ -864,7 +869,8 @@ if the mapping uses more than
|
|||
bytes of memory and if the obsolete space map object uses more than
|
||||
.Sy zfs_condense_max_obsolete_bytes
|
||||
bytes on-disk.
|
||||
The condensing process is an attempt to save memory by removing obsolete mappings.
|
||||
The condensing process is an attempt to save memory by removing obsolete
|
||||
mappings.
|
||||
.
|
||||
.It Sy zfs_condense_max_obsolete_bytes Ns = Ns Sy 1073741824 Ns B Po 1 GiB Pc Pq u64
|
||||
Only attempt to condense indirect vdev mappings if the on-disk size
|
||||
|
|
@ -991,7 +997,8 @@ will result in objects waiting when there is not actually contention on the
|
|||
same object.
|
||||
.
|
||||
.It Sy zfs_slow_io_events_per_second Ns = Ns Sy 20 Ns /s Pq int
|
||||
Rate limit delay and deadman zevents (which report slow I/O operations) to this many per
|
||||
Rate limit delay and deadman zevents (which report slow I/O operations) to this
|
||||
many per
|
||||
second.
|
||||
.
|
||||
.It Sy zfs_unflushed_max_mem_amt Ns = Ns Sy 1073741824 Ns B Po 1 GiB Pc Pq u64
|
||||
|
|
@ -1059,7 +1066,8 @@ Files containing more than
|
|||
will be deleted asynchronously, while smaller files are deleted synchronously.
|
||||
Decreasing this value will reduce the time spent in an
|
||||
.Xr unlink 2
|
||||
system call, at the expense of a longer delay before the freed space is available.
|
||||
system call, at the expense of a longer delay before the freed space is
|
||||
available.
|
||||
This only applies on Linux.
|
||||
.
|
||||
.It Sy zfs_dirty_data_max Ns = Pq int
|
||||
|
|
@ -1123,7 +1131,7 @@ Write operations are throttled when approaching the limit until log data is
|
|||
cleared out after transaction group sync.
|
||||
Because of some overhead, it should be set at least 2 times the size of
|
||||
.Sy zfs_dirty_data_max
|
||||
.No to prevent harming normal write throughput.
|
||||
.No to prevent harming normal write throughput .
|
||||
It also should be smaller than the size of the slog device if slog is present.
|
||||
.Pp
|
||||
Defaults to
|
||||
|
|
@ -1217,7 +1225,7 @@ the active I/O limit is linearly
|
|||
interpolated.
|
||||
.No See Sx ZFS I/O SCHEDULER .
|
||||
.
|
||||
.It Sy zfs_vdev_async_write_max_active Ns = Ns Sy 30 Pq uint
|
||||
.It Sy zfs_vdev_async_write_max_active Ns = Ns Sy 10 Pq uint
|
||||
Maximum asynchronous write I/O operations active to each device.
|
||||
.No See Sx ZFS I/O SCHEDULER .
|
||||
.
|
||||
|
|
@ -1393,7 +1401,7 @@ _
|
|||
4096 ZFS_DEBUG_LOG_SPACEMAP Verify that the log summary is consistent with the spacemap log
|
||||
and enable \fBzfs_dbgmsgs\fP for metaslab loading and flushing.
|
||||
.TE
|
||||
.Sy \& * No Requires debug build.
|
||||
.Sy \& * No Requires debug build .
|
||||
.
|
||||
.It Sy zfs_btree_verify_intensity Ns = Ns Sy 0 Pq uint
|
||||
Enables btree verification.
|
||||
|
|
@ -1409,7 +1417,7 @@ lbz r l l .
|
|||
4 Verify element order. (expensive)
|
||||
* 5 Verify unused memory is poisoned. (expensive)
|
||||
.TE
|
||||
.Sy \& * No Requires debug build.
|
||||
.Sy \& * No Requires debug build .
|
||||
.
|
||||
.It Sy zfs_free_leak_on_eio Ns = Ns Sy 0 Ns | Ns 1 Pq int
|
||||
If destroy encounters an
|
||||
|
|
@ -1583,7 +1591,8 @@ Once all groups have reached the threshold, all groups are allowed to accept
|
|||
allocations.
|
||||
The default value of
|
||||
.Sy 0
|
||||
disables the feature and causes all metaslab groups to be eligible for allocations.
|
||||
disables the feature and causes all metaslab groups to be eligible for
|
||||
allocations.
|
||||
.Pp
|
||||
This parameter allows one to deal with pools having heavily imbalanced
|
||||
vdevs such as would be the case when a new vdev has been added.
|
||||
|
|
@ -1602,7 +1611,8 @@ If enabled, ZFS will place user data indirect blocks
|
|||
into the special allocation class.
|
||||
.
|
||||
.It Sy zfs_multihost_history Ns = Ns Sy 0 Pq uint
|
||||
Historical statistics for this many latest multihost updates will be available in
|
||||
Historical statistics for this many latest multihost updates will be available
|
||||
in
|
||||
.Pa /proc/spl/kstat/zfs/ Ns Ao Ar pool Ac Ns Pa /multihost .
|
||||
.
|
||||
.It Sy zfs_multihost_interval Ns = Ns Sy 1000 Ns ms Po 1 s Pc Pq u64
|
||||
|
|
@ -1701,7 +1711,7 @@ or other data crawling operations.
|
|||
.It Sy zfs_per_txg_dirty_frees_percent Ns = Ns Sy 30 Ns % Pq u64
|
||||
Control percentage of dirtied indirect blocks from frees allowed into one TXG.
|
||||
After this threshold is crossed, additional frees will wait until the next TXG.
|
||||
.Sy 0 No disables this throttle.
|
||||
.Sy 0 No disables this throttle .
|
||||
.
|
||||
.It Sy zfs_prefetch_disable Ns = Ns Sy 0 Ns | Ns 1 Pq int
|
||||
Disable predictive prefetch.
|
||||
|
|
@ -1818,7 +1828,8 @@ A higher number indicates that we care more about how filled in a segment is,
|
|||
while a lower number indicates we care more about the size of the extent without
|
||||
considering the gaps within a segment.
|
||||
This value is only tunable upon module insertion.
|
||||
Changing the value afterwards will have no effect on scrub or resilver performance.
|
||||
Changing the value afterwards will have no effect on scrub or resilver
|
||||
performance.
|
||||
.
|
||||
.It Sy zfs_scan_issue_strategy Ns = Ns Sy 0 Pq uint
|
||||
Determines the order that data will be verified while scrubbing or resilvering:
|
||||
|
|
@ -1834,7 +1845,7 @@ By deferring scrubbing of small segments, we may later find adjacent data
|
|||
to coalesce and increase the segment size.
|
||||
.It Sy 0
|
||||
.No Use strategy Sy 1 No during normal verification
|
||||
.No and strategy Sy 2 No while taking a checkpoint.
|
||||
.No and strategy Sy 2 No while taking a checkpoint .
|
||||
.El
|
||||
.
|
||||
.It Sy zfs_scan_legacy Ns = Ns Sy 0 Ns | Ns 1 Pq int
|
||||
|
|
@ -1861,7 +1872,8 @@ This is done until we get below the soft limit.
|
|||
The fraction of the hard limit used to determined the soft limit for I/O sorting
|
||||
by the sequential scan algorithm.
|
||||
When we cross this limit from below no action is taken.
|
||||
When we cross this limit from above it is because we are issuing verification I/O.
|
||||
When we cross this limit from above it is because we are issuing verification
|
||||
I/O.
|
||||
In this case (unless the metadata scan is done) we stop issuing verification I/O
|
||||
and start scanning metadata again until we get to the hard limit.
|
||||
.
|
||||
|
|
@ -1960,7 +1972,8 @@ vdev while discarding the checkpoint.
|
|||
.
|
||||
.It Sy zfs_special_class_metadata_reserve_pct Ns = Ns Sy 25 Ns % Pq uint
|
||||
Only allow small data blocks to be allocated on the special and dedup vdev
|
||||
types when the available free space percentage on these vdevs exceeds this value.
|
||||
types when the available free space percentage on these vdevs exceeds this
|
||||
value.
|
||||
This ensures reserved space is available for pool metadata as the
|
||||
special vdevs approach capacity.
|
||||
.
|
||||
|
|
@ -1982,7 +1995,8 @@ because these will not be compressed.
|
|||
The
|
||||
.Em 128 KiB
|
||||
allocations are especially detrimental to performance
|
||||
on highly fragmented systems, which may have very few free segments of this size,
|
||||
on highly fragmented systems, which may have very few free segments of this
|
||||
size,
|
||||
and may need to load new metaslabs to satisfy these allocations.
|
||||
.
|
||||
.It Sy zfs_sync_pass_rewrite Ns = Ns Sy 2 Pq uint
|
||||
|
|
@ -1997,7 +2011,8 @@ will create a maximum of one thread per CPU.
|
|||
.
|
||||
.It Sy zfs_trim_extent_bytes_max Ns = Ns Sy 134217728 Ns B Po 128 MiB Pc Pq uint
|
||||
Maximum size of TRIM command.
|
||||
Larger ranges will be split into chunks no larger than this value before issuing.
|
||||
Larger ranges will be split into chunks no larger than this value before
|
||||
issuing.
|
||||
.
|
||||
.It Sy zfs_trim_extent_bytes_min Ns = Ns Sy 32768 Ns B Po 32 KiB Pc Pq uint
|
||||
Minimum size of TRIM commands.
|
||||
|
|
@ -2008,7 +2023,8 @@ to negatively impact overall performance.
|
|||
.
|
||||
.It Sy zfs_trim_metaslab_skip Ns = Ns Sy 0 Ns | Ns 1 Pq uint
|
||||
Skip uninitialized metaslabs during the TRIM process.
|
||||
This option is useful for pools constructed from large thinly-provisioned devices
|
||||
This option is useful for pools constructed from large thinly-provisioned
|
||||
devices
|
||||
where TRIM operations are slow.
|
||||
As a pool ages, an increasing fraction of the pool's metaslabs
|
||||
will be initialized, progressively degrading the usefulness of this option.
|
||||
|
|
@ -2028,7 +2044,8 @@ more efficient TRIM operations and the delay
|
|||
before the recently trimmed space is available for use by the device.
|
||||
.Pp
|
||||
Increasing this value will allow frees to be aggregated for a longer time.
|
||||
This will result is larger TRIM operations and potentially increased memory usage.
|
||||
This will result is larger TRIM operations and potentially increased memory
|
||||
usage.
|
||||
Decreasing this value will have the opposite effect.
|
||||
The default of
|
||||
.Sy 32
|
||||
|
|
@ -2039,7 +2056,8 @@ Historical statistics for this many latest TXGs will be available in
|
|||
.Pa /proc/spl/kstat/zfs/ Ns Ao Ar pool Ac Ns Pa /TXGs .
|
||||
.
|
||||
.It Sy zfs_txg_timeout Ns = Ns Sy 5 Ns s Pq uint
|
||||
Flush dirty data to disk at least every this many seconds (maximum TXG duration).
|
||||
Flush dirty data to disk at least every this many seconds (maximum TXG
|
||||
duration).
|
||||
.
|
||||
.It Sy zfs_vdev_aggregate_trim Ns = Ns Sy 0 Ns | Ns 1 Pq uint
|
||||
Allow TRIM I/O operations to be aggregated.
|
||||
|
|
@ -2094,7 +2112,8 @@ when I/O operations do not immediately follow one another.
|
|||
.
|
||||
.It Sy zfs_vdev_mirror_non_rotating_seek_inc Ns = Ns Sy 1 Pq int
|
||||
A number by which the balancing algorithm increments the load calculation for
|
||||
the purpose of selecting the least busy mirror member when an I/O operation lacks
|
||||
the purpose of selecting the least busy mirror member when an I/O operation
|
||||
lacks
|
||||
locality as defined by the
|
||||
.Sy zfs_vdev_mirror_rotating_seek_offset .
|
||||
Operations within this that are not immediately following the previous operation
|
||||
|
|
@ -2208,7 +2227,8 @@ the ZIL to log synchronous writes.
|
|||
However, if there are fewer than
|
||||
.Sy zfs_embedded_slog_min_ms
|
||||
metaslabs in the vdev, this functionality is disabled.
|
||||
This ensures that we don't set aside an unreasonable amount of space for the ZIL.
|
||||
This ensures that we don't set aside an unreasonable amount of space for the
|
||||
ZIL.
|
||||
.
|
||||
.It Sy zstd_earlyabort_pass Ns = Ns Sy 1 Pq uint
|
||||
Whether heuristic for detection of incompressible data with zstd levels >= 3
|
||||
|
|
@ -2435,7 +2455,8 @@ the scheduler looks for classes whose maximum has not been satisfied.
|
|||
Iteration through the I/O classes is done in the order specified above.
|
||||
No further operations are issued
|
||||
if the aggregate maximum number of concurrent operations has been hit,
|
||||
or if there are no operations queued for an I/O class that has not hit its maximum.
|
||||
or if there are no operations queued for an I/O class that has not hit its
|
||||
maximum.
|
||||
Every time an I/O operation is queued or an operation completes,
|
||||
the scheduler looks for new operations to issue.
|
||||
.Pp
|
||||
|
|
@ -2466,10 +2487,10 @@ the I/O scheduler changes the maximum number of active async write operations
|
|||
according to the amount of dirty data in the pool.
|
||||
Since both throughput and latency typically increase with the number of
|
||||
concurrent operations issued to physical devices, reducing the
|
||||
burstiness in the number of concurrent operations also stabilizes the
|
||||
response time of operations from other – and in particular synchronous – queues.
|
||||
burstiness in the number of simultaneous operations also stabilizes the
|
||||
response time of operations from other queues, in particular synchronous ones.
|
||||
In broad strokes, the I/O scheduler will issue more concurrent operations
|
||||
from the async write queue as there's more dirty data in the pool.
|
||||
from the async write queue as there is more dirty data in the pool.
|
||||
.
|
||||
.Ss Async Writes
|
||||
The number of concurrent operations issued for the async write I/O class
|
||||
|
|
@ -2534,7 +2555,8 @@ so that we only start to delay after writing at full speed
|
|||
has failed to keep up with the incoming write rate.
|
||||
The scale of the curve is defined by
|
||||
.Sy zfs_delay_scale .
|
||||
Roughly speaking, this variable determines the amount of delay at the midpoint of the curve.
|
||||
Roughly speaking, this variable determines the amount of delay at the midpoint
|
||||
of the curve.
|
||||
.Bd -literal
|
||||
delay
|
||||
10ms +-------------------------------------------------------------*+
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ module.
|
|||
.Pp
|
||||
Booting into a ZFS dataset requires
|
||||
.Sy mountpoint Ns = Ns Pa /
|
||||
to be set on the dataset containing the root filesystem (henceforth "the boot dataset") and at the very least either the
|
||||
to be set on the dataset containing the root filesystem (henceforth "the boot
|
||||
dataset") and at the very least either the
|
||||
.Sy bootfs
|
||||
property to be set to that dataset, or the
|
||||
.Sy root=
|
||||
|
|
@ -86,7 +87,8 @@ matching
|
|||
globs are deemed essential and will be mounted as well.
|
||||
.Pp
|
||||
.Xr zfs-mount-generator 8
|
||||
is recommended for proper functioning of the system afterward (correct mount properties, remounting, &c.).
|
||||
is recommended for proper functioning of the system afterward (correct mount
|
||||
properties, remounting, &c.).
|
||||
.
|
||||
.Sh CMDLINE
|
||||
.Ss Standard
|
||||
|
|
@ -122,7 +124,8 @@ cf.\&
|
|||
.Sx Temporary Mount Point Properties
|
||||
in
|
||||
.Xr zfsprops 7 .
|
||||
These properties will not last, since all filesystems will be re-mounted from the real root.
|
||||
These properties will not last, since all filesystems will be re-mounted from
|
||||
the real root.
|
||||
.
|
||||
.It Sy debug
|
||||
If specified,
|
||||
|
|
@ -263,7 +266,8 @@ Does nothing on
|
|||
.Nm systemd
|
||||
systems
|
||||
.Pq if Pa dracut-zfs-generator No succeeded .
|
||||
Otherwise, loads encryption key for the boot dataset from the console or via plymouth.
|
||||
Otherwise, loads encryption key for the boot dataset from the console or via
|
||||
plymouth.
|
||||
It may not work at all!
|
||||
.El
|
||||
.
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ Bookmarks can be created extremely quickly, compared to snapshots, and they
|
|||
consume no additional space within the pool.
|
||||
Bookmarks can also have arbitrary names, much like snapshots.
|
||||
.Pp
|
||||
Unlike snapshots, bookmarks can not be accessed through the filesystem in any way.
|
||||
Unlike snapshots, bookmarks can not be accessed through the filesystem in any
|
||||
way.
|
||||
From a storage standpoint a bookmark just provides a way to reference
|
||||
when a snapshot was created as a distinct object.
|
||||
Bookmarks are initially tied to a snapshot, not the filesystem or volume,
|
||||
|
|
|
|||
|
|
@ -192,7 +192,8 @@ and
|
|||
.It Sy guid
|
||||
The 64 bit GUID of this dataset or bookmark which does not change over its
|
||||
entire lifetime.
|
||||
When a snapshot is sent to another pool, the received snapshot has the same GUID.
|
||||
When a snapshot is sent to another pool, the received snapshot has the same
|
||||
GUID.
|
||||
Thus, the
|
||||
.Sy guid
|
||||
is suitable to identify a snapshot across pools.
|
||||
|
|
@ -259,7 +260,8 @@ this opaque token can be provided to
|
|||
to resume and complete the
|
||||
.Nm zfs Cm receive .
|
||||
.It Sy redact_snaps
|
||||
For bookmarks, this is the list of snapshot guids the bookmark contains a redaction
|
||||
For bookmarks, this is the list of snapshot guids the bookmark contains a
|
||||
redaction
|
||||
list for.
|
||||
For snapshots, this is the list of snapshot guids the snapshot is redacted with
|
||||
respect to.
|
||||
|
|
@ -798,7 +800,8 @@ Controls the compression algorithm used for this dataset.
|
|||
.Pp
|
||||
When set to
|
||||
.Sy on
|
||||
(the default), indicates that the current default compression algorithm should be used.
|
||||
(the default), indicates that the current default compression algorithm should
|
||||
be used.
|
||||
The default balances compression and decompression speed, with compression ratio
|
||||
and is expected to work well on a wide variety of workloads.
|
||||
Unlike all other settings for this property,
|
||||
|
|
@ -861,7 +864,8 @@ is equivalent to
|
|||
.Pp
|
||||
The
|
||||
.Sy zstd
|
||||
compression algorithm provides both high compression ratios and good performance.
|
||||
compression algorithm provides both high compression ratios and good
|
||||
performance.
|
||||
You can specify the
|
||||
.Sy zstd
|
||||
level by using the value
|
||||
|
|
@ -916,7 +920,8 @@ after compression, otherwise the compression will not be considered worthwhile
|
|||
and the block saved uncompressed.
|
||||
Note that when the logical block is less than
|
||||
8 times the disk sector size this effectively reduces the necessary compression
|
||||
ratio; for example, 8 KiB blocks on disks with 4 KiB disk sectors must compress to 1/2
|
||||
ratio; for example, 8 KiB blocks on disks with 4 KiB disk sectors must compress
|
||||
to 1/2
|
||||
or less of their original size.
|
||||
.It Xo
|
||||
.Sy context Ns = Ns Sy none Ns | Ns
|
||||
|
|
@ -1040,7 +1045,7 @@ file system.
|
|||
The default value is
|
||||
.Sy legacy .
|
||||
Setting this property to a value other than
|
||||
.Sy legacy No requires the Sy large_dnode No pool feature to be enabled.
|
||||
.Sy legacy No requires the Sy large_dnode No pool feature to be enabled .
|
||||
.Pp
|
||||
Consider setting
|
||||
.Sy dnodesize
|
||||
|
|
@ -1063,7 +1068,7 @@ if you need to receive a send stream of this dataset on a pool that doesn't
|
|||
enable the
|
||||
.Sy large_dnode
|
||||
feature, or if you need to import this pool on a system that doesn't support the
|
||||
.Sy large_dnode No feature.
|
||||
.Sy large_dnode No feature .
|
||||
.Pp
|
||||
This property can also be referred to by its shortened column name,
|
||||
.Sy dnsize .
|
||||
|
|
@ -1132,14 +1137,16 @@ is selected ZFS will ask for the key at the command prompt when it is required
|
|||
to access the encrypted data (see
|
||||
.Nm zfs Cm load-key
|
||||
for details).
|
||||
This setting will also allow the key to be passed in via the standard input stream,
|
||||
This setting will also allow the key to be passed in via the standard input
|
||||
stream,
|
||||
but users should be careful not to place keys which should be kept secret on
|
||||
the command line.
|
||||
If a file URI is selected, the key will be loaded from the
|
||||
specified absolute file path.
|
||||
If an HTTPS or HTTP URL is selected, it will be GETted using
|
||||
.Xr fetch 3 ,
|
||||
libcurl, or nothing, depending on compile-time configuration and run-time availability.
|
||||
libcurl, or nothing, depending on compile-time configuration and run-time
|
||||
availability.
|
||||
The
|
||||
.Sy SSL_CA_CERT_FILE
|
||||
environment variable can be set to set the location
|
||||
|
|
@ -1499,7 +1506,8 @@ future releases.
|
|||
When set to
|
||||
.Sy some ,
|
||||
ZFS stores an extra copy of only critical metadata.
|
||||
This can improve file create performance since less metadata needs to be written.
|
||||
This can improve file create performance since less metadata
|
||||
needs to be written.
|
||||
If a single on-disk block is corrupt, at worst a single user file can be lost.
|
||||
.Pp
|
||||
When set to
|
||||
|
|
@ -1642,7 +1650,8 @@ LDAP- or
|
|||
.Xr smbpasswd 5 Ns -based )
|
||||
by default.
|
||||
This means that any additional access control
|
||||
(disallow specific user specific access etc) must be done on the underlying file system.
|
||||
(disallow specific user specific access etc) must be done on the underlying file
|
||||
system.
|
||||
.It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts
|
||||
Controls whether the file system is shared via NFS, and what options are to be
|
||||
used.
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ Refer to the documentation for the ZFS
|
|||
implementation that created the pool for information about those features.
|
||||
.Pp
|
||||
Each supported feature also has a short name.
|
||||
By convention a feature's short name is the portion of its GUID which follows the
|
||||
By convention a feature's short name is the portion of its GUID which follows
|
||||
the
|
||||
.Sq \&:
|
||||
.Po
|
||||
i.e.
|
||||
|
|
@ -167,7 +168,8 @@ separated by whitespace and/or commas.
|
|||
Only features present in all files are enabled.
|
||||
.Pp
|
||||
Simple sanity checks are applied to the files:
|
||||
they must be between 1 B and 16 KiB in size, and must end with a newline character.
|
||||
they must be between 1 B and 16 KiB in size, and must end with a newline
|
||||
character.
|
||||
.Pp
|
||||
The requested features are applied when a pool is created using
|
||||
.Nm zpool Cm create Fl o Sy compatibility Ns = Ns Ar …
|
||||
|
|
@ -268,7 +270,7 @@ or when a new file is created under that filesystem. \
|
|||
The upgrade can also be triggered on filesystems via \
|
||||
Nm zfs Cm set Sy version Ns = Ns Sy current Ar fs . \
|
||||
No The upgrade process runs in the background and may take a while to complete \
|
||||
for filesystems containing large amounts of files.
|
||||
for filesystems containing large amounts of files .
|
||||
.
|
||||
.de checksum-spiel
|
||||
When the
|
||||
|
|
@ -339,7 +341,8 @@ while
|
|||
is non-zero.
|
||||
.
|
||||
.feature org.openzfs blake3 no extensible_dataset
|
||||
This feature enables the use of the BLAKE3 hash algorithm for checksum and dedup.
|
||||
This feature enables the use of the BLAKE3 hash algorithm for checksum and
|
||||
dedup.
|
||||
BLAKE3 is a secure hash algorithm focused on high performance.
|
||||
.Pp
|
||||
.checksum-spiel blake3
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ vdev type is an alias for
|
|||
.Pp
|
||||
A raidz group with
|
||||
.Em N No disks of size Em X No with Em P No parity disks can hold approximately
|
||||
.Em (N-P)*X No bytes and can withstand Em P No devices failing without losing data.
|
||||
.Em (N-P)*X No bytes and can withstand Em P No devices failing without losing data .
|
||||
The minimum number of devices in a raidz group is one more than the number of
|
||||
parity disks.
|
||||
The recommended number is between 3 and 9 to help increase performance.
|
||||
|
|
@ -99,7 +99,7 @@ The recommended number is between 3 and 9 to help increase performance.
|
|||
A variant of raidz that provides integrated distributed hot spares which
|
||||
allows for faster resilvering while retaining the benefits of raidz.
|
||||
A dRAID vdev is constructed from multiple internal raidz groups, each with
|
||||
.Em D No data devices and Em P No parity devices.
|
||||
.Em D No data devices and Em P No parity devices .
|
||||
These groups are distributed over all of the children in order to fully
|
||||
utilize the available disk performance.
|
||||
.Pp
|
||||
|
|
@ -119,7 +119,7 @@ recommended to also add a mirrored
|
|||
vdev to store those blocks.
|
||||
.Pp
|
||||
In regards to I/O, performance is similar to raidz since for any read all
|
||||
.Em D No data disks must be accessed.
|
||||
.Em D No data disks must be accessed .
|
||||
Delivered random IOPS can be reasonably approximated as
|
||||
.Sy floor((N-S)/(D+P))*single_drive_IOPS .
|
||||
.Pp
|
||||
|
|
@ -136,7 +136,7 @@ vdev type is an alias for
|
|||
.Sy draid1 .
|
||||
.Pp
|
||||
A dRAID with
|
||||
.Em N No disks of size Em X , D No data disks per redundancy group, Em P
|
||||
.Em N No disks of size Em X , D No data disks per redundancy group , Em P
|
||||
.No parity level, and Em S No distributed hot spares can hold approximately
|
||||
.Em (N-S)*(D/(D+P))*X No bytes and can withstand Em P
|
||||
devices failing without losing data.
|
||||
|
|
@ -151,7 +151,7 @@ The parity level (1-3).
|
|||
.It Ar data
|
||||
The number of data devices per redundancy group.
|
||||
In general, a smaller value of
|
||||
.Em D No will increase IOPS, improve the compression ratio,
|
||||
.Em D No will increase IOPS, improve the compression ratio ,
|
||||
and speed up resilvering at the expense of total usable capacity.
|
||||
Defaults to
|
||||
.Em 8 , No unless Em N-P-S No is less than Em 8 .
|
||||
|
|
|
|||
|
|
@ -82,11 +82,13 @@ By contrast, the
|
|||
property describes how much new data can be written to ZFS filesystems/volumes.
|
||||
The zpool
|
||||
.Sy free
|
||||
property is not generally useful for this purpose, and can be substantially more than the zfs
|
||||
property is not generally useful for this purpose, and can be substantially more
|
||||
than the zfs
|
||||
.Sy available
|
||||
space.
|
||||
This discrepancy is due to several factors, including raidz parity;
|
||||
zfs reservation, quota, refreservation, and refquota properties; and space set aside by
|
||||
zfs reservation, quota, refreservation, and refquota properties; and space set
|
||||
aside by
|
||||
.Sy spa_slop_shift
|
||||
(see
|
||||
.Xr zfs 4
|
||||
|
|
@ -272,7 +274,8 @@ using the
|
|||
command.
|
||||
.It Sy bootfs Ns = Ns Sy (unset) Ns | Ns Ar pool Ns Op / Ns Ar dataset
|
||||
Identifies the default bootable dataset for the root pool.
|
||||
This property is expected to be set mainly by the installation and upgrade programs.
|
||||
This property is expected to be set mainly by the installation and upgrade
|
||||
programs.
|
||||
Not all Linux distribution boot processes use the bootfs property.
|
||||
.It Sy cachefile Ns = Ns Ar path Ns | Ns Sy none
|
||||
Controls the location of where the pool configuration is cached.
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@
|
|||
.
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is a thin shell wrapper that at most checks the status of a dataset's container pool.
|
||||
is a thin shell wrapper that at most checks the status of a dataset's container
|
||||
pool.
|
||||
It is installed by OpenZFS because some Linux
|
||||
distributions expect a fsck helper for all filesystems.
|
||||
.Pp
|
||||
|
|
|
|||
|
|
@ -30,8 +30,10 @@ is an udev helper which parses
|
|||
to map a physical path in a storage topology to a channel name.
|
||||
The channel name is combined with a disk enclosure slot number to create
|
||||
an alias that reflects the physical location of the drive.
|
||||
This is particularly helpful when it comes to tasks like replacing failed drives.
|
||||
Slot numbers may also be remapped in case the default numbering is unsatisfactory.
|
||||
This is particularly helpful when it comes to tasks like replacing failed
|
||||
drives.
|
||||
Slot numbers may also be remapped in case the default numbering is
|
||||
unsatisfactory.
|
||||
The drive aliases will be created as symbolic links in
|
||||
.Pa /dev/disk/by-vdev .
|
||||
.Pp
|
||||
|
|
|
|||
|
|
@ -174,7 +174,8 @@ negates the effect of the flag that follows it and has no effect unless
|
|||
preceded by the
|
||||
.Ar A
|
||||
flag.
|
||||
For example, the range 0:-1:A-d will dump all object types except for directories.
|
||||
For example, the range 0:-1:A-d will dump all object types except for
|
||||
directories.
|
||||
.Pp
|
||||
.Bl -tag -compact -width Ds
|
||||
.It Sy A
|
||||
|
|
@ -274,7 +275,8 @@ the percentage of free space in each space map.
|
|||
.It Fl mmmm
|
||||
Display every spacemap record.
|
||||
.It Fl M , -metaslab-groups
|
||||
Display all "normal" vdev metaslab group information - per-vdev metaslab count, fragmentation,
|
||||
Display all "normal" vdev metaslab group information - per-vdev metaslab count,
|
||||
fragmentation,
|
||||
and free space histogram, as well as overall pool fragmentation and histogram.
|
||||
.It Fl MM
|
||||
"Special" vdevs are added to -M's normal output.
|
||||
|
|
|
|||
|
|
@ -61,8 +61,10 @@ Lock all current and future pages in the virtual memory address space.
|
|||
This may help the daemon remain responsive when the system is under heavy
|
||||
memory pressure.
|
||||
.It Fl I
|
||||
Request that the daemon idle rather than exit when the kernel modules are not loaded.
|
||||
Processing of events will start, or resume, when the kernel modules are (re)loaded.
|
||||
Request that the daemon idle rather than exit when the kernel modules are not
|
||||
loaded.
|
||||
Processing of events will start, or resume, when the kernel modules are
|
||||
(re)loaded.
|
||||
Under Linux the kernel modules cannot be unloaded while the daemon is running.
|
||||
.It Fl Z
|
||||
Zero the daemon's state, thereby allowing zevents still within the kernel
|
||||
|
|
@ -75,12 +77,14 @@ Write the daemon's process ID to the specified file.
|
|||
Custom
|
||||
.Ev $PATH
|
||||
for zedlets to use.
|
||||
Normally zedlets run in a locked-down environment, with hardcoded paths to the ZFS commands
|
||||
Normally zedlets run in a locked-down environment, with hardcoded paths to the
|
||||
ZFS commands
|
||||
.Pq Ev $ZFS , $ZPOOL , $ZED , … ,
|
||||
and a hard-coded
|
||||
.Ev $PATH .
|
||||
This is done for security reasons.
|
||||
However, the ZFS test suite uses a custom PATH for its ZFS commands, and passes it to
|
||||
However, the ZFS test suite uses a custom PATH for its ZFS commands, and passes
|
||||
it to
|
||||
.Nm
|
||||
with
|
||||
.Fl P .
|
||||
|
|
@ -111,7 +115,8 @@ Defaults to
|
|||
.El
|
||||
.Sh ZEVENTS
|
||||
A zevent is comprised of a list of nvpairs (name/value pairs).
|
||||
Each zevent contains an EID (Event IDentifier) that uniquely identifies it throughout
|
||||
Each zevent contains an EID (Event IDentifier) that uniquely identifies it
|
||||
throughout
|
||||
the lifetime of the loaded ZFS kernel module; this EID is a monotonically
|
||||
increasing integer that resets to 1 each time the kernel module is loaded.
|
||||
Each zevent also contains a class string that identifies the type of event.
|
||||
|
|
@ -217,7 +222,8 @@ The ZFS release the daemon is part of.
|
|||
.El
|
||||
.Pp
|
||||
ZEDLETs may need to call other ZFS commands.
|
||||
The installation paths of the following executables are defined as environment variables:
|
||||
The installation paths of the following executables are defined as environment
|
||||
variables:
|
||||
.Sy ZDB ,
|
||||
.Sy ZED ,
|
||||
.Sy ZFS ,
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ mount point permission is set to 755 by default, user
|
|||
will be unable to mount file systems under
|
||||
.Ar tank/cindys .
|
||||
Add an ACE similar to the following syntax to provide mount point access:
|
||||
.Dl # Cm chmod No A+user: Ns Ar cindys Ns :add_subdirectory:allow Ar /tank/cindys
|
||||
.Dl # Cm chmod No A+user : Ns Ar cindys Ns :add_subdirectory:allow Ar /tank/cindys
|
||||
.
|
||||
.Ss Example 2 : No Delegating Create Time Permissions on a ZFS Dataset
|
||||
The following example shows how to grant anyone in the group
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ property cannot be changed from within a jail.
|
|||
After a dataset is attached to a jail and the
|
||||
.Sy jailed
|
||||
property is set, a jailed file system cannot be mounted outside the jail,
|
||||
since the jail administrator might have set the mount point to an unacceptable value.
|
||||
since the jail administrator might have set the mount point to an unacceptable
|
||||
value.
|
||||
.Pp
|
||||
See
|
||||
.Xr jail 8
|
||||
|
|
|
|||
|
|
@ -236,7 +236,8 @@ Key rotation is managed by ZFS.
|
|||
Changing the user's key (e.g. a passphrase)
|
||||
does not require re-encrypting the entire dataset.
|
||||
Datasets can be scrubbed,
|
||||
resilvered, renamed, and deleted without the encryption keys being loaded (see the
|
||||
resilvered, renamed, and deleted without the encryption keys being loaded (see
|
||||
the
|
||||
.Cm load-key
|
||||
subcommand for more info on key loading).
|
||||
.Pp
|
||||
|
|
@ -291,9 +292,11 @@ Encrypted datasets may not have
|
|||
since the implementation stores some encryption metadata where the third copy
|
||||
would normally be.
|
||||
Since compression is applied before encryption, datasets may
|
||||
be vulnerable to a CRIME-like attack if applications accessing the data allow for it.
|
||||
be vulnerable to a CRIME-like attack if applications accessing the data allow
|
||||
for it.
|
||||
Deduplication with encryption will leak information about which blocks
|
||||
are equivalent in a dataset and will incur an extra CPU cost for each block written.
|
||||
are equivalent in a dataset and will incur an extra CPU cost for each block
|
||||
written.
|
||||
.
|
||||
.Sh SEE ALSO
|
||||
.Xr zfsprops 7 ,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ units for configured ZFS datasets.
|
|||
.No Skipped if Sy off .
|
||||
.No Skipped if only Sy noauto
|
||||
datasets exist for a given mountpoint and there's more than one.
|
||||
.No Datasets with Sy yes No take precedence over ones with Sy noauto No for the same mountpoint.
|
||||
.No Datasets with Sy yes No take precedence over ones with Sy noauto No for the same mountpoint .
|
||||
.No Sets logical Em noauto No flag if Sy noauto .
|
||||
Encryption roots always generate
|
||||
.Sy zfs-load-key@ Ns Ar root Ns Sy .service ,
|
||||
|
|
@ -94,14 +94,15 @@ as the mount unit.
|
|||
.No Sets Sy After Ns = for the mount unit.
|
||||
.
|
||||
.It Sy org.openzfs.systemd:wanted-by Ns = Ns Pa unit Ns Oo " " Ns Pa unit Oc Ns …
|
||||
.No Sets logical Em noauto No flag (see below).
|
||||
.No Sets logical Em noauto No flag (see below) .
|
||||
.No If not Sy none , No sets Sy WantedBy Ns = for the mount unit.
|
||||
.It Sy org.openzfs.systemd:required-by Ns = Ns Pa unit Ns Oo " " Ns Pa unit Oc Ns …
|
||||
.No Sets logical Em noauto No flag (see below).
|
||||
.No Sets logical Em noauto No flag (see below) .
|
||||
.No If not Sy none , No sets Sy RequiredBy Ns = for the mount unit.
|
||||
.
|
||||
.It Sy org.openzfs.systemd:nofail Ns = Ns (unset) Ns | Ns Sy on Ns | Ns Sy off
|
||||
Waxes or wanes strength of default reverse dependencies of the mount unit, see below.
|
||||
Waxes or wanes strength of default reverse dependencies of the mount unit, see
|
||||
below.
|
||||
.
|
||||
.It Sy org.openzfs.systemd:ignore Ns = Ns Sy on Ns | Ns Sy off
|
||||
.No Skip if Sy on .
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@ this will cause the terminal to interactively block after asking for the key.
|
|||
.It Fl v
|
||||
Report mount progress.
|
||||
.It Fl f
|
||||
Attempt to force mounting of all filesystems, even those that couldn't normally be mounted (e.g. redacted datasets).
|
||||
Attempt to force mounting of all filesystems, even those that couldn't normally
|
||||
be mounted (e.g. redacted datasets).
|
||||
.El
|
||||
.It Xo
|
||||
.Nm zfs
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ Clear subdirectories' flags recursively.
|
|||
.Ar file Ns | Ns Ar directory Ns …
|
||||
.Xc
|
||||
Check project ID and inherit flag on the files and directories:
|
||||
report entries without the project inherit flag, or with project IDs different from the
|
||||
report entries without the project inherit flag, or with project IDs different
|
||||
from the
|
||||
target directory's project ID or the one specified with
|
||||
.Fl p .
|
||||
.Bl -tag -width "-p id"
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@
|
|||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm zfs Cm promote
|
||||
command makes it possible to destroy the dataset that the clone was created from.
|
||||
command makes it possible to destroy the dataset that the clone was created
|
||||
from.
|
||||
The clone parent-child dependency relationship is reversed, so that the origin
|
||||
dataset becomes a clone of the specified dataset.
|
||||
.Pp
|
||||
|
|
|
|||
|
|
@ -215,7 +215,8 @@ compress on the receiver, unless you specify
|
|||
.Fl o Sy compress Ns = Em off .
|
||||
.It Fl w , -raw
|
||||
For encrypted datasets, send data exactly as it exists on disk.
|
||||
This allows backups to be taken even if encryption keys are not currently loaded.
|
||||
This allows backups to be taken even if encryption keys are not currently
|
||||
loaded.
|
||||
The backup may then be received on an untrusted machine since that machine will
|
||||
not have the encryption keys to read the protected data or alter it without
|
||||
being detected.
|
||||
|
|
@ -286,7 +287,8 @@ when using this flag.
|
|||
Allows sending a replication stream even when there are snapshots missing in the
|
||||
hierarchy.
|
||||
When a snapshot is missing, instead of throwing an error and aborting the send,
|
||||
a warning is printed to the standard error stream and the dataset to which it belongs
|
||||
a warning is printed to the standard error stream and the dataset to which it
|
||||
belongs
|
||||
and its descendents are skipped.
|
||||
This flag can only be used in conjunction with
|
||||
.Fl R .
|
||||
|
|
@ -354,7 +356,8 @@ then the data will be decompressed before sending so it can be split into
|
|||
smaller block sizes.
|
||||
.It Fl w , -raw
|
||||
For encrypted datasets, send data exactly as it exists on disk.
|
||||
This allows backups to be taken even if encryption keys are not currently loaded.
|
||||
This allows backups to be taken even if encryption keys are not currently
|
||||
loaded.
|
||||
The backup may then be received on an untrusted machine since that machine will
|
||||
not have the encryption keys to read the protected data or alter it without
|
||||
being detected.
|
||||
|
|
@ -386,7 +389,8 @@ If the
|
|||
.Sy lz4_compress
|
||||
feature is active on the sending system, then the receiving system must have
|
||||
that feature enabled as well.
|
||||
Datasets that are sent with this flag may not be received as an encrypted dataset,
|
||||
Datasets that are sent with this flag may not be received as an encrypted
|
||||
dataset,
|
||||
since encrypted datasets cannot use the
|
||||
.Sy embedded_data
|
||||
feature.
|
||||
|
|
@ -445,7 +449,7 @@ included in the redaction list contained in the bookmark specified by the
|
|||
flag.
|
||||
The resulting send stream is said to be redacted with respect to the snapshots
|
||||
the bookmark specified by the
|
||||
.Fl -redact No flag was created with.
|
||||
.Fl -redact No flag was created with .
|
||||
The bookmark must have been created by running
|
||||
.Nm zfs Cm redact
|
||||
on the snapshot being sent.
|
||||
|
|
@ -629,7 +633,8 @@ snapshots themselves.
|
|||
In order to make the purpose of the feature more clear, an example is provided.
|
||||
Consider a zfs filesystem containing four files.
|
||||
These files represent information for an online shopping service.
|
||||
One file contains a list of usernames and passwords, another contains purchase histories,
|
||||
One file contains a list of usernames and passwords, another contains purchase
|
||||
histories,
|
||||
a third contains click tracking data, and a fourth contains user preferences.
|
||||
The owner of this data wants to make it available for their development teams to
|
||||
test against, and their market research teams to do analysis on.
|
||||
|
|
@ -641,7 +646,8 @@ However, because all of this data is stored in one ZFS filesystem,
|
|||
it must all be sent and received together.
|
||||
In addition, the owner of the data
|
||||
wants to take advantage of features like compression, checksumming, and
|
||||
snapshots, so they do want to continue to use ZFS to store and transmit their data.
|
||||
snapshots, so they do want to continue to use ZFS to store and transmit their
|
||||
data.
|
||||
Redaction can help them do so.
|
||||
First, they would make two clones of a snapshot of the data on the source.
|
||||
In one clone, they create the setup they want their market research team to see;
|
||||
|
|
@ -654,7 +660,8 @@ They would then create a redaction bookmark on the parent snapshot,
|
|||
using snapshots on the two clones as redaction snapshots.
|
||||
The parent can then be sent, redacted, to the target
|
||||
server where the research and development teams have access.
|
||||
Finally, incremental sends from the parent snapshot to each of the clones can be sent
|
||||
Finally, incremental sends from the parent snapshot to each of the clones can be
|
||||
sent
|
||||
to and received on the target server; these snapshots are identical to the
|
||||
ones on the source, and are ready to be used, while the parent snapshot on the
|
||||
target contains none of the username and password data present on the source,
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@
|
|||
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
|
||||
.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
|
||||
.Xc
|
||||
Displays space consumed by, and quotas on, each user in the specified filesystem,
|
||||
Displays space consumed by, and quotas on, each user in the specified
|
||||
filesystem,
|
||||
snapshot, or path.
|
||||
If a path is given, the filesystem that contains that path will be used.
|
||||
This corresponds to the
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ Each number is in hexadecimal, and only one block can be specified.
|
|||
.It Fl C Ar dvas
|
||||
Inject the given error only into specific DVAs.
|
||||
The mask should be specified as a list of 0-indexed DVAs separated by commas
|
||||
.No (e.g. Ar 0,2 Ns No ).
|
||||
.No (e.g . Ar 0,2 Ns No ).
|
||||
This option is not applicable to logical data errors such as
|
||||
.Sy decompress
|
||||
and
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@ currently in use by another subsystem.
|
|||
However this check is not robust enough
|
||||
to detect simultaneous attempts to use a new device in different pools, even if
|
||||
.Sy multihost Ns = Sy enabled .
|
||||
The administrator must ensure, that simultaneous invocations of any combination of
|
||||
The administrator must ensure, that simultaneous invocations of any combination
|
||||
of
|
||||
.Nm zpool Cm replace ,
|
||||
.Nm zpool Cm create ,
|
||||
.Nm zpool Cm add ,
|
||||
|
|
|
|||
|
|
@ -108,7 +108,8 @@ Issued when a pool is exported.
|
|||
.It Sy zpool.import
|
||||
Issued when a pool is imported.
|
||||
.It Sy zpool.reguid
|
||||
Issued when a REGUID (new unique identifier for the pool have been regenerated) have been detected.
|
||||
Issued when a REGUID (new unique identifier for the pool have been regenerated)
|
||||
have been detected.
|
||||
.It Sy vdev.unknown
|
||||
Issued when the vdev is unknown.
|
||||
Such as trying to clear device errors on a vdev that have failed/been kicked
|
||||
|
|
@ -226,7 +227,8 @@ ID of vdev (if any).
|
|||
.It Sy vdev_fru
|
||||
Physical FRU location.
|
||||
.It Sy vdev_state
|
||||
State of vdev (0=uninitialized, 1=closed, 2=offline, 3=removed, 4=failed to open, 5=faulted, 6=degraded, 7=healthy).
|
||||
State of vdev (0=uninitialized, 1=closed, 2=offline, 3=removed, 4=failed to
|
||||
open, 5=faulted, 6=degraded, 7=healthy).
|
||||
.It Sy vdev_ashift
|
||||
The ashift value of the vdev.
|
||||
.It Sy vdev_complete_ts
|
||||
|
|
@ -373,7 +375,8 @@ If this field exists, it is an array of counters.
|
|||
Each entry counts bit clears in a particular bit of a big-endian uint64 type.
|
||||
The first entry counts bits
|
||||
clears of the high-order bit of the first byte, the 9th byte, etc, and the
|
||||
last entry counts clears of the low-order bit of the 8th byte, the 16th byte, etc.
|
||||
last entry counts clears of the low-order bit of the 8th byte, the 16th byte,
|
||||
etc.
|
||||
This information is useful for observing a stuck bit in a parallel data
|
||||
path, such as IDE or parallel SCSI.
|
||||
.El
|
||||
|
|
|
|||
|
|
@ -61,7 +61,8 @@ the disks.
|
|||
.It Fl a
|
||||
Exports all pools imported on the system.
|
||||
.It Fl f
|
||||
Forcefully unmount all datasets, and allow export of pools with active shared spares.
|
||||
Forcefully unmount all datasets, and allow export of pools with active shared
|
||||
spares.
|
||||
.Pp
|
||||
This command will forcefully export the pool even if it has a shared spare that
|
||||
is currently being used.
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ If
|
|||
is specified, the command exits after
|
||||
.Ar count
|
||||
reports are printed.
|
||||
The first report printed is always the statistics since boot regardless of whether
|
||||
The first report printed is always the statistics since boot regardless of
|
||||
whether
|
||||
.Ar interval
|
||||
and
|
||||
.Ar count
|
||||
|
|
@ -117,7 +118,7 @@ If
|
|||
is passed without a script name, it prints a list of all scripts.
|
||||
.Fl c
|
||||
also sets verbose mode
|
||||
.No \&( Ns Fl v Ns No \&).
|
||||
.No \&( Ns Fl v Ns No \&) .
|
||||
.Pp
|
||||
Script output should be in the form of "name=value".
|
||||
The column name is set to "name" and the value is set to "value".
|
||||
|
|
|
|||
|
|
@ -75,9 +75,11 @@ The
|
|||
feature flag must be enabled to remove a top-level vdev, see
|
||||
.Xr zpool-features 7 .
|
||||
.Pp
|
||||
A mirrored top-level device (log or data) can be removed by specifying the top-level mirror for the
|
||||
A mirrored top-level device (log or data) can be removed by specifying the top-
|
||||
level mirror for the
|
||||
same.
|
||||
Non-log devices or data devices that are part of a mirrored configuration can be removed using
|
||||
Non-log devices or data devices that are part of a mirrored configuration can be
|
||||
removed using
|
||||
the
|
||||
.Nm zpool Cm detach
|
||||
command.
|
||||
|
|
@ -137,11 +139,11 @@ config:
|
|||
.Ed
|
||||
.Pp
|
||||
The command to remove the mirrored log
|
||||
.Ar mirror-2 No is:
|
||||
.Ar mirror-2 No is :
|
||||
.Dl # Nm zpool Cm remove Ar tank mirror-2
|
||||
.Pp
|
||||
The command to remove the mirrored data
|
||||
.Ar mirror-1 No is:
|
||||
.Ar mirror-1 No is :
|
||||
.Dl # Nm zpool Cm remove Ar tank mirror-1
|
||||
.
|
||||
.Sh SEE ALSO
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@
|
|||
.
|
||||
.Sh DESCRIPTION
|
||||
Starts a resilver of the specified pools.
|
||||
If an existing resilver is already running it will be restarted from the beginning.
|
||||
If an existing resilver is already running it will be restarted from the
|
||||
beginning.
|
||||
Any drives that were scheduled for a deferred
|
||||
resilver will be added to the new one.
|
||||
This requires the
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@ again.
|
|||
Wait until scrub has completed before returning.
|
||||
.El
|
||||
.Sh EXAMPLES
|
||||
.Ss Example 1 : No Status of pool with ongoing scrub:
|
||||
.Ss Example 1
|
||||
Status of pool with ongoing scrub:
|
||||
.sp
|
||||
.Bd -literal -compact
|
||||
.No # Nm zpool Cm status
|
||||
...
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ datasets it attempts to mount as it is bringing the new pool online.
|
|||
Note that if any datasets have
|
||||
.Sy keylocation Ns = Ns Sy prompt ,
|
||||
this command will block waiting for the keys to be entered.
|
||||
Without this flag, encrypted datasets will be left unavailable until the keys are loaded.
|
||||
Without this flag, encrypted datasets will be left unavailable until the keys
|
||||
are loaded.
|
||||
.It Fl n
|
||||
Do a dry-run
|
||||
.Pq Qq No-op
|
||||
|
|
|
|||
|
|
@ -98,7 +98,8 @@ This is the number of I/O operations that didn't complete in
|
|||
.Sy zio_slow_io_ms
|
||||
milliseconds
|
||||
.Pq Sy 30000 No by default .
|
||||
This does not necessarily mean the I/O operations failed to complete, just took an
|
||||
This does not necessarily mean the I/O operations failed to complete, just took
|
||||
an
|
||||
unreasonably long amount of time.
|
||||
This may indicate a problem with the underlying storage.
|
||||
.It Fl t
|
||||
|
|
|
|||
|
|
@ -92,7 +92,8 @@ for details on compatibility with systems that support feature flags, but do not
|
|||
support all features enabled on the pool.
|
||||
.Bl -tag -width Ds
|
||||
.It Fl a
|
||||
Enables all supported features (from specified compatibility sets, if any) on all
|
||||
Enables all supported features (from specified compatibility sets, if any) on
|
||||
all
|
||||
pools.
|
||||
.It Fl V Ar version
|
||||
Upgrade to the specified legacy version.
|
||||
|
|
|
|||
|
|
@ -121,7 +121,8 @@ or removes the specified device from the pool.
|
|||
.It Xr zpool-replace 8
|
||||
Replaces an existing device (which may be faulted) with a new one.
|
||||
.It Xr zpool-split 8
|
||||
Creates a new pool by splitting all mirrors in an existing pool (which decreases its redundancy).
|
||||
Creates a new pool by splitting all mirrors in an existing pool (which decreases
|
||||
its redundancy).
|
||||
.El
|
||||
.
|
||||
.Ss Properties
|
||||
|
|
@ -174,7 +175,8 @@ Checkpoints the current state of
|
|||
which can be later restored by
|
||||
.Nm zpool Cm import Fl -rewind-to-checkpoint .
|
||||
.It Xr zpool-trim 8
|
||||
Initiates an immediate on-demand TRIM operation for all of the free space in a pool.
|
||||
Initiates an immediate on-demand TRIM operation for all of the free space in a
|
||||
pool.
|
||||
This operation informs the underlying storage devices of all blocks
|
||||
in the pool which are no longer allocated and allows thinly provisioned
|
||||
devices to reclaim the space.
|
||||
|
|
@ -201,7 +203,8 @@ pool.
|
|||
Takes the specified physical device offline or brings it online.
|
||||
.It Xr zpool-resilver 8
|
||||
Starts a resilver.
|
||||
If an existing resilver is already running it will be restarted from the beginning.
|
||||
If an existing resilver is already running it will be restarted from the
|
||||
beginning.
|
||||
.It Xr zpool-reopen 8
|
||||
Reopen all the vdevs associated with the pool.
|
||||
.It Xr zpool-clear 8
|
||||
|
|
@ -384,11 +387,11 @@ config:
|
|||
.Ed
|
||||
.Pp
|
||||
The command to remove the mirrored log
|
||||
.Ar mirror-2 No is:
|
||||
.Ar mirror-2 No is :
|
||||
.Dl # Nm zpool Cm remove Ar tank mirror-2
|
||||
.Pp
|
||||
The command to remove the mirrored data
|
||||
.Ar mirror-1 No is:
|
||||
.Ar mirror-1 No is :
|
||||
.Dl # Nm zpool Cm remove Ar tank mirror-1
|
||||
.
|
||||
.Ss Example 15 : No Displaying expanded space on a device
|
||||
|
|
|
|||
|
|
@ -42,6 +42,12 @@ endif
|
|||
asflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
|
||||
ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
|
||||
|
||||
ifeq ($(CONFIG_ARM64),y)
|
||||
CFLAGS_REMOVE_zcommon/zfs_fletcher_aarch64_neon.o += -mgeneral-regs-only
|
||||
CFLAGS_REMOVE_zfs/vdev_raidz_math_aarch64_neon.o += -mgeneral-regs-only
|
||||
CFLAGS_REMOVE_zfs/vdev_raidz_math_aarch64_neonx2.o += -mgeneral-regs-only
|
||||
endif
|
||||
|
||||
# Suppress unused-value warnings in sparc64 architecture headers
|
||||
ccflags-$(CONFIG_SPARC64) += -Wno-unused-value
|
||||
|
||||
|
|
|
|||
|
|
@ -424,13 +424,15 @@ icp_aes_impl_get(char *buffer, zfs_kernel_param_t *kp)
|
|||
/* list mandatory options */
|
||||
for (i = 0; i < ARRAY_SIZE(aes_impl_opts); i++) {
|
||||
fmt = (impl == aes_impl_opts[i].sel) ? "[%s] " : "%s ";
|
||||
cnt += sprintf(buffer + cnt, fmt, aes_impl_opts[i].name);
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt,
|
||||
aes_impl_opts[i].name);
|
||||
}
|
||||
|
||||
/* list all supported implementations */
|
||||
for (i = 0; i < aes_supp_impl_cnt; i++) {
|
||||
fmt = (i == impl) ? "[%s] " : "%s ";
|
||||
cnt += sprintf(buffer + cnt, fmt, aes_supp_impl[i]->name);
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt,
|
||||
aes_supp_impl[i]->name);
|
||||
}
|
||||
|
||||
return (cnt);
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ static size_t compress_parents_parallel(const blake3_ops_t *ops,
|
|||
const uint8_t *child_chaining_values, size_t num_chaining_values,
|
||||
const uint32_t key[8], uint8_t flags, uint8_t *out)
|
||||
{
|
||||
const uint8_t *parents_array[MAX_SIMD_DEGREE_OR_2];
|
||||
const uint8_t *parents_array[MAX_SIMD_DEGREE_OR_2] = {0};
|
||||
size_t parents_array_len = 0;
|
||||
|
||||
while (num_chaining_values - (2 * parents_array_len) >= 2) {
|
||||
|
|
|
|||
|
|
@ -282,16 +282,16 @@ blake3_param_get(char *buffer, zfs_kernel_param_t *unused)
|
|||
|
||||
/* cycling */
|
||||
fmt = IMPL_FMT(impl, IMPL_CYCLE);
|
||||
cnt += sprintf(buffer + cnt, fmt, "cycle");
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt, "cycle");
|
||||
|
||||
/* list fastest */
|
||||
fmt = IMPL_FMT(impl, IMPL_FASTEST);
|
||||
cnt += sprintf(buffer + cnt, fmt, "fastest");
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt, "fastest");
|
||||
|
||||
/* list all supported implementations */
|
||||
for (uint32_t i = 0; i < blake3_supp_impls_cnt; ++i) {
|
||||
fmt = IMPL_FMT(impl, i);
|
||||
cnt += sprintf(buffer + cnt, fmt,
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt,
|
||||
blake3_supp_impls[i]->name);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -346,9 +346,11 @@ Q256(size_t bitlen, const uint32_t *data, uint32_t *restrict p)
|
|||
* which only goes over it by a hair (1248 bytes on ARM32).
|
||||
*/
|
||||
#include <sys/isa_defs.h> /* for _ILP32 */
|
||||
#ifdef _ILP32 /* We're 32-bit, assume small stack frames */
|
||||
#if defined(_ILP32) /* We're 32-bit, assume small stack frames */
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Wframe-larger-than="
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__IBMC__) && defined(_AIX) && defined(__64BIT__)
|
||||
static inline size_t
|
||||
|
|
|
|||
|
|
@ -1020,13 +1020,15 @@ icp_gcm_impl_get(char *buffer, zfs_kernel_param_t *kp)
|
|||
}
|
||||
#endif
|
||||
fmt = (impl == gcm_impl_opts[i].sel) ? "[%s] " : "%s ";
|
||||
cnt += sprintf(buffer + cnt, fmt, gcm_impl_opts[i].name);
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt,
|
||||
gcm_impl_opts[i].name);
|
||||
}
|
||||
|
||||
/* list all supported implementations */
|
||||
for (i = 0; i < gcm_supp_impl_cnt; i++) {
|
||||
fmt = (i == impl) ? "[%s] " : "%s ";
|
||||
cnt += sprintf(buffer + cnt, fmt, gcm_supp_impl[i]->name);
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt,
|
||||
gcm_supp_impl[i]->name);
|
||||
}
|
||||
|
||||
return (cnt);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@
|
|||
* the #pragma here to ignore the warning.
|
||||
*/
|
||||
#if defined(_ILP32) || defined(__powerpc) /* Assume small stack */
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Wframe-larger-than="
|
||||
#endif
|
||||
/*
|
||||
* We're running on 32-bit, don't unroll loops to save stack frame space
|
||||
*
|
||||
|
|
|
|||
|
|
@ -170,7 +170,8 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) {
|
|||
/*
|
||||
* Silence infinite recursion warning which was added to -Wall in gcc 12.1
|
||||
*/
|
||||
#if defined(HAVE_INFINITE_RECURSION)
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(HAVE_KERNEL_INFINITE_RECURSION)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Winfinite-recursion"
|
||||
#endif
|
||||
|
|
@ -196,7 +197,8 @@ l_noret luaD_throw (lua_State *L, int errcode) {
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_INFINITE_RECURSION)
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(HAVE_INFINITE_RECURSION)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ static lua_Number lua_strx2number (const char *s, char **endptr) {
|
|||
*endptr = cast(char *, s); /* valid up to here */
|
||||
ret:
|
||||
if (neg) r = -r;
|
||||
return (r * (1 << e));
|
||||
return ((e >= 0) ? (r * (1ULL << e)) : (r / (1ULL << -e)));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2483,7 +2483,7 @@ zfs_zaccess_rwx(znode_t *zp, mode_t mode, int flags, cred_t *cr,
|
|||
* Access function for secpolicy_vnode_setattr
|
||||
*/
|
||||
int
|
||||
zfs_zaccess_unix(znode_t *zp, mode_t mode, cred_t *cr)
|
||||
zfs_zaccess_unix(void *zp, int mode, cred_t *cr)
|
||||
{
|
||||
int v4_mode = zfs_unix_to_v4(mode >> 6);
|
||||
|
||||
|
|
|
|||
|
|
@ -438,10 +438,6 @@ zfs_sync(vfs_t *vfsp, int waitfor)
|
|||
dsl_pool_t *dp;
|
||||
int error;
|
||||
|
||||
error = vfs_stdsync(vfsp, waitfor);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
if ((error = zfs_enter(zfsvfs, FTAG)) != 0)
|
||||
return (error);
|
||||
dp = dmu_objset_pool(zfsvfs->z_os);
|
||||
|
|
@ -725,7 +721,7 @@ zfs_register_callbacks(vfs_t *vfsp)
|
|||
nbmand = B_FALSE;
|
||||
} else if (vfs_optionisset(vfsp, MNTOPT_NBMAND, NULL)) {
|
||||
nbmand = B_TRUE;
|
||||
} else if ((error = dsl_prop_get_int_ds(ds, "nbmand", &nbmand) != 0)) {
|
||||
} else if ((error = dsl_prop_get_int_ds(ds, "nbmand", &nbmand)) != 0) {
|
||||
dsl_pool_config_exit(dmu_objset_pool(os), FTAG);
|
||||
return (error);
|
||||
}
|
||||
|
|
@ -1328,15 +1324,8 @@ zfs_mount(vfs_t *vfsp)
|
|||
}
|
||||
|
||||
fetch_osname_options(osname, &checkpointrewind);
|
||||
|
||||
/*
|
||||
* TBD: Mounting ZFS as root causes a panic in zfsctl_is_node()
|
||||
* add temporary workaround until issue is resolved
|
||||
*/
|
||||
if ((vfsp->vfs_flag & MNT_ROOTFS) != 0 &&
|
||||
(vfsp->vfs_flag & MNT_UPDATE) == 0) {
|
||||
isctlsnap = (zfsctl_is_node(mvp) && strchr(osname, '@') != NULL);
|
||||
}
|
||||
isctlsnap = (mvp != NULL && zfsctl_is_node(mvp) &&
|
||||
strchr(osname, '@') != NULL);
|
||||
|
||||
/*
|
||||
* Check for mount privilege?
|
||||
|
|
|
|||
|
|
@ -4724,7 +4724,6 @@ static int
|
|||
zfs_freebsd_fsync(struct vop_fsync_args *ap)
|
||||
{
|
||||
|
||||
vop_stdfsync(ap);
|
||||
return (zfs_fsync(VTOZ(ap->a_vp), 0, ap->a_td->td_ucred));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -254,8 +254,10 @@ __div_u64(uint64_t u, uint32_t v)
|
|||
* replacements for libgcc-provided functions and will never be called
|
||||
* directly.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Implementation of 64-bit unsigned division for 32-bit machines.
|
||||
|
|
@ -449,7 +451,9 @@ __aeabi_ldivmod(int64_t u, int64_t v)
|
|||
EXPORT_SYMBOL(__aeabi_ldivmod);
|
||||
#endif /* __arm || __arm__ */
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* BITS_PER_LONG */
|
||||
|
||||
|
|
|
|||
|
|
@ -2788,7 +2788,7 @@ zfs_zaccess_rwx(znode_t *zp, mode_t mode, int flags, cred_t *cr,
|
|||
* Access function for secpolicy_vnode_setattr
|
||||
*/
|
||||
int
|
||||
zfs_zaccess_unix(znode_t *zp, mode_t mode, cred_t *cr)
|
||||
zfs_zaccess_unix(void *zp, int mode, cred_t *cr)
|
||||
{
|
||||
int v4_mode = zfs_unix_to_v4(mode >> 6);
|
||||
|
||||
|
|
|
|||
|
|
@ -2186,7 +2186,7 @@ top:
|
|||
vap->va_mask &= ~trim_mask;
|
||||
}
|
||||
err = secpolicy_vnode_setattr(cr, ip, vap, &oldva, flags,
|
||||
(int (*)(void *, int, cred_t *))zfs_zaccess_unix, zp);
|
||||
zfs_zaccess_unix, zp);
|
||||
if (err)
|
||||
goto out3;
|
||||
|
||||
|
|
|
|||
|
|
@ -169,8 +169,7 @@ zfs_znode_hold_cache_constructor(void *buf, void *arg, int kmflags)
|
|||
znode_hold_t *zh = buf;
|
||||
|
||||
mutex_init(&zh->zh_lock, NULL, MUTEX_DEFAULT, NULL);
|
||||
zfs_refcount_create(&zh->zh_refcount);
|
||||
zh->zh_obj = ZFS_NO_OBJECT;
|
||||
zh->zh_refcount = 0;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
@ -182,7 +181,6 @@ zfs_znode_hold_cache_destructor(void *buf, void *arg)
|
|||
znode_hold_t *zh = buf;
|
||||
|
||||
mutex_destroy(&zh->zh_lock);
|
||||
zfs_refcount_destroy(&zh->zh_refcount);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -281,26 +279,26 @@ zfs_znode_hold_enter(zfsvfs_t *zfsvfs, uint64_t obj)
|
|||
boolean_t found = B_FALSE;
|
||||
|
||||
zh_new = kmem_cache_alloc(znode_hold_cache, KM_SLEEP);
|
||||
zh_new->zh_obj = obj;
|
||||
search.zh_obj = obj;
|
||||
|
||||
mutex_enter(&zfsvfs->z_hold_locks[i]);
|
||||
zh = avl_find(&zfsvfs->z_hold_trees[i], &search, NULL);
|
||||
if (likely(zh == NULL)) {
|
||||
zh = zh_new;
|
||||
zh->zh_obj = obj;
|
||||
avl_add(&zfsvfs->z_hold_trees[i], zh);
|
||||
} else {
|
||||
ASSERT3U(zh->zh_obj, ==, obj);
|
||||
found = B_TRUE;
|
||||
}
|
||||
zfs_refcount_add(&zh->zh_refcount, NULL);
|
||||
zh->zh_refcount++;
|
||||
ASSERT3S(zh->zh_refcount, >, 0);
|
||||
mutex_exit(&zfsvfs->z_hold_locks[i]);
|
||||
|
||||
if (found == B_TRUE)
|
||||
kmem_cache_free(znode_hold_cache, zh_new);
|
||||
|
||||
ASSERT(MUTEX_NOT_HELD(&zh->zh_lock));
|
||||
ASSERT3S(zfs_refcount_count(&zh->zh_refcount), >, 0);
|
||||
mutex_enter(&zh->zh_lock);
|
||||
|
||||
return (zh);
|
||||
|
|
@ -313,11 +311,11 @@ zfs_znode_hold_exit(zfsvfs_t *zfsvfs, znode_hold_t *zh)
|
|||
boolean_t remove = B_FALSE;
|
||||
|
||||
ASSERT(zfs_znode_held(zfsvfs, zh->zh_obj));
|
||||
ASSERT3S(zfs_refcount_count(&zh->zh_refcount), >, 0);
|
||||
mutex_exit(&zh->zh_lock);
|
||||
|
||||
mutex_enter(&zfsvfs->z_hold_locks[i]);
|
||||
if (zfs_refcount_remove(&zh->zh_refcount, NULL) == 0) {
|
||||
ASSERT3S(zh->zh_refcount, >, 0);
|
||||
if (--zh->zh_refcount == 0) {
|
||||
avl_remove(&zfsvfs->z_hold_trees[i], zh);
|
||||
remove = B_TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,7 +229,24 @@ zio_crypt_key_init(uint64_t crypt, zio_crypt_key_t *key)
|
|||
ASSERT(key != NULL);
|
||||
ASSERT3U(crypt, <, ZIO_CRYPT_FUNCTIONS);
|
||||
|
||||
/*
|
||||
* Workaround for GCC 12+ with UBSan enabled deficencies.
|
||||
*
|
||||
* GCC 12+ invoked with -fsanitize=undefined incorrectly reports the code
|
||||
* below as violating -Warray-bounds
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
((!defined(_KERNEL) && defined(ZFS_UBSAN_ENABLED)) || \
|
||||
defined(CONFIG_UBSAN))
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#endif
|
||||
keydata_len = zio_crypt_table[crypt].ci_keylen;
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
((!defined(_KERNEL) && defined(ZFS_UBSAN_ENABLED)) || \
|
||||
defined(CONFIG_UBSAN))
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
memset(key, 0, sizeof (zio_crypt_key_t));
|
||||
rw_init(&key->zk_salt_lock, NULL, RW_DEFAULT, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -903,12 +903,12 @@ fletcher_4_param_get(char *buffer, zfs_kernel_param_t *unused)
|
|||
|
||||
/* list fastest */
|
||||
fmt = IMPL_FMT(impl, IMPL_FASTEST);
|
||||
cnt += sprintf(buffer + cnt, fmt, "fastest");
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt, "fastest");
|
||||
|
||||
/* list all supported implementations */
|
||||
for (uint32_t i = 0; i < fletcher_4_supp_impls_cnt; ++i) {
|
||||
fmt = IMPL_FMT(impl, i);
|
||||
cnt += sprintf(buffer + cnt, fmt,
|
||||
cnt += kmem_scnprintf(buffer + cnt, PAGE_SIZE - cnt, fmt,
|
||||
fletcher_4_supp_impls[i]->name);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ ZFS_NO_SANITIZE_UNDEFINED
|
|||
static void
|
||||
fletcher_4_aarch64_neon_init(fletcher_4_ctx_t *ctx)
|
||||
{
|
||||
kfpu_begin();
|
||||
memset(ctx->aarch64_neon, 0, 4 * sizeof (zfs_fletcher_aarch64_neon_t));
|
||||
}
|
||||
|
||||
|
|
@ -69,6 +70,7 @@ fletcher_4_aarch64_neon_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp)
|
|||
8 * ctx->aarch64_neon[3].v[1] - 8 * ctx->aarch64_neon[2].v[1] +
|
||||
ctx->aarch64_neon[1].v[1];
|
||||
ZIO_SET_CHECKSUM(zcp, A, B, C, D);
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
#define NEON_INIT_LOOP() \
|
||||
|
|
@ -146,17 +148,13 @@ unsigned char TMP2 __attribute__((vector_size(16)));
|
|||
unsigned char SRC __attribute__((vector_size(16)));
|
||||
#endif
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
NEON_INIT_LOOP();
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
NEON_MAIN_LOOP(NEON_DONT_REVERSE);
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
NEON_FINI_LOOP();
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -185,17 +183,13 @@ unsigned char TMP2 __attribute__((vector_size(16)));
|
|||
unsigned char SRC __attribute__((vector_size(16)));
|
||||
#endif
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
NEON_INIT_LOOP();
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
NEON_MAIN_LOOP(NEON_DO_REVERSE);
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
NEON_FINI_LOOP();
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
static boolean_t fletcher_4_aarch64_neon_valid(void)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ ZFS_NO_SANITIZE_UNDEFINED
|
|||
static void
|
||||
fletcher_4_avx512f_init(fletcher_4_ctx_t *ctx)
|
||||
{
|
||||
kfpu_begin();
|
||||
memset(ctx->avx512, 0, 4 * sizeof (zfs_fletcher_avx512_t));
|
||||
}
|
||||
|
||||
|
|
@ -72,6 +73,7 @@ fletcher_4_avx512f_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp)
|
|||
}
|
||||
|
||||
ZIO_SET_CHECKSUM(zcp, A, B, C, D);
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
#define FLETCHER_4_AVX512_RESTORE_CTX(ctx) \
|
||||
|
|
@ -96,21 +98,17 @@ fletcher_4_avx512f_native(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
const uint32_t *ip = buf;
|
||||
const uint32_t *ipend = (uint32_t *)((uint8_t *)ip + size);
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
FLETCHER_4_AVX512_RESTORE_CTX(ctx);
|
||||
|
||||
for (; ip < ipend; ip += 8) {
|
||||
do {
|
||||
__asm("vpmovzxdq %0, %%zmm4"::"m" (*ip));
|
||||
__asm("vpaddq %zmm4, %zmm0, %zmm0");
|
||||
__asm("vpaddq %zmm0, %zmm1, %zmm1");
|
||||
__asm("vpaddq %zmm1, %zmm2, %zmm2");
|
||||
__asm("vpaddq %zmm2, %zmm3, %zmm3");
|
||||
}
|
||||
} while ((ip += 8) < ipend);
|
||||
|
||||
FLETCHER_4_AVX512_SAVE_CTX(ctx);
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
STACK_FRAME_NON_STANDARD(fletcher_4_avx512f_native);
|
||||
|
||||
|
|
@ -122,8 +120,6 @@ fletcher_4_avx512f_byteswap(fletcher_4_ctx_t *ctx, const void *buf,
|
|||
const uint32_t *ip = buf;
|
||||
const uint32_t *ipend = (uint32_t *)((uint8_t *)ip + size);
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
FLETCHER_4_AVX512_RESTORE_CTX(ctx);
|
||||
|
||||
__asm("vpbroadcastq %0, %%zmm8" :: "r" (byteswap_mask));
|
||||
|
|
@ -131,7 +127,7 @@ fletcher_4_avx512f_byteswap(fletcher_4_ctx_t *ctx, const void *buf,
|
|||
__asm("vpsllq $16, %zmm8, %zmm10");
|
||||
__asm("vpsllq $24, %zmm8, %zmm11");
|
||||
|
||||
for (; ip < ipend; ip += 8) {
|
||||
do {
|
||||
__asm("vpmovzxdq %0, %%zmm5"::"m" (*ip));
|
||||
|
||||
__asm("vpsrlq $24, %zmm5, %zmm6");
|
||||
|
|
@ -150,11 +146,9 @@ fletcher_4_avx512f_byteswap(fletcher_4_ctx_t *ctx, const void *buf,
|
|||
__asm("vpaddq %zmm0, %zmm1, %zmm1");
|
||||
__asm("vpaddq %zmm1, %zmm2, %zmm2");
|
||||
__asm("vpaddq %zmm2, %zmm3, %zmm3");
|
||||
}
|
||||
} while ((ip += 8) < ipend);
|
||||
|
||||
FLETCHER_4_AVX512_SAVE_CTX(ctx)
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
STACK_FRAME_NON_STANDARD(fletcher_4_avx512f_byteswap);
|
||||
|
||||
|
|
@ -189,13 +183,11 @@ fletcher_4_avx512bw_byteswap(fletcher_4_ctx_t *ctx, const void *buf,
|
|||
const uint32_t *ip = buf;
|
||||
const uint32_t *ipend = (uint32_t *)((uint8_t *)ip + size);
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
FLETCHER_4_AVX512_RESTORE_CTX(ctx);
|
||||
|
||||
__asm("vmovdqu64 %0, %%zmm5" :: "m" (mask));
|
||||
|
||||
for (; ip < ipend; ip += 8) {
|
||||
do {
|
||||
__asm("vpmovzxdq %0, %%zmm4"::"m" (*ip));
|
||||
|
||||
__asm("vpshufb %zmm5, %zmm4, %zmm4");
|
||||
|
|
@ -204,11 +196,9 @@ fletcher_4_avx512bw_byteswap(fletcher_4_ctx_t *ctx, const void *buf,
|
|||
__asm("vpaddq %zmm0, %zmm1, %zmm1");
|
||||
__asm("vpaddq %zmm1, %zmm2, %zmm2");
|
||||
__asm("vpaddq %zmm2, %zmm3, %zmm3");
|
||||
}
|
||||
} while ((ip += 8) < ipend);
|
||||
|
||||
FLETCHER_4_AVX512_SAVE_CTX(ctx)
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
STACK_FRAME_NON_STANDARD(fletcher_4_avx512bw_byteswap);
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ ZFS_NO_SANITIZE_UNDEFINED
|
|||
static void
|
||||
fletcher_4_avx2_init(fletcher_4_ctx_t *ctx)
|
||||
{
|
||||
kfpu_begin();
|
||||
memset(ctx->avx, 0, 4 * sizeof (zfs_fletcher_avx_t));
|
||||
}
|
||||
|
||||
|
|
@ -81,6 +82,7 @@ fletcher_4_avx2_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp)
|
|||
64 * ctx->avx[3].v[3];
|
||||
|
||||
ZIO_SET_CHECKSUM(zcp, A, B, C, D);
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
#define FLETCHER_4_AVX2_RESTORE_CTX(ctx) \
|
||||
|
|
@ -106,22 +108,18 @@ fletcher_4_avx2_native(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
const uint64_t *ip = buf;
|
||||
const uint64_t *ipend = (uint64_t *)((uint8_t *)ip + size);
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
FLETCHER_4_AVX2_RESTORE_CTX(ctx);
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
asm volatile("vpmovzxdq %0, %%ymm4"::"m" (*ip));
|
||||
asm volatile("vpaddq %ymm4, %ymm0, %ymm0");
|
||||
asm volatile("vpaddq %ymm0, %ymm1, %ymm1");
|
||||
asm volatile("vpaddq %ymm1, %ymm2, %ymm2");
|
||||
asm volatile("vpaddq %ymm2, %ymm3, %ymm3");
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
FLETCHER_4_AVX2_SAVE_CTX(ctx);
|
||||
asm volatile("vzeroupper");
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -134,13 +132,11 @@ fletcher_4_avx2_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
const uint64_t *ip = buf;
|
||||
const uint64_t *ipend = (uint64_t *)((uint8_t *)ip + size);
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
FLETCHER_4_AVX2_RESTORE_CTX(ctx);
|
||||
|
||||
asm volatile("vmovdqu %0, %%ymm5" :: "m" (mask));
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
asm volatile("vpmovzxdq %0, %%ymm4"::"m" (*ip));
|
||||
asm volatile("vpshufb %ymm5, %ymm4, %ymm4");
|
||||
|
||||
|
|
@ -148,12 +144,10 @@ fletcher_4_avx2_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
asm volatile("vpaddq %ymm0, %ymm1, %ymm1");
|
||||
asm volatile("vpaddq %ymm1, %ymm2, %ymm2");
|
||||
asm volatile("vpaddq %ymm2, %ymm3, %ymm3");
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
FLETCHER_4_AVX2_SAVE_CTX(ctx);
|
||||
asm volatile("vzeroupper");
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
static boolean_t fletcher_4_avx2_valid(void)
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ ZFS_NO_SANITIZE_UNDEFINED
|
|||
static void
|
||||
fletcher_4_sse2_init(fletcher_4_ctx_t *ctx)
|
||||
{
|
||||
kfpu_begin();
|
||||
memset(ctx->sse, 0, 4 * sizeof (zfs_fletcher_sse_t));
|
||||
}
|
||||
|
||||
|
|
@ -80,6 +81,7 @@ fletcher_4_sse2_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp)
|
|||
8 * ctx->sse[2].v[1] + ctx->sse[1].v[1];
|
||||
|
||||
ZIO_SET_CHECKSUM(zcp, A, B, C, D);
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
#define FLETCHER_4_SSE_RESTORE_CTX(ctx) \
|
||||
|
|
@ -104,13 +106,11 @@ fletcher_4_sse2_native(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
const uint64_t *ip = buf;
|
||||
const uint64_t *ipend = (uint64_t *)((uint8_t *)ip + size);
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
FLETCHER_4_SSE_RESTORE_CTX(ctx);
|
||||
|
||||
asm volatile("pxor %xmm4, %xmm4");
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
asm volatile("movdqu %0, %%xmm5" :: "m"(*ip));
|
||||
asm volatile("movdqa %xmm5, %xmm6");
|
||||
asm volatile("punpckldq %xmm4, %xmm5");
|
||||
|
|
@ -123,11 +123,9 @@ fletcher_4_sse2_native(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
asm volatile("paddq %xmm0, %xmm1");
|
||||
asm volatile("paddq %xmm1, %xmm2");
|
||||
asm volatile("paddq %xmm2, %xmm3");
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
FLETCHER_4_SSE_SAVE_CTX(ctx);
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -136,11 +134,9 @@ fletcher_4_sse2_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
const uint32_t *ip = buf;
|
||||
const uint32_t *ipend = (uint32_t *)((uint8_t *)ip + size);
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
FLETCHER_4_SSE_RESTORE_CTX(ctx);
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
uint32_t scratch1 = BSWAP_32(ip[0]);
|
||||
uint32_t scratch2 = BSWAP_32(ip[1]);
|
||||
asm volatile("movd %0, %%xmm5" :: "r"(scratch1));
|
||||
|
|
@ -150,11 +146,9 @@ fletcher_4_sse2_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
asm volatile("paddq %xmm0, %xmm1");
|
||||
asm volatile("paddq %xmm1, %xmm2");
|
||||
asm volatile("paddq %xmm2, %xmm3");
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
FLETCHER_4_SSE_SAVE_CTX(ctx);
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
static boolean_t fletcher_4_sse2_valid(void)
|
||||
|
|
@ -186,14 +180,12 @@ fletcher_4_ssse3_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
const uint64_t *ip = buf;
|
||||
const uint64_t *ipend = (uint64_t *)((uint8_t *)ip + size);
|
||||
|
||||
kfpu_begin();
|
||||
|
||||
FLETCHER_4_SSE_RESTORE_CTX(ctx);
|
||||
|
||||
asm volatile("movdqu %0, %%xmm7"::"m" (mask));
|
||||
asm volatile("pxor %xmm4, %xmm4");
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
asm volatile("movdqu %0, %%xmm5"::"m" (*ip));
|
||||
asm volatile("pshufb %xmm7, %xmm5");
|
||||
asm volatile("movdqa %xmm5, %xmm6");
|
||||
|
|
@ -207,11 +199,9 @@ fletcher_4_ssse3_byteswap(fletcher_4_ctx_t *ctx, const void *buf, uint64_t size)
|
|||
asm volatile("paddq %xmm0, %xmm1");
|
||||
asm volatile("paddq %xmm1, %xmm2");
|
||||
asm volatile("paddq %xmm2, %xmm3");
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
FLETCHER_4_SSE_SAVE_CTX(ctx);
|
||||
|
||||
kfpu_end();
|
||||
}
|
||||
|
||||
static boolean_t fletcher_4_ssse3_valid(void)
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ fletcher_4_superscalar_native(fletcher_4_ctx_t *ctx,
|
|||
c2 = ctx->superscalar[2].v[1];
|
||||
d2 = ctx->superscalar[3].v[1];
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
a += ip[0];
|
||||
a2 += ip[1];
|
||||
b += a;
|
||||
|
|
@ -98,7 +98,7 @@ fletcher_4_superscalar_native(fletcher_4_ctx_t *ctx,
|
|||
c2 += b2;
|
||||
d += c;
|
||||
d2 += c2;
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
ctx->superscalar[0].v[0] = a;
|
||||
ctx->superscalar[1].v[0] = b;
|
||||
|
|
@ -129,7 +129,7 @@ fletcher_4_superscalar_byteswap(fletcher_4_ctx_t *ctx,
|
|||
c2 = ctx->superscalar[2].v[1];
|
||||
d2 = ctx->superscalar[3].v[1];
|
||||
|
||||
for (; ip < ipend; ip += 2) {
|
||||
do {
|
||||
a += BSWAP_32(ip[0]);
|
||||
a2 += BSWAP_32(ip[1]);
|
||||
b += a;
|
||||
|
|
@ -138,7 +138,7 @@ fletcher_4_superscalar_byteswap(fletcher_4_ctx_t *ctx,
|
|||
c2 += b2;
|
||||
d += c;
|
||||
d2 += c2;
|
||||
}
|
||||
} while ((ip += 2) < ipend);
|
||||
|
||||
ctx->superscalar[0].v[0] = a;
|
||||
ctx->superscalar[1].v[0] = b;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ fletcher_4_superscalar4_native(fletcher_4_ctx_t *ctx,
|
|||
c4 = ctx->superscalar[2].v[3];
|
||||
d4 = ctx->superscalar[3].v[3];
|
||||
|
||||
for (; ip < ipend; ip += 4) {
|
||||
do {
|
||||
a += ip[0];
|
||||
a2 += ip[1];
|
||||
a3 += ip[2];
|
||||
|
|
@ -130,7 +130,7 @@ fletcher_4_superscalar4_native(fletcher_4_ctx_t *ctx,
|
|||
d2 += c2;
|
||||
d3 += c3;
|
||||
d4 += c4;
|
||||
}
|
||||
} while ((ip += 4) < ipend);
|
||||
|
||||
ctx->superscalar[0].v[0] = a;
|
||||
ctx->superscalar[1].v[0] = b;
|
||||
|
|
@ -179,7 +179,7 @@ fletcher_4_superscalar4_byteswap(fletcher_4_ctx_t *ctx,
|
|||
c4 = ctx->superscalar[2].v[3];
|
||||
d4 = ctx->superscalar[3].v[3];
|
||||
|
||||
for (; ip < ipend; ip += 4) {
|
||||
do {
|
||||
a += BSWAP_32(ip[0]);
|
||||
a2 += BSWAP_32(ip[1]);
|
||||
a3 += BSWAP_32(ip[2]);
|
||||
|
|
@ -196,7 +196,7 @@ fletcher_4_superscalar4_byteswap(fletcher_4_ctx_t *ctx,
|
|||
d2 += c2;
|
||||
d3 += c3;
|
||||
d4 += c4;
|
||||
}
|
||||
} while ((ip += 4) < ipend);
|
||||
|
||||
ctx->superscalar[0].v[0] = a;
|
||||
ctx->superscalar[1].v[0] = b;
|
||||
|
|
|
|||
|
|
@ -1503,8 +1503,8 @@ dbuf_read_verify_dnode_crypt(dmu_buf_impl_t *db, uint32_t flags)
|
|||
|
||||
ASSERT(MUTEX_HELD(&db->db_mtx));
|
||||
|
||||
if (!os->os_encrypted || os->os_raw_receive ||
|
||||
(flags & DB_RF_NO_DECRYPT) != 0)
|
||||
if ((flags & DB_RF_NO_DECRYPT) != 0 ||
|
||||
!os->os_encrypted || os->os_raw_receive)
|
||||
return (0);
|
||||
|
||||
DB_DNODE_ENTER(db);
|
||||
|
|
@ -1738,8 +1738,6 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
|
|||
|
||||
mutex_enter(&db->db_mtx);
|
||||
if (db->db_state == DB_CACHED) {
|
||||
spa_t *spa = dn->dn_objset->os_spa;
|
||||
|
||||
/*
|
||||
* Ensure that this block's dnode has been decrypted if
|
||||
* the caller has requested decrypted data.
|
||||
|
|
@ -1758,6 +1756,7 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
|
|||
(arc_is_encrypted(db->db_buf) ||
|
||||
arc_is_unauthenticated(db->db_buf) ||
|
||||
arc_get_compression(db->db_buf) != ZIO_COMPRESS_OFF)) {
|
||||
spa_t *spa = dn->dn_objset->os_spa;
|
||||
zbookmark_phys_t zb;
|
||||
|
||||
SET_BOOKMARK(&zb, dmu_objset_id(db->db_objset),
|
||||
|
|
@ -1774,13 +1773,13 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
|
|||
DB_DNODE_EXIT(db);
|
||||
DBUF_STAT_BUMP(hash_hits);
|
||||
} else if (db->db_state == DB_UNCACHED) {
|
||||
spa_t *spa = dn->dn_objset->os_spa;
|
||||
boolean_t need_wait = B_FALSE;
|
||||
|
||||
db_lock_type_t dblt = dmu_buf_lock_parent(db, RW_READER, FTAG);
|
||||
|
||||
if (zio == NULL &&
|
||||
db->db_blkptr != NULL && !BP_IS_HOLE(db->db_blkptr)) {
|
||||
spa_t *spa = dn->dn_objset->os_spa;
|
||||
zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL);
|
||||
need_wait = B_TRUE;
|
||||
}
|
||||
|
|
@ -3323,10 +3322,10 @@ dbuf_prefetch_indirect_done(zio_t *zio, const zbookmark_phys_t *zb,
|
|||
blkptr_t *bp = ((blkptr_t *)abuf->b_data) +
|
||||
P2PHASE(nextblkid, 1ULL << dpa->dpa_epbs);
|
||||
|
||||
ASSERT(!BP_IS_REDACTED(bp) ||
|
||||
ASSERT(!BP_IS_REDACTED(bp) || (dpa->dpa_dnode &&
|
||||
dsl_dataset_feature_is_active(
|
||||
dpa->dpa_dnode->dn_objset->os_dsl_dataset,
|
||||
SPA_FEATURE_REDACTED_DATASETS));
|
||||
SPA_FEATURE_REDACTED_DATASETS)));
|
||||
if (BP_IS_HOLE(bp) || BP_IS_REDACTED(bp)) {
|
||||
arc_buf_destroy(abuf, private);
|
||||
dbuf_prefetch_fini(dpa, B_TRUE);
|
||||
|
|
|
|||
|
|
@ -1586,8 +1586,6 @@ send_merge_thread(void *arg)
|
|||
}
|
||||
range_free(front_ranges[i]);
|
||||
}
|
||||
if (range == NULL)
|
||||
range = kmem_zalloc(sizeof (*range), KM_SLEEP);
|
||||
range->eos_marker = B_TRUE;
|
||||
bqueue_enqueue_flush(&smt_arg->q, range, 1);
|
||||
spl_fstrans_unmark(cookie);
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ dnode_stats_t dnode_stats = {
|
|||
{ "dnode_move_active", KSTAT_DATA_UINT64 },
|
||||
};
|
||||
|
||||
dnode_sums_t dnode_sums;
|
||||
|
||||
static kstat_t *dnode_ksp;
|
||||
static kmem_cache_t *dnode_cache;
|
||||
|
||||
|
|
@ -225,6 +227,72 @@ dnode_dest(void *arg, void *unused)
|
|||
avl_destroy(&dn->dn_dbufs);
|
||||
}
|
||||
|
||||
static int
|
||||
dnode_kstats_update(kstat_t *ksp, int rw)
|
||||
{
|
||||
dnode_stats_t *ds = ksp->ks_data;
|
||||
|
||||
if (rw == KSTAT_WRITE)
|
||||
return (EACCES);
|
||||
ds->dnode_hold_dbuf_hold.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_dbuf_hold);
|
||||
ds->dnode_hold_dbuf_read.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_dbuf_read);
|
||||
ds->dnode_hold_alloc_hits.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_alloc_hits);
|
||||
ds->dnode_hold_alloc_misses.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_alloc_misses);
|
||||
ds->dnode_hold_alloc_interior.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_alloc_interior);
|
||||
ds->dnode_hold_alloc_lock_retry.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_alloc_lock_retry);
|
||||
ds->dnode_hold_alloc_lock_misses.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_alloc_lock_misses);
|
||||
ds->dnode_hold_alloc_type_none.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_alloc_type_none);
|
||||
ds->dnode_hold_free_hits.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_free_hits);
|
||||
ds->dnode_hold_free_misses.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_free_misses);
|
||||
ds->dnode_hold_free_lock_misses.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_free_lock_misses);
|
||||
ds->dnode_hold_free_lock_retry.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_free_lock_retry);
|
||||
ds->dnode_hold_free_refcount.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_free_refcount);
|
||||
ds->dnode_hold_free_overflow.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_hold_free_overflow);
|
||||
ds->dnode_free_interior_lock_retry.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_free_interior_lock_retry);
|
||||
ds->dnode_allocate.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_allocate);
|
||||
ds->dnode_reallocate.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_reallocate);
|
||||
ds->dnode_buf_evict.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_buf_evict);
|
||||
ds->dnode_alloc_next_chunk.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_alloc_next_chunk);
|
||||
ds->dnode_alloc_race.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_alloc_race);
|
||||
ds->dnode_alloc_next_block.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_alloc_next_block);
|
||||
ds->dnode_move_invalid.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_move_invalid);
|
||||
ds->dnode_move_recheck1.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_move_recheck1);
|
||||
ds->dnode_move_recheck2.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_move_recheck2);
|
||||
ds->dnode_move_special.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_move_special);
|
||||
ds->dnode_move_handle.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_move_handle);
|
||||
ds->dnode_move_rwlock.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_move_rwlock);
|
||||
ds->dnode_move_active.value.ui64 =
|
||||
wmsum_value(&dnode_sums.dnode_move_active);
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
dnode_init(void)
|
||||
{
|
||||
|
|
@ -233,11 +301,41 @@ dnode_init(void)
|
|||
0, dnode_cons, dnode_dest, NULL, NULL, NULL, 0);
|
||||
kmem_cache_set_move(dnode_cache, dnode_move);
|
||||
|
||||
wmsum_init(&dnode_sums.dnode_hold_dbuf_hold, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_dbuf_read, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_alloc_hits, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_alloc_misses, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_alloc_interior, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_alloc_lock_retry, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_alloc_lock_misses, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_alloc_type_none, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_free_hits, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_free_misses, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_free_lock_misses, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_free_lock_retry, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_free_refcount, 0);
|
||||
wmsum_init(&dnode_sums.dnode_hold_free_overflow, 0);
|
||||
wmsum_init(&dnode_sums.dnode_free_interior_lock_retry, 0);
|
||||
wmsum_init(&dnode_sums.dnode_allocate, 0);
|
||||
wmsum_init(&dnode_sums.dnode_reallocate, 0);
|
||||
wmsum_init(&dnode_sums.dnode_buf_evict, 0);
|
||||
wmsum_init(&dnode_sums.dnode_alloc_next_chunk, 0);
|
||||
wmsum_init(&dnode_sums.dnode_alloc_race, 0);
|
||||
wmsum_init(&dnode_sums.dnode_alloc_next_block, 0);
|
||||
wmsum_init(&dnode_sums.dnode_move_invalid, 0);
|
||||
wmsum_init(&dnode_sums.dnode_move_recheck1, 0);
|
||||
wmsum_init(&dnode_sums.dnode_move_recheck2, 0);
|
||||
wmsum_init(&dnode_sums.dnode_move_special, 0);
|
||||
wmsum_init(&dnode_sums.dnode_move_handle, 0);
|
||||
wmsum_init(&dnode_sums.dnode_move_rwlock, 0);
|
||||
wmsum_init(&dnode_sums.dnode_move_active, 0);
|
||||
|
||||
dnode_ksp = kstat_create("zfs", 0, "dnodestats", "misc",
|
||||
KSTAT_TYPE_NAMED, sizeof (dnode_stats) / sizeof (kstat_named_t),
|
||||
KSTAT_FLAG_VIRTUAL);
|
||||
if (dnode_ksp != NULL) {
|
||||
dnode_ksp->ks_data = &dnode_stats;
|
||||
dnode_ksp->ks_update = dnode_kstats_update;
|
||||
kstat_install(dnode_ksp);
|
||||
}
|
||||
}
|
||||
|
|
@ -250,6 +348,35 @@ dnode_fini(void)
|
|||
dnode_ksp = NULL;
|
||||
}
|
||||
|
||||
wmsum_fini(&dnode_sums.dnode_hold_dbuf_hold);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_dbuf_read);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_alloc_hits);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_alloc_misses);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_alloc_interior);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_alloc_lock_retry);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_alloc_lock_misses);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_alloc_type_none);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_free_hits);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_free_misses);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_free_lock_misses);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_free_lock_retry);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_free_refcount);
|
||||
wmsum_fini(&dnode_sums.dnode_hold_free_overflow);
|
||||
wmsum_fini(&dnode_sums.dnode_free_interior_lock_retry);
|
||||
wmsum_fini(&dnode_sums.dnode_allocate);
|
||||
wmsum_fini(&dnode_sums.dnode_reallocate);
|
||||
wmsum_fini(&dnode_sums.dnode_buf_evict);
|
||||
wmsum_fini(&dnode_sums.dnode_alloc_next_chunk);
|
||||
wmsum_fini(&dnode_sums.dnode_alloc_race);
|
||||
wmsum_fini(&dnode_sums.dnode_alloc_next_block);
|
||||
wmsum_fini(&dnode_sums.dnode_move_invalid);
|
||||
wmsum_fini(&dnode_sums.dnode_move_recheck1);
|
||||
wmsum_fini(&dnode_sums.dnode_move_recheck2);
|
||||
wmsum_fini(&dnode_sums.dnode_move_special);
|
||||
wmsum_fini(&dnode_sums.dnode_move_handle);
|
||||
wmsum_fini(&dnode_sums.dnode_move_rwlock);
|
||||
wmsum_fini(&dnode_sums.dnode_move_active);
|
||||
|
||||
kmem_cache_destroy(dnode_cache);
|
||||
dnode_cache = NULL;
|
||||
}
|
||||
|
|
@ -2280,19 +2407,11 @@ dnode_spill_freed(dnode_t *dn)
|
|||
uint64_t
|
||||
dnode_block_freed(dnode_t *dn, uint64_t blkid)
|
||||
{
|
||||
void *dp = spa_get_dsl(dn->dn_objset->os_spa);
|
||||
int i;
|
||||
|
||||
if (blkid == DMU_BONUS_BLKID)
|
||||
return (FALSE);
|
||||
|
||||
/*
|
||||
* If we're in the process of opening the pool, dp will not be
|
||||
* set yet, but there shouldn't be anything dirty.
|
||||
*/
|
||||
if (dp == NULL)
|
||||
return (FALSE);
|
||||
|
||||
if (dn->dn_free_txg)
|
||||
return (TRUE);
|
||||
|
||||
|
|
|
|||
|
|
@ -1760,6 +1760,21 @@ dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We are not allowed to dirty a filesystem when done receiving
|
||||
* a snapshot. In this case the flag SPA_FEATURE_LARGE_BLOCKS will
|
||||
* not be set and a subsequent encrypted raw send will fail. Hence
|
||||
* activate this feature if needed here.
|
||||
*/
|
||||
for (spa_feature_t f = 0; f < SPA_FEATURES; f++) {
|
||||
if (zfeature_active(f, ds->ds_feature_activation[f]) &&
|
||||
!(zfeature_active(f, ds->ds_feature[f]))) {
|
||||
dsl_dataset_activate_feature(dsobj, f,
|
||||
ds->ds_feature_activation[f], tx);
|
||||
ds->ds_feature[f] = ds->ds_feature_activation[f];
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT3U(ds->ds_prev != 0, ==,
|
||||
dsl_dataset_phys(ds)->ds_prev_snap_obj != 0);
|
||||
if (ds->ds_prev) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue