zfs: merge openzfs/zfs@4a1195ca5 (master) into main
Notable upstream pull request merges:
#11312 Temporarily use root credentials to mount snapshots in .zfs
#12246 arc: Drop an incorrect assert
#12443 Fixed data integrity issue when underlying disk returns error
to zfs
#12522 Compressed receive with different ashift can result in incorrect
PSIZE on disk
#12535 Verify embedded blkptr's in arc_read()
#12541 Allow sending corrupt snapshots even if metadata is corrupted
Obtained from: OpenZFS
OpenZFS commit: 4a1195ca50
This commit is contained in:
commit
53b70c86d9
@ -18,7 +18,7 @@ jobs:
|
||||
sudo apt-get install --yes -qq zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev python-dev python-setuptools python-cffi python3 python3-dev python3-setuptools python3-cffi
|
||||
# packages for tests
|
||||
sudo apt-get install --yes -qq parted lsscsi ksh attr acl nfs-kernel-server fio
|
||||
sudo apt-get install --yes -qq mandoc cppcheck pax-utils devscripts abigail-tools
|
||||
sudo apt-get install --yes -qq mandoc cppcheck pax-utils devscripts
|
||||
sudo -E pip --quiet install flake8
|
||||
- name: Prepare
|
||||
run: |
|
||||
@ -34,11 +34,11 @@ jobs:
|
||||
- name: CheckABI
|
||||
id: CheckABI
|
||||
run: |
|
||||
make checkabi
|
||||
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make checkabi
|
||||
- name: StoreABI
|
||||
if: failure() && steps.CheckABI.outcome == 'failure'
|
||||
run: |
|
||||
make storeabi
|
||||
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make storeabi
|
||||
- name: Prepare artifacts
|
||||
if: failure() && steps.CheckABI.outcome == 'failure'
|
||||
run: |
|
||||
|
@ -129,10 +129,20 @@ SHELLCHECKDIRS = cmd contrib etc scripts tests
|
||||
SHELLCHECKSCRIPTS = autogen.sh
|
||||
|
||||
PHONY += checkabi storeabi
|
||||
checkabi: lib
|
||||
|
||||
checklibabiversion:
|
||||
libabiversion=`abidw -v | $(SED) 's/[^0-9]//g'`; \
|
||||
if test $$libabiversion -lt "180"; then \
|
||||
/bin/echo -e "\n" \
|
||||
"*** Please use libabigail 1.8.0 version or newer;\n" \
|
||||
"*** otherwise results are not consistent!\n"; \
|
||||
exit 1; \
|
||||
fi;
|
||||
|
||||
checkabi: checklibabiversion lib
|
||||
$(MAKE) -C lib checkabi
|
||||
|
||||
storeabi: lib
|
||||
storeabi: checklibabiversion lib
|
||||
$(MAKE) -C lib storeabi
|
||||
|
||||
PHONY += mancheck
|
||||
|
@ -369,7 +369,7 @@ main(int argc, char **argv)
|
||||
return (MOUNT_SYSERR);
|
||||
}
|
||||
#endif
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default:
|
||||
(void) fprintf(stderr, gettext("filesystem "
|
||||
"'%s' can not be mounted: %s\n"), dataset,
|
||||
|
@ -94,6 +94,13 @@
|
||||
(idx) == DMU_OTN_UINT64_DATA || (idx) == DMU_OTN_UINT64_METADATA ? \
|
||||
DMU_OT_UINT64_OTHER : DMU_OT_NUMTYPES)
|
||||
|
||||
/* Some platforms require part of inode IDs to be remapped */
|
||||
#ifdef __APPLE__
|
||||
#define ZDB_MAP_OBJECT_ID(obj) INO_XNUTOZFS(obj, 2)
|
||||
#else
|
||||
#define ZDB_MAP_OBJECT_ID(obj) (obj)
|
||||
#endif
|
||||
|
||||
static char *
|
||||
zdb_ot_name(dmu_object_type_t type)
|
||||
{
|
||||
@ -3631,6 +3638,7 @@ parse_object_range(char *range, zopt_object_range_t *zor, char **msg)
|
||||
*msg = "Invalid characters in object ID";
|
||||
rc = 1;
|
||||
}
|
||||
zor->zor_obj_start = ZDB_MAP_OBJECT_ID(zor->zor_obj_start);
|
||||
zor->zor_obj_end = zor->zor_obj_start;
|
||||
return (rc);
|
||||
}
|
||||
@ -3709,6 +3717,9 @@ parse_object_range(char *range, zopt_object_range_t *zor, char **msg)
|
||||
}
|
||||
zor->zor_flags = flags;
|
||||
|
||||
zor->zor_obj_start = ZDB_MAP_OBJECT_ID(zor->zor_obj_start);
|
||||
zor->zor_obj_end = ZDB_MAP_OBJECT_ID(zor->zor_obj_end);
|
||||
|
||||
out:
|
||||
free(dup);
|
||||
return (rc);
|
||||
@ -4614,7 +4625,7 @@ dump_path_impl(objset_t *os, uint64_t obj, char *name, uint64_t *retobj)
|
||||
case DMU_OT_DIRECTORY_CONTENTS:
|
||||
if (s != NULL && *(s + 1) != '\0')
|
||||
return (dump_path_impl(os, child_obj, s + 1, retobj));
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case DMU_OT_PLAIN_FILE_CONTENTS:
|
||||
if (retobj != NULL) {
|
||||
*retobj = child_obj;
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <libzutil.h>
|
||||
#include <libzfs.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "zfs_agents.h"
|
||||
#include "fmd_api.h"
|
||||
|
@ -291,7 +291,7 @@ main(int argc, char *argv[])
|
||||
rv = zed_event_service(&zcp);
|
||||
|
||||
/* ENODEV: When kernel module is unloaded (osx) */
|
||||
if (rv == ENODEV)
|
||||
if (rv != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/uio.h>
|
||||
#include <unistd.h>
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "zed_exec.h"
|
||||
#include "zed_log.h"
|
||||
#include "zed_strings.h"
|
||||
|
@ -7466,6 +7466,7 @@ unshare_unmount(int op, int argc, char **argv)
|
||||
if (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) ==
|
||||
ZFS_CANMOUNT_NOAUTO)
|
||||
continue;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
if [ "$1" = "-h" ] ; then
|
||||
echo "Show whether a vdev is a file, hdd, or ssd."
|
||||
echo "Show whether a vdev is a file, hdd, ssd, or iscsi."
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -18,6 +18,13 @@ if [ -b "$VDEV_UPATH" ]; then
|
||||
if [ "$val" = "1" ]; then
|
||||
MEDIA="hdd"
|
||||
fi
|
||||
|
||||
vpd_pg83="/sys/block/$device/device/vpd_pg83"
|
||||
if [ -f "$vpd_pg83" ]; then
|
||||
if grep -q --binary "iqn." "$vpd_pg83"; then
|
||||
MEDIA="iscsi"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ -f "$VDEV_UPATH" ]; then
|
||||
MEDIA="file"
|
||||
|
@ -118,7 +118,7 @@ escape_string(const char *s)
|
||||
case '=':
|
||||
case '\\':
|
||||
*d++ = '\\';
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default:
|
||||
*d = *c;
|
||||
}
|
||||
|
@ -27,5 +27,7 @@ storeabi:
|
||||
for lib in $(lib_LTLIBRARIES) ; do \
|
||||
abidw --no-show-locs \
|
||||
--no-corpus-path \
|
||||
--no-comp-dir-path \
|
||||
--type-id-style hash \
|
||||
$${lib%.la}.so > ../$${lib%.la}.abi ; \
|
||||
done
|
||||
|
@ -26,6 +26,7 @@ AM_LIBTOOLFLAGS = --silent
|
||||
AM_CFLAGS = -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes
|
||||
AM_CFLAGS += -fno-strict-aliasing
|
||||
AM_CFLAGS += $(NO_OMIT_FRAME_POINTER)
|
||||
AM_CFLAGS += $(IMPLICIT_FALLTHROUGH)
|
||||
AM_CFLAGS += $(DEBUG_CFLAGS)
|
||||
AM_CFLAGS += $(ASAN_CFLAGS)
|
||||
AM_CFLAGS += $(CODE_COVERAGE_CFLAGS) $(NO_FORMAT_ZERO_LENGTH)
|
||||
|
@ -161,6 +161,29 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE], [
|
||||
AC_SUBST([NO_UNUSED_BUT_SET_VARIABLE])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if gcc supports -Wimplicit-fallthrough option.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH], [
|
||||
AC_MSG_CHECKING([whether $CC supports -Wimplicit-fallthrough])
|
||||
|
||||
saved_flags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough"
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
IMPLICIT_FALLTHROUGH=-Wimplicit-fallthrough
|
||||
AC_DEFINE([HAVE_IMPLICIT_FALLTHROUGH], 1,
|
||||
[Define if compiler supports -Wimplicit-fallthrough])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
IMPLICIT_FALLTHROUGH=
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
CFLAGS="$saved_flags"
|
||||
AC_SUBST([IMPLICIT_FALLTHROUGH])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if gcc supports -fno-omit-frame-pointer option.
|
||||
dnl #
|
||||
|
@ -162,6 +162,9 @@ dnl #
|
||||
dnl # 3.1 API change,
|
||||
dnl # Check if inode_operations contains the function get_acl
|
||||
dnl #
|
||||
dnl # 5.15 API change,
|
||||
dnl # Added the bool rcu argument to get_acl for rcu path walk.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [
|
||||
#include <linux/fs.h>
|
||||
@ -174,14 +177,32 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
||||
.get_acl = get_acl_fn,
|
||||
};
|
||||
],[])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl_rcu], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
struct posix_acl *get_acl_fn(struct inode *inode, int type,
|
||||
bool rcu) { return NULL; }
|
||||
|
||||
static const struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
.get_acl = get_acl_fn,
|
||||
};
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL], [
|
||||
AC_MSG_CHECKING([whether iops->get_acl() exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_operations_get_acl], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GET_ACL, 1, [iops->get_acl() exists])
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([iops->get_acl()])
|
||||
ZFS_LINUX_TEST_RESULT([inode_operations_get_acl_rcu], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GET_ACL_RCU, 1, [iops->get_acl() takes rcu])
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([iops->get_acl()])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
|
@ -47,6 +47,44 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_BDI], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 5.9: added blk_queue_update_readahead(),
|
||||
dnl # 5.15: renamed to disk_update_readahead()
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_UPDATE_READAHEAD], [
|
||||
ZFS_LINUX_TEST_SRC([blk_queue_update_readahead], [
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct request_queue q;
|
||||
blk_queue_update_readahead(&q);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([disk_update_readahead], [
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct gendisk disk;
|
||||
disk_update_readahead(&disk);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_UPDATE_READAHEAD], [
|
||||
AC_MSG_CHECKING([whether blk_queue_update_readahead() exists])
|
||||
ZFS_LINUX_TEST_RESULT([blk_queue_update_readahead], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_QUEUE_UPDATE_READAHEAD, 1,
|
||||
[blk_queue_update_readahead() exists])
|
||||
],[
|
||||
AC_MSG_CHECKING([whether disk_update_readahead() exists])
|
||||
ZFS_LINUX_TEST_RESULT([disk_update_readahead], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_DISK_UPDATE_READAHEAD, 1,
|
||||
[disk_update_readahead() exists])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.32 API,
|
||||
dnl # blk_queue_discard()
|
||||
@ -280,6 +318,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS], [
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE], [
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_PLUG
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_BDI
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_UPDATE_READAHEAD
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_DISCARD
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_FLAG_SET
|
||||
@ -292,6 +331,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE], [
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE], [
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_PLUG
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_BDI
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_UPDATE_READAHEAD
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_DISCARD
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_FLAG_SET
|
||||
|
32
sys/contrib/openzfs/config/kernel-stdarg.m4
Normal file
32
sys/contrib/openzfs/config/kernel-stdarg.m4
Normal file
@ -0,0 +1,32 @@
|
||||
dnl #
|
||||
dnl # Linux 5.15 gets rid of -isystem and external <stdarg.h> inclusion
|
||||
dnl # and ships its own <linux/stdarg.h>. Check if this header file does
|
||||
dnl # exist and provide all necessary definitions for variable argument
|
||||
dnl # functions. Adjust the inclusion of <stdarg.h> according to the
|
||||
dnl # results.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG], [
|
||||
ZFS_LINUX_TEST_SRC([has_standalone_linux_stdarg], [
|
||||
#include <linux/stdarg.h>
|
||||
|
||||
#if !defined(va_start) || !defined(va_end) || \
|
||||
!defined(va_arg) || !defined(va_copy)
|
||||
#error "<linux/stdarg.h> is invalid"
|
||||
#endif
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG], [
|
||||
dnl #
|
||||
dnl # Linux 5.15 ships its own stdarg.h and doesn't allow to
|
||||
dnl # include compiler headers.
|
||||
dnl #
|
||||
AC_MSG_CHECKING([whether standalone <linux/stdarg.h> exists])
|
||||
ZFS_LINUX_TEST_RESULT([has_standalone_linux_stdarg], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_STANDALONE_LINUX_STDARG, 1,
|
||||
[standalone <linux/stdarg.h> exists])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
@ -133,6 +133,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||
ZFS_AC_KERNEL_SRC_SIGINFO
|
||||
ZFS_AC_KERNEL_SRC_SET_SPECIAL_STATE
|
||||
ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||
ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG
|
||||
|
||||
AC_MSG_CHECKING([for available kernel interfaces])
|
||||
ZFS_LINUX_TEST_COMPILE_ALL([kabi])
|
||||
@ -239,6 +240,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
||||
ZFS_AC_KERNEL_SIGINFO
|
||||
ZFS_AC_KERNEL_SET_SPECIAL_STATE
|
||||
ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||
ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG
|
||||
])
|
||||
|
||||
dnl #
|
||||
|
@ -211,6 +211,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
||||
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_BOOL_COMPARE
|
||||
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
|
||||
|
@ -73,14 +73,14 @@ AC_DEFUN([ZFS_AC_META], [
|
||||
if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
_match="${ZFS_META_NAME}-${ZFS_META_VERSION}"
|
||||
_alias=$(git describe --match=${_match} 2>/dev/null)
|
||||
_release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
|
||||
_release=$(echo ${_alias}|sed "s/${ZFS_META_NAME}//"|cut -f3- -d'-'|sed 's/-/_/g')
|
||||
if test -n "${_release}"; then
|
||||
ZFS_META_RELEASE=${_release}
|
||||
_zfs_ac_meta_type="git describe"
|
||||
else
|
||||
_match="${ZFS_META_NAME}-${ZFS_META_VERSION}-${ZFS_META_RELEASE}"
|
||||
_alias=$(git describe --match=${_match} 2>/dev/null)
|
||||
_release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
|
||||
_release=$(echo ${_alias}|sed 's/${ZFS_META_NAME}//'|cut -f3- -d'-'|sed 's/-/_/g')
|
||||
if test -n "${_release}"; then
|
||||
ZFS_META_RELEASE=${_release}
|
||||
_zfs_ac_meta_type="git describe"
|
||||
|
@ -839,7 +839,7 @@ _LIBZFS_H int zfs_unmount(zfs_handle_t *, const char *, int);
|
||||
_LIBZFS_H int zfs_unmountall(zfs_handle_t *, int);
|
||||
_LIBZFS_H int zfs_mount_delegation_check(void);
|
||||
|
||||
#if defined(__linux__)
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
_LIBZFS_H int zfs_parse_mount_options(char *mntopts, unsigned long *mntflags,
|
||||
unsigned long *zfsflags, int sloppy, char *badopt, char *mtabopt);
|
||||
_LIBZFS_H void zfs_adjust_mount_options(zfs_handle_t *zhp, const char *mntpoint,
|
||||
@ -930,6 +930,8 @@ _LIBZFS_H int zfs_smb_acl_rename(libzfs_handle_t *, char *, char *, char *,
|
||||
*/
|
||||
_LIBZFS_H int zpool_enable_datasets(zpool_handle_t *, const char *, int);
|
||||
_LIBZFS_H int zpool_disable_datasets(zpool_handle_t *, boolean_t);
|
||||
_LIBZFS_H void zpool_disable_datasets_os(zpool_handle_t *, boolean_t);
|
||||
_LIBZFS_H void zpool_disable_volume_os(const char *);
|
||||
|
||||
/*
|
||||
* Parse a features file for -o compatibility
|
||||
|
@ -67,6 +67,7 @@
|
||||
#define __always_inline inline
|
||||
#define noinline __noinline
|
||||
#define ____cacheline_aligned __aligned(CACHE_LINE_SIZE)
|
||||
#define fallthrough __attribute__((__fallthrough__))
|
||||
|
||||
#if !defined(_KERNEL) && !defined(_STANDALONE)
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
|
@ -92,11 +92,14 @@ blk_queue_set_write_cache(struct request_queue *q, bool wc, bool fua)
|
||||
static inline void
|
||||
blk_queue_set_read_ahead(struct request_queue *q, unsigned long ra_pages)
|
||||
{
|
||||
#if !defined(HAVE_BLK_QUEUE_UPDATE_READAHEAD) && \
|
||||
!defined(HAVE_DISK_UPDATE_READAHEAD)
|
||||
#ifdef HAVE_BLK_QUEUE_BDI_DYNAMIC
|
||||
q->backing_dev_info->ra_pages = ra_pages;
|
||||
#else
|
||||
q->backing_dev_info.ra_pages = ra_pages;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_BIO_BVEC_ITER
|
||||
|
@ -28,6 +28,14 @@
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#if !defined(fallthrough)
|
||||
#if defined(HAVE_IMPLICIT_FALLTHROUGH)
|
||||
#define fallthrough __attribute__((__fallthrough__))
|
||||
#else
|
||||
#define fallthrough ((void)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(READ_ONCE)
|
||||
#define READ_ONCE(x) ACCESS_ONCE(x)
|
||||
#endif
|
||||
|
@ -24,7 +24,11 @@
|
||||
#ifndef _SPL_CMN_ERR_H
|
||||
#define _SPL_CMN_ERR_H
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_STANDALONE_LINUX_STDARG)
|
||||
#include <linux/stdarg.h>
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#define CE_CONT 0 /* continuation */
|
||||
#define CE_NOTE 1 /* notice */
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <linux/dcache_compat.h>
|
||||
#include <linux/utsname_compat.h>
|
||||
#include <linux/compiler_compat.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#if THREAD_SIZE >= 16384
|
||||
|
@ -70,7 +70,11 @@ extern int zpl_set_acl(struct user_namespace *userns, struct inode *ip,
|
||||
extern int zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type);
|
||||
#endif /* HAVE_SET_ACL_USERNS */
|
||||
#endif /* HAVE_SET_ACL */
|
||||
#if defined(HAVE_GET_ACL_RCU)
|
||||
extern struct posix_acl *zpl_get_acl(struct inode *ip, int type, bool rcu);
|
||||
#elif defined(HAVE_GET_ACL)
|
||||
extern struct posix_acl *zpl_get_acl(struct inode *ip, int type);
|
||||
#endif
|
||||
extern int zpl_init_acl(struct inode *ip, struct inode *dir);
|
||||
extern int zpl_chmod_acl(struct inode *ip);
|
||||
#else
|
||||
|
@ -110,6 +110,10 @@ extern "C" {
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_BAD_CLEARED_BITS "bad_cleared_bits"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_BAD_SET_HISTOGRAM "bad_set_histogram"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_BAD_CLEARED_HISTOGRAM "bad_cleared_histogram"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_SNAPSHOT_NAME "snapshot_name"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_DEVICE_NAME "device_name"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_RAW_DEVICE_NAME "raw_name"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_VOLUME "volume"
|
||||
|
||||
#define FM_EREPORT_FAILMODE_WAIT "wait"
|
||||
#define FM_EREPORT_FAILMODE_CONTINUE "continue"
|
||||
@ -119,6 +123,11 @@ extern "C" {
|
||||
#define FM_RESOURCE_AUTOREPLACE "autoreplace"
|
||||
#define FM_RESOURCE_STATECHANGE "statechange"
|
||||
|
||||
#define FM_RESOURCE_ZFS_SNAPSHOT_MOUNT "snapshot_mount"
|
||||
#define FM_RESOURCE_ZFS_SNAPSHOT_UNMOUNT "snapshot_unmount"
|
||||
#define FM_RESOURCE_ZVOL_CREATE_SYMLINK "zvol_create"
|
||||
#define FM_RESOURCE_ZVOL_REMOVE_SYMLINK "zvol_remove"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1170,6 +1170,8 @@ extern void spa_configfile_set(spa_t *, nvlist_t *, boolean_t);
|
||||
/* asynchronous event notification */
|
||||
extern void spa_event_notify(spa_t *spa, vdev_t *vdev, nvlist_t *hist_nvl,
|
||||
const char *name);
|
||||
extern void zfs_ereport_zvol_post(const char *subclass, const char *name,
|
||||
const char *device_name, const char *raw_name);
|
||||
|
||||
/* waiting for pool activities to complete */
|
||||
extern int spa_wait(const char *pool, zpool_wait_activity_t activity,
|
||||
|
@ -766,7 +766,6 @@ extern void spl_fstrans_unmark(fstrans_cookie_t);
|
||||
extern int __spl_pf_fstrans_check(void);
|
||||
extern int kmem_cache_reap_active(void);
|
||||
|
||||
#define ____cacheline_aligned
|
||||
|
||||
/*
|
||||
* Kernel modules
|
||||
|
@ -673,6 +673,8 @@ extern int zfs_ereport_post_checksum(spa_t *spa, vdev_t *vd,
|
||||
struct zio_bad_cksum *info);
|
||||
|
||||
void zio_vsd_default_cksum_report(zio_t *zio, zio_cksum_report_t *zcr);
|
||||
extern void zfs_ereport_snapshot_post(const char *subclass, spa_t *spa,
|
||||
const char *name);
|
||||
|
||||
/* Called from spa_sync(), but primarily an injection handler */
|
||||
extern void spa_handle_ignored_writes(spa_t *spa);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -27,6 +27,15 @@
|
||||
#ifndef _SYS_FEATURE_TESTS_H
|
||||
#define _SYS_FEATURE_TESTS_H
|
||||
|
||||
#define __NORETURN __attribute__((__noreturn__))
|
||||
#define ____cacheline_aligned
|
||||
#define __NORETURN __attribute__((__noreturn__))
|
||||
|
||||
#if !defined(fallthrough) && !defined(_LIBCPP_VERSION)
|
||||
#if defined(HAVE_IMPLICIT_FALLTHROUGH)
|
||||
#define fallthrough __attribute__((__fallthrough__))
|
||||
#else
|
||||
#define fallthrough ((void)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1363,9 +1363,8 @@ zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl,
|
||||
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
|
||||
goto error;
|
||||
}
|
||||
fallthrough;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
|
||||
|
||||
case ZFS_PROP_SHARESMB:
|
||||
case ZFS_PROP_SHARENFS:
|
||||
@ -3775,8 +3774,8 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
|
||||
if (type == ZFS_TYPE_VOLUME)
|
||||
return (zfs_error(hdl, EZFS_VOLTOOBIG,
|
||||
errbuf));
|
||||
fallthrough;
|
||||
#endif
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
return (zfs_standard_error(hdl, errno, errbuf));
|
||||
}
|
||||
|
@ -672,6 +672,8 @@ zfs_unmount(zfs_handle_t *zhp, const char *mountpoint, int flags)
|
||||
}
|
||||
}
|
||||
|
||||
zpool_disable_volume_os(zhp->zfs_name);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -1637,6 +1639,8 @@ zpool_disable_datasets(zpool_handle_t *zhp, boolean_t force)
|
||||
remove_mountpoint(sets[i].dataset);
|
||||
}
|
||||
|
||||
zpool_disable_datasets_os(zhp, force);
|
||||
|
||||
ret = 0;
|
||||
out:
|
||||
(void) fclose(mnttab);
|
||||
|
@ -314,7 +314,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
len);
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default:
|
||||
(void) strlcpy(buf, "-", len);
|
||||
break;
|
||||
@ -405,7 +405,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
(void) snprintf(buf, len, "-");
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default:
|
||||
(void) snprintf(buf, len, "%llu", (u_longlong_t)intval);
|
||||
}
|
||||
|
@ -4866,7 +4866,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
(void) zfs_error(hdl, EZFS_BUSY, errbuf);
|
||||
break;
|
||||
}
|
||||
/* fallthru */
|
||||
fallthrough;
|
||||
default:
|
||||
(void) zfs_standard_error(hdl, ioctl_errno, errbuf);
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ zfs_setprop_error(libzfs_handle_t *hdl, zfs_prop_t prop, int err,
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default:
|
||||
(void) zfs_standard_error(hdl, err, errbuf);
|
||||
}
|
||||
|
@ -133,3 +133,15 @@ zfs_mount_delegation_check(void)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Called from the tail end of zpool_disable_datasets() */
|
||||
void
|
||||
zpool_disable_datasets_os(zpool_handle_t *zhp, boolean_t force)
|
||||
{
|
||||
}
|
||||
|
||||
/* Called from the tail end of zfs_unmount() */
|
||||
void
|
||||
zpool_disable_volume_os(const char *name)
|
||||
{
|
||||
}
|
||||
|
@ -411,3 +411,15 @@ zfs_mount_delegation_check(void)
|
||||
{
|
||||
return ((geteuid() != 0) ? EACCES : 0);
|
||||
}
|
||||
|
||||
/* Called from the tail end of zpool_disable_datasets() */
|
||||
void
|
||||
zpool_disable_datasets_os(zpool_handle_t *zhp, boolean_t force)
|
||||
{
|
||||
}
|
||||
|
||||
/* Called from the tail end of zfs_unmount() */
|
||||
void
|
||||
zpool_disable_volume_os(const char *name)
|
||||
{
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,346 +16,191 @@
|
||||
<elf-symbol name='lzbe_remove_pair' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='lzbe_set_boot_device' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
</elf-function-symbols>
|
||||
<abi-instr version='1.0' address-size='64' path='lzbe_device.c' comp-dir-path='/home/runner/work/zfs/zfs/lib/libzfsbootenv' language='LANG_C99'>
|
||||
<type-decl name='int' size-in-bits='32' id='type-id-1'/>
|
||||
<type-decl name='char' size-in-bits='8' id='type-id-2'/>
|
||||
<qualified-type-def type-id='type-id-2' const='yes' id='type-id-3'/>
|
||||
<pointer-type-def type-id='type-id-3' size-in-bits='64' id='type-id-4'/>
|
||||
<pointer-type-def type-id='type-id-2' size-in-bits='64' id='type-id-5'/>
|
||||
<pointer-type-def type-id='type-id-5' size-in-bits='64' id='type-id-6'/>
|
||||
<function-decl name='lzbe_get_boot_device' mangled-name='lzbe_get_boot_device' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_get_boot_device'>
|
||||
<parameter type-id='type-id-4' name='pool'/>
|
||||
<parameter type-id='type-id-6' name='device'/>
|
||||
<return type-id='type-id-1'/>
|
||||
</function-decl>
|
||||
<type-decl name='unnamed-enum-underlying-type' is-anonymous='yes' size-in-bits='32' alignment-in-bits='32' id='type-id-7'/>
|
||||
<enum-decl name='lzbe_flags' id='type-id-8'>
|
||||
<underlying-type type-id='type-id-7'/>
|
||||
<abi-instr version='1.0' address-size='64' path='lzbe_device.c' language='LANG_C99'>
|
||||
<type-decl name='char' size-in-bits='8' id='a84c031d'/>
|
||||
<type-decl name='int' size-in-bits='32' id='95e97e5e'/>
|
||||
<type-decl name='unnamed-enum-underlying-type-32' is-anonymous='yes' size-in-bits='32' alignment-in-bits='32' id='9cac1fee'/>
|
||||
<type-decl name='void' id='48b5725f'/>
|
||||
<typedef-decl name='lzbe_flags_t' type-id='2b77720b' id='a1936f04'/>
|
||||
<enum-decl name='lzbe_flags' id='2b77720b'>
|
||||
<underlying-type type-id='9cac1fee'/>
|
||||
<enumerator name='lzbe_add' value='0'/>
|
||||
<enumerator name='lzbe_replace' value='1'/>
|
||||
</enum-decl>
|
||||
<typedef-decl name='lzbe_flags_t' type-id='type-id-8' id='type-id-9'/>
|
||||
<pointer-type-def type-id='a84c031d' size-in-bits='64' id='26a90f95'/>
|
||||
<pointer-type-def type-id='26a90f95' size-in-bits='64' id='9b23c9ad'/>
|
||||
<qualified-type-def type-id='a84c031d' const='yes' id='9b45d938'/>
|
||||
<pointer-type-def type-id='9b45d938' size-in-bits='64' id='80f4b756'/>
|
||||
<function-decl name='lzbe_get_boot_device' mangled-name='lzbe_get_boot_device' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_get_boot_device'>
|
||||
<parameter type-id='80f4b756' name='pool'/>
|
||||
<parameter type-id='9b23c9ad' name='device'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='lzbe_set_boot_device' mangled-name='lzbe_set_boot_device' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_set_boot_device'>
|
||||
<parameter type-id='type-id-4' name='pool'/>
|
||||
<parameter type-id='type-id-9' name='flag'/>
|
||||
<parameter type-id='type-id-4' name='device'/>
|
||||
<return type-id='type-id-1'/>
|
||||
</function-decl>
|
||||
<type-decl name='void' id='type-id-10'/>
|
||||
<function-decl name='libzfs_init' mangled-name='libzfs_init' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_open' mangled-name='zpool_open' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_get_bootenv' mangled-name='zpool_get_bootenv' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_close' mangled-name='zpool_close' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='libzfs_fini' mangled-name='libzfs_fini' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_lookup_string' mangled-name='nvlist_lookup_string' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_free' mangled-name='nvlist_free' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='strdup' mangled-name='strdup' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='__stack_chk_fail' mangled-name='__stack_chk_fail' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='__asprintf_chk' mangled-name='__asprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='__fprintf_chk' mangled-name='__fprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='fnvlist_alloc' mangled-name='fnvlist_alloc' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='fnvlist_add_uint64' mangled-name='fnvlist_add_uint64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_exists' mangled-name='nvlist_exists' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_set_bootenv' mangled-name='zpool_set_bootenv' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='fnvlist_free' mangled-name='fnvlist_free' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='fnvlist_add_string' mangled-name='fnvlist_add_string' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='free' mangled-name='free' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_lookup_uint64' mangled-name='nvlist_lookup_uint64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='libzfs_error_description' mangled-name='libzfs_error_description' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='fnvlist_remove' mangled-name='fnvlist_remove' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
<parameter type-id='80f4b756' name='pool'/>
|
||||
<parameter type-id='a1936f04' name='flag'/>
|
||||
<parameter type-id='80f4b756' name='device'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr version='1.0' address-size='64' path='lzbe_pair.c' comp-dir-path='/home/runner/work/zfs/zfs/lib/libzfsbootenv' language='LANG_C99'>
|
||||
<pointer-type-def type-id='type-id-10' size-in-bits='64' id='type-id-11'/>
|
||||
<abi-instr version='1.0' address-size='64' path='lzbe_pair.c' language='LANG_C99'>
|
||||
<type-decl name='unsigned long int' size-in-bits='64' id='7359adad'/>
|
||||
<typedef-decl name='size_t' type-id='7359adad' id='b59d7dce'/>
|
||||
<pointer-type-def type-id='48b5725f' size-in-bits='64' id='eaa32e2f'/>
|
||||
<pointer-type-def type-id='eaa32e2f' size-in-bits='64' id='63e171df'/>
|
||||
<function-decl name='lzbe_remove_pair' mangled-name='lzbe_remove_pair' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_remove_pair'>
|
||||
<parameter type-id='type-id-11' name='ptr'/>
|
||||
<parameter type-id='type-id-4' name='key'/>
|
||||
<return type-id='type-id-1'/>
|
||||
<parameter type-id='eaa32e2f' name='ptr'/>
|
||||
<parameter type-id='80f4b756' name='key'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<type-decl name='unsigned long int' size-in-bits='64' id='type-id-12'/>
|
||||
<typedef-decl name='size_t' type-id='type-id-12' id='type-id-13'/>
|
||||
<function-decl name='lzbe_add_pair' mangled-name='lzbe_add_pair' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_add_pair'>
|
||||
<parameter type-id='type-id-11' name='ptr'/>
|
||||
<parameter type-id='type-id-4' name='key'/>
|
||||
<parameter type-id='type-id-4' name='type'/>
|
||||
<parameter type-id='type-id-11' name='value'/>
|
||||
<parameter type-id='type-id-13' name='size'/>
|
||||
<return type-id='type-id-1'/>
|
||||
<parameter type-id='eaa32e2f' name='ptr'/>
|
||||
<parameter type-id='80f4b756' name='key'/>
|
||||
<parameter type-id='80f4b756' name='type'/>
|
||||
<parameter type-id='eaa32e2f' name='value'/>
|
||||
<parameter type-id='b59d7dce' name='size'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='lzbe_nvlist_free' mangled-name='lzbe_nvlist_free' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_nvlist_free'>
|
||||
<parameter type-id='type-id-11' name='ptr'/>
|
||||
<return type-id='type-id-10'/>
|
||||
<parameter type-id='eaa32e2f' name='ptr'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='lzbe_nvlist_set' mangled-name='lzbe_nvlist_set' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_nvlist_set'>
|
||||
<parameter type-id='type-id-4' name='pool'/>
|
||||
<parameter type-id='type-id-4' name='key'/>
|
||||
<parameter type-id='type-id-11' name='ptr'/>
|
||||
<return type-id='type-id-1'/>
|
||||
<parameter type-id='80f4b756' name='pool'/>
|
||||
<parameter type-id='80f4b756' name='key'/>
|
||||
<parameter type-id='eaa32e2f' name='ptr'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<pointer-type-def type-id='type-id-11' size-in-bits='64' id='type-id-14'/>
|
||||
<function-decl name='lzbe_nvlist_get' mangled-name='lzbe_nvlist_get' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_nvlist_get'>
|
||||
<parameter type-id='type-id-4' name='pool'/>
|
||||
<parameter type-id='type-id-4' name='key'/>
|
||||
<parameter type-id='type-id-14' name='ptr'/>
|
||||
<return type-id='type-id-1'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_remove_all' mangled-name='nvlist_remove_all' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='strcmp' mangled-name='strcmp' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_uint8_array' mangled-name='nvlist_add_uint8_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_byte' mangled-name='nvlist_add_byte' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_int16' mangled-name='nvlist_add_int16' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_uint16' mangled-name='nvlist_add_uint16' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_int32' mangled-name='nvlist_add_int32' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_uint32' mangled-name='nvlist_add_uint32' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_int64' mangled-name='nvlist_add_int64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_uint64' mangled-name='nvlist_add_uint64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_string' mangled-name='nvlist_add_string' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_byte_array' mangled-name='nvlist_add_byte_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_int16_array' mangled-name='nvlist_add_int16_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_uint16_array' mangled-name='nvlist_add_uint16_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_int32_array' mangled-name='nvlist_add_int32_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_uint32_array' mangled-name='nvlist_add_uint32_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_int64_array' mangled-name='nvlist_add_int64_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_uint64_array' mangled-name='nvlist_add_uint64_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_string_array' mangled-name='nvlist_add_string_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_nvlist' mangled-name='nvlist_add_nvlist' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_nvlist_array' mangled-name='nvlist_add_nvlist_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_boolean_value' mangled-name='nvlist_add_boolean_value' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_int8' mangled-name='nvlist_add_int8' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_uint8' mangled-name='nvlist_add_uint8' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_boolean_array' mangled-name='nvlist_add_boolean_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_add_int8_array' mangled-name='nvlist_add_int8_array' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_lookup_nvlist' mangled-name='nvlist_lookup_nvlist' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_dup' mangled-name='nvlist_dup' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_alloc' mangled-name='nvlist_alloc' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
<parameter type-id='80f4b756' name='pool'/>
|
||||
<parameter type-id='80f4b756' name='key'/>
|
||||
<parameter type-id='63e171df' name='ptr'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr version='1.0' address-size='64' path='lzbe_util.c' comp-dir-path='/home/runner/work/zfs/zfs/lib/libzfsbootenv' language='LANG_C99'>
|
||||
<class-decl name='_IO_FILE' size-in-bits='1728' is-struct='yes' visibility='default' id='type-id-15'>
|
||||
<abi-instr version='1.0' address-size='64' path='lzbe_util.c' language='LANG_C99'>
|
||||
<array-type-def dimensions='1' type-id='a84c031d' size-in-bits='8' id='89feb1ec'>
|
||||
<subrange length='1' type-id='7359adad' id='52f813b4'/>
|
||||
</array-type-def>
|
||||
<array-type-def dimensions='1' type-id='a84c031d' size-in-bits='160' id='664ac0b7'>
|
||||
<subrange length='20' type-id='7359adad' id='fdca39cf'/>
|
||||
</array-type-def>
|
||||
<type-decl name='long int' size-in-bits='64' id='bd54fe1a'/>
|
||||
<type-decl name='signed char' size-in-bits='8' id='28577a57'/>
|
||||
<type-decl name='unsigned short int' size-in-bits='16' id='8efea9e5'/>
|
||||
<typedef-decl name='FILE' type-id='ec1ed955' id='aa12d1ba'/>
|
||||
<class-decl name='_IO_FILE' size-in-bits='1728' is-struct='yes' visibility='default' id='ec1ed955'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='_flags' type-id='type-id-1' visibility='default'/>
|
||||
<var-decl name='_flags' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='_IO_read_ptr' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_read_ptr' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='_IO_read_end' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_read_end' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='_IO_read_base' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_read_base' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='_IO_write_base' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_write_base' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='_IO_write_ptr' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_write_ptr' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='_IO_write_end' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_write_end' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='448'>
|
||||
<var-decl name='_IO_buf_base' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_buf_base' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='512'>
|
||||
<var-decl name='_IO_buf_end' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_buf_end' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='576'>
|
||||
<var-decl name='_IO_save_base' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_save_base' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='640'>
|
||||
<var-decl name='_IO_backup_base' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_backup_base' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='704'>
|
||||
<var-decl name='_IO_save_end' type-id='type-id-5' visibility='default'/>
|
||||
<var-decl name='_IO_save_end' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='768'>
|
||||
<var-decl name='_markers' type-id='type-id-16' visibility='default'/>
|
||||
<var-decl name='_markers' type-id='e4c6fa61' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='832'>
|
||||
<var-decl name='_chain' type-id='type-id-17' visibility='default'/>
|
||||
<var-decl name='_chain' type-id='dca988a5' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='896'>
|
||||
<var-decl name='_fileno' type-id='type-id-1' visibility='default'/>
|
||||
<var-decl name='_fileno' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='928'>
|
||||
<var-decl name='_flags2' type-id='type-id-1' visibility='default'/>
|
||||
<var-decl name='_flags2' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='960'>
|
||||
<var-decl name='_old_offset' type-id='type-id-18' visibility='default'/>
|
||||
<var-decl name='_old_offset' type-id='79989e9c' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1024'>
|
||||
<var-decl name='_cur_column' type-id='type-id-19' visibility='default'/>
|
||||
<var-decl name='_cur_column' type-id='8efea9e5' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1040'>
|
||||
<var-decl name='_vtable_offset' type-id='type-id-20' visibility='default'/>
|
||||
<var-decl name='_vtable_offset' type-id='28577a57' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1048'>
|
||||
<var-decl name='_shortbuf' type-id='type-id-21' visibility='default'/>
|
||||
<var-decl name='_shortbuf' type-id='89feb1ec' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1088'>
|
||||
<var-decl name='_lock' type-id='cecf4ea7' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1152'>
|
||||
<var-decl name='_offset' type-id='type-id-22' visibility='default'/>
|
||||
<var-decl name='_offset' type-id='724e4de6' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1216'>
|
||||
<var-decl name='__pad1' type-id='type-id-11' visibility='default'/>
|
||||
<var-decl name='__pad1' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1280'>
|
||||
<var-decl name='__pad2' type-id='type-id-11' visibility='default'/>
|
||||
<var-decl name='__pad2' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1344'>
|
||||
<var-decl name='__pad3' type-id='type-id-11' visibility='default'/>
|
||||
<var-decl name='__pad3' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1408'>
|
||||
<var-decl name='__pad4' type-id='type-id-11' visibility='default'/>
|
||||
<var-decl name='__pad4' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1472'>
|
||||
<var-decl name='__pad5' type-id='type-id-13' visibility='default'/>
|
||||
<var-decl name='__pad5' type-id='b59d7dce' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1536'>
|
||||
<var-decl name='_mode' type-id='type-id-1' visibility='default'/>
|
||||
<var-decl name='_mode' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1568'>
|
||||
<var-decl name='_unused2' type-id='type-id-23' visibility='default'/>
|
||||
<var-decl name='_unused2' type-id='664ac0b7' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='_IO_marker' size-in-bits='192' is-struct='yes' visibility='default' id='type-id-24'>
|
||||
<class-decl name='_IO_marker' size-in-bits='192' is-struct='yes' visibility='default' id='010ae0b9'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='_next' type-id='type-id-16' visibility='default'/>
|
||||
<var-decl name='_next' type-id='e4c6fa61' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='_sbuf' type-id='type-id-17' visibility='default'/>
|
||||
<var-decl name='_sbuf' type-id='dca988a5' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='_pos' type-id='type-id-1' visibility='default'/>
|
||||
<var-decl name='_pos' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<pointer-type-def type-id='type-id-24' size-in-bits='64' id='type-id-16'/>
|
||||
<pointer-type-def type-id='type-id-15' size-in-bits='64' id='type-id-17'/>
|
||||
<type-decl name='long int' size-in-bits='64' id='type-id-25'/>
|
||||
<typedef-decl name='__off_t' type-id='type-id-25' id='type-id-18'/>
|
||||
<type-decl name='unsigned short int' size-in-bits='16' id='type-id-19'/>
|
||||
<type-decl name='signed char' size-in-bits='8' id='type-id-20'/>
|
||||
|
||||
<array-type-def dimensions='1' type-id='type-id-2' size-in-bits='8' id='type-id-21'>
|
||||
<subrange length='1' type-id='type-id-12' id='type-id-26'/>
|
||||
|
||||
</array-type-def>
|
||||
<typedef-decl name='__off64_t' type-id='type-id-25' id='type-id-22'/>
|
||||
|
||||
<array-type-def dimensions='1' type-id='type-id-2' size-in-bits='160' id='type-id-23'>
|
||||
<subrange length='20' type-id='type-id-12' id='type-id-27'/>
|
||||
|
||||
</array-type-def>
|
||||
<typedef-decl name='FILE' type-id='type-id-15' id='type-id-28'/>
|
||||
<pointer-type-def type-id='type-id-28' size-in-bits='64' id='type-id-29'/>
|
||||
<typedef-decl name='__off_t' type-id='bd54fe1a' id='79989e9c'/>
|
||||
<typedef-decl name='_IO_lock_t' type-id='48b5725f' id='bb4788fa'/>
|
||||
<typedef-decl name='__off64_t' type-id='bd54fe1a' id='724e4de6'/>
|
||||
<pointer-type-def type-id='aa12d1ba' size-in-bits='64' id='822cd80b'/>
|
||||
<pointer-type-def type-id='ec1ed955' size-in-bits='64' id='dca988a5'/>
|
||||
<pointer-type-def type-id='bb4788fa' size-in-bits='64' id='cecf4ea7'/>
|
||||
<pointer-type-def type-id='010ae0b9' size-in-bits='64' id='e4c6fa61'/>
|
||||
<function-decl name='lzbe_bootenv_print' mangled-name='lzbe_bootenv_print' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='lzbe_bootenv_print'>
|
||||
<parameter type-id='type-id-4' name='pool'/>
|
||||
<parameter type-id='type-id-4' name='nvlist'/>
|
||||
<parameter type-id='type-id-29' name='of'/>
|
||||
<return type-id='type-id-1'/>
|
||||
</function-decl>
|
||||
<function-decl name='lzbe_nvlist_get' mangled-name='lzbe_nvlist_get' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
</function-decl>
|
||||
<function-decl name='nvlist_print' mangled-name='nvlist_print' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='type-id-10'/>
|
||||
<parameter type-id='80f4b756' name='pool'/>
|
||||
<parameter type-id='80f4b756' name='nvlist'/>
|
||||
<parameter type-id='822cd80b' name='of'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
</abi-corpus>
|
||||
|
@ -63,7 +63,7 @@ lzbe_set_boot_device(const char *pool, lzbe_flags_t flag, const char *device)
|
||||
/* Drop this nvlist */
|
||||
fnvlist_free(nv);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case lzbe_replace:
|
||||
nv = fnvlist_alloc();
|
||||
break;
|
||||
|
@ -1032,10 +1032,11 @@ zpool_read_label(int fd, nvlist_t **config, int *num_labels)
|
||||
// This shouldn't be possible to
|
||||
// encounter, die if we do.
|
||||
ASSERT(B_FALSE);
|
||||
fallthrough;
|
||||
case EOPNOTSUPP:
|
||||
case ENOSYS:
|
||||
do_slow = B_TRUE;
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case 0:
|
||||
default:
|
||||
(void) aio_return(&aiocbs[l]);
|
||||
|
@ -377,7 +377,7 @@ kcf_provider_zero_refcnt(kcf_provider_desc_t *desc)
|
||||
mutex_exit(&desc->pd_lock);
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
|
||||
case CRYPTO_HW_PROVIDER:
|
||||
case CRYPTO_LOGICAL_PROVIDER:
|
||||
|
@ -976,7 +976,7 @@ aes_encrypt_atomic(crypto_provider_handle_t provider,
|
||||
case AES_GMAC_MECH_INFO_TYPE:
|
||||
if (plaintext->cd_length != 0)
|
||||
return (CRYPTO_ARGUMENTS_BAD);
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case AES_GCM_MECH_INFO_TYPE:
|
||||
length_needed = plaintext->cd_length + aes_ctx.ac_tag_len;
|
||||
break;
|
||||
|
@ -8,6 +8,10 @@
|
||||
#define lcode_c
|
||||
#define LUA_CORE
|
||||
|
||||
#if defined(HAVE_IMPLICIT_FALLTHROUGH)
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#endif
|
||||
|
||||
#include <sys/lua/lua.h>
|
||||
|
||||
#include "lcode.h"
|
||||
|
@ -676,7 +676,7 @@ static void freeobj (lua_State *L, GCObject *o) {
|
||||
case LUA_TUSERDATA: luaM_freemem(L, o, sizeudata(gco2u(o))); break;
|
||||
case LUA_TSHRSTR:
|
||||
G(L)->strt.nuse--;
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case LUA_TLNGSTR: {
|
||||
luaM_freemem(L, o, sizestring(gco2ts(o)));
|
||||
break;
|
||||
|
@ -477,7 +477,7 @@ static int llex (LexState *ls, SemInfo *seminfo) {
|
||||
else if (!lisdigit(ls->current)) return '.';
|
||||
/* else go through */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9': {
|
||||
read_numeral(ls, seminfo);
|
||||
|
@ -501,7 +501,7 @@ static const char *match (MatchState *ms, const char *s, const char *p) {
|
||||
}
|
||||
case '+': /* 1 or more repetitions */
|
||||
s++; /* 1 match already done */
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case '*': /* 0 or more repetitions */
|
||||
s = max_expand(ms, s, p, ep);
|
||||
break;
|
||||
|
@ -492,7 +492,7 @@ const TValue *luaH_get (Table *t, const TValue *key) {
|
||||
return luaH_getint(t, k); /* use specialized version */
|
||||
/* else go through */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default: {
|
||||
Node *n = mainposition(t, key);
|
||||
do { /* check whether `key' is somewhere in the chain */
|
||||
|
@ -125,7 +125,7 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath,
|
||||
struct vfsconf *vfsp;
|
||||
struct mount *mp;
|
||||
vnode_t *vp, *mvp;
|
||||
struct ucred *cr;
|
||||
struct ucred *pcr, *tcr;
|
||||
int error;
|
||||
|
||||
ASSERT_VOP_ELOCKED(*vpp, "mount_snapshot");
|
||||
@ -194,14 +194,18 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath,
|
||||
* mount(8) and df(1) output.
|
||||
*/
|
||||
mp->mnt_flag |= MNT_IGNORE;
|
||||
|
||||
/*
|
||||
* XXX: This is evil, but we can't mount a snapshot as a regular user.
|
||||
* XXX: Is is safe when snapshot is mounted from within a jail?
|
||||
*/
|
||||
cr = td->td_ucred;
|
||||
tcr = td->td_ucred;
|
||||
pcr = td->td_proc->p_ucred;
|
||||
td->td_ucred = kcred;
|
||||
td->td_proc->p_ucred = kcred;
|
||||
error = VFS_MOUNT(mp);
|
||||
td->td_ucred = cr;
|
||||
td->td_ucred = tcr;
|
||||
td->td_proc->p_ucred = pcr;
|
||||
|
||||
if (error != 0) {
|
||||
/*
|
||||
|
@ -269,7 +269,7 @@ zfs_ace_fuid_size(void *acep)
|
||||
entry_type == OWNING_GROUP ||
|
||||
entry_type == ACE_EVERYONE)
|
||||
return (sizeof (zfs_ace_hdr_t));
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default:
|
||||
return (sizeof (zfs_ace_t));
|
||||
}
|
||||
@ -2153,7 +2153,7 @@ zfs_zaccess_aces_check(znode_t *zp, uint32_t *working_mode,
|
||||
break;
|
||||
case OWNING_GROUP:
|
||||
who = gowner;
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case ACE_IDENTIFIER_GROUP:
|
||||
checkit = zfs_groupmember(zfsvfs, who, cr);
|
||||
break;
|
||||
|
@ -960,7 +960,7 @@ zfs_lookup(vnode_t *dvp, const char *nm, vnode_t **vpp,
|
||||
cnp->cn_flags |= SAVENAME;
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case DELETE:
|
||||
if (error == 0)
|
||||
cnp->cn_flags |= SAVENAME;
|
||||
|
@ -269,7 +269,7 @@ zfs_ace_fuid_size(void *acep)
|
||||
entry_type == OWNING_GROUP ||
|
||||
entry_type == ACE_EVERYONE)
|
||||
return (sizeof (zfs_ace_hdr_t));
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default:
|
||||
return (sizeof (zfs_ace_t));
|
||||
}
|
||||
@ -2317,7 +2317,7 @@ zfs_zaccess_aces_check(znode_t *zp, uint32_t *working_mode,
|
||||
break;
|
||||
case OWNING_GROUP:
|
||||
who = gowner;
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case ACE_IDENTIFIER_GROUP:
|
||||
checkit = zfs_groupmember(zfsvfs, who, cr);
|
||||
break;
|
||||
|
@ -430,7 +430,7 @@ zfs_inode_set_ops(zfsvfs_t *zfsvfs, struct inode *ip)
|
||||
case S_IFBLK:
|
||||
(void) sa_lookup(ITOZ(ip)->z_sa_hdl, SA_ZPL_RDEV(zfsvfs), &rdev,
|
||||
sizeof (rdev));
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case S_IFIFO:
|
||||
case S_IFSOCK:
|
||||
init_special_inode(ip, ip->i_mode, rdev);
|
||||
|
@ -1012,13 +1012,12 @@ zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
|
||||
}
|
||||
#endif /* HAVE_SET_ACL */
|
||||
|
||||
struct posix_acl *
|
||||
zpl_get_acl(struct inode *ip, int type)
|
||||
static struct posix_acl *
|
||||
zpl_get_acl_impl(struct inode *ip, int type)
|
||||
{
|
||||
struct posix_acl *acl;
|
||||
void *value = NULL;
|
||||
char *name;
|
||||
int size;
|
||||
|
||||
/*
|
||||
* As of Linux 3.14, the kernel get_acl will check this for us.
|
||||
@ -1042,7 +1041,7 @@ zpl_get_acl(struct inode *ip, int type)
|
||||
return (ERR_PTR(-EINVAL));
|
||||
}
|
||||
|
||||
size = zpl_xattr_get(ip, name, NULL, 0);
|
||||
int size = zpl_xattr_get(ip, name, NULL, 0);
|
||||
if (size > 0) {
|
||||
value = kmem_alloc(size, KM_SLEEP);
|
||||
size = zpl_xattr_get(ip, name, value, size);
|
||||
@ -1068,6 +1067,25 @@ zpl_get_acl(struct inode *ip, int type)
|
||||
return (acl);
|
||||
}
|
||||
|
||||
#if defined(HAVE_GET_ACL_RCU)
|
||||
struct posix_acl *
|
||||
zpl_get_acl(struct inode *ip, int type, bool rcu)
|
||||
{
|
||||
if (rcu)
|
||||
return (ERR_PTR(-ECHILD));
|
||||
|
||||
return (zpl_get_acl_impl(ip, type));
|
||||
}
|
||||
#elif defined(HAVE_GET_ACL)
|
||||
struct posix_acl *
|
||||
zpl_get_acl(struct inode *ip, int type)
|
||||
{
|
||||
return (zpl_get_acl_impl(ip, type));
|
||||
}
|
||||
#else
|
||||
#error "Unsupported iops->get_acl() implementation"
|
||||
#endif /* HAVE_GET_ACL_RCU */
|
||||
|
||||
int
|
||||
zpl_init_acl(struct inode *ip, struct inode *dir)
|
||||
{
|
||||
@ -1078,7 +1096,7 @@ zpl_init_acl(struct inode *ip, struct inode *dir)
|
||||
return (0);
|
||||
|
||||
if (!S_ISLNK(ip->i_mode)) {
|
||||
acl = zpl_get_acl(dir, ACL_TYPE_DEFAULT);
|
||||
acl = zpl_get_acl_impl(dir, ACL_TYPE_DEFAULT);
|
||||
if (IS_ERR(acl))
|
||||
return (PTR_ERR(acl));
|
||||
if (!acl) {
|
||||
@ -1127,7 +1145,7 @@ zpl_chmod_acl(struct inode *ip)
|
||||
if (S_ISLNK(ip->i_mode))
|
||||
return (-EOPNOTSUPP);
|
||||
|
||||
acl = zpl_get_acl(ip, ACL_TYPE_ACCESS);
|
||||
acl = zpl_get_acl_impl(ip, ACL_TYPE_ACCESS);
|
||||
if (IS_ERR(acl) || !acl)
|
||||
return (PTR_ERR(acl));
|
||||
|
||||
@ -1189,7 +1207,7 @@ __zpl_xattr_acl_get_access(struct inode *ip, const char *name,
|
||||
if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
|
||||
return (-EOPNOTSUPP);
|
||||
|
||||
acl = zpl_get_acl(ip, type);
|
||||
acl = zpl_get_acl_impl(ip, type);
|
||||
if (IS_ERR(acl))
|
||||
return (PTR_ERR(acl));
|
||||
if (acl == NULL)
|
||||
@ -1217,7 +1235,7 @@ __zpl_xattr_acl_get_default(struct inode *ip, const char *name,
|
||||
if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIX)
|
||||
return (-EOPNOTSUPP);
|
||||
|
||||
acl = zpl_get_acl(ip, type);
|
||||
acl = zpl_get_acl_impl(ip, type);
|
||||
if (IS_ERR(acl))
|
||||
return (PTR_ERR(acl));
|
||||
if (acl == NULL)
|
||||
|
@ -1066,10 +1066,10 @@ abd_raidz_gen_iterate(abd_t **cabds, abd_t *dabd,
|
||||
switch (parity) {
|
||||
case 3:
|
||||
len = MIN(caiters[2].iter_mapsize, len);
|
||||
/* falls through */
|
||||
fallthrough;
|
||||
case 2:
|
||||
len = MIN(caiters[1].iter_mapsize, len);
|
||||
/* falls through */
|
||||
fallthrough;
|
||||
case 1:
|
||||
len = MIN(caiters[0].iter_mapsize, len);
|
||||
}
|
||||
@ -1179,11 +1179,11 @@ abd_raidz_rec_iterate(abd_t **cabds, abd_t **tabds,
|
||||
case 3:
|
||||
len = MIN(xiters[2].iter_mapsize, len);
|
||||
len = MIN(citers[2].iter_mapsize, len);
|
||||
/* falls through */
|
||||
fallthrough;
|
||||
case 2:
|
||||
len = MIN(xiters[1].iter_mapsize, len);
|
||||
len = MIN(citers[1].iter_mapsize, len);
|
||||
/* falls through */
|
||||
fallthrough;
|
||||
case 1:
|
||||
len = MIN(xiters[0].iter_mapsize, len);
|
||||
len = MIN(citers[0].iter_mapsize, len);
|
||||
|
@ -5911,17 +5911,24 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
|
||||
*/
|
||||
fstrans_cookie_t cookie = spl_fstrans_mark();
|
||||
top:
|
||||
/*
|
||||
* Verify the block pointer contents are reasonable. This should
|
||||
* always be the case since the blkptr is protected by a checksum.
|
||||
* However, if there is damage it's desirable to detect this early
|
||||
* and treat it as a checksum error. This allows an alternate blkptr
|
||||
* to be tried when one is available (e.g. ditto blocks).
|
||||
*/
|
||||
if (!zfs_blkptr_verify(spa, bp, zio_flags & ZIO_FLAG_CONFIG_WRITER,
|
||||
BLK_VERIFY_LOG)) {
|
||||
rc = SET_ERROR(ECKSUM);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!embedded_bp) {
|
||||
/*
|
||||
* Embedded BP's have no DVA and require no I/O to "read".
|
||||
* Create an anonymous arc buf to back it.
|
||||
*/
|
||||
if (!zfs_blkptr_verify(spa, bp, zio_flags &
|
||||
ZIO_FLAG_CONFIG_WRITER, BLK_VERIFY_LOG)) {
|
||||
rc = SET_ERROR(ECKSUM);
|
||||
goto out;
|
||||
}
|
||||
|
||||
hdr = buf_hash_find(guid, bp, &hash_lock);
|
||||
}
|
||||
|
||||
@ -6535,7 +6542,6 @@ arc_release(arc_buf_t *buf, void *tag)
|
||||
ASSERT(!HDR_IO_IN_PROGRESS(hdr));
|
||||
ASSERT(!HDR_IN_HASH_TABLE(hdr));
|
||||
ASSERT(!HDR_HAS_L2HDR(hdr));
|
||||
ASSERT(HDR_EMPTY(hdr));
|
||||
|
||||
ASSERT3U(hdr->b_l1hdr.b_bufcnt, ==, 1);
|
||||
ASSERT3S(zfs_refcount_count(&hdr->b_l1hdr.b_refcnt), ==, 1);
|
||||
|
@ -2054,6 +2054,8 @@ setup_to_thread(struct send_thread_arg *to_arg, objset_t *to_os,
|
||||
to_arg->flags = TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA;
|
||||
if (rawok)
|
||||
to_arg->flags |= TRAVERSE_NO_DECRYPT;
|
||||
if (zfs_send_corrupt_data)
|
||||
to_arg->flags |= TRAVERSE_HARD;
|
||||
to_arg->num_blocks_visited = &dssp->dss_blocks;
|
||||
(void) thread_create(NULL, 0, send_traverse_thread, to_arg, 0,
|
||||
curproc, TS_RUN, minclsyspri);
|
||||
|
@ -749,7 +749,7 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds, const char *propname,
|
||||
ASSERT(err == 0 || err == ENOENT);
|
||||
err = zap_remove(mos, zapobj, inheritstr, tx);
|
||||
ASSERT(err == 0 || err == ENOENT);
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case (ZPROP_SRC_NONE | ZPROP_SRC_RECEIVED):
|
||||
/*
|
||||
* remove propname$recvd
|
||||
|
@ -9710,7 +9710,7 @@ spa_activity_in_progress(spa_t *spa, zpool_wait_activity_t activity,
|
||||
case ZPOOL_WAIT_RESILVER:
|
||||
if ((*in_progress = vdev_rebuild_active(spa->spa_root_vdev)))
|
||||
break;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case ZPOOL_WAIT_SCRUB:
|
||||
{
|
||||
boolean_t scanning, paused, is_scrub;
|
||||
|
@ -1305,7 +1305,7 @@ vdev_label_read_bootenv(vdev_t *rvd, nvlist_t *bootenv)
|
||||
nvlist_free(config);
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
default:
|
||||
/* Check for FreeBSD zfs bootonce command string */
|
||||
buf = abd_to_buf(abd);
|
||||
|
@ -142,7 +142,7 @@ static const struct {
|
||||
a.b[6] = mul_lt[a.b[6]]; \
|
||||
a.b[5] = mul_lt[a.b[5]]; \
|
||||
a.b[4] = mul_lt[a.b[4]]; \
|
||||
/* falls through */ \
|
||||
fallthrough; \
|
||||
case 4: \
|
||||
a.b[3] = mul_lt[a.b[3]]; \
|
||||
a.b[2] = mul_lt[a.b[2]]; \
|
||||
|
@ -1444,6 +1444,58 @@ zfs_ereport_fini(void)
|
||||
mutex_destroy(&recent_events_lock);
|
||||
}
|
||||
|
||||
void
|
||||
zfs_ereport_snapshot_post(const char *subclass, spa_t *spa, const char *name)
|
||||
{
|
||||
nvlist_t *aux;
|
||||
|
||||
aux = fm_nvlist_create(NULL);
|
||||
nvlist_add_string(aux, FM_EREPORT_PAYLOAD_ZFS_SNAPSHOT_NAME, name);
|
||||
|
||||
zfs_post_common(spa, NULL, FM_RSRC_CLASS, subclass, aux);
|
||||
fm_nvlist_destroy(aux, FM_NVA_FREE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Post when a event when a zvol is created or removed
|
||||
*
|
||||
* This is currently only used by macOS, since it uses the event to create
|
||||
* symlinks between the volume name (mypool/myvol) and the actual /dev
|
||||
* device (/dev/disk3). For example:
|
||||
*
|
||||
* /var/run/zfs/dsk/mypool/myvol -> /dev/disk3
|
||||
*
|
||||
* name: The full name of the zvol ("mypool/myvol")
|
||||
* dev_name: The full /dev name for the zvol ("/dev/disk3")
|
||||
* raw_name: The raw /dev name for the zvol ("/dev/rdisk3")
|
||||
*/
|
||||
void
|
||||
zfs_ereport_zvol_post(const char *subclass, const char *name,
|
||||
const char *dev_name, const char *raw_name)
|
||||
{
|
||||
nvlist_t *aux;
|
||||
char *r;
|
||||
|
||||
boolean_t locked = mutex_owned(&spa_namespace_lock);
|
||||
if (!locked) mutex_enter(&spa_namespace_lock);
|
||||
spa_t *spa = spa_lookup(name);
|
||||
if (!locked) mutex_exit(&spa_namespace_lock);
|
||||
|
||||
if (spa == NULL)
|
||||
return;
|
||||
|
||||
aux = fm_nvlist_create(NULL);
|
||||
nvlist_add_string(aux, FM_EREPORT_PAYLOAD_ZFS_DEVICE_NAME, dev_name);
|
||||
nvlist_add_string(aux, FM_EREPORT_PAYLOAD_ZFS_RAW_DEVICE_NAME,
|
||||
raw_name);
|
||||
r = strchr(name, '/');
|
||||
if (r && r[1])
|
||||
nvlist_add_string(aux, FM_EREPORT_PAYLOAD_ZFS_VOLUME, &r[1]);
|
||||
|
||||
zfs_post_common(spa, NULL, FM_RSRC_CLASS, subclass, aux);
|
||||
fm_nvlist_destroy(aux, FM_NVA_FREE);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(zfs_ereport_post);
|
||||
EXPORT_SYMBOL(zfs_ereport_is_valid);
|
||||
EXPORT_SYMBOL(zfs_ereport_post_checksum);
|
||||
|
@ -362,7 +362,7 @@ zfs_replay_create_acl(void *arg1, void *arg2, boolean_t byteswap)
|
||||
zfsvfs->z_fuid_replay = zfs_replay_fuids(fuidstart,
|
||||
(void *)&name, lracl->lr_fuidcnt, lracl->lr_domcnt,
|
||||
lr->lr_uid, lr->lr_gid);
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case TX_CREATE_ACL_ATTR:
|
||||
if (name == NULL) {
|
||||
lrattr = (lr_attr_t *)(caddr_t)(lracl + 1);
|
||||
@ -394,7 +394,7 @@ zfs_replay_create_acl(void *arg1, void *arg2, boolean_t byteswap)
|
||||
zfsvfs->z_fuid_replay = zfs_replay_fuids(fuidstart,
|
||||
(void *)&name, lracl->lr_fuidcnt, lracl->lr_domcnt,
|
||||
lr->lr_uid, lr->lr_gid);
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case TX_MKDIR_ACL_ATTR:
|
||||
if (name == NULL) {
|
||||
lrattr = (lr_attr_t *)(caddr_t)(lracl + 1);
|
||||
@ -519,7 +519,7 @@ zfs_replay_create(void *arg1, void *arg2, boolean_t byteswap)
|
||||
zfs_replay_fuid_domain(start, &start,
|
||||
lr->lr_uid, lr->lr_gid);
|
||||
name = (char *)start;
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
|
||||
case TX_CREATE:
|
||||
if (name == NULL)
|
||||
@ -537,7 +537,7 @@ zfs_replay_create(void *arg1, void *arg2, boolean_t byteswap)
|
||||
zfs_replay_fuid_domain(start, &start,
|
||||
lr->lr_uid, lr->lr_gid);
|
||||
name = (char *)start;
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
|
||||
case TX_MKDIR:
|
||||
if (name == NULL)
|
||||
|
@ -1178,6 +1178,20 @@ zil_lwb_flush_vdevs_done(zio_t *zio)
|
||||
|
||||
ASSERT3P(zcw->zcw_lwb, ==, lwb);
|
||||
zcw->zcw_lwb = NULL;
|
||||
/*
|
||||
* We expect any ZIO errors from child ZIOs to have been
|
||||
* propagated "up" to this specific LWB's root ZIO, in
|
||||
* order for this error handling to work correctly. This
|
||||
* includes ZIO errors from either this LWB's write or
|
||||
* flush, as well as any errors from other dependent LWBs
|
||||
* (e.g. a root LWB ZIO that might be a child of this LWB).
|
||||
*
|
||||
* With that said, it's important to note that LWB flush
|
||||
* errors are not propagated up to the LWB root ZIO.
|
||||
* This is incorrect behavior, and results in VDEV flush
|
||||
* errors not being handled correctly here. See the
|
||||
* comment above the call to "zio_flush" for details.
|
||||
*/
|
||||
|
||||
zcw->zcw_zio_error = zio->io_error;
|
||||
|
||||
@ -1251,6 +1265,12 @@ zil_lwb_write_done(zio_t *zio)
|
||||
* nodes. We avoid calling zio_flush() since there isn't any
|
||||
* good reason for doing so, after the lwb block failed to be
|
||||
* written out.
|
||||
*
|
||||
* Additionally, we don't perform any further error handling at
|
||||
* this point (e.g. setting "zcw_zio_error" appropriately), as
|
||||
* we expect that to occur in "zil_lwb_flush_vdevs_done" (thus,
|
||||
* we expect any error seen here, to have been propagated to
|
||||
* that function).
|
||||
*/
|
||||
if (zio->io_error != 0) {
|
||||
while ((zv = avl_destroy_nodes(t, &cookie)) != NULL)
|
||||
@ -1281,8 +1301,17 @@ zil_lwb_write_done(zio_t *zio)
|
||||
|
||||
while ((zv = avl_destroy_nodes(t, &cookie)) != NULL) {
|
||||
vdev_t *vd = vdev_lookup_top(spa, zv->zv_vdev);
|
||||
if (vd != NULL)
|
||||
if (vd != NULL) {
|
||||
/*
|
||||
* The "ZIO_FLAG_DONT_PROPAGATE" is currently
|
||||
* always used within "zio_flush". This means,
|
||||
* any errors when flushing the vdev(s), will
|
||||
* (unfortunately) not be handled correctly,
|
||||
* since these "zio_flush" errors will not be
|
||||
* propagated up to "zil_lwb_flush_vdevs_done".
|
||||
*/
|
||||
zio_flush(lwb->lwb_root_zio, vd);
|
||||
}
|
||||
kmem_free(zv, sizeof (*zv));
|
||||
}
|
||||
}
|
||||
@ -1399,8 +1428,7 @@ zil_lwb_write_open(zilog_t *zilog, lwb_t *lwb)
|
||||
lwb->lwb_write_zio = zio_rewrite(lwb->lwb_root_zio,
|
||||
zilog->zl_spa, 0, &lwb->lwb_blk, lwb_abd,
|
||||
BP_GET_LSIZE(&lwb->lwb_blk), zil_lwb_write_done, lwb,
|
||||
prio, ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE |
|
||||
ZIO_FLAG_FASTWRITE, &zb);
|
||||
prio, ZIO_FLAG_CANFAIL | ZIO_FLAG_FASTWRITE, &zb);
|
||||
ASSERT3P(lwb->lwb_write_zio, !=, NULL);
|
||||
|
||||
lwb->lwb_state = LWB_STATE_OPENED;
|
||||
|
@ -1006,7 +1006,7 @@ zfs_blkptr_verify(spa_t *spa, const blkptr_t *bp, boolean_t config_held,
|
||||
* will be done once the zio is executed in vdev_mirror_map_alloc.
|
||||
*/
|
||||
if (!spa->spa_trust_config)
|
||||
return (B_TRUE);
|
||||
return (errors == 0);
|
||||
|
||||
if (!config_held)
|
||||
spa_config_enter(spa, SCL_VDEV, bp, RW_READER);
|
||||
@ -1771,6 +1771,18 @@ zio_write_compress(zio_t *zio)
|
||||
zio->io_abd, NULL, lsize, zp->zp_complevel);
|
||||
if (psize == 0 || psize >= lsize)
|
||||
compress = ZIO_COMPRESS_OFF;
|
||||
} else if (zio->io_flags & ZIO_FLAG_RAW_COMPRESS) {
|
||||
size_t rounded = MIN((size_t)roundup(psize,
|
||||
spa->spa_min_alloc), lsize);
|
||||
|
||||
if (rounded != psize) {
|
||||
abd_t *cdata = abd_alloc_linear(rounded, B_TRUE);
|
||||
abd_zero_off(cdata, psize, rounded - psize);
|
||||
abd_copy_off(cdata, zio->io_abd, 0, 0, psize);
|
||||
psize = rounded;
|
||||
zio_push_transform(zio, cdata,
|
||||
psize, rounded, NULL);
|
||||
}
|
||||
} else {
|
||||
ASSERT3U(psize, !=, 0);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ zio_compress_to_feature(enum zio_compress comp)
|
||||
case ZIO_COMPRESS_ZSTD:
|
||||
return (SPA_FEATURE_ZSTD_COMPRESS);
|
||||
default:
|
||||
/* fallthru */;
|
||||
break;
|
||||
}
|
||||
return (SPA_FEATURE_NONE);
|
||||
}
|
||||
|
@ -1040,6 +1040,68 @@ zvol_create_snap_minor_cb(const char *dsname, void *arg)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* If spa_keystore_load_wkey() is called for an encrypted zvol,
|
||||
* we need to look for any clones also using the key. This function
|
||||
* is "best effort" - so we just skip over it if there are failures.
|
||||
*/
|
||||
static void
|
||||
zvol_add_clones(const char *dsname, list_t *minors_list)
|
||||
{
|
||||
/* Also check if it has clones */
|
||||
dsl_dir_t *dd = NULL;
|
||||
dsl_pool_t *dp = NULL;
|
||||
|
||||
if (dsl_pool_hold(dsname, FTAG, &dp) != 0)
|
||||
return;
|
||||
|
||||
if (!spa_feature_is_enabled(dp->dp_spa,
|
||||
SPA_FEATURE_ENCRYPTION))
|
||||
goto out;
|
||||
|
||||
if (dsl_dir_hold(dp, dsname, FTAG, &dd, NULL) != 0)
|
||||
goto out;
|
||||
|
||||
if (dsl_dir_phys(dd)->dd_clones == 0)
|
||||
goto out;
|
||||
|
||||
zap_cursor_t *zc = kmem_alloc(sizeof (zap_cursor_t), KM_SLEEP);
|
||||
zap_attribute_t *za = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP);
|
||||
objset_t *mos = dd->dd_pool->dp_meta_objset;
|
||||
|
||||
for (zap_cursor_init(zc, mos, dsl_dir_phys(dd)->dd_clones);
|
||||
zap_cursor_retrieve(zc, za) == 0;
|
||||
zap_cursor_advance(zc)) {
|
||||
dsl_dataset_t *clone;
|
||||
minors_job_t *job;
|
||||
|
||||
if (dsl_dataset_hold_obj(dd->dd_pool,
|
||||
za->za_first_integer, FTAG, &clone) == 0) {
|
||||
|
||||
char name[ZFS_MAX_DATASET_NAME_LEN];
|
||||
dsl_dataset_name(clone, name);
|
||||
|
||||
char *n = kmem_strdup(name);
|
||||
job = kmem_alloc(sizeof (minors_job_t), KM_SLEEP);
|
||||
job->name = n;
|
||||
job->list = minors_list;
|
||||
job->error = 0;
|
||||
list_insert_tail(minors_list, job);
|
||||
|
||||
dsl_dataset_rele(clone, FTAG);
|
||||
}
|
||||
}
|
||||
zap_cursor_fini(zc);
|
||||
kmem_free(za, sizeof (zap_attribute_t));
|
||||
kmem_free(zc, sizeof (zap_cursor_t));
|
||||
|
||||
out:
|
||||
if (dd != NULL)
|
||||
dsl_dir_rele(dd, FTAG);
|
||||
if (dp != NULL)
|
||||
dsl_pool_rele(dp, FTAG);
|
||||
}
|
||||
|
||||
/*
|
||||
* Mask errors to continue dmu_objset_find() traversal
|
||||
*/
|
||||
@ -1078,6 +1140,8 @@ zvol_create_minors_cb(const char *dsname, void *arg)
|
||||
taskq_dispatch(system_taskq, zvol_prefetch_minors_impl, job,
|
||||
TQ_SLEEP);
|
||||
|
||||
zvol_add_clones(dsname, minors_list);
|
||||
|
||||
if (snapdev == ZFS_SNAPDEV_VISIBLE) {
|
||||
/*
|
||||
* traverse snapshots only, do not traverse children,
|
||||
|
@ -280,15 +280,8 @@ if sys.platform.startswith('freebsd'):
|
||||
'cli_root/zfs_share/zfs_share_concurrent_shares':
|
||||
['FAIL', known_reason],
|
||||
'cli_root/zpool_import/zpool_import_012_pos': ['FAIL', known_reason],
|
||||
'cli_root/zpool_import/zpool_import_features_001_pos':
|
||||
['FAIL', '11854'],
|
||||
'cli_root/zpool_import/zpool_import_features_002_neg':
|
||||
['FAIL', '11854'],
|
||||
'cli_root/zpool_import/zpool_import_features_003_pos':
|
||||
['FAIL', '11854'],
|
||||
'delegate/zfs_allow_003_pos': ['FAIL', known_reason],
|
||||
'inheritance/inherit_001_pos': ['FAIL', '11829'],
|
||||
'pool_checkpoint/checkpoint_zhack_feat': ['FAIL', '11854'],
|
||||
'resilver/resilver_restart_001': ['FAIL', known_reason],
|
||||
'zvol/zvol_misc/zvol_misc_volmode': ['FAIL', known_reason],
|
||||
})
|
||||
|
@ -122,7 +122,7 @@ main(int argc, char *argv[])
|
||||
switch (sbuf.st_mode & S_IFMT) {
|
||||
case S_IFDIR:
|
||||
isdir = B_TRUE;
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case S_IFLNK:
|
||||
case S_IFCHR:
|
||||
case S_IFBLK:
|
||||
|
@ -83,25 +83,24 @@ function do_vol_test
|
||||
|
||||
vol=$TESTPOOL/$TESTVOL1
|
||||
vol_b_path=$ZVOL_DEVDIR/$TESTPOOL/$TESTVOL1
|
||||
vol_r_path=$ZVOL_RDEVDIR/$TESTPOOL/$TESTVOL1
|
||||
|
||||
log_must zfs create -V $VOLSIZE -o copies=$copies $vol
|
||||
log_must zfs set refreservation=none $vol
|
||||
block_device_wait $vol_r_path
|
||||
block_device_wait $vol_b_path
|
||||
|
||||
case "$type" in
|
||||
"ext2")
|
||||
if is_freebsd; then
|
||||
log_unsupported "ext2 test not implemented for freebsd"
|
||||
fi
|
||||
log_must eval "new_fs $vol_r_path >/dev/null 2>&1"
|
||||
log_must eval "new_fs $vol_b_path >/dev/null 2>&1"
|
||||
log_must mount -o rw $vol_b_path $mntp
|
||||
;;
|
||||
"ufs")
|
||||
if is_linux; then
|
||||
log_unsupported "ufs test not implemented for linux"
|
||||
fi
|
||||
log_must eval "new_fs $vol_r_path >/dev/null 2>&1"
|
||||
log_must eval "new_fs $vol_b_path >/dev/null 2>&1"
|
||||
log_must mount $vol_b_path $mntp
|
||||
;;
|
||||
"zfs")
|
||||
|
@ -69,7 +69,7 @@ rename_dataset ${vol}-new $vol
|
||||
|
||||
clone=$TESTPOOL/${snap}_clone
|
||||
create_clone $vol@$snap $clone
|
||||
block_device_wait
|
||||
block_device_wait $VOLDATA
|
||||
|
||||
#verify data integrity
|
||||
for input in $VOL_R_PATH $ZVOL_RDEVDIR/$clone; do
|
||||
|
@ -72,7 +72,7 @@ log_must zfs mount -o ro $POOL_NAME/testfs
|
||||
|
||||
old_mntpnt=$(get_prop mountpoint $POOL_NAME/testfs)
|
||||
log_must eval "ls $old_mntpnt | grep -q testfile"
|
||||
block_device_wait
|
||||
block_device_wait /dev/zvol/$POOL_NAME/testvol
|
||||
log_mustnot dd if=/dev/zero of=/dev/zvol/$POOL_NAME/testvol bs=512 count=1
|
||||
log_must dd if=/dev/zvol/$POOL_NAME/testvol of=/dev/null bs=512 count=1
|
||||
|
||||
@ -90,7 +90,7 @@ log_must eval "zfs send $POOL_NAME/testfs@snap1 | \
|
||||
zfs recv $POOL_NAME/encroot/testfs"
|
||||
log_must eval "zfs send $POOL_NAME/testvol@snap1 | \
|
||||
zfs recv $POOL_NAME/encroot/testvol"
|
||||
block_device_wait
|
||||
block_device_wait /dev/zvol/$POOL_NAME/encroot/testvol
|
||||
log_must dd if=/dev/zero of=/dev/zvol/$POOL_NAME/encroot/testvol bs=512 count=1
|
||||
new_mntpnt=$(get_prop mountpoint $POOL_NAME/encroot/testfs)
|
||||
log_must eval "ls $new_mntpnt | grep -q testfile"
|
||||
|
@ -107,6 +107,8 @@ log_must zfs create -o mountpoint=none $VOLFS
|
||||
log_must zfs create -V $VOLSIZE -s $SUBZVOL
|
||||
log_must zfs create -V $VOLSIZE -s $ZVOL
|
||||
udev_wait
|
||||
blockdev_exists $ZDEV
|
||||
blockdev_exists $SUBZDEV
|
||||
test_io $ZDEV
|
||||
test_io $SUBZDEV
|
||||
|
||||
|
@ -809,7 +809,7 @@
|
||||
/* #undef ZFS_IS_GPL_COMPATIBLE */
|
||||
|
||||
/* Define the project alias string. */
|
||||
#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g3b89d9518"
|
||||
#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g4a1195ca5"
|
||||
|
||||
/* Define the project author. */
|
||||
#define ZFS_META_AUTHOR "OpenZFS"
|
||||
@ -839,7 +839,7 @@
|
||||
#define ZFS_META_NAME "zfs"
|
||||
|
||||
/* Define the project release. */
|
||||
#define ZFS_META_RELEASE "FreeBSD_g3b89d9518"
|
||||
#define ZFS_META_RELEASE "FreeBSD_g4a1195ca5"
|
||||
|
||||
/* Define the project version. */
|
||||
#define ZFS_META_VERSION "2.1.99"
|
||||
|
@ -2,4 +2,4 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#define ZFS_META_GITREV "zfs-2.1.99-430-g3b89d9518"
|
||||
#define ZFS_META_GITREV "zfs-2.1.99-453-g4a1195ca50"
|
||||
|
Loading…
Reference in New Issue
Block a user