Date: Sun, 13 Mar 2022 23:52:48 GMT From: Martin Matuska <mm@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 408fc21842a8 - releng/13.1 - zfs: merge openzfs/zfs@ef83e07db (zfs-2.1-release) into releng/13.1 Message-ID: <202203132352.22DNqmjq056475@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch releng/13.1 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=408fc21842a843efc6599e90fc88f06cd3b8dd9c commit 408fc21842a843efc6599e90fc88f06cd3b8dd9c Author: Martin Matuska <mm@FreeBSD.org> AuthorDate: 2022-03-11 07:11:42 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2022-03-13 23:51:56 +0000 zfs: merge openzfs/zfs@ef83e07db (zfs-2.1-release) into releng/13.1 OpenZFS release 2.1.3 Notable upstream pull request merges: #12569 FreeBSD: Really zero the zero page #12828 FreeBSD: Add vop_standard_writecount_nomsyn #12828 zfs: Fix a deadlock between page busy and the teardown lock #12828 FreeBSD: Catch up with more VFS changes #12851 FreeBSD: Provide correct file generation number #12857 Verify dRAID empty sectors #12874 FreeBSD: Update argument types for VOP_READDIR #12896 Reduce number of arc_prune threads #12934 FreeBSD: Fix zvol_*_open() locking #12961 FreeBSD: Fix leaked strings in libspl mnttab #12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD #12981 Introduce a flag to skip comparing the local mac when raw sending #12985 Avoid memory allocations in the ARC eviction thread #13014 Report dnodes with faulty bonuslen #13016 FreeBSD: Fix zvol_cdev_open locking #13027 Fix clearing set-uid and set-gid bits on a file when replying a write #13031 Add enumerated vdev names to 'zpool iostat -v' and 'zpool list -v' #13074 Enable encrypted raw sending to pools with greater ashift #13076 Receive checks should allow unencrypted child datasets #13098 Avoid dirtying the final TXGs when exporting a pool #13172 Fix ENOSPC when unlinking multiple files from full pool Obtained from: OpenZFS OpenZFS commit: ef83e07db53e5d1017d3afbf376f4dbb2f6feada OpenZFS tag: zfs-2.1.3 Relnotes: yes (cherry picked from commit bd2e56ef47d5a2c69f6f8e092abfd27a4d469d1e) Approved by: re (delphij) --- .../.github/workflows/zfs-tests-functional.yml | 4 +- .../openzfs/.github/workflows/zfs-tests-sanity.yml | 4 +- sys/contrib/openzfs/META | 4 +- sys/contrib/openzfs/README.md | 2 +- sys/contrib/openzfs/cmd/mount_zfs/mount_zfs.c | 47 +++-- sys/contrib/openzfs/cmd/vdev_id/vdev_id | 11 +- sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 1 + sys/contrib/openzfs/cmd/zed/zed.c | 2 +- sys/contrib/openzfs/cmd/zed/zed.d/all-syslog.sh | 2 +- .../openzfs/cmd/zed/zed.d/generic-notify.sh | 2 +- .../openzfs/cmd/zed/zed.d/statechange-notify.sh | 5 +- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 90 +++++++++- sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 21 ++- sys/contrib/openzfs/cmd/zed/zed_conf.c | 1 + sys/contrib/openzfs/cmd/zed/zed_exec.c | 2 + sys/contrib/openzfs/cmd/zpool/zpool.d/dm-deps | 10 +- sys/contrib/openzfs/cmd/zpool/zpool.d/iostat | 6 +- sys/contrib/openzfs/cmd/zpool/zpool.d/lsblk | 2 +- sys/contrib/openzfs/cmd/zpool/zpool.d/media | 15 +- sys/contrib/openzfs/cmd/zpool/zpool.d/ses | 2 +- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 8 +- sys/contrib/openzfs/cmd/zstream/zstream_dump.c | 13 ++ sys/contrib/openzfs/config/Substfiles.am | 4 +- sys/contrib/openzfs/config/always-python.m4 | 2 +- sys/contrib/openzfs/config/always-pyzfs.m4 | 2 +- sys/contrib/openzfs/config/kernel-add-disk.m4 | 26 +++ sys/contrib/openzfs/config/kernel-fallocate.m4 | 17 ++ sys/contrib/openzfs/config/kernel-fpu.m4 | 49 +++++- sys/contrib/openzfs/config/kernel-kmem.m4 | 1 + sys/contrib/openzfs/config/kernel-kthread.m4 | 68 ++++++++ sys/contrib/openzfs/config/kernel-pde-data.m4 | 16 +- sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 22 ++- sys/contrib/openzfs/config/kernel.m4 | 117 +++++++++---- sys/contrib/openzfs/config/toolchain-simd.m4 | 66 +++++++ sys/contrib/openzfs/config/user-libfetch.m4 | 71 ++++++++ sys/contrib/openzfs/config/user.m4 | 1 + sys/contrib/openzfs/config/zfs-build.m4 | 3 + sys/contrib/openzfs/config/zfs-meta.m4 | 4 +- sys/contrib/openzfs/configure.ac | 1 + sys/contrib/openzfs/contrib/bpftrace/zfs-trace.sh | 3 +- .../dracut/02zfsexpandknowledge/module-setup.sh.in | 16 +- .../contrib/dracut/90zfs/module-setup.sh.in | 8 +- .../openzfs/contrib/dracut/90zfs/parse-zfs.sh.in | 2 +- .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 2 +- .../contrib/dracut/90zfs/zfs-generator.sh.in | 2 +- .../contrib/dracut/90zfs/zfs-load-key.sh.in | 37 ++-- .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- .../dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +- sys/contrib/openzfs/contrib/initramfs/hooks/zfs.in | 7 + sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 18 +- sys/contrib/openzfs/etc/default/zfs.in | 8 +- sys/contrib/openzfs/etc/init.d/.gitignore | 1 + sys/contrib/openzfs/etc/init.d/Makefile.am | 2 +- sys/contrib/openzfs/etc/init.d/README.md | 11 +- sys/contrib/openzfs/etc/init.d/zfs-import.in | 3 +- sys/contrib/openzfs/etc/init.d/zfs-load-key.in | 131 ++++++++++++++ sys/contrib/openzfs/etc/systemd/system/.gitignore | 1 + sys/contrib/openzfs/etc/systemd/system/Makefile.am | 5 +- .../etc/systemd/system/zfs-scrub-monthly@.timer.in | 12 ++ .../etc/systemd/system/zfs-scrub-weekly@.timer.in | 12 ++ .../etc/systemd/system/zfs-scrub@.service.in | 14 ++ sys/contrib/openzfs/etc/zfs/zfs-functions.in | 23 +-- sys/contrib/openzfs/include/libzfs_impl.h | 2 + .../openzfs/include/os/freebsd/spl/sys/vnode.h | 1 - .../include/os/linux/kernel/linux/simd_x86.h | 124 ++++++++++++- sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 4 + sys/contrib/openzfs/include/sys/dsl_pool.h | 1 + sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 9 + sys/contrib/openzfs/include/sys/spa.h | 2 + sys/contrib/openzfs/include/sys/vdev_draid.h | 1 + sys/contrib/openzfs/include/sys/vdev_raidz.h | 2 + sys/contrib/openzfs/include/sys/zio.h | 2 + sys/contrib/openzfs/lib/libshare/os/freebsd/nfs.c | 8 +- sys/contrib/openzfs/lib/libspl/os/freebsd/mnttab.c | 25 ++- sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs.abi | 73 +++++--- sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c | 186 ++++++++++++++++++++ sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 14 +- sys/contrib/openzfs/lib/libzfs/libzfs_util.c | 8 + .../openzfs/lib/libzfs/os/linux/libzfs_mount_os.c | 2 +- sys/contrib/openzfs/man/man4/zfs.4 | 7 + sys/contrib/openzfs/man/man7/zfsprops.7 | 33 +++- sys/contrib/openzfs/man/man7/zpoolprops.7 | 7 +- sys/contrib/openzfs/man/man8/zfs-load-key.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-receive.8 | 4 +- sys/contrib/openzfs/man/man8/zfs-share.8 | 12 +- sys/contrib/openzfs/man/man8/zgenhostid.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-attach.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-clear.8 | 7 +- sys/contrib/openzfs/man/man8/zpool-events.8 | 4 +- sys/contrib/openzfs/man/man8/zpool-import.8 | 7 +- sys/contrib/openzfs/man/man8/zpool-replace.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-scrub.8 | 21 +++ sys/contrib/openzfs/module/Makefile.in | 37 ++-- sys/contrib/openzfs/module/os/freebsd/zfs/abd_os.c | 1 + .../openzfs/module/os/freebsd/zfs/vdev_file.c | 3 +- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 2 +- .../openzfs/module/os/freebsd/zfs/zfs_racct.c | 4 + .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 8 +- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 22 ++- .../openzfs/module/os/freebsd/zfs/zio_crypt.c | 22 ++- .../openzfs/module/os/freebsd/zfs/zvol_os.c | 90 ++++++---- .../openzfs/module/os/linux/spl/spl-kstat.c | 2 +- .../openzfs/module/os/linux/spl/spl-procfs-list.c | 2 +- .../openzfs/module/os/linux/spl/spl-taskq.c | 11 +- .../openzfs/module/os/linux/spl/spl-thread.c | 7 +- .../openzfs/module/os/linux/zfs/vdev_disk.c | 2 +- .../openzfs/module/os/linux/zfs/vdev_file.c | 2 +- .../openzfs/module/os/linux/zfs/zfs_racct.c | 2 + .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 5 + .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 4 + .../openzfs/module/os/linux/zfs/zio_crypt.c | 18 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 9 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 125 +++++++------ sys/contrib/openzfs/module/zcommon/zfs_prop.c | 10 +- sys/contrib/openzfs/module/zfs/abd.c | 6 +- sys/contrib/openzfs/module/zfs/arc.c | 66 ++++--- sys/contrib/openzfs/module/zfs/bpobj.c | 4 +- sys/contrib/openzfs/module/zfs/bptree.c | 2 +- sys/contrib/openzfs/module/zfs/dbuf.c | 28 ++- sys/contrib/openzfs/module/zfs/dmu.c | 9 +- sys/contrib/openzfs/module/zfs/dmu_diff.c | 2 +- sys/contrib/openzfs/module/zfs/dmu_objset.c | 10 +- sys/contrib/openzfs/module/zfs/dmu_recv.c | 10 +- sys/contrib/openzfs/module/zfs/dmu_redact.c | 2 +- sys/contrib/openzfs/module/zfs/dmu_send.c | 5 +- sys/contrib/openzfs/module/zfs/dmu_traverse.c | 2 +- sys/contrib/openzfs/module/zfs/dmu_zfetch.c | 1 + sys/contrib/openzfs/module/zfs/dnode.c | 11 +- sys/contrib/openzfs/module/zfs/dnode_sync.c | 11 +- sys/contrib/openzfs/module/zfs/dsl_bookmark.c | 4 +- sys/contrib/openzfs/module/zfs/dsl_crypt.c | 9 +- sys/contrib/openzfs/module/zfs/dsl_dataset.c | 6 +- sys/contrib/openzfs/module/zfs/dsl_destroy.c | 4 +- sys/contrib/openzfs/module/zfs/dsl_dir.c | 28 +-- sys/contrib/openzfs/module/zfs/dsl_pool.c | 10 +- sys/contrib/openzfs/module/zfs/dsl_prop.c | 2 +- sys/contrib/openzfs/module/zfs/dsl_scan.c | 34 ++-- sys/contrib/openzfs/module/zfs/dsl_synctask.c | 2 +- sys/contrib/openzfs/module/zfs/fm.c | 4 +- sys/contrib/openzfs/module/zfs/gzip.c | 2 +- sys/contrib/openzfs/module/zfs/lz4.c | 6 +- sys/contrib/openzfs/module/zfs/lzjb.c | 4 +- sys/contrib/openzfs/module/zfs/metaslab.c | 16 +- sys/contrib/openzfs/module/zfs/range_tree.c | 8 +- sys/contrib/openzfs/module/zfs/sa.c | 8 +- sys/contrib/openzfs/module/zfs/sha256.c | 5 +- sys/contrib/openzfs/module/zfs/spa.c | 77 +++++--- sys/contrib/openzfs/module/zfs/spa_checkpoint.c | 10 +- sys/contrib/openzfs/module/zfs/spa_errlog.c | 2 + sys/contrib/openzfs/module/zfs/spa_misc.c | 2 + sys/contrib/openzfs/module/zfs/vdev.c | 9 +- sys/contrib/openzfs/module/zfs/vdev_draid.c | 51 +++++- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 6 +- sys/contrib/openzfs/module/zfs/vdev_initialize.c | 4 +- sys/contrib/openzfs/module/zfs/vdev_mirror.c | 2 + sys/contrib/openzfs/module/zfs/vdev_missing.c | 7 +- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 24 ++- sys/contrib/openzfs/module/zfs/vdev_removal.c | 4 +- sys/contrib/openzfs/module/zfs/vdev_trim.c | 1 + sys/contrib/openzfs/module/zfs/zap.c | 2 - sys/contrib/openzfs/module/zfs/zap_leaf.c | 2 - sys/contrib/openzfs/module/zfs/zap_micro.c | 2 - sys/contrib/openzfs/module/zfs/zcp.c | 4 +- sys/contrib/openzfs/module/zfs/zcp_synctask.c | 8 +- sys/contrib/openzfs/module/zfs/zfs_fm.c | 77 +++++++- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 105 ++++++++--- sys/contrib/openzfs/module/zfs/zil.c | 21 +-- sys/contrib/openzfs/module/zfs/zio.c | 18 +- sys/contrib/openzfs/module/zfs/zio_checksum.c | 10 +- sys/contrib/openzfs/module/zfs/zio_compress.c | 4 +- sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in | 2 +- sys/contrib/openzfs/rpm/generic/zfs-kmod.spec.in | 5 +- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 7 + sys/contrib/openzfs/rpm/redhat/zfs-kmod.spec.in | 5 +- sys/contrib/openzfs/scripts/dkms.mkconf | 22 +-- sys/contrib/openzfs/scripts/kmodtool | 2 +- sys/contrib/openzfs/scripts/zfs-tests.sh | 26 +-- sys/contrib/openzfs/scripts/zfs.sh | 11 +- sys/contrib/openzfs/scripts/zimport.sh | 2 +- sys/contrib/openzfs/tests/runfiles/common.run | 26 +-- sys/contrib/openzfs/tests/runfiles/linux.run | 14 +- sys/contrib/openzfs/tests/runfiles/sanity.run | 3 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 52 +++--- .../tests/zfs-tests/cmd/mmap_seek/mmap_seek.c | 4 + .../openzfs/tests/zfs-tests/include/blkdev.shlib | 2 +- .../openzfs/tests/zfs-tests/include/libtest.shlib | 30 +++- .../tests/zfs-tests/tests/functional/Makefile.am | 1 + .../functional/alloc_class/alloc_class.kshlib | 1 + .../tests/functional/cli_root/zfs_load-key/HEXKEY | 1 + .../functional/cli_root/zfs_load-key/Makefile.am | 6 +- .../functional/cli_root/zfs_load-key/PASSPHRASE | 1 + .../tests/functional/cli_root/zfs_load-key/RAWKEY | 1 + .../functional/cli_root/zfs_load-key/cleanup.ksh | 2 + .../functional/cli_root/zfs_load-key/setup.ksh | 5 +- .../cli_root/zfs_load-key/zfs_load-key.cfg | 31 ++++ .../cli_root/zfs_load-key/zfs_load-key_all.ksh | 9 + .../zfs_load-key/zfs_load-key_common.kshlib | 63 +++++++ .../cli_root/zfs_load-key/zfs_load-key_https.ksh | 78 +++++++++ .../zfs_load-key/zfs_load-key_location.ksh | 5 + .../zfs_load-key/zfs_load-key_recursive.ksh | 6 + .../functional/cli_root/zfs_receive/Makefile.am | 3 +- .../zfs_receive/zfs_receive_-wR-encrypted-mix.ksh | 75 ++++++++ .../zfs_receive/zfs_receive_to_encrypted.ksh | 18 +- .../cli_root/zfs_set/zfs_set_keylocation.ksh | 22 +-- .../cli_root/zpool_events/zpool_events_errors.ksh | 11 +- .../cli_root/zpool_expand/zpool_expand_001_pos.ksh | 4 +- .../zpool_import/import_devices_missing.ksh | 4 +- .../zpool_import/import_rewind_config_changed.ksh | 58 ++++++- .../cli_root/zpool_reopen/zpool_reopen.shlib | 4 +- .../tests/functional/deadman/deadman_sync.ksh | 4 +- .../functional/fallocate/fallocate_punch-hole.ksh | 27 ++- .../tests/functional/history/history_006_neg.ksh | 4 +- .../tests/functional/no_space/Makefile.am | 3 +- .../tests/functional/no_space/enospc_002_pos.ksh | 5 +- .../tests/functional/no_space/enospc_rm.ksh | 60 +++++++ .../pool_checkpoint/checkpoint_ro_rewind.ksh | 4 +- .../tests/functional/redundancy/redundancy.kshlib | 2 +- .../tests/functional/refreserv/refreserv_raidz.ksh | 2 +- .../functional/reservation/reservation_021_neg.ksh | 2 +- .../zfs-tests/tests/functional/rsend/Makefile.am | 2 + .../zfs-tests/tests/functional/rsend/rsend.kshlib | 8 + .../tests/functional/rsend/send-c_verify_ratio.ksh | 2 +- .../tests/functional/rsend/send_raw_ashift.ksh | 193 +++++++++++++++++++++ .../functional/rsend/send_raw_spill_block.ksh | 161 +++++++++++++++++ .../rsend/send_realloc_encrypted_files.ksh | 6 +- .../tests/functional/rsend/send_realloc_files.ksh | 6 +- .../zfs-tests/tests/functional/simd/Makefile.am | 2 + .../tests/functional/simd/simd_supported.ksh | 58 +++++++ .../tests/functional/snapshot/rollback_003_pos.ksh | 17 +- .../zfs-tests/tests/functional/suid/Makefile.am | 1 + .../tests/functional/suid/suid_write_to_file.c | 150 ++++++++-------- .../tests/functional/suid/suid_write_to_none.ksh | 2 +- .../tests/functional/suid/suid_write_to_sgid.ksh | 2 +- .../tests/functional/suid/suid_write_to_suid.ksh | 2 +- .../functional/suid/suid_write_to_suid_sgid.ksh | 2 +- .../functional/suid/suid_write_zil_replay.ksh | 99 +++++++++++ .../tests/functional/userquota/Makefile.am | 3 +- .../userquota/userspace_send_encrypted.ksh | 119 +++++++++++++ .../zvol/zvol_misc/zvol_misc_common.kshlib | 11 +- .../zvol/zvol_misc/zvol_misc_rename_inuse.ksh | 4 +- .../zvol/zvol_misc/zvol_misc_snapdev.ksh | 2 +- .../zvol/zvol_misc/zvol_misc_volmode.ksh | 93 +++++----- .../functional/zvol/zvol_misc/zvol_misc_zil.ksh | 4 +- sys/modules/zfs/Makefile | 1 + sys/modules/zfs/zfs_config.h | 53 +++++- sys/modules/zfs/zfs_gitrev.h | 2 +- 247 files changed, 3613 insertions(+), 910 deletions(-) diff --git a/sys/contrib/openzfs/.github/workflows/zfs-tests-functional.yml b/sys/contrib/openzfs/.github/workflows/zfs-tests-functional.yml index cad763287ea9..adcbcb15681a 100644 --- a/sys/contrib/openzfs/.github/workflows/zfs-tests-functional.yml +++ b/sys/contrib/openzfs/.github/workflows/zfs-tests-functional.yml @@ -26,7 +26,8 @@ jobs: xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \ libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \ libpam0g-dev pamtester python-dev python-setuptools python-cffi \ - python3 python3-dev python3-setuptools python3-cffi python3-packaging + python3 python3-dev python3-setuptools python3-cffi python3-packaging \ + libcurl4-openssl-dev - name: Autogen.sh run: | sh autogen.sh @@ -64,6 +65,7 @@ jobs: - name: Tests run: | /usr/share/zfs/zfs-tests.sh -vR -s 3G + timeout-minutes: 330 - name: Prepare artifacts if: failure() run: | diff --git a/sys/contrib/openzfs/.github/workflows/zfs-tests-sanity.yml b/sys/contrib/openzfs/.github/workflows/zfs-tests-sanity.yml index 78187212bb26..c1e257dd1572 100644 --- a/sys/contrib/openzfs/.github/workflows/zfs-tests-sanity.yml +++ b/sys/contrib/openzfs/.github/workflows/zfs-tests-sanity.yml @@ -22,7 +22,8 @@ jobs: xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \ libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \ libpam0g-dev pamtester python-dev python-setuptools python-cffi \ - python3 python3-dev python3-setuptools python3-cffi python3-packaging + python3 python3-dev python3-setuptools python3-cffi python3-packaging \ + libcurl4-openssl-dev - name: Autogen.sh run: | sh autogen.sh @@ -60,6 +61,7 @@ jobs: - name: Tests run: | /usr/share/zfs/zfs-tests.sh -vR -s 3G -r sanity + timeout-minutes: 330 - name: Prepare artifacts if: failure() run: | diff --git a/sys/contrib/openzfs/META b/sys/contrib/openzfs/META index 10130517955a..0437224b403f 100644 --- a/sys/contrib/openzfs/META +++ b/sys/contrib/openzfs/META @@ -1,10 +1,10 @@ Meta: 1 Name: zfs Branch: 1.0 -Version: 2.1.2 +Version: 2.1.3 Release: 1 Release-Tags: relext License: CDDL Author: OpenZFS -Linux-Maximum: 5.15 +Linux-Maximum: 5.16 Linux-Minimum: 3.10 diff --git a/sys/contrib/openzfs/README.md b/sys/contrib/openzfs/README.md index d666df7af309..331889560950 100644 --- a/sys/contrib/openzfs/README.md +++ b/sys/contrib/openzfs/README.md @@ -12,7 +12,7 @@ This repository contains the code for running OpenZFS on Linux and FreeBSD. * [Documentation](https://openzfs.github.io/openzfs-docs/) - for using and developing this repo * [ZoL Site](https://zfsonlinux.org) - Linux release info & links * [Mailing lists](https://openzfs.github.io/openzfs-docs/Project%20and%20Community/Mailing%20Lists.html) - * [OpenZFS site](http://open-zfs.org/) - for conference videos and info on other platforms (illumos, OSX, Windows, etc) + * [OpenZFS site](https://openzfs.org/) - for conference videos and info on other platforms (illumos, OSX, Windows, etc) # Installation diff --git a/sys/contrib/openzfs/cmd/mount_zfs/mount_zfs.c b/sys/contrib/openzfs/cmd/mount_zfs/mount_zfs.c index de3833698a2b..55968ac88ffa 100644 --- a/sys/contrib/openzfs/cmd/mount_zfs/mount_zfs.c +++ b/sys/contrib/openzfs/cmd/mount_zfs/mount_zfs.c @@ -246,13 +246,6 @@ main(int argc, char **argv) } } - if (verbose) - (void) fprintf(stdout, gettext("mount.zfs:\n" - " dataset: \"%s\"\n mountpoint: \"%s\"\n" - " mountflags: 0x%lx\n zfsflags: 0x%lx\n" - " mountopts: \"%s\"\n mtabopts: \"%s\"\n"), - dataset, mntpoint, mntflags, zfsflags, mntopts, mtabopt); - if (mntflags & MS_REMOUNT) { nomtab = 1; remount = 1; @@ -275,7 +268,10 @@ main(int argc, char **argv) return (MOUNT_USAGE); } - zfs_adjust_mount_options(zhp, mntpoint, mntopts, mtabopt); + if (!zfsutil || sloppy || + libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) { + zfs_adjust_mount_options(zhp, mntpoint, mntopts, mtabopt); + } /* treat all snapshots as legacy mount points */ if (zfs_get_type(zhp) == ZFS_TYPE_SNAPSHOT) @@ -293,12 +289,11 @@ main(int argc, char **argv) if (zfs_version == 0) { fprintf(stderr, gettext("unable to fetch " "ZFS version for filesystem '%s'\n"), dataset); + zfs_close(zhp); + libzfs_fini(g_zfs); return (MOUNT_SYSERR); } - zfs_close(zhp); - libzfs_fini(g_zfs); - /* * Legacy mount points may only be mounted using 'mount', never using * 'zfs mount'. However, since 'zfs mount' actually invokes 'mount' @@ -316,6 +311,8 @@ main(int argc, char **argv) "Use 'zfs set mountpoint=%s' or 'mount -t zfs %s %s'.\n" "See zfs(8) for more information.\n"), dataset, mntpoint, dataset, mntpoint); + zfs_close(zhp); + libzfs_fini(g_zfs); return (MOUNT_USAGE); } @@ -326,14 +323,38 @@ main(int argc, char **argv) "Use 'zfs set mountpoint=%s' or 'zfs mount %s'.\n" "See zfs(8) for more information.\n"), dataset, "legacy", dataset); + zfs_close(zhp); + libzfs_fini(g_zfs); return (MOUNT_USAGE); } + if (verbose) + (void) fprintf(stdout, gettext("mount.zfs:\n" + " dataset: \"%s\"\n mountpoint: \"%s\"\n" + " mountflags: 0x%lx\n zfsflags: 0x%lx\n" + " mountopts: \"%s\"\n mtabopts: \"%s\"\n"), + dataset, mntpoint, mntflags, zfsflags, mntopts, mtabopt); + if (!fake) { - error = mount(dataset, mntpoint, MNTTYPE_ZFS, - mntflags, mntopts); + if (zfsutil && !sloppy && + !libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) { + error = zfs_mount_at(zhp, mntopts, mntflags, mntpoint); + if (error) { + (void) fprintf(stderr, "zfs_mount_at() failed: " + "%s", libzfs_error_description(g_zfs)); + zfs_close(zhp); + libzfs_fini(g_zfs); + return (MOUNT_SYSERR); + } + } else { + error = mount(dataset, mntpoint, MNTTYPE_ZFS, + mntflags, mntopts); + } } + zfs_close(zhp); + libzfs_fini(g_zfs); + if (error) { switch (errno) { case ENOENT: diff --git a/sys/contrib/openzfs/cmd/vdev_id/vdev_id b/sys/contrib/openzfs/cmd/vdev_id/vdev_id index 8cc4399a5668..7b5aab141997 100755 --- a/sys/contrib/openzfs/cmd/vdev_id/vdev_id +++ b/sys/contrib/openzfs/cmd/vdev_id/vdev_id @@ -596,7 +596,9 @@ enclosure_handler () { # DEVPATH=/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host0/subsystem/devices/0:0:0:0/scsi_generic/sg0 # Get the enclosure ID ("0:0:0:0") - ENC=$(basename $(readlink -m "/sys/$DEVPATH/../..")) + ENC="${DEVPATH%/*}" + ENC="${ENC%/*}" + ENC="${ENC##*/}" if [ ! -d "/sys/class/enclosure/$ENC" ] ; then # Not an enclosure, bail out return @@ -616,10 +618,11 @@ enclosure_handler () { # The PCI directory is two directories up from the port directory # /sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0 - PCI_ID_LONG=$(basename $(readlink -m "/sys/$PORT_DIR/../..")) + PCI_ID_LONG="$(readlink -m "/sys/$PORT_DIR/../..")" + PCI_ID_LONG="${PCI_ID_LONG##*/}" # Strip down the PCI address from 0000:05:00.0 to 05:00.0 - PCI_ID=$(echo "$PCI_ID_LONG" | sed -r 's/^[0-9]+://g') + PCI_ID="${PCI_ID_LONG#[0-9]*:}" # Name our device according to vdev_id.conf (like "L0" or "U1"). NAME=$(awk "/channel/{if (\$1 == \"channel\" && \$2 == \"$PCI_ID\" && \ @@ -674,7 +677,7 @@ alias_handler () { link=$(echo "$link" | sed 's/p[0-9][0-9]*$//') fi # Check both the fully qualified and the base name of link. - for l in $link $(basename "$link") ; do + for l in $link ${link##*/} ; do if [ ! -z "$l" ]; then alias=$(awk -v var="$l" '($1 == "alias") && \ ($3 == var) \ diff --git a/sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c b/sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c index 1c4cc885b5e5..f4063bea7378 100644 --- a/sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c +++ b/sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c @@ -40,6 +40,7 @@ #include <sys/fm/fs/zfs.h> #include <libzfs.h> #include <string.h> +#include <libgen.h> #include "zfs_agents.h" #include "fmd_api.h" diff --git a/sys/contrib/openzfs/cmd/zed/zed.c b/sys/contrib/openzfs/cmd/zed/zed.c index 0aa03fded468..e45176c00bf2 100644 --- a/sys/contrib/openzfs/cmd/zed/zed.c +++ b/sys/contrib/openzfs/cmd/zed/zed.c @@ -291,7 +291,7 @@ idle: rv = zed_event_service(&zcp); /* ENODEV: When kernel module is unloaded (osx) */ - if (rv == ENODEV) + if (rv != 0) break; } diff --git a/sys/contrib/openzfs/cmd/zed/zed.d/all-syslog.sh b/sys/contrib/openzfs/cmd/zed/zed.d/all-syslog.sh index b07cf0f295ad..ea108c47b779 100755 --- a/sys/contrib/openzfs/cmd/zed/zed.d/all-syslog.sh +++ b/sys/contrib/openzfs/cmd/zed/zed.d/all-syslog.sh @@ -21,7 +21,7 @@ if [ "${ZED_SYSLOG_DISPLAY_GUIDS}" = "1" ]; then [ -n "${ZEVENT_VDEV_GUID}" ] && msg="${msg} vdev_guid=${ZEVENT_VDEV_GUID}" else [ -n "${ZEVENT_POOL}" ] && msg="${msg} pool='${ZEVENT_POOL}'" - [ -n "${ZEVENT_VDEV_PATH}" ] && msg="${msg} vdev=$(basename "${ZEVENT_VDEV_PATH}")" + [ -n "${ZEVENT_VDEV_PATH}" ] && msg="${msg} vdev=${ZEVENT_VDEV_PATH##*/}" fi # log pool state if state is anything other than 'ACTIVE' diff --git a/sys/contrib/openzfs/cmd/zed/zed.d/generic-notify.sh b/sys/contrib/openzfs/cmd/zed/zed.d/generic-notify.sh index 1db26980c1a0..9cf657e39970 100755 --- a/sys/contrib/openzfs/cmd/zed/zed.d/generic-notify.sh +++ b/sys/contrib/openzfs/cmd/zed/zed.d/generic-notify.sh @@ -23,7 +23,7 @@ # Rate-limit the notification based in part on the filename. # -rate_limit_tag="${ZEVENT_POOL};${ZEVENT_SUBCLASS};$(basename -- "$0")" +rate_limit_tag="${ZEVENT_POOL};${ZEVENT_SUBCLASS};${0##*/}" rate_limit_interval="${ZED_NOTIFY_INTERVAL_SECS}" zed_rate_limit "${rate_limit_tag}" "${rate_limit_interval}" || exit 3 diff --git a/sys/contrib/openzfs/cmd/zed/zed.d/statechange-notify.sh b/sys/contrib/openzfs/cmd/zed/zed.d/statechange-notify.sh index 76f09061c5b5..ab11dfbc99d5 100755 --- a/sys/contrib/openzfs/cmd/zed/zed.d/statechange-notify.sh +++ b/sys/contrib/openzfs/cmd/zed/zed.d/statechange-notify.sh @@ -15,7 +15,7 @@ # Send notification in response to a fault induced statechange # # ZEVENT_SUBCLASS: 'statechange' -# ZEVENT_VDEV_STATE_STR: 'DEGRADED', 'FAULTED' or 'REMOVED' +# ZEVENT_VDEV_STATE_STR: 'DEGRADED', 'FAULTED', 'REMOVED', or 'UNAVAIL' # # Exit codes: # 0: notification sent @@ -31,7 +31,8 @@ if [ "${ZEVENT_VDEV_STATE_STR}" != "FAULTED" ] \ && [ "${ZEVENT_VDEV_STATE_STR}" != "DEGRADED" ] \ - && [ "${ZEVENT_VDEV_STATE_STR}" != "REMOVED" ]; then + && [ "${ZEVENT_VDEV_STATE_STR}" != "REMOVED" ] \ + && [ "${ZEVENT_VDEV_STATE_STR}" != "UNAVAIL" ]; then exit 3 fi diff --git a/sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh b/sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh index d1ebf7dbcc16..290f9150b43f 100644 --- a/sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh +++ b/sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh @@ -77,7 +77,7 @@ zed_log_msg() zed_log_err() { logger -p "${ZED_SYSLOG_PRIORITY}" -t "${ZED_SYSLOG_TAG}" -- "error:" \ - "$(basename -- "$0"):""${ZEVENT_EID:+" eid=${ZEVENT_EID}:"}" "$@" + "${0##*/}:""${ZEVENT_EID:+" eid=${ZEVENT_EID}:"}" "$@" } @@ -202,6 +202,10 @@ zed_notify() [ "${rv}" -eq 0 ] && num_success=$((num_success + 1)) [ "${rv}" -eq 1 ] && num_failure=$((num_failure + 1)) + zed_notify_pushover "${subject}" "${pathname}"; rv=$? + [ "${rv}" -eq 0 ] && num_success=$((num_success + 1)) + [ "${rv}" -eq 1 ] && num_failure=$((num_failure + 1)) + [ "${num_success}" -gt 0 ] && return 0 [ "${num_failure}" -gt 0 ] && return 1 return 2 @@ -254,7 +258,7 @@ zed_notify_email() [ -n "${subject}" ] || return 1 if [ ! -r "${pathname}" ]; then zed_log_err \ - "$(basename "${ZED_EMAIL_PROG}") cannot read \"${pathname}\"" + "${ZED_EMAIL_PROG##*/} cannot read \"${pathname}\"" return 1 fi @@ -266,7 +270,7 @@ zed_notify_email() eval ${ZED_EMAIL_PROG} ${ZED_EMAIL_OPTS} < "${pathname}" >/dev/null 2>&1 rv=$? if [ "${rv}" -ne 0 ]; then - zed_log_err "$(basename "${ZED_EMAIL_PROG}") exit=${rv}" + zed_log_err "${ZED_EMAIL_PROG##*/} exit=${rv}" return 1 fi return 0 @@ -413,7 +417,7 @@ zed_notify_slack_webhook() # Construct the JSON message for posting. # - msg_json="$(printf '{"text": "*%s*\n%s"}' "${subject}" "${msg_body}" )" + msg_json="$(printf '{"text": "*%s*\\n%s"}' "${subject}" "${msg_body}" )" # Send the POST request and check for errors. # @@ -433,6 +437,84 @@ zed_notify_slack_webhook() return 0 } +# zed_notify_pushover (subject, pathname) +# +# Send a notification via Pushover <https://pushover.net/>. +# The access token (ZED_PUSHOVER_TOKEN) identifies this client to the +# Pushover server. The user token (ZED_PUSHOVER_USER) defines the user or +# group to which the notification will be sent. +# +# Requires curl and sed executables to be installed in the standard PATH. +# +# References +# https://pushover.net/api +# +# Arguments +# subject: notification subject +# pathname: pathname containing the notification message (OPTIONAL) +# +# Globals +# ZED_PUSHOVER_TOKEN +# ZED_PUSHOVER_USER +# +# Return +# 0: notification sent +# 1: notification failed +# 2: not configured +# +zed_notify_pushover() +{ + local subject="$1" + local pathname="${2:-"/dev/null"}" + local msg_body + local msg_out + local msg_err + local url="https://api.pushover.net/1/messages.json" + + [ -n "${ZED_PUSHOVER_TOKEN}" ] && [ -n "${ZED_PUSHOVER_USER}" ] || return 2 + + if [ ! -r "${pathname}" ]; then + zed_log_err "pushover cannot read \"${pathname}\"" + return 1 + fi + + zed_check_cmd "curl" "sed" || return 1 + + # Read the message body in. + # + msg_body="$(cat "${pathname}")" + + if [ -z "${msg_body}" ] + then + msg_body=$subject + subject="" + fi + + # Send the POST request and check for errors. + # + msg_out="$( \ + curl \ + --form-string "token=${ZED_PUSHOVER_TOKEN}" \ + --form-string "user=${ZED_PUSHOVER_USER}" \ + --form-string "message=${msg_body}" \ + --form-string "title=${subject}" \ + "${url}" \ + 2>/dev/null \ + )"; rv=$? + if [ "${rv}" -ne 0 ]; then + zed_log_err "curl exit=${rv}" + return 1 + fi + msg_err="$(echo "${msg_out}" \ + | sed -n -e 's/.*"errors" *:.*\[\(.*\)\].*/\1/p')" + if [ -n "${msg_err}" ]; then + zed_log_err "pushover \"${msg_err}"\" + return 1 + fi + return 0 +} + + # zed_rate_limit (tag, [interval]) # # Check whether an event of a given type [tag] has already occurred within the diff --git a/sys/contrib/openzfs/cmd/zed/zed.d/zed.rc b/sys/contrib/openzfs/cmd/zed/zed.d/zed.rc index 1c278b2ef96e..9ac77f929c73 100644 --- a/sys/contrib/openzfs/cmd/zed/zed.d/zed.rc +++ b/sys/contrib/openzfs/cmd/zed/zed.d/zed.rc @@ -13,9 +13,9 @@ # Email address of the zpool administrator for receipt of notifications; # multiple addresses can be specified if they are delimited by whitespace. # Email will only be sent if ZED_EMAIL_ADDR is defined. -# Disabled by default; uncomment to enable. +# Enabled by default; comment to disable. # -#ZED_EMAIL_ADDR="root" +ZED_EMAIL_ADDR="root" ## # Name or path of executable responsible for sending notifications via email; @@ -82,6 +82,23 @@ # #ZED_SLACK_WEBHOOK_URL="" +## +# Pushover token. +# This defines the application from which the notification will be sent. +# <https://pushover.net/api#registration> +# Disabled by default; uncomment to enable. +# ZED_PUSHOVER_USER, below, must also be configured. +# +#ZED_PUSHOVER_TOKEN="" + +## +# Pushover user key. +# This defines which user or group will receive Pushover notifications. +# <https://pushover.net/api#identifiers> +# Disabled by default; uncomment to enable. +# ZED_PUSHOVER_TOKEN, above, must also be configured. +#ZED_PUSHOVER_USER="" + ## # Default directory for zed state files. # diff --git a/sys/contrib/openzfs/cmd/zed/zed_conf.c b/sys/contrib/openzfs/cmd/zed/zed_conf.c index 2cf2311dbb42..59935102f123 100644 --- a/sys/contrib/openzfs/cmd/zed/zed_conf.c +++ b/sys/contrib/openzfs/cmd/zed/zed_conf.c @@ -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> diff --git a/sys/contrib/openzfs/cmd/zed/zed_exec.c b/sys/contrib/openzfs/cmd/zed/zed_exec.c index 1eecfa0a92c4..03dcd03aceb7 100644 --- a/sys/contrib/openzfs/cmd/zed/zed_exec.c +++ b/sys/contrib/openzfs/cmd/zed/zed_exec.c @@ -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" diff --git a/sys/contrib/openzfs/cmd/zpool/zpool.d/dm-deps b/sys/contrib/openzfs/cmd/zpool/zpool.d/dm-deps index ee39514e4d92..42af6a8d63cd 100755 --- a/sys/contrib/openzfs/cmd/zpool/zpool.d/dm-deps +++ b/sys/contrib/openzfs/cmd/zpool/zpool.d/dm-deps @@ -16,14 +16,12 @@ if [ -L "$dev" ] ; then dev=$(readlink "$dev") fi -dev=$(basename "$dev") +dev="${dev##*/}" val="" if [ -d "/sys/class/block/$dev/slaves" ] ; then - # ls -C: output in columns, no newlines - val=$(ls -C "/sys/class/block/$dev/slaves") - - # ls -C will print two spaces between files; change to one space. - val=$(echo "$val" | sed -r 's/[[:blank:]]+/ /g') + # ls -C: output in columns, no newlines, two spaces (change to one) + # shellcheck disable=SC2012 + val=$(ls -C "/sys/class/block/$dev/slaves" | tr -s '[:space:]' ' ') fi echo "dm-deps=$val" diff --git a/sys/contrib/openzfs/cmd/zpool/zpool.d/iostat b/sys/contrib/openzfs/cmd/zpool/zpool.d/iostat index 41a3acfae7a4..19be475e9b27 100755 --- a/sys/contrib/openzfs/cmd/zpool/zpool.d/iostat +++ b/sys/contrib/openzfs/cmd/zpool/zpool.d/iostat @@ -9,7 +9,7 @@ iostat: Show iostat values since boot (summary page). iostat-1s: Do a single 1-second iostat sample and show values. iostat-10s: Do a single 10-second iostat sample and show values." -script=$(basename "$0") +script="${0##*/}" if [ "$1" = "-h" ] ; then echo "$helpstr" | grep "$script:" | tr -s '\t' | cut -f 2- exit @@ -42,7 +42,7 @@ else ${brief:+"-y"} \ ${interval:+"$interval"} \ ${interval:+"1"} \ - "$VDEV_UPATH" | awk NF | tail -n 2) + "$VDEV_UPATH" | grep -v '^$' | tail -n 2) fi @@ -61,7 +61,7 @@ fi cols=$(echo "$out" | head -n 1) # Get the values and tab separate them to make them cut-able. -vals=$(echo "$out" | tail -n 1 | sed -r 's/[[:blank:]]+/\t/g') +vals=$(echo "$out" | tail -n 1 | tr -s '[:space:]' '\t') i=0 for col in $cols ; do diff --git a/sys/contrib/openzfs/cmd/zpool/zpool.d/lsblk b/sys/contrib/openzfs/cmd/zpool/zpool.d/lsblk index 1cdef40494fe..919783a1c1bf 100755 --- a/sys/contrib/openzfs/cmd/zpool/zpool.d/lsblk +++ b/sys/contrib/openzfs/cmd/zpool/zpool.d/lsblk @@ -48,7 +48,7 @@ size: Show the disk capacity. vendor: Show the disk vendor. lsblk: Show the disk size, vendor, and model number." -script=$(basename "$0") +script="${0##*/}" if [ "$1" = "-h" ] ; then echo "$helpstr" | grep "$script:" | tr -s '\t' | cut -f 2- diff --git a/sys/contrib/openzfs/cmd/zpool/zpool.d/media b/sys/contrib/openzfs/cmd/zpool/zpool.d/media index 5683cdc3c023..660f78b743fc 100755 --- a/sys/contrib/openzfs/cmd/zpool/zpool.d/media +++ b/sys/contrib/openzfs/cmd/zpool/zpool.d/media @@ -9,15 +9,12 @@ if [ "$1" = "-h" ] ; then fi if [ -b "$VDEV_UPATH" ]; then - device=$(basename "$VDEV_UPATH") - val=$(cat "/sys/block/$device/queue/rotational" 2>/dev/null) - if [ "$val" = "0" ]; then - MEDIA="ssd" - fi - - if [ "$val" = "1" ]; then - MEDIA="hdd" - fi + device="${VDEV_UPATH##*/}" + read -r val 2>/dev/null < "/sys/block/$device/queue/rotational" + case "$val" in + 0) MEDIA="ssd" ;; + 1) MEDIA="hdd" ;; + esac vpd_pg83="/sys/block/$device/device/vpd_pg83" if [ -f "$vpd_pg83" ]; then diff --git a/sys/contrib/openzfs/cmd/zpool/zpool.d/ses b/sys/contrib/openzfs/cmd/zpool/zpool.d/ses index b1836d676528..b51fe31894ab 100755 --- a/sys/contrib/openzfs/cmd/zpool/zpool.d/ses +++ b/sys/contrib/openzfs/cmd/zpool/zpool.d/ses @@ -11,7 +11,7 @@ fault_led: Show value of the disk enclosure slot fault LED. locate_led: Show value of the disk enclosure slot locate LED. ses: Show disk's enc, enc device, slot, and fault/locate LED values." -script=$(basename "$0") +script="${0##*/}" if [ "$1" = "-h" ] ; then echo "$helpstr" | grep "$script:" | tr -s '\t' | cut -f 2- exit diff --git a/sys/contrib/openzfs/cmd/zpool/zpool_main.c b/sys/contrib/openzfs/cmd/zpool/zpool_main.c index 9cf0163ab327..b93a6196beea 100644 --- a/sys/contrib/openzfs/cmd/zpool/zpool_main.c +++ b/sys/contrib/openzfs/cmd/zpool/zpool_main.c @@ -4825,7 +4825,7 @@ children: continue; vname = zpool_vdev_name(g_zfs, zhp, newchild[c], - cb->cb_name_flags); + cb->cb_name_flags | VDEV_NAME_TYPE_ID); ret += print_vdev_stats(zhp, vname, oldnv ? oldchild[c] : NULL, newchild[c], cb, depth + 2); free(vname); @@ -4868,7 +4868,7 @@ children: } vname = zpool_vdev_name(g_zfs, zhp, newchild[c], - cb->cb_name_flags); + cb->cb_name_flags | VDEV_NAME_TYPE_ID); ret += print_vdev_stats(zhp, vname, oldnv ? oldchild[c] : NULL, newchild[c], cb, depth + 2); free(vname); @@ -6182,7 +6182,7 @@ print_list_stats(zpool_handle_t *zhp, const char *name, nvlist_t *nv, continue; vname = zpool_vdev_name(g_zfs, zhp, child[c], - cb->cb_name_flags); + cb->cb_name_flags | VDEV_NAME_TYPE_ID); print_list_stats(zhp, vname, child[c], cb, depth + 2, B_FALSE); free(vname); } @@ -6216,7 +6216,7 @@ print_list_stats(zpool_handle_t *zhp, const char *name, nvlist_t *nv, printed = B_TRUE; } vname = zpool_vdev_name(g_zfs, zhp, child[c], - cb->cb_name_flags); + cb->cb_name_flags | VDEV_NAME_TYPE_ID); print_list_stats(zhp, vname, child[c], cb, depth + 2, B_FALSE); free(vname); diff --git a/sys/contrib/openzfs/cmd/zstream/zstream_dump.c b/sys/contrib/openzfs/cmd/zstream/zstream_dump.c index 45cf7b97a147..04a4986b45d8 100644 --- a/sys/contrib/openzfs/cmd/zstream/zstream_dump.c +++ b/sys/contrib/openzfs/cmd/zstream/zstream_dump.c @@ -297,6 +297,7 @@ zstream_do_dump(int argc, char *argv[]) fletcher_4_init(); while (read_hdr(drr, &zc)) { + uint64_t featureflags = 0; /* * If this is the first DMU record being processed, check for @@ -362,6 +363,9 @@ zstream_do_dump(int argc, char *argv[]) BSWAP_64(drrb->drr_fromguid); } + featureflags = + DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo); + (void) printf("BEGIN record\n"); (void) printf("\thdrtype = %lld\n", DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo)); @@ -461,6 +465,15 @@ zstream_do_dump(int argc, char *argv[]) BSWAP_64(drro->drr_maxblkid); } + if (featureflags & DMU_BACKUP_FEATURE_RAW && + drro->drr_bonuslen > drro->drr_raw_bonuslen) { + (void) fprintf(stderr, + "Warning: Object %llu has bonuslen = " + "%u > raw_bonuslen = %u\n\n", + (u_longlong_t)drro->drr_object, + drro->drr_bonuslen, drro->drr_raw_bonuslen); + } + payload_size = DRR_OBJECT_PAYLOAD_SIZE(drro); if (verbose) { diff --git a/sys/contrib/openzfs/config/Substfiles.am b/sys/contrib/openzfs/config/Substfiles.am index 63697bfa2b6a..911903e10e69 100644 --- a/sys/contrib/openzfs/config/Substfiles.am +++ b/sys/contrib/openzfs/config/Substfiles.am @@ -15,7 +15,9 @@ subst_sed_cmd = \ -e 's|@PYTHON[@]|$(PYTHON)|g' \ -e 's|@PYTHON_SHEBANG[@]|$(PYTHON_SHEBANG)|g' \ -e 's|@DEFAULT_INIT_NFS_SERVER[@]|$(DEFAULT_INIT_NFS_SERVER)|g' \ - -e 's|@DEFAULT_INIT_SHELL[@]|$(DEFAULT_INIT_SHELL)|g' + -e 's|@DEFAULT_INIT_SHELL[@]|$(DEFAULT_INIT_SHELL)|g' \ + -e 's|@LIBFETCH_DYNAMIC[@]|$(LIBFETCH_DYNAMIC)|g' \ + -e 's|@LIBFETCH_SONAME[@]|$(LIBFETCH_SONAME)|g' SUBSTFILES = CLEANFILES = $(SUBSTFILES) diff --git a/sys/contrib/openzfs/config/always-python.m4 b/sys/contrib/openzfs/config/always-python.m4 index 76b06fcd8488..5f47df424c27 100644 --- a/sys/contrib/openzfs/config/always-python.m4 +++ b/sys/contrib/openzfs/config/always-python.m4 @@ -28,7 +28,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYTHON], [ dnl # AM_PATH_PYTHON([], [], [:]) AS_IF([test -z "$PYTHON_VERSION"], [ *** 9827 LINES SKIPPED ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203132352.22DNqmjq056475>