aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/cross-bootstrap-tools.yml5
-rw-r--r--Makefile.inc119
-rw-r--r--ObsoleteFiles.inc8316
-rw-r--r--UPDATING6
-rw-r--r--cddl/lib/libspl/Makefile1
-rw-r--r--cddl/lib/libzpool/Makefile2
-rw-r--r--contrib/bmake/ChangeLog9
-rw-r--r--contrib/bmake/FILES2
-rw-r--r--contrib/bmake/VERSION2
-rw-r--r--contrib/bmake/job.c6
-rw-r--r--contrib/bmake/meta.c8
-rw-r--r--contrib/bmake/meta.h4
-rw-r--r--contrib/bmake/mk/ChangeLog17
-rwxr-xr-x[-rw-r--r--]contrib/bmake/mk/install-mk4
-rwxr-xr-xcontrib/bmake/mk/meta2deps.py28
-rwxr-xr-xcontrib/bmake/mk/meta2deps.sh14
-rw-r--r--contrib/bmake/unit-tests/Makefile7
-rw-r--r--contrib/bmake/unit-tests/meta-output.exp11
-rw-r--r--contrib/bmake/unit-tests/meta-output.mk30
-rw-r--r--contrib/pf/authpf/authpf.c4
-rw-r--r--etc/mtree/BSD.usr.dist2
-rw-r--r--lib/libc/sys/accept.c2
-rw-r--r--lib/libc/sys/accept4.c2
-rw-r--r--lib/libc/sys/aio_suspend.c2
-rw-r--r--lib/libc/sys/clock_nanosleep.c2
-rw-r--r--lib/libc/sys/close.c2
-rw-r--r--lib/libc/sys/connect.c2
-rw-r--r--lib/libc/sys/fork.c2
-rw-r--r--lib/libc/sys/fsync.c2
-rw-r--r--lib/libc/sys/kevent.c2
-rw-r--r--lib/libc/sys/msync.c2
-rw-r--r--lib/libc/sys/nanosleep.c2
-rw-r--r--lib/libc/sys/open.c2
-rw-r--r--lib/libc/sys/openat.c1
-rw-r--r--lib/libc/sys/poll.c2
-rw-r--r--lib/libc/sys/ppoll.c2
-rw-r--r--lib/libc/sys/pselect.c2
-rw-r--r--lib/libc/sys/read.c2
-rw-r--r--lib/libc/sys/readv.c2
-rw-r--r--lib/libc/sys/recvfrom.c2
-rw-r--r--lib/libc/sys/recvmsg.c2
-rw-r--r--lib/libc/sys/select.c2
-rw-r--r--lib/libc/sys/sendmsg.c2
-rw-r--r--lib/libc/sys/sendto.c2
-rw-r--r--lib/libc/sys/setcontext.c1
-rw-r--r--lib/libc/sys/sigaction.c1
-rw-r--r--lib/libc/sys/sigprocmask.c1
-rw-r--r--lib/libc/sys/sigsuspend.c1
-rw-r--r--lib/libc/sys/sigtimedwait.c2
-rw-r--r--lib/libc/sys/sigwaitinfo.c2
-rw-r--r--lib/libc/sys/swapcontext.c1
-rw-r--r--lib/libc/sys/wait4.c2
-rw-r--r--lib/libc/sys/wait6.c2
-rw-r--r--lib/libc/sys/write.c2
-rw-r--r--lib/libc/sys/writev.c2
-rw-r--r--lib/libnvmf/libnvmf.h4
-rw-r--r--lib/libpfctl/libpfctl.c169
-rw-r--r--lib/libpfctl/libpfctl.h4
-rw-r--r--lib/libsys/Makefile.sys21
-rw-r--r--lib/libthr/thread/thr_init.c1
-rw-r--r--lib/libthr/thread/thr_sig.c8
-rw-r--r--lib/libusb/libusb.331
-rw-r--r--lib/libusb/libusb.h28
-rw-r--r--lib/libusb/libusb10.c7
-rw-r--r--lib/libusb/libusb10_desc.c51
-rw-r--r--lib/libusb/libusb10_io.c6
-rw-r--r--lib/libutil/Symbol.map9
-rw-r--r--lib/libutil/expand_number.358
-rw-r--r--lib/libutil/expand_number.c49
-rw-r--r--lib/libutil/libutil.h8
-rw-r--r--lib/libutil/tests/expand_number_test.c79
-rw-r--r--libexec/rtld-elf/rtld.h2
-rw-r--r--release/packages/ucl/libutil++-all.ucl4
-rw-r--r--sbin/hastd/nv.c9
-rw-r--r--sbin/ifconfig/ifbridge.c137
-rw-r--r--sbin/ifconfig/ifconfig.862
-rw-r--r--sbin/pfctl/pfctl.c3
-rw-r--r--sbin/pfctl/pfctl_radix.c4
-rw-r--r--share/man/man5/pf.conf.571
-rw-r--r--share/man/man9/cpuset.914
-rw-r--r--stand/libsa/zfs/spl/sys/zfs_context.h2
-rw-r--r--sys/arm64/arm64/copyinout.S18
-rw-r--r--sys/arm64/arm64/locore.S23
-rw-r--r--sys/arm64/arm64/pmap.c32
-rw-r--r--sys/arm64/arm64/support.S9
-rw-r--r--sys/arm64/include/armreg.h20
-rw-r--r--sys/arm64/include/vmm.h1
-rw-r--r--sys/arm64/include/vmparam.h5
-rw-r--r--sys/arm64/vmm/vmm_arm64.c2
-rw-r--r--sys/conf/files1
-rw-r--r--sys/contrib/openzfs/.cirrus.yml21
-rw-r--r--sys/contrib/openzfs/.github/codeql-cpp.yml1
-rw-r--r--sys/contrib/openzfs/.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql34
-rwxr-xr-xsys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh8
-rwxr-xr-xsys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh3
-rwxr-xr-xsys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh6
-rw-r--r--sys/contrib/openzfs/.github/workflows/zfs-qemu.yml22
-rw-r--r--sys/contrib/openzfs/.github/workflows/zloop.yml24
-rwxr-xr-xsys/contrib/openzfs/cmd/arc_summary3
-rw-r--r--sys/contrib/openzfs/cmd/zdb/zdb.c103
-rw-r--r--sys/contrib/openzfs/cmd/zdb/zdb_il.c8
-rw-r--r--sys/contrib/openzfs/cmd/zed/agents/zfs_agents.c67
-rw-r--r--sys/contrib/openzfs/cmd/zed/zed_event.c2
-rw-r--r--sys/contrib/openzfs/cmd/zfs/zfs_main.c36
-rw-r--r--sys/contrib/openzfs/cmd/zpool/zpool_iter.c5
-rw-r--r--sys/contrib/openzfs/cmd/zpool/zpool_main.c264
-rw-r--r--sys/contrib/openzfs/cmd/zpool/zpool_vdev.c24
-rw-r--r--sys/contrib/openzfs/cmd/ztest.c51
-rw-r--r--sys/contrib/openzfs/config/ax_python_devel.m44
-rw-r--r--sys/contrib/openzfs/config/kernel-free-inode.m424
-rw-r--r--sys/contrib/openzfs/config/kernel.m42
-rw-r--r--sys/contrib/openzfs/config/user-statx.m434
-rw-r--r--sys/contrib/openzfs/config/user.m41
-rw-r--r--sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.install1
-rw-r--r--sys/contrib/openzfs/etc/Makefile.am1
-rw-r--r--sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in26
-rw-r--r--sys/contrib/openzfs/include/Makefile.am2
-rw-r--r--sys/contrib/openzfs/include/libzfs.h15
-rw-r--r--sys/contrib/openzfs/include/os/freebsd/Makefile.am2
-rw-r--r--sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h5
-rw-r--r--sys/contrib/openzfs/include/os/freebsd/spl/sys/mod.h (renamed from sys/contrib/openzfs/include/os/freebsd/spl/sys/mod_os.h)0
-rw-r--r--sys/contrib/openzfs/include/os/freebsd/spl/sys/vm.h1
-rw-r--r--sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode_impl.h1
-rw-r--r--sys/contrib/openzfs/include/os/linux/Makefile.am2
-rw-r--r--sys/contrib/openzfs/include/os/linux/spl/sys/atomic.h32
-rw-r--r--sys/contrib/openzfs/include/os/linux/spl/sys/kmem.h61
-rw-r--r--sys/contrib/openzfs/include/os/linux/spl/sys/misc.h6
-rw-r--r--sys/contrib/openzfs/include/os/linux/spl/sys/mod.h (renamed from sys/contrib/openzfs/include/os/linux/spl/sys/mod_os.h)0
-rw-r--r--sys/contrib/openzfs/include/os/linux/zfs/sys/trace_acl.h7
-rw-r--r--sys/contrib/openzfs/include/os/linux/zfs/sys/trace_common.h8
-rw-r--r--sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h1
-rw-r--r--sys/contrib/openzfs/include/sys/arc_impl.h2
-rw-r--r--sys/contrib/openzfs/include/sys/dbuf.h1
-rw-r--r--sys/contrib/openzfs/include/sys/dmu.h4
-rw-r--r--sys/contrib/openzfs/include/sys/dmu_objset.h2
-rw-r--r--sys/contrib/openzfs/include/sys/dmu_traverse.h7
-rw-r--r--sys/contrib/openzfs/include/sys/fs/zfs.h3
-rw-r--r--sys/contrib/openzfs/include/sys/metaslab.h7
-rw-r--r--sys/contrib/openzfs/include/sys/metaslab_impl.h2
-rw-r--r--sys/contrib/openzfs/include/sys/mod.h36
-rw-r--r--sys/contrib/openzfs/include/sys/range_tree.h9
-rw-r--r--sys/contrib/openzfs/include/sys/spa.h75
-rw-r--r--sys/contrib/openzfs/include/sys/spa_impl.h9
-rw-r--r--sys/contrib/openzfs/include/sys/vdev.h16
-rw-r--r--sys/contrib/openzfs/include/sys/vdev_impl.h4
-rw-r--r--sys/contrib/openzfs/include/sys/xvattr.h1
-rw-r--r--sys/contrib/openzfs/include/sys/zfs_context.h20
-rw-r--r--sys/contrib/openzfs/include/sys/zfs_znode.h2
-rw-r--r--sys/contrib/openzfs/include/sys/zil.h4
-rw-r--r--sys/contrib/openzfs/include/sys/zio.h71
-rw-r--r--sys/contrib/openzfs/include/sys/zvol.h3
-rw-r--r--sys/contrib/openzfs/include/sys/zvol_impl.h3
-rw-r--r--sys/contrib/openzfs/include/zfeature_common.h13
-rw-r--r--sys/contrib/openzfs/include/zfs_crrd.h75
-rw-r--r--sys/contrib/openzfs/lib/libspl/Makefile.am1
-rw-r--r--sys/contrib/openzfs/lib/libspl/include/Makefile.am2
-rw-r--r--sys/contrib/openzfs/lib/libspl/include/os/linux/sys/stat.h5
-rw-r--r--sys/contrib/openzfs/lib/libspl/include/sys/mod.h56
-rw-r--r--sys/contrib/openzfs/lib/libspl/include/sys/tunables.h60
-rw-r--r--sys/contrib/openzfs/lib/libspl/include/umem.h2
-rw-r--r--sys/contrib/openzfs/lib/libspl/os/linux/getmntany.c36
-rw-r--r--sys/contrib/openzfs/lib/libspl/tunables.c319
-rw-r--r--sys/contrib/openzfs/lib/libuutil/libuutil.abi196
-rw-r--r--sys/contrib/openzfs/lib/libzdb/libzdb.c4
-rw-r--r--sys/contrib/openzfs/lib/libzfs/libzfs.abi246
-rw-r--r--sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c2
-rw-r--r--sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c37
-rw-r--r--sys/contrib/openzfs/lib/libzfs/libzfs_pool.c128
-rw-r--r--sys/contrib/openzfs/lib/libzfs/libzfs_status.c3
-rw-r--r--sys/contrib/openzfs/lib/libzfs_core/libzfs_core.abi206
-rw-r--r--sys/contrib/openzfs/lib/libzpool/Makefile.am3
-rw-r--r--sys/contrib/openzfs/lib/libzpool/kernel.c18
-rw-r--r--sys/contrib/openzfs/lib/libzpool/util.c172
-rw-r--r--sys/contrib/openzfs/man/man1/ztest.18
-rw-r--r--sys/contrib/openzfs/man/man4/zfs.451
-rw-r--r--sys/contrib/openzfs/man/man7/zfsprops.736
-rw-r--r--sys/contrib/openzfs/man/man7/zpool-features.741
-rw-r--r--sys/contrib/openzfs/man/man7/zpoolconcepts.79
-rw-r--r--sys/contrib/openzfs/man/man8/zdb.813
-rw-r--r--sys/contrib/openzfs/man/man8/zfs-rewrite.828
-rw-r--r--sys/contrib/openzfs/man/man8/zpool-events.84
-rw-r--r--sys/contrib/openzfs/man/man8/zpool-initialize.87
-rw-r--r--sys/contrib/openzfs/man/man8/zpool-scrub.851
-rw-r--r--sys/contrib/openzfs/man/man8/zpool-trim.87
-rw-r--r--sys/contrib/openzfs/module/Kbuild.in32
-rw-r--r--sys/contrib/openzfs/module/Makefile.bsd1
-rw-r--r--sys/contrib/openzfs/module/Makefile.in2
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c9
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/spl/spl_vm.c1
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c32
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c32
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c387
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c7
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c155
-rw-r--r--sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c22
-rw-r--r--sys/contrib/openzfs/module/os/linux/spl/spl-proc.c10
-rw-r--r--sys/contrib/openzfs/module/os/linux/spl/spl-thread.c12
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/abd_os.c4
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c2
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zfs_file_os.c23
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c65
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c99
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zfs_znode_os.c24
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c41
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zpl_super.c12
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c36
-rw-r--r--sys/contrib/openzfs/module/zcommon/zfeature_common.c24
-rw-r--r--sys/contrib/openzfs/module/zcommon/zfs_prop.c11
-rw-r--r--sys/contrib/openzfs/module/zcommon/zfs_valstr.c3
-rw-r--r--sys/contrib/openzfs/module/zfs/arc.c32
-rw-r--r--sys/contrib/openzfs/module/zfs/bpobj.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/brt.c70
-rw-r--r--sys/contrib/openzfs/module/zfs/dbuf.c82
-rw-r--r--sys/contrib/openzfs/module/zfs/ddt.c15
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu.c11
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu_diff.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu_direct.c2
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu_objset.c8
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu_recv.c8
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu_redact.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu_send.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/dmu_traverse.c17
-rw-r--r--sys/contrib/openzfs/module/zfs/dnode.c19
-rw-r--r--sys/contrib/openzfs/module/zfs/dsl_bookmark.c2
-rw-r--r--sys/contrib/openzfs/module/zfs/dsl_crypt.c2
-rw-r--r--sys/contrib/openzfs/module/zfs/dsl_dataset.c20
-rw-r--r--sys/contrib/openzfs/module/zfs/dsl_deadlist.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/dsl_destroy.c12
-rw-r--r--sys/contrib/openzfs/module/zfs/dsl_pool.c2
-rw-r--r--sys/contrib/openzfs/module/zfs/dsl_scan.c27
-rw-r--r--sys/contrib/openzfs/module/zfs/metaslab.c182
-rw-r--r--sys/contrib/openzfs/module/zfs/range_tree.c96
-rw-r--r--sys/contrib/openzfs/module/zfs/spa.c194
-rw-r--r--sys/contrib/openzfs/module/zfs/spa_errlog.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/spa_misc.c11
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev.c57
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_indirect.c2
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_initialize.c5
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_mirror.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_raidz.c28
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_rebuild.c5
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_removal.c30
-rw-r--r--sys/contrib/openzfs/module/zfs/vdev_trim.c24
-rw-r--r--sys/contrib/openzfs/module/zfs/zap.c2
-rw-r--r--sys/contrib/openzfs/module/zfs/zcp.c2
-rw-r--r--sys/contrib/openzfs/module/zfs/zfs_chksum.c69
-rw-r--r--sys/contrib/openzfs/module/zfs/zfs_crrd.c227
-rw-r--r--sys/contrib/openzfs/module/zfs/zfs_ioctl.c36
-rw-r--r--sys/contrib/openzfs/module/zfs/zfs_log.c16
-rw-r--r--sys/contrib/openzfs/module/zfs/zfs_vnops.c31
-rw-r--r--sys/contrib/openzfs/module/zfs/zil.c95
-rw-r--r--sys/contrib/openzfs/module/zfs/zio.c326
-rw-r--r--sys/contrib/openzfs/module/zfs/zio_checksum.c31
-rw-r--r--sys/contrib/openzfs/module/zfs/zvol.c342
-rw-r--r--sys/contrib/openzfs/module/zstd/zfs_zstd.c3
-rw-r--r--sys/contrib/openzfs/rpm/generic/zfs.spec.in16
-rwxr-xr-xsys/contrib/openzfs/scripts/spdxcheck.pl1
-rw-r--r--sys/contrib/openzfs/tests/runfiles/common.run22
-rw-r--r--sys/contrib/openzfs/tests/runfiles/sanity.run2
-rwxr-xr-xsys/contrib/openzfs/tests/test-runner/bin/test-runner.py.in5
-rwxr-xr-xsys/contrib/openzfs/tests/test-runner/bin/zts-report.py.in4
-rw-r--r--sys/contrib/openzfs/tests/test-runner/include/logapi.shlib7
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/callbacks/zfs_dmesg.ksh7
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore1
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am4
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/cmd/draid.c2
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/cmd/idmap_util.c2
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/cmd/mktree.c2
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/cmd/mmap_ftruncate.c85
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/cmd/mmapwrite.c4
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg1
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/include/libtest.shlib4
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg1
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am15
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_002_neg.ksh5
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_003_pos.ksh8
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_004_pos.ksh5
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_009_pos.ksh5
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_010_pos.ksh2
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_011_neg.ksh4
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_014_neg.ksh39
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_015_pos.ksh46
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh21
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_tunables.ksh71
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite_physical.ksh100
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_001_pos.ksh2
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_005_pos.ksh3
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg3
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_multiple_pools.ksh131
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_001_neg.ksh3
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_date_range_001.ksh94
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_multiple_pools.ksh128
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_multiple_pools.ksh123
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh4
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib17
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_header_neg.ksh53
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_header_pos.ksh81
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_multi.ksh54
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh80
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh2
-rw-r--r--sys/fs/fuse/fuse_vnops.c34
-rw-r--r--sys/kern/kern_racct.c307
-rw-r--r--sys/kern/kern_time.c5
-rw-r--r--sys/modules/zfs/Makefile1
-rw-r--r--sys/modules/zfs/zfs_config.h16
-rw-r--r--sys/modules/zfs/zfs_gitrev.h2
-rw-r--r--sys/net/if_bridge.c84
-rw-r--r--sys/net/if_bridgevar.h11
-rw-r--r--sys/net/if_epair.c2
-rw-r--r--sys/net/pfvar.h4
-rw-r--r--sys/netinet/tcp_output.c2
-rw-r--r--sys/netinet/tcp_sack.c36
-rw-r--r--sys/netinet/tcp_stacks/rack_bbr_common.c6
-rw-r--r--sys/netpfil/pf/pf.c19
-rw-r--r--sys/netpfil/pf/pf.h4
-rw-r--r--sys/netpfil/pf/pf_ioctl.c3
-rw-r--r--sys/netpfil/pf/pf_nl.c132
-rw-r--r--sys/netpfil/pf/pf_nl.h19
-rw-r--r--sys/netpfil/pf/pf_norm.c2
-rw-r--r--sys/netpfil/pf/pf_ruleset.c16
-rw-r--r--sys/netpfil/pf/pf_table.c2
-rw-r--r--sys/sys/cpuset.h2
-rw-r--r--sys/sys/proc.h1
-rw-r--r--sys/sys/racct.h6
-rw-r--r--tests/sys/fs/fusefs/pre-init.cc72
-rwxr-xr-xtests/sys/net/if_bridge_test.sh105
-rw-r--r--tests/sys/netpfil/pf/Makefile1
-rw-r--r--tests/sys/netpfil/pf/frag4.py72
-rw-r--r--tests/sys/netpfil/pf/nat64.sh12
-rw-r--r--tests/sys/netpfil/pf/sctp.py33
-rw-r--r--tests/sys/netpfil/pf/table.sh42
-rwxr-xr-xtools/build/make.py74
-rw-r--r--usr.bin/bmake/Makefile2
-rw-r--r--usr.bin/bmake/Makefile.config2
-rw-r--r--usr.bin/bmake/unit-tests/Makefile7
-rw-r--r--usr.bin/find/find.113
-rw-r--r--usr.bin/find/printf.c161
-rwxr-xr-xusr.bin/find/tests/find_test.sh111
-rw-r--r--usr.bin/tail/tail.c12
-rwxr-xr-xusr.bin/tail/tests/tail_test.sh48
-rw-r--r--usr.sbin/bhyve/aarch64/bhyverun_machdep.c3
-rw-r--r--usr.sbin/bhyve/aarch64/vmexit.c5
-rw-r--r--usr.sbin/bluetooth/ath3kfw/ath3kfw.84
-rw-r--r--usr.sbin/bluetooth/bcmfw/bcmfw.84
-rw-r--r--usr.sbin/bluetooth/iwmbtfw/iwmbtfw.84
-rw-r--r--usr.sbin/bluetooth/rtlbtfw/rtlbtfw.85
-rw-r--r--usr.sbin/ctld/Makefile12
-rw-r--r--usr.sbin/ctld/conf.cc70
-rw-r--r--usr.sbin/ctld/conf.h12
-rw-r--r--usr.sbin/ctld/ctl.conf.5242
-rw-r--r--usr.sbin/ctld/ctld.cc531
-rw-r--r--usr.sbin/ctld/ctld.hh172
-rw-r--r--usr.sbin/ctld/discovery.cc8
-rw-r--r--usr.sbin/ctld/iscsi.cc508
-rw-r--r--usr.sbin/ctld/iscsi.hh79
-rw-r--r--usr.sbin/ctld/kernel.cc245
-rw-r--r--usr.sbin/ctld/login.cc17
-rw-r--r--usr.sbin/ctld/nvmf.cc478
-rw-r--r--usr.sbin/ctld/nvmf.hh71
-rw-r--r--usr.sbin/ctld/nvmf_discovery.cc518
-rw-r--r--usr.sbin/ctld/parse.y232
-rw-r--r--usr.sbin/ctld/token.l7
-rw-r--r--usr.sbin/ctld/uclparse.cc381
-rw-r--r--usr.sbin/rpcbind/check_bound.c23
-rw-r--r--usr.sbin/rpcbind/pmap_svc.c38
-rw-r--r--usr.sbin/rpcbind/rpcb_stat.c15
-rw-r--r--usr.sbin/rpcbind/rpcb_svc.c13
-rw-r--r--usr.sbin/rpcbind/rpcb_svc_4.c30
-rw-r--r--usr.sbin/rpcbind/rpcb_svc_com.c288
-rw-r--r--usr.sbin/rpcbind/rpcbind.c466
-rw-r--r--usr.sbin/rpcbind/rpcbind.h42
-rw-r--r--usr.sbin/rpcbind/warmstart.c12
-rw-r--r--usr.sbin/uathload/uathload.84
373 files changed, 11418 insertions, 11639 deletions
diff --git a/.github/workflows/cross-bootstrap-tools.yml b/.github/workflows/cross-bootstrap-tools.yml
index 540e05cbd6e2..8f0dd933ef09 100644
--- a/.github/workflows/cross-bootstrap-tools.yml
+++ b/.github/workflows/cross-bootstrap-tools.yml
@@ -31,7 +31,7 @@ jobs:
pkgs: bmake libarchive-dev clang-18 lld-18
- os: macos-latest
compiler: clang-18
- cross-bindir: /opt/homebrew/opt/llvm@18/bin
+ cross-toolchain: llvm@18
pkgs: bmake libarchive llvm@18
- target_arch: amd64
target: amd64
@@ -55,6 +55,9 @@ jobs:
if [ -n "${{ matrix.cross-bindir }}" ]; then
echo "EXTRA_BUILD_ARGS=--cross-bindir=${{ matrix.cross-bindir }}" >> $GITHUB_ENV
fi
+ if [ -n "${{ matrix.cross-toolchain }}" ]; then
+ echo "EXTRA_BUILD_ARGS=--cross-toolchain=${{ matrix.cross-toolchain }}" >> $GITHUB_ENV
+ fi
mkdir -p ../build
echo "MAKEOBJDIRPREFIX=${PWD%/*}/build" >> $GITHUB_ENV
# heh, works on Linux/BSD/macOS ...
diff --git a/Makefile.inc1 b/Makefile.inc1
index b66743e154eb..e6c9b49eefa3 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -3588,16 +3588,6 @@ delete-old-files: .PHONY
fi; \
done; \
done
-# Remove catpages without corresponding manpages.
- @exec 3<&0; \
- find ${DESTDIR}/usr/share/man/cat* ! -type d 2>/dev/null | sort | \
- sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
- while read catpage; do \
- read manpage; \
- if [ ! -e "$${manpage}" ]; then \
- rm ${RM_I} $${catpage} <&3; \
- fi; \
- done
# Remove compressed copies of uncompressed manpages
.if ${MK_MANCOMPRESS} != "yes"
@exec 3<&0; \
@@ -3640,15 +3630,6 @@ check-old-files: .PHONY
fi; \
done; \
done
-# Check for catpages without corresponding manpages.
- @find ${DESTDIR}/usr/share/man/cat* ! -type d 2>/dev/null | \
- sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
- while read catpage; do \
- read manpage; \
- if [ ! -e "$${manpage}" ]; then \
- echo $${catpage}; \
- fi; \
- done | sort
# Check for compressed copies of uncompressed manpages
.if ${MK_MANCOMPRESS} != "yes"
@find ${DESTDIR}/usr/share/man ${DESTDIR}/usr/share/openssl/man ! -type d ! -name \*.gz 2>/dev/null | \
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 6308e51331b0..86a449c80a76 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -61,6 +61,7 @@ OLD_FILES+=usr/lib/libopencsd.so
# 20250801: Move compile_et to /usr/sbin
OLD_FILES+=usr/share/et/compile_et
+OLD_DIRS+=usr/share/et
# 20250728: zfsboot (MBR) removed
OLD_FILES+=boot/zfsboot
@@ -82,18 +83,6 @@ OLD_LIBS+=usr/lib/libkrb5.so.121
OLD_LIBS+=usr/lib/libkrb5profile.so.121
OLD_LIBS+=usr/lib/libkrb5support.so.121
OLD_LIBS+=usr/lib/libverto.so.121
-OLD_LIBS+=usr/lib/libcom_err.so.121
-OLD_LIBS+=usr/lib/libgssapi_krb5.so.121
-OLD_LIBS+=usr/lib/libgssrpc.so.121
-OLD_LIBS+=usr/lib/libk5crypto.so.121
-OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.121
-OLD_LIBS+=usr/lib/libkadm5srv_mit.so.121
-OLD_LIBS+=usr/lib/libkdb5.so.121
-OLD_LIBS+=usr/lib/libkrad.so.121
-OLD_LIBS+=usr/lib/libkrb5.so.121
-OLD_LIBS+=usr/lib/libkrb5profile.so.121
-OLD_LIBS+=usr/lib/libkrb5support.so.121
-OLD_LIBS+=usr/lib/libverto.so.121
# 20250726: xargs tests rewritten
OLD_FILES+=usr/tests/usr.bin/xargs/legacy_test
@@ -214,7 +203,7 @@ OLD_FILES+=usr/sbin/keyserv
OLD_FILES+=usr/bin/newkey
OLD_FILES+=usr/share/man/man1/chkey.1.gz
OLD_FILES+=usr/share/man/man1/keylogin.1.gz
-OLD_FILES+=usr/share/man/man1/keylogin.1.gz
+OLD_FILES+=usr/share/man/man1/keylogout.1.gz
OLD_FILES+=usr/share/man/man5/publickey.5.gz
OLD_FILES+=usr/share/man/man8/keyserv.1.gz
OLD_FILES+=etc/rc.d/keyserv
@@ -251,7 +240,6 @@ OLD_FILES+=usr/lib/libalias_skinny_p.a
OLD_FILES+=usr/lib/libalias_smedia_p.a
OLD_FILES+=usr/lib/libarchive_p.a
OLD_FILES+=usr/lib/libasn1_p.a
-OLD_FILES+=usr/lib/libauditd_p.a
OLD_FILES+=usr/lib/libavl_p.a
OLD_FILES+=usr/lib/libbe_p.a
OLD_FILES+=usr/lib/libbegemot_p.a
@@ -338,7 +326,6 @@ OLD_FILES+=usr/lib/libnss_tacplus_p.a
OLD_FILES+=usr/lib/libnv_p.a
OLD_FILES+=usr/lib/libnvpair_p.a
OLD_FILES+=usr/lib/libopencsd_p.a
-OLD_FILES+=usr/lib/libopie_p.a
OLD_FILES+=usr/lib/libpanel_p.a
OLD_FILES+=usr/lib/libpanelw_p.a
OLD_FILES+=usr/lib/libpathconv_p.a
@@ -351,7 +338,6 @@ OLD_FILES+=usr/lib/libprivateauditd_p.a
OLD_FILES+=usr/lib/libprivatebsdstat_p.a
OLD_FILES+=usr/lib/libprivatecbor_p.a
OLD_FILES+=usr/lib/libprivatedevdctl_p.a
-OLD_FILES+=usr/lib/libprivateevent_p.a
OLD_FILES+=usr/lib/libprivateevent1_p.a
OLD_FILES+=usr/lib/libprivatefido2_p.a
OLD_FILES+=usr/lib/libprivategmock_main_p.a
@@ -360,7 +346,6 @@ OLD_FILES+=usr/lib/libprivategtest_main_p.a
OLD_FILES+=usr/lib/libprivategtest_p.a
OLD_FILES+=usr/lib/libprivateheimipcc_p.a
OLD_FILES+=usr/lib/libprivateheimipcs_p.a
-OLD_FILES+=usr/lib/libprivateifconfig_p.a
OLD_FILES+=usr/lib/libprivateldns_p.a
OLD_FILES+=usr/lib/libprivatesqlite3_p.a
OLD_FILES+=usr/lib/libprivatessh_p.a
@@ -384,9 +369,7 @@ OLD_FILES+=usr/lib/libspl_p.a
OLD_FILES+=usr/lib/libssl_p.a
OLD_FILES+=usr/lib/libstats_p.a
OLD_FILES+=usr/lib/libstdbuf_p.a
-OLD_FILES+=usr/lib/libstdc++_p.a
OLD_FILES+=usr/lib/libstdthreads_p.a
-OLD_FILES+=usr/lib/libsupc++_p.a
OLD_FILES+=usr/lib/libsysdecode_p.a
OLD_FILES+=usr/lib/libtacplus_p.a
OLD_FILES+=usr/lib/libtermcap_p.a
@@ -11504,8300 +11487,5 @@ OLD_FILES+=usr/share/man/man4/nsp.4.gz
OLD_FILES+=usr/share/man/man4/stg.4.gz
# 20181021: mse(4) removal
OLD_FILES+=usr/share/man/man4/mse.4.gz
-# 20181015: Stale libcasper(3) files following r329452
-OLD_LIBS+=lib/casper/libcap_sysctl.so.0
-OLD_LIBS+=lib/casper/libcap_grp.so.0
-OLD_LIBS+=lib/casper/libcap_pwd.so.0
-OLD_LIBS+=lib/casper/libcap_random.so.0
-OLD_LIBS+=lib/casper/libcap_dns.so.0
-OLD_LIBS+=lib/casper/libcap_syslog.so.0
-# 20181012: rename of ixlv(4) to iavf(4)
-OLD_FILES+=usr/share/man/man4/if_ixlv.4.gz
-OLD_FILES+=usr/share/man/man4/ixlv.4.gz
-# 20181009: OpenSSL 1.1.1
-OLD_FILES+=usr/include/openssl/des_old.h
-OLD_FILES+=usr/include/openssl/dso.h
-OLD_FILES+=usr/include/openssl/krb5_asn.h
-OLD_FILES+=usr/include/openssl/kssl.h
-OLD_FILES+=usr/include/openssl/pqueue.h
-OLD_FILES+=usr/include/openssl/ssl23.h
-OLD_FILES+=usr/include/openssl/ui_compat.h
-OLD_FILES+=usr/share/openssl/man/man1/dss1.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/md2.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/md4.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/md5.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/mdc2.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/ripemd160.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/sha.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/sha1.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/sha224.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/sha256.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/sha384.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/sha512.1.gz
-OLD_FILES+=usr/share/openssl/man/man1/x509v3_config.1.gz
-OLD_FILES+=usr/share/openssl/man/man3/ASN1_STRING_length_set.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BIO_get_conn_int_port.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BIO_get_conn_ip.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BIO_set.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BIO_set_conn_int_port.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BIO_set_conn_ip.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BN_BLINDING_get_thread_id.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BN_BLINDING_set_thread_id.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BN_BLINDING_thread_id.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BN_CTX_init.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BN_MONT_CTX_init.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BN_RECP_CTX_init.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BN_init.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BUF_memdup.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BUF_memdup.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BUF_strdup.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BUF_strlcat.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BUF_strlcpy.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/BUF_strndup.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CMS_set1_signer_cert.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_cmp.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_cpy.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_current.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_get_callback.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_hash.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_THREADID_set_callback.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_destroy_dynlockid.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_get_new_dynlockid.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_lock.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_num_locks.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_dynlock_create_callback.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_dynlock_destroy_callback.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_dynlock_lock_callback.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_locking_callback.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/DES_ede3_cbcm_encrypt.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/DES_enc_read.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/DES_enc_write.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EC_KEY_get_key_method_data.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EC_KEY_insert_key_method_data.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EC_POINT_set_Jprojective_coordinates.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/ERR_load_UI_strings.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_CIPHER_CTX_cleanup.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_CIPHER_CTX_init.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_MAX_MD_SIZE.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_MD_CTX_cleanup.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_MD_CTX_create.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_MD_CTX_destroy.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_MD_CTX_init.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEVP_PKEY_CTX_set_app_data.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_CTX_set_rsa_rsa_keygen_bits.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_get_default_digest.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_dss.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_dss1.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_sha.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/HMAC_CTX_cleanup.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/HMAC_CTX_init.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/HMAC_cleanup.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/OPENSSL_ia32cap_loc.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/PEM.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/RAND_SSLeay.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/RSA_PKCS1_SSLeay.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/RSA_null_method.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_need_tmp_rsa.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_custom_cli_ext.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_default_read_ahead.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_tmp_rsa.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_tmp_rsa_callback.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_add_session.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_flush_sessions.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_get_accept_state.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_get_msg_callback_arg.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_need_tmp_rsa.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_remove_session.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_set_tmp_rsa.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSL_set_tmp_rsa_callback.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSLeay.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSLeay_add_ssl_algorithms.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSLeay_version.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSLv2_client_method.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSLv2_method.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/SSLv2_server_method.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/X509_STORE_CTX_set_chain.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/X509_STORE_CTX_trusted_stack.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bio.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/blowfish.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_add_words.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_check_top.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_cmp_words.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_div_words.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_dump.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_expand.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_expand2.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_fix_top.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_internal.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_add_words.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_comba4.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_comba8.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_high.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_low_normal.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_low_recursive.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_normal.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_part_recursive.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_recursive.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_mul_words.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_print.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_set_high.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_set_low.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_set_max.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_comba4.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_comba8.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_normal.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_recursive.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_sqr_words.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_sub_words.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/bn_wexpand.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/buffer.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/crypto.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/d2i_ECPKParameters_bio.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/d2i_ECPKParameters_fp.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/d2i_ECPrivate_key.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/d2i_Netscape_RSA.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/d2i_PKCS8PrivateKey.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/d2i_Private_key.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/des.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/des_read_2passwords.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/des_read_password.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/des_read_pw.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/des_read_pw_string.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/dh.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/dsa.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/ec.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/ecdsa.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/engine.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/err.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/evp.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/hmac.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/i2d_ECPKParameters_bio.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/i2d_ECPKParameters_fp.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/i2d_Netscape_RSA.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_delete.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_doall.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_doall_arg.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_error.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_free.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_insert.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_new.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_node_stats.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_node_stats_bio.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_node_usage_stats.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_node_usage_stats_bio.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_retrieve.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_stats.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lh_stats_bio.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/lhash.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/md5.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/mdc2.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/pem.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/rand.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/rc4.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/ripemd.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/rsa.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/sha.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/ssl.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/threads.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/ui.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/ui_compat.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/x509.3.gz
-OLD_LIBS+=lib/libcrypto.so.8
-OLD_LIBS+=usr/lib/engines/lib4758cca.so
-OLD_LIBS+=usr/lib/engines/libaep.so
-OLD_LIBS+=usr/lib/engines/libatalla.so
-OLD_LIBS+=usr/lib/engines/libcapi.so
-OLD_LIBS+=usr/lib/engines/libchil.so
-OLD_LIBS+=usr/lib/engines/libcswift.so
-OLD_LIBS+=usr/lib/engines/libgost.so
-OLD_LIBS+=usr/lib/engines/libnuron.so
-OLD_LIBS+=usr/lib/engines/libsureware.so
-OLD_LIBS+=usr/lib/engines/libubsec.so
-OLD_LIBS+=usr/lib/libssl.so.8
-OLD_LIBS+=usr/lib32/lib4758cca.so
-OLD_LIBS+=usr/lib32/libaep.so
-OLD_LIBS+=usr/lib32/libatalla.so
-OLD_LIBS+=usr/lib32/libcapi.so
-OLD_LIBS+=usr/lib32/libchil.so
-OLD_LIBS+=usr/lib32/libcswift.so
-OLD_LIBS+=usr/lib32/libgost.so
-OLD_LIBS+=usr/lib32/libnuron.so
-OLD_LIBS+=usr/lib32/libsureware.so
-OLD_LIBS+=usr/lib32/libubsec.so
-# 20180824: libbe(3) SHLIBDIR fixed to reflect correct location
-MOVED_LIBS+=usr/lib/libbe.so.1
-# 20180819: Remove deprecated arc4random(3) stir/addrandom interfaces
-OLD_FILES+=usr/share/man/man3/arc4random_addrandom.3.gz
-OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz
-# 20180819: send-pr(1) placeholder removal
-OLD_FILES+=usr/bin/send-pr
-# 20180801: jedec_ts(4) removed
-OLD_FILES+=usr/share/man/man4/jedec_ts.4.gz
-# 20180725: Cleanup old libcasper.so.0
-OLD_LIBS+=lib/libcasper.so.0
-# 20180722: indent(1) option renamed, test files follow
-OLD_FILES+=usr/bin/indent/tests/nsac.0
-OLD_FILES+=usr/bin/indent/tests/nsac.0.pro
-OLD_FILES+=usr/bin/indent/tests/nsac.0.stdout
-OLD_FILES+=usr/bin/indent/tests/sac.0
-OLD_FILES+=usr/bin/indent/tests/sac.0.pro
-OLD_FILES+=usr/bin/indent/tests/sac.0.stdout
-# 20180721: move of libmlx5.so.1 and libibverbs.so.1
-MOVED_LIBS+=usr/lib/libmlx5.so.1
-MOVED_LIBS+=usr/lib/libibverbs.so.1
-# 20180720: zfsloader.8 merged into loader.8
-OLD_FILES+=usr/share/man/man8/zfsloader.8.gz
-# 20180710: old numa cleanup
-OLD_FILES+=usr/include/sys/numa.h
-OLD_FILES+=usr/share/man/man2/numa_getaffinity.2.gz
-OLD_FILES+=usr/share/man/man2/numa_setaffinity.2.gz
-OLD_FILES+=usr/share/man/man1/numactl.1.gz
-OLD_FILES+=usr/bin/numactl
-# 20180630: new clang import which bumps version from 6.0.0 to 6.0.1
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/esan_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/hwasan_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/scudo_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/tsan_interface.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/6.0.0/include/sanitizer
-OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_cmath.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_complex_builtins.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_intrinsics.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_math_forward_declares.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/altivec.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/arm64intr.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/armintr.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512bitalgintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512ifmaintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512ifmavlintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512pfintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmi2intrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmiintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmivlintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlbitalgintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlcdintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlvbmi2intrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlvnniintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vnniintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vpopcntdqintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vpopcntdqvlintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/cetintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/clflushoptintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/clwbintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/clzerointrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/cpuid.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/gfniintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/immintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/lwpintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/module.modulemap
-OLD_FILES+=usr/lib/clang/6.0.0/include/msa.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/mwaitxintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/opencl-c.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/pkuintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/vadefs.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/vaesintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/vpclmulqdqintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/xsavecintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/xsaveintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/xsaveoptintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/xsavesintrin.h
-OLD_FILES+=usr/lib/clang/6.0.0/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/6.0.0/include
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-i386.so
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-x86_64.so
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-armhf.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats_client-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_minimal-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/6.0.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/6.0.0/lib
-OLD_DIRS+=usr/lib/clang/6.0.0
-# 20180615: asf(8) removed
-OLD_FILES+=usr/sbin/asf
-OLD_FILES+=usr/share/man/man8/asf.8.gz
-# 20180609: obsolete libc++ files missed from the 5.0.0 import
-OLD_FILES+=usr/include/c++/v1/__refstring
-OLD_FILES+=usr/include/c++/v1/__undef_min_max
-OLD_FILES+=usr/include/c++/v1/tr1/__refstring
-OLD_FILES+=usr/include/c++/v1/tr1/__undef_min_max
-# 20180607: remove nls support from grep
-OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/grep.cat
-OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/grep.cat
-OLD_FILES+=usr/share/nls/ja_JP.SJIS/grep.cat
-OLD_FILES+=usr/share/nls/ja_JP.eucJP/grep.cat
-OLD_FILES+=usr/share/nls/gl_ES.ISO8859-1/grep.cat
-OLD_FILES+=usr/share/nls/zh_CN.UTF-8/grep.cat
-OLD_FILES+=usr/share/nls/es_ES.ISO8859-1/grep.cat
-OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/grep.cat
-OLD_FILES+=usr/share/nls/uk_UA.UTF-8/grep.cat
-OLD_FILES+=usr/share/nls/ja_JP.UTF-8/grep.cat
-# 20180528: libpcap update removed header file
-OLD_FILES+=usr/include/pcap/export-defs.h
-# 20180517: retire vxge
-OLD_FILES+=usr/share/man/man4/if_vxge.4.gz
-OLD_FILES+=usr/share/man/man4/vxge.4.gz
-# 20180512: Rename Unbound tools
-OLD_FILES+=usr/sbin/unbound
-OLD_FILES+=usr/sbin/unbound-anchor
-OLD_FILES+=usr/sbin/unbound-checkconf
-OLD_FILES+=usr/sbin/unbound-control
-OLD_FILES+=usr/share/man/man5/unbound.conf.5.gz
-OLD_FILES+=usr/share/man/man8/unbound-anchor.8.gz
-OLD_FILES+=usr/share/man/man8/unbound-checkconf.8.gz
-OLD_FILES+=usr/share/man/man8/unbound-control.8.gz
-OLD_FILES+=usr/share/man/man8/unbound.8.gz
-# 20180508: retire nxge
-OLD_FILES+=usr/share/man/man4/if_nxge.4.gz
-OLD_FILES+=usr/share/man/man4/nxge.4.gz
-# 20180505: rhosts
-OLD_FILES+=usr/share/skel/dot.rhosts
-# 20180502: retire ixgb
-OLD_FILES+=usr/share/man/man4/if_ixgb.4.gz
-OLD_FILES+=usr/share/man/man4/ixgb.4.gz
-# 20180501: retire lmc
-OLD_FILES+=usr/include/dev/lmc/if_lmc.h
-OLD_DIRS+=usr/include/dev/lmc
-OLD_FILES+=usr/sbin/lmcconfig
-OLD_FILES+=usr/share/man/man4/lmc.4.gz
-OLD_FILES+=usr/share/man/man4/if_lmc.4.gz
-OLD_FILES+=usr/share/man/man8/lmcconfig.8.gz
-# 20180417: remove fuswintr and suswintr
-OLD_FILES+=usr/share/man/man9/fuswintr.9.gz
-OLD_FILES+=usr/share/man/man9/suswintr.9.gz
-# 20180413: remove Arcnet support
-OLD_FILES+=usr/include/net/if_arc.h
-OLD_FILES+=usr/share/man/man4/cm.4.gz
-# 20180409: remove FDDI support
-OLD_FILES+=usr/include/net/fddi.h
-OLD_FILES+=usr/share/man/man4/fpa.4.gz
-# 20180319: remove /boot/overlays, replaced by /boot/dtb/overlays
-OLD_DIRS+=boot/overlays
-# 20180311: remove sys/sys/i386/include/pcaudioio.h
-.if ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/include/machine/pcaudioio.h
-.endif
-# 20180310: remove sys/sys/dataacq.h
-OLD_FILES+=usr/include/sys/dataacq.h
-# 20180306: remove DTrace scripts made obsolete by dwatch(1)
-OLD_FILES+=usr/share/dtrace/watch_execve
-OLD_FILES+=usr/share/dtrace/watch_kill
-OLD_FILES+=usr/share/dtrace/watch_vop_remove
-# 20180212: move devmatch
-OLD_FILES+=usr/sbin/devmatch
-# 20180211: remove usb.conf
-OLD_FILES+=etc/devd/usb.conf
-# 20180208: remove c_rehash(1)
-OLD_FILES+=usr/share/openssl/man/man1/c_rehash.1.gz
-# 20180206: remove gdbtui
-OLD_FILES+=usr/bin/gdbtui
-# 20180201: Obsolete forth files
-OLD_FILES+=boot/pcibios.4th
-# 20180114: new clang import which bumps version from 5.0.1 to 6.0.0
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/esan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/tsan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/5.0.1/include/sanitizer
-OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_cmath.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_complex_builtins.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_intrinsics.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_math_forward_declares.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/__clang_cuda_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/altivec.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/armintr.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512ifmaintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512ifmavlintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512pfintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vbmiintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vbmivlintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vlcdintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avx512vpopcntdqintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/clflushoptintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/clzerointrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/cpuid.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/immintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/lwpintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/module.modulemap
-OLD_FILES+=usr/lib/clang/5.0.1/include/msa.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/mwaitxintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/opencl-c.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/pkuintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/vadefs.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/xsavecintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/xsaveintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/xsaveoptintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/xsavesintrin.h
-OLD_FILES+=usr/lib/clang/5.0.1/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/5.0.1/include
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-i386.so
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan-x86_64.so
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.profile-armhf.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.stats-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.stats-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.stats_client-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.stats_client-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/5.0.1/lib/freebsd
-OLD_DIRS+=usr/lib/clang/5.0.1/lib
-OLD_DIRS+=usr/lib/clang/5.0.1
-# 20180109: Remove vestiges of digi(4) driver
-OLD_FILES+=usr/include/sys/digiio.h
-OLD_FILES+=usr/sbin/digictl
-OLD_FILES+=usr/share/man/man8/digictl.8.gz
-# 20180107: Convert remaining geli(8) tests to ATF
-OLD_FILES+=tests/sys/geom/class/eli/nokey_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/readonly_test.sh
-# 20180106: Convert most geli(8) tests to ATF
-OLD_FILES+=tests/sys/geom/class/eli/attach_d_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/configure_b_B_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/detach_l_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/init_B_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/init_J_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/init_a_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/init_alias_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/init_i_P_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/integrity_copy_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/integrity_data_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/integrity_hmac_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/onetime_a_test.sh
-OLD_FILES+=tests/sys/geom/class/eli/onetime_d_test.sh
-# 20171230: Remove /etc/skel from mtree
-OLD_DIRS+=etc/skel
-# 20171208: Remove basename_r(3)
-OLD_FILES+=usr/share/man/man3/basename_r.3.gz
-# 20171206: Remove sponge(1)
-OLD_FILES+=usr/bin/sponge
-OLD_FILES+=usr/share/man/man1/sponge.1.gz
-# 20171204: Move fdformat man page from volume 1 to volume 8
-OLD_FILES+=usr/share/man/man1/fdformat.1.gz
-# 20171203: libproc version bump
-OLD_LIBS+=usr/lib/libproc.so.4
-# 20171203: new clang import which bumps version from 5.0.0 to 5.0.1
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/esan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/tsan_interface.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/5.0.0/include/sanitizer
-OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_cmath.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_complex_builtins.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_intrinsics.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_math_forward_declares.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/altivec.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/armintr.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512ifmaintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512ifmavlintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512pfintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vbmiintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vbmivlintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlcdintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vpopcntdqintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/clflushoptintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/clzerointrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/cpuid.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/immintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/lwpintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/module.modulemap
-OLD_FILES+=usr/lib/clang/5.0.0/include/msa.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/mwaitxintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/opencl-c.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/pkuintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/vadefs.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/xsavecintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/xsaveintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/xsaveoptintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/xsavesintrin.h
-OLD_FILES+=usr/lib/clang/5.0.0/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/5.0.0/include
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-i386.so
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-x86_64.so
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-armhf.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/5.0.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/5.0.0/lib
-OLD_DIRS+=usr/lib/clang/5.0.0
-# 20171118: Remove old etc casper files
-OLD_FILES+=etc/casper/system.dns
-OLD_FILES+=etc/casper/system.grp
-OLD_FILES+=etc/casper/system.pwd
-OLD_FILES+=etc/casper/system.random
-OLD_FILES+=etc/casper/system.sysctl
-OLD_DIRS+=etc/casper
-# 20171116: lint(1) removal
-OLD_FILES+=usr/bin/lint
-OLD_FILES+=usr/libexec/lint1
-OLD_FILES+=usr/libexec/lint2
-OLD_FILES+=usr/libdata/lint/llib-lposix.ln
-OLD_FILES+=usr/libdata/lint/llib-lstdc.ln
-OLD_FILES+=usr/share/man/man1/lint.1.gz
-OLD_FILES+=usr/share/man/man7/lint.7.gz
-OLD_DIRS+=usr/libdata/lint
-# 20171114: Removal of all fortune datfiles other than freebsd-tips
-OLD_FILES+=usr/share/games/fortune/fortunes
-OLD_FILES+=usr/share/games/fortune/fortunes.dat
-OLD_FILES+=usr/share/games/fortune/gerrold.limerick
-OLD_FILES+=usr/share/games/fortune/gerrold.limerick.dat
-OLD_FILES+=usr/share/games/fortune/limerick
-OLD_FILES+=usr/share/games/fortune/limerick.dat
-OLD_FILES+=usr/share/games/fortune/murphy
-OLD_FILES+=usr/share/games/fortune/murphy-o
-OLD_FILES+=usr/share/games/fortune/murphy-o.dat
-OLD_FILES+=usr/share/games/fortune/murphy.dat
-OLD_FILES+=usr/share/games/fortune/startrek
-OLD_FILES+=usr/share/games/fortune/startrek.dat
-OLD_FILES+=usr/share/games/fortune/zippy
-OLD_FILES+=usr/share/games/fortune/zippy.dat
-# 20171112: Removal of eqnchar definition
-OLD_FILES+=usr/share/misc/eqnchar
-# 20171110: Removal of mailaddr man page
-OLD_FILES+=usr/share/man/man7/mailaddr.7.gz
-# 20171108: Rename of NgSendMsgReply to NgSendReplyMsg
-OLD_FILES+=usr/share/man/man3/NgSendMsgReply.3.gz
-# 20171108: badsect(8) removal
-OLD_FILES+=sbin/badsect
-OLD_FILES+=rescue/badsect
-OLD_FILES+=usr/share/man/man8/badsect.8.gz
-# 20171105: fixing lib/libclang_rt CRTARCH for arm:armv[67]
-.if ${MACHINE_ARCH:Marmv[67]*} != "" && \
- (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.a
-OLD_LIBS+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-arm.so
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-arm.a
-OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a
-.endif
-# 20171104: libcap_random should be in /lib not in /usr/lib
-OLD_LIBS+=usr/lib/libcap_random.so.0
-# 20171104: Casper can work only as shared library
-OLD_FILES+=usr/lib/libcap_dns.a
-OLD_FILES+=usr/lib/libcap_dns_p.a
-OLD_FILES+=usr/lib/libcap_grp.a
-OLD_FILES+=usr/lib/libcap_grp_p.a
-OLD_FILES+=usr/lib/libcap_pwd.a
-OLD_FILES+=usr/lib/libcap_pwd_p.a
-OLD_FILES+=usr/lib/libcap_random.a
-OLD_FILES+=usr/lib/libcap_random_p.a
-OLD_FILES+=usr/lib/libcap_sysctl.a
-OLD_FILES+=usr/lib/libcap_sysctl_p.a
-OLD_FILES+=usr/lib/libcasper.a
-OLD_FILES+=usr/lib/libcasper_p.a
-# 20171031: Removal of adding_user man page
-OLD_FILES+=usr/share/man/man7/adding_user.7.gz
-# 20171031: Disconnected libpathconv tests
-OLD_DIRS+=usr/tests/lib/libpathconv
-# 20171017: Removal of mbpool(9)
-OLD_FILES+=usr/include/sys/mbpool.h
-OLD_FILES+=usr/share/man/man9/mbpool.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_destroy.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_alloc.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_ext_free.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_count.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_card_free.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_get_keep.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_free.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_get.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_create.9.gz
-OLD_FILES+=usr/share/man/man9/mbp_sync.9.gz
-# 20171010: Remove libstand
-OLD_FILES+=usr/lib/libstand.a
-OLD_FILES+=usr/lib/libstand_p.a
-OLD_FILES+=usr/include/stand.h
-OLD_FILES+=usr/share/man/man3/libstand.3.gz
-# 20171003: remove RCMDS
-OLD_FILES+=bin/rcp
-OLD_FILES+=rescue/rcp
-OLD_FILES+=usr/bin/rlogin
-OLD_FILES+=usr/bin/rsh
-OLD_FILES+=usr/libexec/rlogind
-OLD_FILES+=usr/libexec/rshd
-OLD_FILES+=usr/share/man/man1/rcp.1.gz
-OLD_FILES+=usr/share/man/man1/rlogin.1.gz
-OLD_FILES+=usr/share/man/man1/rsh.1.gz
-OLD_FILES+=usr/share/man/man8/rlogind.8.gz
-OLD_FILES+=usr/share/man/man8/rshd.8.gz
-# 20170927: crshared
-OLD_FILES+=usr/share/man/man9/crshared.9.gz
-# 20170927: procctl
-OLD_FILES+=usr/share/man/man8/procctl.8.gz
-OLD_FILES+=usr/sbin/procctl
-# 20170926: remove unneeded man aliases and locales directory
-OLD_FILES+=usr/share/man/en.ISO8859-1/man1
-OLD_FILES+=usr/share/man/en.ISO8859-1/man2
-OLD_FILES+=usr/share/man/en.ISO8859-1/man3
-OLD_FILES+=usr/share/man/en.ISO8859-1/man4
-OLD_FILES+=usr/share/man/en.ISO8859-1/man5
-OLD_FILES+=usr/share/man/en.ISO8859-1/man6
-OLD_FILES+=usr/share/man/en.ISO8859-1/man7
-OLD_FILES+=usr/share/man/en.ISO8859-1/man8
-OLD_FILES+=usr/share/man/en.ISO8859-1/man9
-OLD_DIRS+=usr/share/man/en.ISO8859-1
-OLD_FILES+=usr/share/man/en.ISO8859-1/mandoc.db
-OLD_FILES+=usr/share/man/en.UTF-8/man1
-OLD_FILES+=usr/share/man/en.UTF-8/man2
-OLD_FILES+=usr/share/man/en.UTF-8/man3
-OLD_FILES+=usr/share/man/en.UTF-8/man4
-OLD_FILES+=usr/share/man/en.UTF-8/man5
-OLD_FILES+=usr/share/man/en.UTF-8/man6
-OLD_FILES+=usr/share/man/en.UTF-8/man7
-OLD_FILES+=usr/share/man/en.UTF-8/man8
-OLD_FILES+=usr/share/man/en.UTF-8/man9
-OLD_FILES+=usr/share/man/en.UTF-8/mandoc.db
-OLD_DIRS+=usr/share/man/en.UTF-8
-OLD_FILES+=usr/share/man/en.ISO8859-15
-OLD_FILES+=usr/share/openssl/man/en.ISO8859-1/man1
-OLD_FILES+=usr/share/openssl/man/en.ISO8859-1/man3
-OLD_FILES+=usr/share/openssl/man/en.ISO8859-1/mandoc.db
-OLD_DIRS+=usr/share/openssl/man/en.ISO8859-1
-OLD_FILES+=usr/share/openssl/man/en.ISO8859-15
-OLD_DIRS+=usr/share/man/ja/man1
-OLD_DIRS+=usr/share/man/ja/man2
-OLD_DIRS+=usr/share/man/ja/man3
-OLD_DIRS+=usr/share/man/ja/man4
-OLD_DIRS+=usr/share/man/ja/man5
-OLD_DIRS+=usr/share/man/ja/man6
-OLD_DIRS+=usr/share/man/ja/man7
-OLD_DIRS+=usr/share/man/ja/man8
-OLD_DIRS+=usr/share/man/ja/man9
-OLD_DIRS+=usr/share/man/ja
-# 20170913: remove unneeded catman utility
-OLD_FILES+=etc/periodic/weekly/330.catman
-OLD_FILES+=usr/bin/catman
-OLD_FILES+=usr/libexec/catman.local
-OLD_FILES+=usr/share/man/man1/catman.1.gz
-OLD_FILES+=usr/share/man/man8/catman.local.8.gz
-OLD_DIRS+=usr/share/man/cat1
-OLD_DIRS+=usr/share/man/cat2
-OLD_DIRS+=usr/share/man/cat3
-OLD_DIRS+=usr/share/man/cat4/amd64
-OLD_DIRS+=usr/share/man/cat4/arm
-OLD_DIRS+=usr/share/man/cat4/i386
-OLD_DIRS+=usr/share/man/cat4/powerpc
-OLD_DIRS+=usr/share/man/cat4/sparc64
-OLD_DIRS+=usr/share/man/cat4
-OLD_DIRS+=usr/share/man/cat5
-OLD_DIRS+=usr/share/man/cat6
-OLD_DIRS+=usr/share/man/cat7
-OLD_DIRS+=usr/share/man/cat8/amd64
-OLD_DIRS+=usr/share/man/cat8/arm
-OLD_DIRS+=usr/share/man/cat8/i386
-OLD_DIRS+=usr/share/man/cat8/powerpc
-OLD_DIRS+=usr/share/man/cat8/sparc64
-OLD_DIRS+=usr/share/man/cat8
-OLD_DIRS+=usr/share/man/cat9
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat2
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat3
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/amd64
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/arm
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/i386
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/powerpc
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4/sparc64
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat4
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat5
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat6
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat7
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/amd64
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/arm
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/i386
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/powerpc
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8/sparc64
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat8
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat9
-OLD_DIRS+=usr/share/man/en.UTF-8/cat1
-OLD_DIRS+=usr/share/man/en.UTF-8/cat2
-OLD_DIRS+=usr/share/man/en.UTF-8/cat3
-OLD_DIRS+=usr/share/man/en.UTF-8/cat4/amd64
-OLD_DIRS+=usr/share/man/en.UTF-8/cat4/arm
-OLD_DIRS+=usr/share/man/en.UTF-8/cat4/i386
-OLD_DIRS+=usr/share/man/en.UTF-8/cat4/powerpc
-OLD_DIRS+=usr/share/man/en.UTF-8/cat4/sparc64
-OLD_DIRS+=usr/share/man/en.UTF-8/cat4
-OLD_DIRS+=usr/share/man/en.UTF-8/cat5
-OLD_DIRS+=usr/share/man/en.UTF-8/cat6
-OLD_DIRS+=usr/share/man/en.UTF-8/cat7
-OLD_DIRS+=usr/share/man/en.UTF-8/cat8/amd64
-OLD_DIRS+=usr/share/man/en.UTF-8/cat8/arm
-OLD_DIRS+=usr/share/man/en.UTF-8/cat8/i386
-OLD_DIRS+=usr/share/man/en.UTF-8/cat8/powerpc
-OLD_DIRS+=usr/share/man/en.UTF-8/cat8/sparc64
-OLD_DIRS+=usr/share/man/en.UTF-8/cat8
-OLD_DIRS+=usr/share/man/en.UTF-8/cat9
-OLD_DIRS+=usr/share/man/ja/cat1
-OLD_DIRS+=usr/share/man/ja/cat2
-OLD_DIRS+=usr/share/man/ja/cat3
-OLD_DIRS+=usr/share/man/ja/cat4/amd64
-OLD_DIRS+=usr/share/man/ja/cat4/arm
-OLD_DIRS+=usr/share/man/ja/cat4/i386
-OLD_DIRS+=usr/share/man/ja/cat4/powerpc
-OLD_DIRS+=usr/share/man/ja/cat4/sparc64
-OLD_DIRS+=usr/share/man/ja/cat4
-OLD_DIRS+=usr/share/man/ja/cat5
-OLD_DIRS+=usr/share/man/ja/cat6
-OLD_DIRS+=usr/share/man/ja/cat7
-OLD_DIRS+=usr/share/man/ja/cat8/amd64
-OLD_DIRS+=usr/share/man/ja/cat8/arm
-OLD_DIRS+=usr/share/man/ja/cat8/powerpc
-OLD_DIRS+=usr/share/man/ja/cat8/sparc64
-OLD_DIRS+=usr/share/man/ja/cat8
-OLD_DIRS+=usr/share/man/ja/cat9
-OLD_DIRS+=usr/share/openssl/man/cat1
-OLD_DIRS+=usr/share/openssl/man/cat3
-OLD_DIRS+=usr/share/openssl/man/en.ISO8859-1/cat1
-OLD_DIRS+=usr/share/openssl/man/en.ISO8859-1/cat3
-# 20170830: rename ntb_hw(4) to ntb_hw_intel(4)
-OLD_FILES+=usr/share/man/man4/ntb_hw.4.gz
-# 20170802: ksyms(4) ioctl interface was removed
-OLD_FILES+=usr/include/sys/ksyms.h
-# 20170729: the iicbus/pcf8563 driver is replaced with iicbus/nxprtc
-OLD_FILES+=usr/include/dev/iicbus/pcf8563reg.h
-# 20170727: options FLOWTABLE removed
-OLD_FILES+=usr/include/net/flowtable.h
-# 20170722: new clang import which bumps version from 4.0.0 to 5.0.0
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/esan_interface.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/4.0.0/include/sanitizer
-OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_cmath.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_complex_builtins.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_intrinsics.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_math_forward_declares.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/__clang_cuda_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/altivec.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/armintr.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512ifmaintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512ifmavlintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512pfintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vbmiintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vbmivlintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vlcdintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/clflushoptintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/cpuid.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/immintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/module.modulemap
-OLD_FILES+=usr/lib/clang/4.0.0/include/msa.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/mwaitxintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/opencl-c.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/pkuintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/vadefs.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/xsavecintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/xsaveintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/xsaveoptintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/xsavesintrin.h
-OLD_FILES+=usr/lib/clang/4.0.0/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/4.0.0/include
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-i386.so
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan-x86_64.so
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.stats-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.stats-x86_64.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.stats_client-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/4.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/4.0.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/4.0.0/lib
-OLD_DIRS+=usr/lib/clang/4.0.0
-OLD_FILES+=usr/bin/llvm-pdbdump
-# 20170717: Remove documentation of vaporware
-OLD_FILES+=usr/share/man/man2/pdwait4.2.gz
-# 20170610: chown-f_test replaced by chown_test
-OLD_FILES+=usr/tests/usr.sbin/chown/chown-f_test
-# 20170531: removal of groff
-OLD_FILES+=usr/bin/addftinfo
-OLD_FILES+=usr/bin/afmtodit
-OLD_FILES+=usr/bin/checknr
-OLD_FILES+=usr/bin/colcrt
-OLD_FILES+=usr/bin/eqn
-OLD_FILES+=usr/bin/grn
-OLD_FILES+=usr/bin/grodvi
-OLD_FILES+=usr/bin/groff
-OLD_FILES+=usr/bin/grog
-OLD_FILES+=usr/bin/grolbp
-OLD_FILES+=usr/bin/grolj4
-OLD_FILES+=usr/bin/grops
-OLD_FILES+=usr/bin/grotty
-OLD_FILES+=usr/bin/hpftodit
-OLD_FILES+=usr/bin/indxbib
-OLD_FILES+=usr/bin/lkbib
-OLD_FILES+=usr/bin/lookbib
-OLD_FILES+=usr/bin/mmroff
-OLD_FILES+=usr/bin/neqn
-OLD_FILES+=usr/bin/nroff
-OLD_FILES+=usr/bin/pfbtops
-OLD_FILES+=usr/bin/pic
-OLD_FILES+=usr/bin/post-grohtml
-OLD_FILES+=usr/bin/pre-grohtml
-OLD_FILES+=usr/bin/psroff
-OLD_FILES+=usr/bin/refer
-OLD_FILES+=usr/bin/tbl
-OLD_FILES+=usr/bin/tfmtodit
-OLD_FILES+=usr/bin/troff
-OLD_FILES+=usr/bin/vgrind
-OLD_FILES+=usr/libexec/vfontedpr
-OLD_FILES+=usr/share/dict/eign
-OLD_FILES+=usr/share/groff_font/devX100-12/CB
-OLD_FILES+=usr/share/groff_font/devX100-12/CBI
-OLD_FILES+=usr/share/groff_font/devX100-12/CI
-OLD_FILES+=usr/share/groff_font/devX100-12/CR
-OLD_FILES+=usr/share/groff_font/devX100-12/DESC
-OLD_FILES+=usr/share/groff_font/devX100-12/HB
-OLD_FILES+=usr/share/groff_font/devX100-12/HBI
-OLD_FILES+=usr/share/groff_font/devX100-12/HI
-OLD_FILES+=usr/share/groff_font/devX100-12/HR
-OLD_FILES+=usr/share/groff_font/devX100-12/NB
-OLD_FILES+=usr/share/groff_font/devX100-12/NBI
-OLD_FILES+=usr/share/groff_font/devX100-12/NI
-OLD_FILES+=usr/share/groff_font/devX100-12/NR
-OLD_FILES+=usr/share/groff_font/devX100-12/S
-OLD_FILES+=usr/share/groff_font/devX100-12/TB
-OLD_FILES+=usr/share/groff_font/devX100-12/TBI
-OLD_FILES+=usr/share/groff_font/devX100-12/TI
-OLD_FILES+=usr/share/groff_font/devX100-12/TR
-OLD_DIRS+=usr/share/groff_font/devX100-12
-OLD_FILES+=usr/share/groff_font/devX100/CB
-OLD_FILES+=usr/share/groff_font/devX100/CBI
-OLD_FILES+=usr/share/groff_font/devX100/CI
-OLD_FILES+=usr/share/groff_font/devX100/CR
-OLD_FILES+=usr/share/groff_font/devX100/DESC
-OLD_FILES+=usr/share/groff_font/devX100/HB
-OLD_FILES+=usr/share/groff_font/devX100/HBI
-OLD_FILES+=usr/share/groff_font/devX100/HI
-OLD_FILES+=usr/share/groff_font/devX100/HR
-OLD_FILES+=usr/share/groff_font/devX100/NB
-OLD_FILES+=usr/share/groff_font/devX100/NBI
-OLD_FILES+=usr/share/groff_font/devX100/NI
-OLD_FILES+=usr/share/groff_font/devX100/NR
-OLD_FILES+=usr/share/groff_font/devX100/S
-OLD_FILES+=usr/share/groff_font/devX100/TB
-OLD_FILES+=usr/share/groff_font/devX100/TBI
-OLD_FILES+=usr/share/groff_font/devX100/TI
-OLD_FILES+=usr/share/groff_font/devX100/TR
-OLD_DIRS+=usr/share/groff_font/devX100
-OLD_FILES+=usr/share/groff_font/devX75-12/CB
-OLD_FILES+=usr/share/groff_font/devX75-12/CBI
-OLD_FILES+=usr/share/groff_font/devX75-12/CI
-OLD_FILES+=usr/share/groff_font/devX75-12/CR
-OLD_FILES+=usr/share/groff_font/devX75-12/DESC
-OLD_FILES+=usr/share/groff_font/devX75-12/HB
-OLD_FILES+=usr/share/groff_font/devX75-12/HBI
-OLD_FILES+=usr/share/groff_font/devX75-12/HI
-OLD_FILES+=usr/share/groff_font/devX75-12/HR
-OLD_FILES+=usr/share/groff_font/devX75-12/NB
-OLD_FILES+=usr/share/groff_font/devX75-12/NBI
-OLD_FILES+=usr/share/groff_font/devX75-12/NI
-OLD_FILES+=usr/share/groff_font/devX75-12/NR
-OLD_FILES+=usr/share/groff_font/devX75-12/S
-OLD_FILES+=usr/share/groff_font/devX75-12/TB
-OLD_FILES+=usr/share/groff_font/devX75-12/TBI
-OLD_FILES+=usr/share/groff_font/devX75-12/TI
-OLD_FILES+=usr/share/groff_font/devX75-12/TR
-OLD_DIRS+=usr/share/groff_font/devX75-12
-OLD_FILES+=usr/share/groff_font/devX75/CB
-OLD_FILES+=usr/share/groff_font/devX75/CBI
-OLD_FILES+=usr/share/groff_font/devX75/CI
-OLD_FILES+=usr/share/groff_font/devX75/CR
-OLD_FILES+=usr/share/groff_font/devX75/DESC
-OLD_FILES+=usr/share/groff_font/devX75/HB
-OLD_FILES+=usr/share/groff_font/devX75/HBI
-OLD_FILES+=usr/share/groff_font/devX75/HI
-OLD_FILES+=usr/share/groff_font/devX75/HR
-OLD_FILES+=usr/share/groff_font/devX75/NB
-OLD_FILES+=usr/share/groff_font/devX75/NBI
-OLD_FILES+=usr/share/groff_font/devX75/NI
-OLD_FILES+=usr/share/groff_font/devX75/NR
-OLD_FILES+=usr/share/groff_font/devX75/S
-OLD_FILES+=usr/share/groff_font/devX75/TB
-OLD_FILES+=usr/share/groff_font/devX75/TBI
-OLD_FILES+=usr/share/groff_font/devX75/TI
-OLD_FILES+=usr/share/groff_font/devX75/TR
-OLD_DIRS+=usr/share/groff_font/devX75
-OLD_FILES+=usr/share/groff_font/devascii/B
-OLD_FILES+=usr/share/groff_font/devascii/BI
-OLD_FILES+=usr/share/groff_font/devascii/CW
-OLD_FILES+=usr/share/groff_font/devascii/DESC
-OLD_FILES+=usr/share/groff_font/devascii/I
-OLD_FILES+=usr/share/groff_font/devascii/L
-OLD_FILES+=usr/share/groff_font/devascii/R
-OLD_FILES+=usr/share/groff_font/devascii/S
-OLD_DIRS+=usr/share/groff_font/devascii
-OLD_FILES+=usr/share/groff_font/devcp1047/B
-OLD_FILES+=usr/share/groff_font/devcp1047/BI
-OLD_FILES+=usr/share/groff_font/devcp1047/CW
-OLD_FILES+=usr/share/groff_font/devcp1047/DESC
-OLD_FILES+=usr/share/groff_font/devcp1047/I
-OLD_FILES+=usr/share/groff_font/devcp1047/L
-OLD_FILES+=usr/share/groff_font/devcp1047/R
-OLD_FILES+=usr/share/groff_font/devcp1047/S
-OLD_DIRS+=usr/share/groff_font/devcp1047
-OLD_FILES+=usr/share/groff_font/devdvi/CW
-OLD_FILES+=usr/share/groff_font/devdvi/CWEC
-OLD_FILES+=usr/share/groff_font/devdvi/CWI
-OLD_FILES+=usr/share/groff_font/devdvi/CWIEC
-OLD_FILES+=usr/share/groff_font/devdvi/CWITC
-OLD_FILES+=usr/share/groff_font/devdvi/CWTC
-OLD_FILES+=usr/share/groff_font/devdvi/CompileFonts
-OLD_FILES+=usr/share/groff_font/devdvi/DESC
-OLD_FILES+=usr/share/groff_font/devdvi/EX
-OLD_FILES+=usr/share/groff_font/devdvi/HB
-OLD_FILES+=usr/share/groff_font/devdvi/HBEC
-OLD_FILES+=usr/share/groff_font/devdvi/HBI
-OLD_FILES+=usr/share/groff_font/devdvi/HBIEC
-OLD_FILES+=usr/share/groff_font/devdvi/HBITC
-OLD_FILES+=usr/share/groff_font/devdvi/HBTC
-OLD_FILES+=usr/share/groff_font/devdvi/HI
-OLD_FILES+=usr/share/groff_font/devdvi/HIEC
-OLD_FILES+=usr/share/groff_font/devdvi/HITC
-OLD_FILES+=usr/share/groff_font/devdvi/HR
-OLD_FILES+=usr/share/groff_font/devdvi/HREC
-OLD_FILES+=usr/share/groff_font/devdvi/HRTC
-OLD_FILES+=usr/share/groff_font/devdvi/MI
-OLD_FILES+=usr/share/groff_font/devdvi/Makefile
-OLD_FILES+=usr/share/groff_font/devdvi/S
-OLD_FILES+=usr/share/groff_font/devdvi/SA
-OLD_FILES+=usr/share/groff_font/devdvi/SB
-OLD_FILES+=usr/share/groff_font/devdvi/SC
-OLD_FILES+=usr/share/groff_font/devdvi/TB
-OLD_FILES+=usr/share/groff_font/devdvi/TBEC
-OLD_FILES+=usr/share/groff_font/devdvi/TBI
-OLD_FILES+=usr/share/groff_font/devdvi/TBIEC
-OLD_FILES+=usr/share/groff_font/devdvi/TBITC
-OLD_FILES+=usr/share/groff_font/devdvi/TBTC
-OLD_FILES+=usr/share/groff_font/devdvi/TI
-OLD_FILES+=usr/share/groff_font/devdvi/TIEC
-OLD_FILES+=usr/share/groff_font/devdvi/TITC
-OLD_FILES+=usr/share/groff_font/devdvi/TR
-OLD_FILES+=usr/share/groff_font/devdvi/TREC
-OLD_FILES+=usr/share/groff_font/devdvi/TRTC
-OLD_FILES+=usr/share/groff_font/devdvi/ec.map
-OLD_FILES+=usr/share/groff_font/devdvi/msam.map
-OLD_FILES+=usr/share/groff_font/devdvi/msbm.map
-OLD_FILES+=usr/share/groff_font/devdvi/tc.map
-OLD_FILES+=usr/share/groff_font/devdvi/texb.map
-OLD_FILES+=usr/share/groff_font/devdvi/texex.map
-OLD_FILES+=usr/share/groff_font/devdvi/texi.map
-OLD_FILES+=usr/share/groff_font/devdvi/texmi.map
-OLD_FILES+=usr/share/groff_font/devdvi/texr.map
-OLD_FILES+=usr/share/groff_font/devdvi/texsy.map
-OLD_FILES+=usr/share/groff_font/devdvi/textex.map
-OLD_FILES+=usr/share/groff_font/devdvi/textt.map
-OLD_DIRS+=usr/share/groff_font/devdvi
-OLD_FILES+=usr/share/groff_font/devhtml/B
-OLD_FILES+=usr/share/groff_font/devhtml/BI
-OLD_FILES+=usr/share/groff_font/devhtml/CB
-OLD_FILES+=usr/share/groff_font/devhtml/CBI
-OLD_FILES+=usr/share/groff_font/devhtml/CI
-OLD_FILES+=usr/share/groff_font/devhtml/CR
-OLD_FILES+=usr/share/groff_font/devhtml/DESC
-OLD_FILES+=usr/share/groff_font/devhtml/I
-OLD_FILES+=usr/share/groff_font/devhtml/R
-OLD_FILES+=usr/share/groff_font/devhtml/S
-OLD_DIRS+=usr/share/groff_font/devhtml
-OLD_FILES+=usr/share/groff_font/devkoi8-r/B
-OLD_FILES+=usr/share/groff_font/devkoi8-r/BI
-OLD_FILES+=usr/share/groff_font/devkoi8-r/CW
-OLD_FILES+=usr/share/groff_font/devkoi8-r/DESC
-OLD_FILES+=usr/share/groff_font/devkoi8-r/I
-OLD_FILES+=usr/share/groff_font/devkoi8-r/L
-OLD_FILES+=usr/share/groff_font/devkoi8-r/R
-OLD_FILES+=usr/share/groff_font/devkoi8-r/S
-OLD_DIRS+=usr/share/groff_font/devkoi8-r
-OLD_FILES+=usr/share/groff_font/devlatin1/B
-OLD_FILES+=usr/share/groff_font/devlatin1/BI
-OLD_FILES+=usr/share/groff_font/devlatin1/CW
-OLD_FILES+=usr/share/groff_font/devlatin1/DESC
-OLD_FILES+=usr/share/groff_font/devlatin1/I
-OLD_FILES+=usr/share/groff_font/devlatin1/L
-OLD_FILES+=usr/share/groff_font/devlatin1/R
-OLD_FILES+=usr/share/groff_font/devlatin1/S
-OLD_DIRS+=usr/share/groff_font/devlatin1
-OLD_FILES+=usr/share/groff_font/devlbp/CB
-OLD_FILES+=usr/share/groff_font/devlbp/CI
-OLD_FILES+=usr/share/groff_font/devlbp/CR
-OLD_FILES+=usr/share/groff_font/devlbp/DESC
-OLD_FILES+=usr/share/groff_font/devlbp/EB
-OLD_FILES+=usr/share/groff_font/devlbp/EI
-OLD_FILES+=usr/share/groff_font/devlbp/ER
-OLD_FILES+=usr/share/groff_font/devlbp/HB
-OLD_FILES+=usr/share/groff_font/devlbp/HBI
-OLD_FILES+=usr/share/groff_font/devlbp/HI
-OLD_FILES+=usr/share/groff_font/devlbp/HNB
-OLD_FILES+=usr/share/groff_font/devlbp/HNBI
-OLD_FILES+=usr/share/groff_font/devlbp/HNI
-OLD_FILES+=usr/share/groff_font/devlbp/HNR
-OLD_FILES+=usr/share/groff_font/devlbp/HR
-OLD_FILES+=usr/share/groff_font/devlbp/TB
-OLD_FILES+=usr/share/groff_font/devlbp/TBI
-OLD_FILES+=usr/share/groff_font/devlbp/TI
-OLD_FILES+=usr/share/groff_font/devlbp/TR
-OLD_DIRS+=usr/share/groff_font/devlbp
-OLD_FILES+=usr/share/groff_font/devlj4/AB
-OLD_FILES+=usr/share/groff_font/devlj4/ABI
-OLD_FILES+=usr/share/groff_font/devlj4/AI
-OLD_FILES+=usr/share/groff_font/devlj4/ALBB
-OLD_FILES+=usr/share/groff_font/devlj4/ALBR
-OLD_FILES+=usr/share/groff_font/devlj4/AOB
-OLD_FILES+=usr/share/groff_font/devlj4/AOI
-OLD_FILES+=usr/share/groff_font/devlj4/AOR
-OLD_FILES+=usr/share/groff_font/devlj4/AR
-OLD_FILES+=usr/share/groff_font/devlj4/CB
-OLD_FILES+=usr/share/groff_font/devlj4/CBI
-OLD_FILES+=usr/share/groff_font/devlj4/CI
-OLD_FILES+=usr/share/groff_font/devlj4/CLARENDON
-OLD_FILES+=usr/share/groff_font/devlj4/CORONET
-OLD_FILES+=usr/share/groff_font/devlj4/CR
-OLD_FILES+=usr/share/groff_font/devlj4/DESC
-OLD_FILES+=usr/share/groff_font/devlj4/GB
-OLD_FILES+=usr/share/groff_font/devlj4/GBI
-OLD_FILES+=usr/share/groff_font/devlj4/GI
-OLD_FILES+=usr/share/groff_font/devlj4/GR
-OLD_FILES+=usr/share/groff_font/devlj4/LGB
-OLD_FILES+=usr/share/groff_font/devlj4/LGI
-OLD_FILES+=usr/share/groff_font/devlj4/LGR
-OLD_FILES+=usr/share/groff_font/devlj4/MARIGOLD
-OLD_FILES+=usr/share/groff_font/devlj4/OB
-OLD_FILES+=usr/share/groff_font/devlj4/OBI
-OLD_FILES+=usr/share/groff_font/devlj4/OI
-OLD_FILES+=usr/share/groff_font/devlj4/OR
-OLD_FILES+=usr/share/groff_font/devlj4/S
-OLD_FILES+=usr/share/groff_font/devlj4/SYMBOL
-OLD_FILES+=usr/share/groff_font/devlj4/TB
-OLD_FILES+=usr/share/groff_font/devlj4/TBI
-OLD_FILES+=usr/share/groff_font/devlj4/TI
-OLD_FILES+=usr/share/groff_font/devlj4/TNRB
-OLD_FILES+=usr/share/groff_font/devlj4/TNRBI
-OLD_FILES+=usr/share/groff_font/devlj4/TNRI
-OLD_FILES+=usr/share/groff_font/devlj4/TNRR
-OLD_FILES+=usr/share/groff_font/devlj4/TR
-OLD_FILES+=usr/share/groff_font/devlj4/UB
-OLD_FILES+=usr/share/groff_font/devlj4/UBI
-OLD_FILES+=usr/share/groff_font/devlj4/UCB
-OLD_FILES+=usr/share/groff_font/devlj4/UCBI
-OLD_FILES+=usr/share/groff_font/devlj4/UCI
-OLD_FILES+=usr/share/groff_font/devlj4/UCR
-OLD_FILES+=usr/share/groff_font/devlj4/UI
-OLD_FILES+=usr/share/groff_font/devlj4/UR
-OLD_FILES+=usr/share/groff_font/devlj4/WINGDINGS
-OLD_DIRS+=usr/share/groff_font/devlj4
-OLD_FILES+=usr/share/groff_font/devps/AB
-OLD_FILES+=usr/share/groff_font/devps/ABI
-OLD_FILES+=usr/share/groff_font/devps/AI
-OLD_FILES+=usr/share/groff_font/devps/AR
-OLD_FILES+=usr/share/groff_font/devps/BMB
-OLD_FILES+=usr/share/groff_font/devps/BMBI
-OLD_FILES+=usr/share/groff_font/devps/BMI
-OLD_FILES+=usr/share/groff_font/devps/BMR
-OLD_FILES+=usr/share/groff_font/devps/CB
-OLD_FILES+=usr/share/groff_font/devps/CBI
-OLD_FILES+=usr/share/groff_font/devps/CI
-OLD_FILES+=usr/share/groff_font/devps/CR
-OLD_FILES+=usr/share/groff_font/devps/DESC
-OLD_FILES+=usr/share/groff_font/devps/EURO
-OLD_FILES+=usr/share/groff_font/devps/HB
-OLD_FILES+=usr/share/groff_font/devps/HBI
-OLD_FILES+=usr/share/groff_font/devps/HI
-OLD_FILES+=usr/share/groff_font/devps/HNB
-OLD_FILES+=usr/share/groff_font/devps/HNBI
-OLD_FILES+=usr/share/groff_font/devps/HNI
-OLD_FILES+=usr/share/groff_font/devps/HNR
-OLD_FILES+=usr/share/groff_font/devps/HR
-OLD_FILES+=usr/share/groff_font/devps/Makefile
-OLD_FILES+=usr/share/groff_font/devps/NB
-OLD_FILES+=usr/share/groff_font/devps/NBI
-OLD_FILES+=usr/share/groff_font/devps/NI
-OLD_FILES+=usr/share/groff_font/devps/NR
-OLD_FILES+=usr/share/groff_font/devps/PB
-OLD_FILES+=usr/share/groff_font/devps/PBI
-OLD_FILES+=usr/share/groff_font/devps/PI
-OLD_FILES+=usr/share/groff_font/devps/PR
-OLD_FILES+=usr/share/groff_font/devps/S
-OLD_FILES+=usr/share/groff_font/devps/SS
-OLD_FILES+=usr/share/groff_font/devps/TB
-OLD_FILES+=usr/share/groff_font/devps/TBI
-OLD_FILES+=usr/share/groff_font/devps/TI
-OLD_FILES+=usr/share/groff_font/devps/TR
-OLD_FILES+=usr/share/groff_font/devps/ZCMI
-OLD_FILES+=usr/share/groff_font/devps/ZD
-OLD_FILES+=usr/share/groff_font/devps/ZDR
-OLD_FILES+=usr/share/groff_font/devps/afmname
-OLD_FILES+=usr/share/groff_font/devps/dingbats.map
-OLD_FILES+=usr/share/groff_font/devps/dingbats.rmap
-OLD_FILES+=usr/share/groff_font/devps/download
-OLD_FILES+=usr/share/groff_font/devps/freeeuro.pfa
-OLD_FILES+=usr/share/groff_font/devps/lgreekmap
-OLD_FILES+=usr/share/groff_font/devps/prologue
-OLD_FILES+=usr/share/groff_font/devps/symbol.sed
-OLD_FILES+=usr/share/groff_font/devps/symbolchars
-OLD_FILES+=usr/share/groff_font/devps/symbolsl.afm
-OLD_FILES+=usr/share/groff_font/devps/symbolsl.pfa
-OLD_FILES+=usr/share/groff_font/devps/text.enc
-OLD_FILES+=usr/share/groff_font/devps/textmap
-OLD_FILES+=usr/share/groff_font/devps/zapfdr.pfa
-OLD_DIRS+=usr/share/groff_font/devps
-OLD_FILES+=usr/share/groff_font/devutf8/B
-OLD_FILES+=usr/share/groff_font/devutf8/BI
-OLD_FILES+=usr/share/groff_font/devutf8/CW
-OLD_FILES+=usr/share/groff_font/devutf8/DESC
-OLD_FILES+=usr/share/groff_font/devutf8/I
-OLD_FILES+=usr/share/groff_font/devutf8/L
-OLD_FILES+=usr/share/groff_font/devutf8/R
-OLD_FILES+=usr/share/groff_font/devutf8/S
-OLD_DIRS+=usr/share/groff_font/devutf8
-OLD_DIRS+=usr/share/groff_font
-OLD_FILES+=usr/share/man/man1/addftinfo.1.gz
-OLD_FILES+=usr/share/man/man1/afmtodit.1.gz
-OLD_FILES+=usr/share/man/man1/checknr.1.gz
-OLD_FILES+=usr/share/man/man1/colcrt.1.gz
-OLD_FILES+=usr/share/man/man1/eqn.1.gz
-OLD_FILES+=usr/share/man/man1/grn.1.gz
-OLD_FILES+=usr/share/man/man1/grodvi.1.gz
-OLD_FILES+=usr/share/man/man1/groff.1.gz
-OLD_FILES+=usr/share/man/man1/grog.1.gz
-OLD_FILES+=usr/share/man/man1/grolbp.1.gz
-OLD_FILES+=usr/share/man/man1/grolj4.1.gz
-OLD_FILES+=usr/share/man/man1/grops.1.gz
-OLD_FILES+=usr/share/man/man1/grotty.1.gz
-OLD_FILES+=usr/share/man/man1/hpftodit.1.gz
-OLD_FILES+=usr/share/man/man1/indxbib.1.gz
-OLD_FILES+=usr/share/man/man1/lkbib.1.gz
-OLD_FILES+=usr/share/man/man1/lookbib.1.gz
-OLD_FILES+=usr/share/man/man1/mmroff.1.gz
-OLD_FILES+=usr/share/man/man1/neqn.1.gz
-OLD_FILES+=usr/share/man/man1/nroff.1.gz
-OLD_FILES+=usr/share/man/man1/pfbtops.1.gz
-OLD_FILES+=usr/share/man/man1/pic.1.gz
-OLD_FILES+=usr/share/man/man1/psroff.1.gz
-OLD_FILES+=usr/share/man/man1/refer.1.gz
-OLD_FILES+=usr/share/man/man1/tbl.1.gz
-OLD_FILES+=usr/share/man/man1/tfmtodit.1.gz
-OLD_FILES+=usr/share/man/man1/troff.1.gz
-OLD_FILES+=usr/share/man/man1/vgrind.1.gz
-OLD_FILES+=usr/share/man/man5/groff_font.5.gz
-OLD_FILES+=usr/share/man/man5/groff_out.5.gz
-OLD_FILES+=usr/share/man/man5/groff_tmac.5.gz
-OLD_FILES+=usr/share/man/man5/lj4_font.5.gz
-OLD_FILES+=usr/share/man/man5/tmac.5.gz
-OLD_FILES+=usr/share/man/man5/vgrindefs.5.gz
-OLD_FILES+=usr/share/man/man7/ditroff.7.gz
-OLD_FILES+=usr/share/man/man7/groff.7.gz
-OLD_FILES+=usr/share/man/man7/groff_char.7.gz
-OLD_FILES+=usr/share/man/man7/groff_diff.7.gz
-OLD_FILES+=usr/share/man/man7/groff_man.7.gz
-OLD_FILES+=usr/share/man/man7/groff_mdoc.7.gz
-OLD_FILES+=usr/share/man/man7/groff_me.7.gz
-OLD_FILES+=usr/share/man/man7/groff_mm.7.gz
-OLD_FILES+=usr/share/man/man7/groff_mmse.7.gz
-OLD_FILES+=usr/share/man/man7/groff_ms.7.gz
-OLD_FILES+=usr/share/man/man7/groff_trace.7.gz
-OLD_FILES+=usr/share/man/man7/groff_www.7.gz
-OLD_FILES+=usr/share/man/man7/mdoc.samples.7.gz
-OLD_FILES+=usr/share/man/man7/me.7.gz
-OLD_FILES+=usr/share/man/man7/mm.7.gz
-OLD_FILES+=usr/share/man/man7/mmse.7.gz
-OLD_FILES+=usr/share/man/man7/ms.7.gz
-OLD_FILES+=usr/share/man/man7/orig_me.7.gz
-OLD_FILES+=usr/share/me/acm.me
-OLD_FILES+=usr/share/me/chars.me
-OLD_FILES+=usr/share/me/deltext.me
-OLD_FILES+=usr/share/me/eqn.me
-OLD_FILES+=usr/share/me/float.me
-OLD_FILES+=usr/share/me/footnote.me
-OLD_FILES+=usr/share/me/index.me
-OLD_FILES+=usr/share/me/letterhead.me
-OLD_FILES+=usr/share/me/local.me
-OLD_FILES+=usr/share/me/null.me
-OLD_FILES+=usr/share/me/refer.me
-OLD_FILES+=usr/share/me/revisions
-OLD_FILES+=usr/share/me/sh.me
-OLD_FILES+=usr/share/me/tbl.me
-OLD_FILES+=usr/share/me/thesis.me
-OLD_DIRS+=usr/share/me
-OLD_FILES+=usr/share/misc/vgrindefs
-OLD_FILES+=usr/share/misc/vgrindefs.db
-OLD_FILES+=usr/share/tmac/X.tmac
-OLD_FILES+=usr/share/tmac/Xps.tmac
-OLD_FILES+=usr/share/tmac/a4.tmac
-OLD_FILES+=usr/share/tmac/an-old.tmac
-OLD_FILES+=usr/share/tmac/an.tmac
-OLD_FILES+=usr/share/tmac/andoc.tmac
-OLD_FILES+=usr/share/tmac/composite.tmac
-OLD_FILES+=usr/share/tmac/cp1047.tmac
-OLD_FILES+=usr/share/tmac/devtag.tmac
-OLD_FILES+=usr/share/tmac/doc.tmac
-OLD_FILES+=usr/share/tmac/dvi.tmac
-OLD_FILES+=usr/share/tmac/e.tmac
-OLD_FILES+=usr/share/tmac/ec.tmac
-OLD_FILES+=usr/share/tmac/eqnrc
-OLD_FILES+=usr/share/tmac/europs.tmac
-OLD_FILES+=usr/share/tmac/html-end.tmac
-OLD_FILES+=usr/share/tmac/html.tmac
-OLD_FILES+=usr/share/tmac/hyphen.ru
-OLD_FILES+=usr/share/tmac/hyphen.us
-OLD_FILES+=usr/share/tmac/hyphenex.us
-OLD_FILES+=usr/share/tmac/koi8-r.tmac
-OLD_FILES+=usr/share/tmac/latin1.tmac
-OLD_FILES+=usr/share/tmac/latin2.tmac
-OLD_FILES+=usr/share/tmac/latin9.tmac
-OLD_FILES+=usr/share/tmac/lbp.tmac
-OLD_FILES+=usr/share/tmac/lj4.tmac
-OLD_FILES+=usr/share/tmac/m.tmac
-OLD_FILES+=usr/share/tmac/man.local
-OLD_FILES+=usr/share/tmac/man.tmac
-OLD_FILES+=usr/share/tmac/mandoc.tmac
-OLD_FILES+=usr/share/tmac/mdoc.local
-OLD_FILES+=usr/share/tmac/mdoc.tmac
-OLD_FILES+=usr/share/tmac/mdoc/doc-common
-OLD_FILES+=usr/share/tmac/mdoc/doc-ditroff
-OLD_FILES+=usr/share/tmac/mdoc/doc-nroff
-OLD_FILES+=usr/share/tmac/mdoc/doc-syms
-OLD_FILES+=usr/share/tmac/mdoc/fr.ISO8859-1
-OLD_FILES+=usr/share/tmac/mdoc/ru.KOI8-R
-OLD_DIRS+=usr/share/tmac/mdoc
-OLD_FILES+=usr/share/tmac/me.tmac
-OLD_FILES+=usr/share/tmac/mm/0.MT
-OLD_FILES+=usr/share/tmac/mm/4.MT
-OLD_FILES+=usr/share/tmac/mm/5.MT
-OLD_FILES+=usr/share/tmac/mm/locale
-OLD_FILES+=usr/share/tmac/mm/mm.tmac
-OLD_FILES+=usr/share/tmac/mm/mmse.tmac
-OLD_FILES+=usr/share/tmac/mm/ms.cov
-OLD_FILES+=usr/share/tmac/mm/se_locale
-OLD_FILES+=usr/share/tmac/mm/se_ms.cov
-OLD_DIRS+=usr/share/tmac/mm
-OLD_FILES+=usr/share/tmac/ms.tmac
-OLD_FILES+=usr/share/tmac/mse.tmac
-OLD_FILES+=usr/share/tmac/papersize.tmac
-OLD_FILES+=usr/share/tmac/pic.tmac
-OLD_FILES+=usr/share/tmac/ps.tmac
-OLD_FILES+=usr/share/tmac/psatk.tmac
-OLD_FILES+=usr/share/tmac/psold.tmac
-OLD_FILES+=usr/share/tmac/pspic.tmac
-OLD_FILES+=usr/share/tmac/s.tmac
-OLD_FILES+=usr/share/tmac/safer.tmac
-OLD_FILES+=usr/share/tmac/tmac.orig_me
-OLD_FILES+=usr/share/tmac/tmac.vgrind
-OLD_FILES+=usr/share/tmac/trace.tmac
-OLD_FILES+=usr/share/tmac/troffrc
-OLD_FILES+=usr/share/tmac/troffrc-end
-OLD_FILES+=usr/share/tmac/tty-char.tmac
-OLD_FILES+=usr/share/tmac/tty.tmac
-OLD_FILES+=usr/share/tmac/unicode.tmac
-OLD_FILES+=usr/share/tmac/www.tmac
-OLD_DIRS+=usr/share/tmac
-# 20170607: remove incorrect atf_check(1) manpage link
-OLD_FILES+=usr/share/man/man1/atf_check.1.gz
-# 20170601: remove stale manpage
-OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz
-# 20170601: old libifconfig and libifc
-OLD_FILES+=usr/lib/libifc.a
-OLD_FILES+=usr/lib/libifc_p.a
-OLD_FILES+=usr/lib/libifconfig.a
-OLD_FILES+=usr/lib/libifconfig_p.a
-# 20170529: mount.conf(8) -> mount.conf(5)
-OLD_FILES+=usr/share/man/man8/mount.conf.8.gz
-# 20170525: remove misleading template
-OLD_FILES+=usr/share/misc/man.template
-# 20170525: disconnect the roff docs from the build
-OLD_FILES+=usr/share/doc/papers/beyond43.ascii.gz
-OLD_FILES+=usr/share/doc/papers/bio.ascii.gz
-OLD_FILES+=usr/share/doc/papers/contents.ascii.gz
-OLD_FILES+=usr/share/doc/papers/devfs.ascii.gz
-OLD_FILES+=usr/share/doc/papers/diskperf.ascii.gz
-OLD_FILES+=usr/share/doc/papers/fsinterface.ascii.gz
-OLD_FILES+=usr/share/doc/papers/hwpmc.ascii.gz
-OLD_FILES+=usr/share/doc/papers/jail.ascii.gz
-OLD_FILES+=usr/share/doc/papers/kernmalloc.ascii.gz
-OLD_FILES+=usr/share/doc/papers/kerntune.ascii.gz
-OLD_FILES+=usr/share/doc/papers/malloc.ascii.gz
-OLD_FILES+=usr/share/doc/papers/newvm.ascii.gz
-OLD_FILES+=usr/share/doc/papers/releng.ascii.gz
-OLD_FILES+=usr/share/doc/papers/sysperf.ascii.gz
-OLD_FILES+=usr/share/doc/papers/timecounter.ascii.gz
-OLD_DIRS+=usr/share/doc/papers
-OLD_FILES+=usr/share/doc/psd/01.cacm/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/01.cacm
-OLD_FILES+=usr/share/doc/psd/02.implement/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/02.implement
-OLD_FILES+=usr/share/doc/psd/03.iosys/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/03.iosys
-OLD_FILES+=usr/share/doc/psd/04.uprog/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/04.uprog
-OLD_FILES+=usr/share/doc/psd/05.sysman/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/05.sysman
-OLD_FILES+=usr/share/doc/psd/06.Clang/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/06.Clang
-OLD_FILES+=usr/share/doc/psd/12.make/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/12.make
-OLD_FILES+=usr/share/doc/psd/13.rcs/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/13.rcs
-OLD_FILES+=usr/share/doc/psd/13.rcs/rcs_func.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/13.rcs
-OLD_FILES+=usr/share/doc/psd/15.yacc/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/15.yacc
-OLD_FILES+=usr/share/doc/psd/16.lex/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/16.lex
-OLD_FILES+=usr/share/doc/psd/17.m4/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/17.m4
-OLD_FILES+=usr/share/doc/psd/18.gprof/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/18.gprof
-OLD_FILES+=usr/share/doc/psd/20.ipctut/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/20.ipctut
-OLD_FILES+=usr/share/doc/psd/21.ipc/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/21.ipc
-OLD_FILES+=usr/share/doc/psd/22.rpcgen/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/22.rpcgen
-OLD_FILES+=usr/share/doc/psd/23.rpc/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/23.rpc
-OLD_FILES+=usr/share/doc/psd/24.xdr/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/24.xdr
-OLD_FILES+=usr/share/doc/psd/25.xdrrfc/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/25.xdrrfc
-OLD_FILES+=usr/share/doc/psd/26.rpcrfc/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/26.rpcrfc
-OLD_FILES+=usr/share/doc/psd/27.nfsrfc/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/27.nfsrfc
-OLD_FILES+=usr/share/doc/psd/Title.ascii.gz
-OLD_FILES+=usr/share/doc/psd/contents.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/
-OLD_FILES+=usr/share/doc/smm/01.setup/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/01.setup
-OLD_FILES+=usr/share/doc/smm/02.config/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/02.config
-OLD_FILES+=usr/share/doc/smm/03.fsck/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/03.fsck
-OLD_FILES+=usr/share/doc/smm/04.quotas/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/04.quotas
-OLD_FILES+=usr/share/doc/smm/05.fastfs/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/05.fastfs
-OLD_FILES+=usr/share/doc/smm/06.nfs/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/06.nfs
-OLD_FILES+=usr/share/doc/smm/07.lpd/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/07.lpd
-OLD_FILES+=usr/share/doc/smm/08.sendmailop/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/08.sendmailop
-OLD_FILES+=usr/share/doc/smm/11.timedop/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/11.timedop
-OLD_FILES+=usr/share/doc/smm/12.timed/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/12.timed
-OLD_FILES+=usr/share/doc/smm/18.net/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/smm/18.net
-OLD_FILES+=usr/share/doc/smm/Title.ascii.gz
-OLD_FILES+=usr/share/doc/smm/contents.ascii.gz
-OLD_DIRS+=usr/share/doc/smm
-OLD_FILES+=usr/share/doc/usd/04.csh/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/04.csh
-OLD_FILES+=usr/share/doc/usd/05.dc/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/05.dc
-OLD_FILES+=usr/share/doc/usd/06.bc/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/06.bc
-OLD_FILES+=usr/share/doc/usd/07.mail/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/07.mail
-OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz
-OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/10.exref
-OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/11.edit
-OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz
-OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz
-OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/12.vi
-OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/13.viref
-OLD_FILES+=usr/share/doc/usd/18.msdiffs/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/18.msdiffs
-OLD_FILES+=usr/share/doc/usd/19.memacros/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/19.memacros
-OLD_FILES+=usr/share/doc/usd/20.meref/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/20.meref
-OLD_FILES+=usr/share/doc/usd/21.troff/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/21.troff
-OLD_FILES+=usr/share/doc/usd/22.trofftut/paper.ascii.gz
-OLD_DIRS+=usr/share/doc/usd/22.trofftut
-OLD_FILES+=usr/share/doc/usd/Title.ascii.gz
-OLD_FILES+=usr/share/doc/usd/contents.ascii.gz
-OLD_DIRS+=usr/share/doc/usd
-# 20170523: 64-bit inode support, library version bumps
-OLD_LIBS+=lib/libzfs.so.2
-OLD_LIBS+=usr/lib/libarchive.so.6
-OLD_LIBS+=usr/lib/libmilter.so.5
-# 20170427: NATM configuration support removed
-OLD_FILES+=etc/rc.d/atm1
-OLD_FILES+=etc/rc.d/atm2
-OLD_FILES+=etc/rc.d/atm3
-OLD_FILES+=usr/share/man/man8/rc.atm.8.gz
-# 20170426: UMA_ZONE_REFCNT removed
-OLD_FILES+=usr/share/man/man9/uma_find_refcnt.9.gz
-# 20170424: NATM support removed
-OLD_FILES+=rescue/atmconfig
-OLD_FILES+=sbin/atmconfig
-OLD_FILES+=usr/include/bsnmp/snmp_atm.h
-OLD_FILES+=usr/include/dev/utopia/idtphy.h
-OLD_FILES+=usr/include/dev/utopia/suni.h
-OLD_FILES+=usr/include/dev/utopia/utopia.h
-OLD_FILES+=usr/include/dev/utopia/utopia_priv.h
-OLD_DIRS+=usr/include/dev/utopia
-OLD_FILES+=usr/include/net/if_atm.h
-OLD_FILES+=usr/include/netgraph/atm/ng_atm.h
-OLD_FILES+=usr/include/netinet/if_atm.h
-OLD_FILES+=usr/include/netnatm/natm.h
-OLD_FILES+=usr/lib/snmp_atm.so
-OLD_LIBS+=usr/lib/snmp_atm.so.6
-OLD_FILES+=usr/share/doc/atm/atmconfig.help
-OLD_FILES+=usr/share/doc/atm/atmconfig_device.help
-OLD_DIRS+=usr/share/doc/atm
-OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz
-OLD_FILES+=usr/share/man/man4/en.4.gz
-OLD_FILES+=usr/share/man/man4/fatm.4.gz
-OLD_FILES+=usr/share/man/man4/hatm.4.gz
-OLD_FILES+=usr/share/man/man4/if_en.4.gz
-OLD_FILES+=usr/share/man/man4/if_fatm.4.gz
-OLD_FILES+=usr/share/man/man4/if_hatm.4.gz
-OLD_FILES+=usr/share/man/man4/if_patm.4.gz
-OLD_FILES+=usr/share/man/man4/natm.4.gz
-OLD_FILES+=usr/share/man/man4/natmip.4.gz
-OLD_FILES+=usr/share/man/man4/ng_atm.4.gz
-OLD_FILES+=usr/share/man/man4/patm.4.gz
-OLD_FILES+=usr/share/man/man4/utopia.4.gz
-OLD_FILES+=usr/share/man/man8/atmconfig.8.gz
-OLD_FILES+=usr/share/man/man9/utopia.9.gz
-OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def
-OLD_FILES+=usr/share/snmp/defs/atm_tree.def
-OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt
-OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt
-# 20170420: remove GNU diff
-OLD_FILES+=usr/share/man/man7/diff.7.gz
-# 20170322: rename <x> to <x>_test to match the FreeBSD test suite name scheme
-OLD_FILES+=usr/tests/usr.bin/col/col
-OLD_FILES+=usr/tests/usr.bin/diff/diff
-OLD_FILES+=usr/tests/usr.bin/ident/ident
-OLD_FILES+=usr/tests/usr.bin/mkimg/mkimg
-OLD_FILES+=usr/tests/usr.bin/sdiff/sdiff
-OLD_FILES+=usr/tests/usr.bin/soelim/soelim
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_config
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_etcdir
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupadd
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupdel
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupmod
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_lock
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_useradd
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_userdel
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_usermod
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_usernext
-# 20170319: io_test requires zh_TW.Big5 locale
-OLD_FILES+=usr/tests/lib/libc/locale/io_test
-# 20170319: remove nls for non supported Big5* locales
-OLD_DIRS+=usr/share/nls/zh_HK.Big5HKSCS
-OLD_DIRS+=usr/share/nls/zh_TW.Big5
-# 20170313: move .../sys/geom/eli/... to .../sys/geom/class/eli/...
-OLD_FILES+=usr/tests/sys/geom/eli/pbkdf2/pbkdf2
-OLD_FILES+=usr/tests/sys/geom/eli/pbkdf2/Kyuafile
-OLD_FILES+=usr/tests/sys/geom/eli/Kyuafile
-OLD_DIRS+=usr/tests/sys/geom/eli/pbkdf2
-OLD_DIRS+=usr/tests/sys/geom/eli
-# 20170313: sbin/ipftest and ipresend temporarily disconnected
-OLD_FILES+=sbin/ipftest
-OLD_FILES+=sbin/ipresend
-OLD_FILES+=usr/share/man/man1/ipftest.1.gz
-OLD_FILES+=usr/share/man/man1/ipresend.1.gz
-# 20170311: Remove WITHOUT_MANDOCDB option
-OLD_FILES+=usr/share/man/man1/makewhatis.1.gz
-# 20170308: rename some tests
-OLD_FILES+=usr/tests/bin/pwait/pwait
-OLD_FILES+=usr/tests/usr.bin/timeout/timeout
-# 20170307: remove pcap-int.h
-OLD_FILES+=usr/include/pcap-int.h
-# 20170302: new libc++ import which bumps version from 3.9.1 to 4.0.0
-OLD_FILES+=usr/include/c++/v1/__undef___deallocate
-OLD_FILES+=usr/include/c++/v1/tr1/__undef___deallocate
-# 20170302: new clang import which bumps version from 3.9.1 to 4.0.0
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/esan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/3.9.1/include/sanitizer
-OLD_FILES+=usr/lib/clang/3.9.1/include/__clang_cuda_cmath.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/__clang_cuda_intrinsics.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/__clang_cuda_math_forward_declares.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/__clang_cuda_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/altivec.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512ifmaintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512ifmavlintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512pfintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vbmiintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vbmivlintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vlcdintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/clflushoptintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/cpuid.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/immintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/module.modulemap
-OLD_FILES+=usr/lib/clang/3.9.1/include/msa.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/mwaitxintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/opencl-c.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/pkuintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/vadefs.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/xsavecintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/xsaveintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/xsaveoptintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/xsavesintrin.h
-OLD_FILES+=usr/lib/clang/3.9.1/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/3.9.1/include
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-i386.so
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan-x86_64.so
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.stats-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.stats-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.stats_client-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.stats_client-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.9.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.9.1/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.9.1/lib
-OLD_DIRS+=usr/lib/clang/3.9.1
-# 20170226: SVR4 compatibility removed
-.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/share/man/man4/streams.4.gz
-OLD_FILES+=usr/share/man/man4/svr4.4.gz
-.endif
-# 20170219: OpenPAM RADULA upgrade removed the libpam tests
-OLD_FILES+=usr/tests/lib/libpam/Kyuafile
-OLD_FILES+=usr/tests/lib/libpam/t_openpam_ctype
-OLD_FILES+=usr/tests/lib/libpam/t_openpam_readlinev
-OLD_FILES+=usr/tests/lib/libpam/t_openpam_readword
-OLD_DIRS+=usr/test/lib/libpam
-# 20170216: remove ahb(4)
-OLD_FILES+=usr/share/man/man4/ahb.4.gz
-# 20170216: remove fea(4)
-OLD_FILES+=usr/share/man/man4/fea.4.gz
-# 20170206: remove bdes(1)
-OLD_FILES+=usr/bin/bdes
-OLD_FILES+=usr/share/man/man1/bdes.1.gz
-# 20170206: merged projects/ipsec
-OLD_FILES+=usr/include/netinet/ip_ipsec.h
-OLD_FILES+=usr/include/netinet6/ip6_ipsec.h
-# 20170128: remove pc98 support
-OLD_FILES+=usr/include/dev/ic/i8251.h
-OLD_FILES+=usr/include/dev/ic/i8255.h
-OLD_FILES+=usr/include/dev/ic/rsa.h
-OLD_FILES+=usr/include/dev/ic/wd33c93reg.h
-OLD_FILES+=usr/include/sys/disk/pc98.h
-OLD_FILES+=usr/include/sys/diskpc98.h
-OLD_FILES+=usr/share/man/man4/i386/ct.4.gz
-OLD_FILES+=usr/share/man/man4/i386/snc.4.gz
-OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.iso.kbd
-OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.kbd
-OLD_FILES+=usr/share/vt/keymaps/jp.pc98.iso.kbd
-OLD_FILES+=usr/share/vt/keymaps/jp.pc98.kbd
-# 20170110: Four files from ggate tests consolidated into one
-OLD_FILES+=usr/tests/sys/geom/class/gate/1_test
-OLD_FILES+=usr/tests/sys/geom/class/gate/2_test
-OLD_FILES+=usr/tests/sys/geom/class/gate/3_test
-OLD_FILES+=usr/tests/sys/geom/class/gate/conf.sh
-# 20170103: libbsnmptools.so made into an INTERNALLIB
-OLD_FILES+=usr/lib/libbsnmptools.a
-OLD_FILES+=usr/lib/libbsnmptools_p.a
-OLD_LIBS+=usr/lib/libbsnmptools.so.0
-OLD_FILES+=usr/lib/libbsnmptools.so
-# 20170102: sysdecode_getfsstat_flags() renamed to sysdecode_getfsstat_mode()
-OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz
-# 20161230: libarchive ACL pax test renamed to test_acl_pax_posix1e.tar.uu
-OLD_FILES+=usr/tests/lib/libarchive/test_acl_pax.tar.uu
-# 20161229: Three files from gnop tests consolidated into one
-OLD_FILES+=usr/tests/sys/geom/class/nop/1_test
-OLD_FILES+=usr/tests/sys/geom/class/nop/2_test
-OLD_FILES+=usr/tests/sys/geom/class/nop/conf.sh
-# 20161217: new clang import which bumps version from 3.9.0 to 3.9.1
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/esan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/3.9.0/include/sanitizer
-OLD_FILES+=usr/lib/clang/3.9.0/include/__clang_cuda_cmath.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/__clang_cuda_intrinsics.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/__clang_cuda_math_forward_declares.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/__clang_cuda_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/altivec.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512ifmaintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512ifmavlintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512pfintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vbmiintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vbmivlintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vlcdintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/clflushoptintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/cpuid.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/immintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/module.modulemap
-OLD_FILES+=usr/lib/clang/3.9.0/include/mwaitxintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/opencl-c.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/pkuintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/vadefs.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/xsavecintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/xsaveintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/xsaveoptintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/xsavesintrin.h
-OLD_FILES+=usr/lib/clang/3.9.0/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/3.9.0/include
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-i386.so
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-x86_64.so
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.stats-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.stats-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.stats_client-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.stats_client-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.9.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.9.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.9.0/lib
-OLD_DIRS+=usr/lib/clang/3.9.0
-# 20161205: libproc version bump
-OLD_LIBS+=usr/lib/libproc.so.3
-# 20161127: Remove vm_page_cache(9)
-OLD_FILES+=usr/share/man/man9/vm_page_cache.9.gz
-# 20161124: new clang import which bumps version from 3.8.0 to 3.9.0
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/3.8.0/include/sanitizer
-OLD_FILES+=usr/lib/clang/3.8.0/include/__clang_cuda_runtime_wrapper.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/altivec.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/cpuid.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/immintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/module.modulemap
-OLD_FILES+=usr/lib/clang/3.8.0/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/pkuintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/vadefs.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/xsavecintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/xsaveintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/xsaveoptintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/xsavesintrin.h
-OLD_FILES+=usr/lib/clang/3.8.0/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/3.8.0/include
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-i386.so
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-x86_64.so
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.8.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.8.0/lib
-OLD_DIRS+=usr/lib/clang/3.8.0
-# 20161121: Hyper-V manuals only apply to amd64 and i386
-.if ${TARGET_ARCH} != "amd64" && ${TARGET_ARCH} != "i386"
-OLD_FILES+=usr/share/man/man4/hv_kvp.4.gz
-OLD_FILES+=usr/share/man/man4/hv_netvsc.4.gz
-OLD_FILES+=usr/share/man/man4/hv_storvsc.4.gz
-OLD_FILES+=usr/share/man/man4/hv_utils.4.gz
-OLD_FILES+=usr/share/man/man4/hv_vmbus.4.gz
-OLD_FILES+=usr/share/man/man4/hv_vss.4.gz
-.endif
-# 20161118: Remove hv_ata_pci_disengage(4)
-OLD_FILES+=usr/share/man/man4/hv_ata_pci_disengage.4.gz
-# 20161017: urtwn(4) was merged into rtwn(4)
-OLD_FILES+=usr/share/man/man4/if_urtwn.4.gz
-OLD_FILES+=usr/share/man/man4/urtwn.4.gz
-OLD_FILES+=usr/share/man/man4/urtwnfw.4.gz
-# 20161015: Remove GNU rcs
-OLD_FILES+=usr/bin/ci
-OLD_FILES+=usr/bin/co
-OLD_FILES+=usr/bin/merge
-OLD_FILES+=usr/bin/rcs
-OLD_FILES+=usr/bin/rcsclean
-OLD_FILES+=usr/bin/rcsdiff
-OLD_FILES+=usr/bin/rcsfreeze
-OLD_FILES+=usr/bin/rcsmerge
-OLD_FILES+=usr/bin/rlog
-OLD_FILES+=usr/share/doc/psd/13.rcs/paper.ascii.gz
-OLD_FILES+=usr/share/doc/psd/13.rcs/rcs_func.ascii.gz
-OLD_DIRS+=usr/share/doc/psd/13.rcs
-OLD_FILES+=usr/share/man/man1/ci.1.gz
-OLD_FILES+=usr/share/man/man1/co.1.gz
-OLD_FILES+=usr/share/man/man1/merge.1.gz
-OLD_FILES+=usr/share/man/man1/rcs.1.gz
-OLD_FILES+=usr/share/man/man1/rcsclean.1.gz
-OLD_FILES+=usr/share/man/man1/rcsdiff.1.gz
-OLD_FILES+=usr/share/man/man1/rcsfreeze.1.gz
-OLD_FILES+=usr/share/man/man1/rcsintro.1.gz
-OLD_FILES+=usr/share/man/man1/rcsmerge.1.gz
-OLD_FILES+=usr/share/man/man1/rlog.1.gz
-OLD_FILES+=usr/share/man/man5/rcsfile.5.gz
-# 20161010: remove link to removed m_getclr(9) macro
-OLD_FILES+=usr/share/man/man9/m_getclr.9.gz
-# 20160906: libkqueue tests moved to /usr/tests/sys/kqueue/libkqueue
-OLD_FILES+=usr/tests/sys/kqueue/kqtest
-OLD_FILES+=usr/tests/sys/kqueue/kqueue_test
-# 20160903: idle page zeroing support removed
-OLD_FILES+=usr/share/man/man9/pmap_zero_idle.9.gz
-# 20160901: Remove digi(4)
-OLD_FILES+=usr/share/man/man4/digi.4.gz
-# 20160819: Remove ie(4)
-OLD_FILES+=usr/share/man/man4/i386/ie.4.gz
-# 20160819: Remove spic(4)
-OLD_FILES+=usr/share/man/man4/spic.4.gz
-# 20160819: Remove wl(4) and wlconfig(8)
-OLD_FILES+=usr/share/man/man4/i386/wl.4.gz
-OLD_FILES+=usr/sbin/wlconfig
-OLD_FILES+=usr/share/man/man8/i386/wlconfig.8.gz
-# 20160819: Remove si(4) and sicontrol(8)
-OLD_FILES+=usr/share/man/man4/si.4.gz
-OLD_FILES+=usr/sbin/sicontrol
-OLD_FILES+=usr/share/man/man8/sicontrol.8.gz
-# 20160819: Remove scd(4)
-OLD_FILES+=usr/share/man/man4/scd.4.gz
-# 20160815: Remove mcd(4)
-OLD_FILES+=usr/share/man/man4/mcd.4.gz
-# 20160805: lockmgr_waiters(9) removed
-OLD_FILES+=usr/share/man/man9/lockmgr_waiters.9.gz
-# 20160703: POSIXify locales with variants
-OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hant_TW.UTF-8
-OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hant_TW.Big5/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hant_TW.Big5
-OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hant_HK.UTF-8/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hant_HK.UTF-8
-OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hans_CN.eucCN/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hans_CN.eucCN
-OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hans_CN.UTF-8/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hans_CN.UTF-8
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GBK/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hans_CN.GBK
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB2312/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hans_CN.GB2312
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hans_CN.GB18030/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hans_CN.GB18030
-OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_MESSAGES
-OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/sr_Latn_RS.UTF-8/LC_TIME
-OLD_DIRS+=usr/share/locale/sr_Latn_RS.UTF-8
-OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_COLLATE
-OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_CTYPE
-OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_MESSAGES
-OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_MONETARY
-OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_NUMERIC
-OLD_FILES+=usr/share/locale/sr_Latn_RS.ISO8859-2/LC_TIME
-OLD_DIRS+=usr/share/locale/sr_Latn_RS.ISO8859-2
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_MESSAGES
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.UTF-8/LC_TIME
-OLD_DIRS+=usr/share/locale/sr_Cyrl_RS.UTF-8
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_COLLATE
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_CTYPE
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_MESSAGES
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_MONETARY
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_NUMERIC
-OLD_FILES+=usr/share/locale/sr_Cyrl_RS.ISO8859-5/LC_TIME
-OLD_DIRS+=usr/share/locale/sr_Cyrl_RS.ISO8859-5
-OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_MESSAGES
-OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/mn_Cyrl_MN.UTF-8/LC_TIME
-OLD_DIRS+=usr/share/locale/mn_Cyrl_MN.UTF-8
-OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_MESSAGES
-OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/kk_Cyrl_KZ.UTF-8/LC_TIME
-OLD_DIRS+=usr/share/locale/kk_Cyrl_KZ.UTF-8
-# 20160608: removed pam_verbose_error
-OLD_LIBS+=usr/lib/libpam.so.5
-OLD_LIBS+=usr/lib/pam_chroot.so.5
-OLD_LIBS+=usr/lib/pam_deny.so.5
-OLD_LIBS+=usr/lib/pam_echo.so.5
-OLD_LIBS+=usr/lib/pam_exec.so.5
-OLD_LIBS+=usr/lib/pam_ftpusers.so.5
-OLD_LIBS+=usr/lib/pam_group.so.5
-OLD_LIBS+=usr/lib/pam_guest.so.5
-OLD_LIBS+=usr/lib/pam_krb5.so.5
-OLD_LIBS+=usr/lib/pam_ksu.so.5
-OLD_LIBS+=usr/lib/pam_lastlog.so.5
-OLD_LIBS+=usr/lib/pam_login_access.so.5
-OLD_LIBS+=usr/lib/pam_nologin.so.5
-OLD_LIBS+=usr/lib/pam_opie.so.5
-OLD_LIBS+=usr/lib/pam_opieaccess.so.5
-OLD_LIBS+=usr/lib/pam_passwdqc.so.5
-OLD_LIBS+=usr/lib/pam_permit.so.5
-OLD_LIBS+=usr/lib/pam_radius.so.5
-OLD_LIBS+=usr/lib/pam_rhosts.so.5
-OLD_LIBS+=usr/lib/pam_rootok.so.5
-OLD_LIBS+=usr/lib/pam_securetty.so.5
-OLD_LIBS+=usr/lib/pam_self.so.5
-OLD_LIBS+=usr/lib/pam_ssh.so.5
-OLD_LIBS+=usr/lib/pam_tacplus.so.5
-OLD_LIBS+=usr/lib/pam_unix.so.5
-# 20160523: remove extranous ALTQ files
-OLD_FILES+=usr/include/altq/altq_codel.h
-OLD_FILES+=usr/include/altq/altq_fairq.h
-# 20160519: remove DTrace Toolkit from base
-OLD_FILES+=usr/sbin/dtruss
-OLD_FILES+=usr/share/dtrace/toolkit/execsnoop
-OLD_FILES+=usr/share/dtrace/toolkit/hotkernel
-OLD_FILES+=usr/share/dtrace/toolkit/hotuser
-OLD_FILES+=usr/share/dtrace/toolkit/opensnoop
-OLD_FILES+=usr/share/dtrace/toolkit/procsystime
-OLD_DIRS+=usr/share/dtrace/toolkit
-OLD_FILES+=usr/share/man/man1/dtruss.1.gz
-# 20160519: stale MLINK removed
-OLD_FILES+=usr/share/man/man9/rman_await_resource.9.gz
-# 20160517: ReiserFS removed
-OLD_FILES+=usr/share/man/man5/reiserfs.5.gz
-# 20160504: tests rework
-OLD_FILES+=usr/tests/lib/libc/regex/data/README
-# 20160430: kvm_getfiles(3) removed from kvm(3)
-OLD_LIBS+=lib/libkvm.so.6
-OLD_FILES+=usr/share/man/man3/kvm_getfiles.3.gz
-# 20160423: remove mroute6d
-OLD_FILES+=etc/rc.d/mroute6d
-# 20160419: rename units.lib -> definitions.units
-OLD_FILES+=usr/share/misc/units.lib
-# 20160419: remove Big5HKSCS locales
-OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_HK.Big5HKSCS
-OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_COLLATE
-OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_CTYPE
-OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_MESSAGES
-OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_MONETARY
-OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_NUMERIC
-OLD_FILES+=usr/share/locale/zh_Hant_HK.Big5HKSCS/LC_TIME
-OLD_DIRS+=usr/share/locale/zh_Hant_HK.Big5HKSCS
-# 20160317: rman_res_t size bump to uintmax_t
-OLD_LIBS+=usr/lib/libdevinfo.so.5
-# 20160305: new clang import which bumps version from 3.7.1 to 3.8.0
-OLD_FILES+=usr/bin/macho-dump
-OLD_FILES+=usr/bin/tblgen
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/3.7.1/include/sanitizer
-OLD_FILES+=usr/lib/clang/3.7.1/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/altivec.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/cpuid.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/immintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/module.modulemap
-OLD_FILES+=usr/lib/clang/3.7.1/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/vadefs.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/3.7.1/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/3.7.1/include
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.7.1/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.7.1/lib
-OLD_DIRS+=usr/lib/clang/3.7.1
-OLD_FILES+=usr/share/man/man1/tblgen.1.gz
-# 20160301: Remove taskqueue_enqueue_fast
-OLD_FILES+=usr/share/man/man9/taskqueue_enqueue_fast.9.gz
-# 20160225: Remove casperd and libcapsicum
-OLD_FILES+=sbin/casperd
-OLD_FILES+=etc/rc.d/casperd
-OLD_FILES+=usr/share/man/man8/casperd.8.gz
-OLD_FILES+=usr/include/libcapsicum.h
-OLD_FILES+=usr/include/libcapsicum_service.h
-OLD_FILES+=usr/include/libcapsicum.h
-OLD_FILES+=usr/share/man/man3/libcapsicum.3.gz
-OLD_FILES+=usr/include/libcapsicum_dns.h
-OLD_FILES+=usr/include/libcapsicum_grp.h
-OLD_FILES+=usr/include/libcapsicum_impl.h
-OLD_FILES+=usr/include/libcapsicum_pwd.h
-OLD_FILES+=usr/include/libcapsicum_random.h
-OLD_FILES+=usr/include/libcapsicum_sysctl.h
-OLD_FILES+=libexec/casper/dns
-OLD_FILES+=libexec/casper/grp
-OLD_FILES+=libexec/casper/pwd
-OLD_FILES+=libexec/casper/random
-OLD_FILES+=libexec/casper/sysctl
-OLD_FILES+=libexec/casper/.debug/random.debug
-OLD_FILES+=libexec/casper/.debug/dns.debug
-OLD_FILES+=libexec/casper/.debug/sysctl.debug
-OLD_FILES+=libexec/casper/.debug/pwd.debug
-OLD_FILES+=libexec/casper/.debug/grp.debug
-OLD_DIRS+=libexec/casper/.debug
-OLD_DIRS+=libexec/casper
-OLD_FILES+=usr/lib/libcapsicum.a
-OLD_FILES+=usr/lib/libcapsicum.so
-OLD_LIBS+=lib/libcapsicum.so.0
-OLD_FILES+=usr/lib/libcapsicum_p.a
-# 20160223: functionality from mkulzma(1) merged into mkuzip(1)
-OLD_FILES+=usr/bin/mkulzma
-OLD_FILES+=usr/share/man/man4/geom_uncompress.4.gz
-OLD_FILES+=usr/share/man/man8/mkulzma.8.gz
-# 20160211: Remove obsolete unbound-control-setup
-OLD_FILES+=usr/sbin/unbound-control-setup
-# 20160121: cc.h moved
-OLD_FILES+=usr/include/netinet/cc.h
-# 20160116: Update mandoc to cvs snapshot 20160116
-OLD_FILES+=usr/share/mdocml/example.style.css
-OLD_FILES+=usr/share/mdocml/style.css
-OLD_DIRS+=usr/share/mdocml
-# 20160114: SA-16:06.snmpd
-OLD_FILES+=usr/share/examples/etc/snmpd.config
-# 20160107: GNU ld installed as ld.bfd and linked as ld
-OLD_FILES+=usr/lib/debug/usr/bin/ld.debug
-# 20151225: new clang import which bumps version from 3.7.0 to 3.7.1
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/coverage_interface.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/lsan_interface.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/msan_interface.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h
-OLD_DIRS+=usr/lib/clang/3.7.0/include/sanitizer
-OLD_FILES+=usr/lib/clang/3.7.0/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/altivec.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx512cdintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx512dqintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vldqintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/cpuid.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/cuda_builtin_vars.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/fxsrintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/htmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/htmxlintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/immintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/module.modulemap
-OLD_FILES+=usr/lib/clang/3.7.0/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/s390intrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/vadefs.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/vecintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/xopintrin.h
-OLD_FILES+=usr/lib/clang/3.7.0/include/xtestintrin.h
-OLD_DIRS+=usr/lib/clang/3.7.0/include
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.safestack-i386.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.safestack-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.7.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.7.0/lib
-OLD_DIRS+=usr/lib/clang/3.7.0
-# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406)
-MOVED_LIBS+=usr/lib/libelf.so.2
-# 20151115: Fox bad upgrade scheme
-OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030
-OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312
-OLD_FILES+=usr/share/locale/zh_CN.GBK/zh_Hans_CN.GBK
-OLD_FILES+=usr/share/locale/zh_CN.UTF-8/zh_Hans_CN.UTF-8
-OLD_FILES+=usr/share/locale/zh_CN.eucCN/zh_Hans_CN.eucCN
-OLD_FILES+=usr/share/locale/zh_TW.Big5/zh_Hant_TW.Big5
-OLD_FILES+=usr/share/locale/zh_TW.UTF-8/zh_Hant_TW.UTF-8
-# 20151107: String collation improvements
-OLD_FILES+=usr/share/locale/UTF-8/LC_CTYPE
-OLD_DIRS+=usr/share/locale/UTF-8
-OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_COLLATE
-OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_CTYPE
-OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MESSAGES
-OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MONETARY
-OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_NUMERIC
-OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_TIME
-OLD_DIRS+=usr/share/locale/kk_KZ.PT154/
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_COLLATE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_CTYPE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_TIME
-OLD_DIRS+=usr/share/locale/la_LN.ISO8859-1
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-13/LC_COLLATE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-13/LC_CTYPE
-OLD_DIRS+=usr/share/locale/la_LN.ISO8859-13
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_COLLATE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_CTYPE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_TIME
-OLD_DIRS+=usr/share/locale/la_LN.ISO8859-15
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_COLLATE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_CTYPE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_TIME
-OLD_DIRS+=usr/share/locale/la_LN.ISO8859-2
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_COLLATE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_CTYPE
-OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_TIME
-OLD_DIRS+=usr/share/locale/la_LN.ISO8859-4
-OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_COLLATE
-OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_CTYPE
-OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_TIME
-OLD_DIRS+=usr/share/locale/la_LN.US-ASCII
-OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_MESSAGES
-OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_TIME
-OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_COLLATE
-OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_MONETARY
-OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_CTYPE
-OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_NUMERIC
-OLD_DIRS+=usr/share/locale/lt_LT.ISO8859-4
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_COLLATE
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_CTYPE
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MESSAGES
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MONETARY
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_NUMERIC
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_TIME
-OLD_DIRS+=usr/share/locale/no_NO.ISO8859-1
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_COLLATE
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_CTYPE
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_MESSAGES
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_MONETARY
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_NUMERIC
-OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_TIME
-OLD_DIRS+=usr/share/locale/no_NO.ISO8859-15
-OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_MESSAGES
-OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_TIME
-OLD_DIRS+=usr/share/locale/no_NO.UTF-8
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_COLLATE
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_TIME
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_CTYPE
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_MESSAGES
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_NUMERIC
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_MONETARY
-OLD_DIRS+=usr/share/locale/sr_YU.ISO8859-2
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_COLLATE
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_MONETARY
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_NUMERIC
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_CTYPE
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_TIME
-OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_MESSAGES
-OLD_DIRS+=usr/share/locale/sr_YU.ISO8859-5
-OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_COLLATE
-OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_MONETARY
-OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_CTYPE
-OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_TIME
-OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_NUMERIC
-OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_MESSAGES
-OLD_DIRS+=usr/share/locale/sr_YU.UTF-8
-# 20151101: added missing _test suffix on multiple tests in lib/libc
-OLD_FILES+=usr/tests/lib/libc/c063/faccessat
-OLD_FILES+=usr/tests/lib/libc/c063/fchmodat
-OLD_FILES+=usr/tests/lib/libc/c063/fchownat
-OLD_FILES+=usr/tests/lib/libc/c063/fexecve
-OLD_FILES+=usr/tests/lib/libc/c063/fstatat
-OLD_FILES+=usr/tests/lib/libc/c063/linkat
-OLD_FILES+=usr/tests/lib/libc/c063/mkdirat
-OLD_FILES+=usr/tests/lib/libc/c063/mkfifoat
-OLD_FILES+=usr/tests/lib/libc/c063/mknodat
-OLD_FILES+=usr/tests/lib/libc/c063/openat
-OLD_FILES+=usr/tests/lib/libc/c063/readlinkat
-OLD_FILES+=usr/tests/lib/libc/c063/renameat
-OLD_FILES+=usr/tests/lib/libc/c063/symlinkat
-OLD_FILES+=usr/tests/lib/libc/c063/unlinkat
-OLD_FILES+=usr/tests/lib/libc/c063/utimensat
-OLD_FILES+=usr/tests/lib/libc/string/memchr
-OLD_FILES+=usr/tests/lib/libc/string/memcpy
-OLD_FILES+=usr/tests/lib/libc/string/memmem
-OLD_FILES+=usr/tests/lib/libc/string/memset
-OLD_FILES+=usr/tests/lib/libc/string/strcat
-OLD_FILES+=usr/tests/lib/libc/string/strchr
-OLD_FILES+=usr/tests/lib/libc/string/strcmp
-OLD_FILES+=usr/tests/lib/libc/string/strcpy
-OLD_FILES+=usr/tests/lib/libc/string/strcspn
-OLD_FILES+=usr/tests/lib/libc/string/strerror
-OLD_FILES+=usr/tests/lib/libc/string/strlen
-OLD_FILES+=usr/tests/lib/libc/string/strpbrk
-OLD_FILES+=usr/tests/lib/libc/string/strrchr
-OLD_FILES+=usr/tests/lib/libc/string/strspn
-OLD_FILES+=usr/tests/lib/libc/string/swab
-# 20151101: 430.status-rwho was renamed to 430.status-uptime
-OLD_FILES+=etc/periodic/daily/430.status-rwho
-# 20151030: OpenSSL 1.0.2d import
-OLD_FILES+=usr/share/openssl/man/man3/CMS_set1_signer_certs.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_ctrl.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_ctrl_str.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/d2i_509_CRL_fp.3.gz
-OLD_LIBS+=lib/libcrypto.so.7
-OLD_LIBS+=usr/lib/libssl.so.7
-# 20151029: LinuxKPI moved to sys/compat/linuxkpi
-OLD_FILES+=usr/include/dev/usb/usb_compat_linux.h
-# 20151015: test symbols moved to /usr/lib/debug
-OLD_DIRS+=usr/tests/lib/atf/libatf-c++/.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/atf_c++_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/build_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/check_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/config_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/macros_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/tests_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/utils_test.debug
-OLD_DIRS+=usr/tests/lib/atf/libatf-c++/detail/.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/application_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/env_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/exceptions_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/fs_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/process_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/sanity_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/text_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/.debug/version_helper.debug
-OLD_DIRS+=usr/tests/lib/atf/libatf-c/.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/atf_c_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/build_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/check_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/config_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/error_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/macros_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/tc_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/tp_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/.debug/utils_test.debug
-OLD_DIRS+=usr/tests/lib/atf/libatf-c/detail/.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/dynstr_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/env_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/fs_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/list_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/map_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/process_helpers.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/process_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/sanity_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/text_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/user_test.debug
-OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/.debug/version_helper.debug
-OLD_DIRS+=usr/tests/lib/atf/test-programs/.debug
-OLD_FILES+=usr/tests/lib/atf/test-programs/.debug/c_helpers.debug
-OLD_FILES+=usr/tests/lib/atf/test-programs/.debug/cpp_helpers.debug
-OLD_DIRS+=usr/tests/lib/libc/c063/.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/faccessat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/fchmodat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/fchownat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/fexecve.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/fstatat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/linkat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/mkdirat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/mkfifoat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/mknodat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/openat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/readlinkat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/renameat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/symlinkat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/unlinkat.debug
-OLD_FILES+=usr/tests/lib/libc/c063/.debug/utimensat.debug
-OLD_DIRS+=usr/tests/lib/libc/db/.debug
-OLD_FILES+=usr/tests/lib/libc/db/.debug/h_db.debug
-OLD_DIRS+=usr/tests/lib/libc/gen/.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/alarm_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/arc4random_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/assert_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/basedirname_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/dir_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/floatunditf_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/fnmatch_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpclassify2_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpclassify_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpsetmask_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/fpsetround_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/ftok_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/getcwd_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/getgrent_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/glob_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/humanize_number_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/isnan_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/nice_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/pause_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/raise_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/realpath_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/setdomainname_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/sethostname_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/sleep_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/syslog_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/time_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/ttyname_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/.debug/vis_test.debug
-OLD_DIRS+=usr/tests/lib/libc/gen/execve/.debug
-OLD_FILES+=usr/tests/lib/libc/gen/execve/.debug/execve_test.debug
-OLD_DIRS+=usr/tests/lib/libc/gen/posix_spawn/.debug
-OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/fileactions_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_fileactions.debug
-OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_spawn.debug
-OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/h_spawnattr.debug
-OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/spawn_test.debug
-OLD_FILES+=usr/tests/lib/libc/gen/posix_spawn/.debug/spawnattr_test.debug
-OLD_DIRS+=usr/tests/lib/libc/hash/.debug
-OLD_FILES+=usr/tests/lib/libc/hash/.debug/h_hash.debug
-OLD_FILES+=usr/tests/lib/libc/hash/.debug/sha2_test.debug
-OLD_DIRS+=usr/tests/lib/libc/inet/.debug
-OLD_FILES+=usr/tests/lib/libc/inet/.debug/inet_network_test.debug
-OLD_DIRS+=usr/tests/lib/libc/locale/.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/io_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbrtowc_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbsnrtowcs_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbstowcs_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/mbtowc_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcscspn_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcspbrk_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcsspn_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/wcstod_test.debug
-OLD_FILES+=usr/tests/lib/libc/locale/.debug/wctomb_test.debug
-OLD_DIRS+=usr/tests/lib/libc/net/.debug
-OLD_FILES+=usr/tests/lib/libc/net/.debug/ether_aton_test.debug
-OLD_FILES+=usr/tests/lib/libc/net/.debug/getprotoent_test.debug
-OLD_FILES+=usr/tests/lib/libc/net/.debug/h_dns_server.debug
-OLD_FILES+=usr/tests/lib/libc/net/.debug/h_nsd_recurse.debug
-OLD_FILES+=usr/tests/lib/libc/net/.debug/h_protoent.debug
-OLD_FILES+=usr/tests/lib/libc/net/.debug/h_servent.debug
-OLD_DIRS+=usr/tests/lib/libc/regex/.debug
-OLD_FILES+=usr/tests/lib/libc/regex/.debug/exhaust_test.debug
-OLD_FILES+=usr/tests/lib/libc/regex/.debug/h_regex.debug
-OLD_FILES+=usr/tests/lib/libc/regex/.debug/regex_att_test.debug
-OLD_DIRS+=usr/tests/lib/libc/ssp/.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_fgets.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_getcwd.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_gets.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memcpy.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memmove.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_memset.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_raw.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_read.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_readlink.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_snprintf.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_sprintf.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_stpcpy.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_stpncpy.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strcat.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strcpy.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strncat.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_strncpy.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_vsnprintf.debug
-OLD_FILES+=usr/tests/lib/libc/ssp/.debug/h_vsprintf.debug
-OLD_DIRS+=usr/tests/lib/libc/stdio/.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/clearerr_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fflush_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fmemopen2_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fmemopen_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fopen_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/fputc_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/mktemp_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/popen_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/printf_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdio/.debug/scanf_test.debug
-OLD_DIRS+=usr/tests/lib/libc/stdlib/.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/abs_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/atoi_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/div_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/exit_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/getenv_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/h_getopt.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/h_getopt_long.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/hsearch_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/posix_memalign_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/random_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/strtod_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/strtol_test.debug
-OLD_FILES+=usr/tests/lib/libc/stdlib/.debug/system_test.debug
-OLD_DIRS+=usr/tests/lib/libc/string/.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/memchr.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/memcpy.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/memmem.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/memset.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strcat.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strchr.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strcmp.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strcpy.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strcspn.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strerror.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strlen.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strpbrk.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strrchr.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/strspn.debug
-OLD_FILES+=usr/tests/lib/libc/string/.debug/swab.debug
-OLD_DIRS+=usr/tests/lib/libc/sys/.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/access_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/chroot_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/clock_gettime_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/connect_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/dup_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/fsync_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/getcontext_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/getgroups_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/getitimer_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/getlogin_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/getpid_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/getrusage_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/getsid_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/gettimeofday_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/issetugid_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/kevent_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/kill_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/link_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/listen_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/mincore_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/mkdir_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/mkfifo_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/mknod_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/mlock_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/mmap_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/mprotect_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgctl_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgget_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgrcv_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/msgsnd_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/msync_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/nanosleep_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/pipe2_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/pipe_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/poll_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/revoke_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/select_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/setrlimit_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/setuid_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigaction_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigqueue_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/sigtimedwait_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/socketpair_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/stat_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/timer_create_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/truncate_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/ucontext_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/umask_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/unlink_test.debug
-OLD_FILES+=usr/tests/lib/libc/sys/.debug/write_test.debug
-OLD_DIRS+=usr/tests/lib/libc/termios/.debug
-OLD_FILES+=usr/tests/lib/libc/termios/.debug/tcsetpgrp_test.debug
-OLD_DIRS+=usr/tests/lib/libc/tls/.debug
-OLD_FILES+=usr/tests/lib/libc/tls/.debug/h_tls_dlopen.so.debug
-OLD_FILES+=usr/tests/lib/libc/tls/.debug/libh_tls_dynamic.so.1.debug
-OLD_FILES+=usr/tests/lib/libc/tls/.debug/tls_dlopen_test.debug
-OLD_FILES+=usr/tests/lib/libc/tls/.debug/tls_dynamic_test.debug
-OLD_DIRS+=usr/tests/lib/libc/ttyio/.debug
-OLD_FILES+=usr/tests/lib/libc/ttyio/.debug/ttyio_test.debug
-OLD_DIRS+=usr/tests/lib/libcrypt/.debug
-OLD_FILES+=usr/tests/lib/libcrypt/.debug/crypt_tests.debug
-OLD_DIRS+=usr/tests/lib/libmp/.debug
-OLD_FILES+=usr/tests/lib/libmp/.debug/legacy_test.debug
-OLD_DIRS+=usr/tests/lib/libnv/.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/dnv_tests.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/nv_array_tests.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/nv_tests.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_add_test.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_exists_test.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_free_test.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_get_test.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_move_test.debug
-OLD_FILES+=usr/tests/lib/libnv/.debug/nvlist_send_recv_test.debug
-OLD_DIRS+=usr/tests/lib/libpam/.debug
-OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_ctype.debug
-OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_readlinev.debug
-OLD_FILES+=usr/tests/lib/libpam/.debug/t_openpam_readword.debug
-OLD_DIRS+=usr/tests/lib/libproc/.debug
-OLD_FILES+=usr/tests/lib/libproc/.debug/proc_test.debug
-OLD_FILES+=usr/tests/lib/libproc/.debug/target_prog.debug
-OLD_DIRS+=usr/tests/lib/librt/.debug
-OLD_FILES+=usr/tests/lib/librt/.debug/sched_test.debug
-OLD_FILES+=usr/tests/lib/librt/.debug/sem_test.debug
-OLD_DIRS+=usr/tests/lib/libthr/.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/barrier_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/cond_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/condwait_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/detach_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/equal_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/fork_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/fpu_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/h_atexit.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/h_cancel.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/h_exit.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/h_resolv.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/join_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/kill_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/mutex_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/once_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/preempt_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/rwlock_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/sem_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/siglongjmp_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/sigmask_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/sigsuspend_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/sleep_test.debug
-OLD_FILES+=usr/tests/lib/libthr/.debug/swapcontext_test.debug
-OLD_DIRS+=usr/tests/lib/libthr/dlopen/.debug
-OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/dlopen_test.debug
-OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/h_pthread_dlopen.so.1.debug
-OLD_FILES+=usr/tests/lib/libthr/dlopen/.debug/main_pthread_create_test.debug
-OLD_DIRS+=usr/tests/lib/libutil/.debug
-OLD_FILES+=usr/tests/lib/libutil/.debug/flopen_test.debug
-OLD_FILES+=usr/tests/lib/libutil/.debug/grp_test.debug
-OLD_FILES+=usr/tests/lib/libutil/.debug/humanize_number_test.debug
-OLD_FILES+=usr/tests/lib/libutil/.debug/pidfile_test.debug
-OLD_FILES+=usr/tests/lib/libutil/.debug/trimdomain-nodomain_test.debug
-OLD_FILES+=usr/tests/lib/libutil/.debug/trimdomain_test.debug
-OLD_DIRS+=usr/tests/lib/libxo/.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/libenc_test.so.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_01.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_02.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_03.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_04.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_05.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_06.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_07.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_08.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_09.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_10.debug
-OLD_FILES+=usr/tests/lib/libxo/.debug/test_11.debug
-OLD_DIRS+=usr/tests/lib/msun/.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/acos_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/asin_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/atan_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/cbrt_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/ceil_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/cos_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/cosh_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/erf_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/exp_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/fmod_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/infinity_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/ldexp_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/log_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/pow_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/precision_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/round_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/scalbn_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/sin_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/sinh_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/sqrt_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/tan_test.debug
-OLD_FILES+=usr/tests/lib/msun/.debug/tanh_test.debug
-OLD_DIRS+=usr/tests/libexec/rtld-elf/.debug
-OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/ld_library_pathfds.debug
-OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/libpythagoras.so.0.debug
-OLD_FILES+=usr/tests/libexec/rtld-elf/.debug/target.debug
-OLD_DIRS+=usr/tests/sbin/devd/.debug
-OLD_FILES+=usr/tests/sbin/devd/.debug/client_test.debug
-OLD_DIRS+=usr/tests/sbin/dhclient/.debug
-OLD_FILES+=usr/tests/sbin/dhclient/.debug/option-domain-search_test.debug
-OLD_DIRS+=usr/tests/share/examples/tests/atf/.debug
-OLD_FILES+=usr/tests/share/examples/tests/atf/.debug/printf_test.debug
-OLD_DIRS+=usr/tests/share/examples/tests/plain/.debug
-OLD_FILES+=usr/tests/share/examples/tests/plain/.debug/printf_test.debug
-OLD_DIRS+=usr/tests/sys/aio/.debug
-OLD_FILES+=usr/tests/sys/aio/.debug/aio_kqueue_test.debug
-OLD_FILES+=usr/tests/sys/aio/.debug/aio_test.debug
-OLD_FILES+=usr/tests/sys/aio/.debug/lio_kqueue_test.debug
-OLD_DIRS+=usr/tests/sys/fifo/.debug
-OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_create.debug
-OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_io.debug
-OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_misc.debug
-OLD_FILES+=usr/tests/sys/fifo/.debug/fifo_open.debug
-OLD_DIRS+=usr/tests/sys/file/.debug
-OLD_FILES+=usr/tests/sys/file/.debug/closefrom_test.debug
-OLD_FILES+=usr/tests/sys/file/.debug/dup_test.debug
-OLD_FILES+=usr/tests/sys/file/.debug/fcntlflags_test.debug
-OLD_FILES+=usr/tests/sys/file/.debug/flock_helper.debug
-OLD_FILES+=usr/tests/sys/file/.debug/ftruncate_test.debug
-OLD_FILES+=usr/tests/sys/file/.debug/newfileops_on_fork_test.debug
-OLD_DIRS+=usr/tests/sys/kern/.debug
-OLD_FILES+=usr/tests/sys/kern/.debug/kern_descrip_test.debug
-OLD_FILES+=usr/tests/sys/kern/.debug/ptrace_test.debug
-OLD_FILES+=usr/tests/sys/kern/.debug/unix_seqpacket_test.debug
-OLD_DIRS+=usr/tests/sys/kern/execve/.debug
-OLD_FILES+=usr/tests/sys/kern/execve/.debug/execve_helper.debug
-OLD_FILES+=usr/tests/sys/kern/execve/.debug/good_aout.debug
-OLD_DIRS+=usr/tests/sys/kqueue/.debug
-OLD_FILES+=usr/tests/sys/kqueue/.debug/kqtest.debug
-OLD_DIRS+=usr/tests/sys/mqueue/.debug
-OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest1.debug
-OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest2.debug
-OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest3.debug
-OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest4.debug
-OLD_FILES+=usr/tests/sys/mqueue/.debug/mqtest5.debug
-OLD_DIRS+=usr/tests/sys/netinet/.debug
-OLD_FILES+=usr/tests/sys/netinet/.debug/udp_dontroute.debug
-OLD_DIRS+=usr/tests/sys/pjdfstest/.debug
-OLD_FILES+=usr/tests/sys/pjdfstest/.debug/pjdfstest.debug
-OLD_DIRS+=usr/tests/sys/vm/.debug
-OLD_FILES+=usr/tests/sys/vm/.debug/mmap_test.debug
-# 20151015: Rename files due to file-installed-as-dir bug
-OLD_FILES+=usr/share/doc/legal/realtek
-OLD_FILES+=usr/share/doc/legal/realtek/LICENSE
-OLD_DIRS+=usr/share/doc/legal/realtek
-OLD_DIRS+=usr/share/doc/legal/intel_ipw
-OLD_FILES+=usr/share/doc/legal/intel_ipw/LICENSE
-OLD_FILES+=usr/share/doc/legal/intel_iwn
-OLD_FILES+=usr/share/doc/legal/intel_iwn/LICENSE
-OLD_DIRS+=usr/share/doc/legal/intel_iwn
-OLD_DIRS+=usr/share/doc/legal/intel_iwi
-OLD_FILES+=usr/share/doc/legal/intel_iwi/LICENSE
-OLD_DIRS+=usr/share/doc/legal/intel_wpi
-OLD_FILES+=usr/share/doc/legal/intel_wpi/LICENSE
-# 20151006: new libc++ import
-OLD_FILES+=usr/include/c++/__tuple_03
-OLD_FILES+=usr/include/c++/v1/__tuple_03
-OLD_FILES+=usr/include/c++/v1/tr1/__tuple_03
-# 20151006: new clang import which bumps version from 3.6.1 to 3.7.0
-OLD_FILES+=usr/lib/clang/3.6.1/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/altivec.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/cpuid.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/immintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/module.modulemap
-OLD_FILES+=usr/lib/clang/3.6.1/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.1/include/xopintrin.h
-OLD_DIRS+=usr/lib/clang/3.6.1/include
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.san-i386.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.san-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan-i386.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.6.1/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.6.1/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.6.1/lib
-OLD_DIRS+=usr/lib/clang/3.6.1
-# 20150928: unused sgsmsg utility is removed
-OLD_FILES+=usr/bin/sgsmsg
-# 20150926: remove links to removed/unimplemented mbuf(9) macros
-OLD_FILES+=usr/share/man/man9/MEXT_ADD_REF.9.gz
-OLD_FILES+=usr/share/man/man9/MEXTFREE.9.gz
-OLD_FILES+=usr/share/man/man9/MEXT_IS_REF.9.gz
-OLD_FILES+=usr/share/man/man9/MEXT_REM_REF.9.gz
-OLD_FILES+=usr/share/man/man9/MFREE.9.gz
-# 20150818: *allocm() are gone in jemalloc 4.0.0
-OLD_FILES+=usr/share/man/man3/allocm.3.gz
-OLD_FILES+=usr/share/man/man3/dallocm.3.gz
-OLD_FILES+=usr/share/man/man3/nallocm.3.gz
-OLD_FILES+=usr/share/man/man3/rallocm.3.gz
-OLD_FILES+=usr/share/man/man3/sallocm.3.gz
-# 20150802: Remove netbsd's test on pw(8)
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_test
-# 20150719: Remove libarchive.pc
-OLD_FILES+=usr/libdata/pkgconfig/libarchive.pc
-# 20150705: Rename DTrace provider man pages
-OLD_FILES+=usr/share/man/man4/dtrace-io.4.gz
-OLD_FILES+=usr/share/man/man4/dtrace-ip.4.gz
-OLD_FILES+=usr/share/man/man4/dtrace-proc.4.gz
-OLD_FILES+=usr/share/man/man4/dtrace-sched.4.gz
-OLD_FILES+=usr/share/man/man4/dtrace-tcp.4.gz
-OLD_FILES+=usr/share/man/man4/dtrace-udp.4.gz
-# 20150704: nvlist private headers no longer installed
-OLD_FILES+=usr/include/sys/nv_impl.h
-OLD_FILES+=usr/include/sys/nvlist_impl.h
-OLD_FILES+=usr/include/sys/nvpair_impl.h
-# 20150624
-OLD_LIBS+=usr/lib/libugidfw.so.4
-# 20150604: Move nvlist man pages to section 9
-OLD_FILES+=usr/share/man/man3/libnv.3.gz
-OLD_FILES+=usr/share/man/man3/nv.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_stringf.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_add_stringv.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_clone.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_create.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_destroy.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_dump.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_empty.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_error.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_exists_type.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_fdump.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_flags.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_free_type.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_get_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_get_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_get_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_get_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_get_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_get_parent.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_get_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_move_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_move_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_move_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_move_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_next.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_pack.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_recv.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_send.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_set_error.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_size.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_take_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_take_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_take_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_take_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_take_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_take_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_unpack.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_xfer.3.gz
-# 20150702: Remove duplicated nvlist includes
-OLD_FILES+=usr/include/dnv.h
-OLD_FILES+=usr/include/nv.h
-# 20150528: PCI IOV device driver methods moved to a separate kobj interface
-OLD_FILES+=usr/share/man/man9/PCI_ADD_VF.9.gz
-OLD_FILES+=usr/share/man/man9/PCI_INIT_IOV.9.gz
-OLD_FILES+=usr/share/man/man9/PCI_UNINIT_IOV.9.gz
-# 20150525: new clang import which bumps version from 3.6.0 to 3.6.1
-OLD_FILES+=usr/lib/clang/3.6.0/include/__stddef_max_align_t.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_aes.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_pclmul.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/adxintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/altivec.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/ammintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/arm_acle.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/arm_neon.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/avx2intrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/avx512bwintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/avx512erintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/avx512fintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/avx512vlbwintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/avx512vlintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/avxintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/bmi2intrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/bmiintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/cpuid.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/emmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/f16cintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/fma4intrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/fmaintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/ia32intrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/immintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/lzcntintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/mm3dnow.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/mm_malloc.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/mmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/module.modulemap
-OLD_FILES+=usr/lib/clang/3.6.0/include/nmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/pmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/popcntintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/prfchwintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/rdseedintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/rtmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/shaintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/smmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/tbmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/tmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/wmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/x86intrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/xmmintrin.h
-OLD_FILES+=usr/lib/clang/3.6.0/include/xopintrin.h
-OLD_DIRS+=usr/lib/clang/3.6.0/include
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.san-i386.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.san-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan-i386.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.6.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.6.0/lib
-OLD_DIRS+=usr/lib/clang/3.6.0
-# 20150521
-OLD_FILES+=usr/bin/demandoc
-OLD_FILES+=usr/share/man/man1/demandoc.1.gz
-OLD_FILES+=usr/share/man/man3/mandoc.3.gz
-OLD_FILES+=usr/share/man/man3/mandoc_headers.3.gz
-# 20150520
-OLD_FILES+=usr/lib/libheimsqlite.a
-OLD_FILES+=usr/lib/libheimsqlite.so
-OLD_LIBS+=usr/lib/libheimsqlite.so.11
-OLD_FILES+=usr/lib/libheimsqlite_p.a
-# 20150506
-OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz
-# 20150504
-OLD_FILES+=usr/share/examples/etc/libmap32.conf
-OLD_FILES+=usr/include/bsdstat.h
-OLD_DIRS+=usr/lib32/private
-OLD_LIBS+=usr/lib/private/libatf-c++.so.2
-OLD_LIBS+=usr/lib/private/libbsdstat.so.1
-OLD_LIBS+=usr/lib/private/libheimipcs.so.11
-OLD_LIBS+=usr/lib/private/libsqlite3.so.0
-OLD_LIBS+=usr/lib/private/libunbound.so.5
-OLD_LIBS+=usr/lib/private/libatf-c.so.1
-OLD_LIBS+=usr/lib/private/libheimipcc.so.11
-OLD_LIBS+=usr/lib/private/libldns.so.5
-OLD_LIBS+=usr/lib/private/libssh.so.5
-OLD_LIBS+=usr/lib/private/libucl.so.1
-OLD_DIRS+=usr/lib/private
-# 20150501
-OLD_FILES+=usr/bin/soeliminate
-OLD_FILES+=usr/share/man/man1/soeliminate.1.gz
-# 20150501: Remove the nvlist_.*[vf] functions manpages
-OLD_FILES+=usr/share/man/man3/nvlist_addf_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addf_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addf_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addf_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addf_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addf_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addf_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addv_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addv_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addv_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addv_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addv_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addv_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_addv_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsf_type.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_existsv_type.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freef_type.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev_null.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_freev_type.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getf_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getf_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getf_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getf_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getf_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getf_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getv_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getv_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getv_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getv_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getv_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_getv_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_movef_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_movef_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_movef_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_movef_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_movev_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_movev_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_movev_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_movev_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takef_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takef_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takef_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takef_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takef_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takef_string.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takev_binary.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takev_bool.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takev_descriptor.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takev_number.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takev_nvlist.3.gz
-OLD_FILES+=usr/share/man/man3/nvlist_takev_string.3.gz
-# 20150429: remove never written documentation
-OLD_FILES+=usr/share/doc/papers/hwpmc.ascii.gz
-# 20150427: test/sys/kern/mmap_test moved to test/sys/vm/mmap_test
-OLD_FILES+=usr/tests/sys/kern/mmap_test
-# 20150422: zlib.c moved from net to libkern
-OLD_FILES+=usr/include/net/zlib.h
-OLD_FILES+=usr/include/net/zutil.h
-# 20150418
-OLD_FILES+=sbin/mount_oldnfs
-OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz
-# 20150416: ALTQ moved to net/altq
-OLD_FILES+=usr/include/altq/altq_rmclass_debug.h
-OLD_FILES+=usr/include/altq/altq.h
-OLD_FILES+=usr/include/altq/altq_cdnr.h
-OLD_FILES+=usr/include/altq/altq_hfsc.h
-OLD_FILES+=usr/include/altq/altq_priq.h
-OLD_FILES+=usr/include/altq/altqconf.h
-OLD_FILES+=usr/include/altq/altq_classq.h
-OLD_FILES+=usr/include/altq/altq_red.h
-OLD_FILES+=usr/include/altq/if_altq.h
-OLD_FILES+=usr/include/altq/altq_var.h
-OLD_FILES+=usr/include/altq/altq_rmclass.h
-OLD_FILES+=usr/include/altq/altq_cbq.h
-OLD_FILES+=usr/include/altq/altq_rio.h
-OLD_DIRS+=usr/include/altq
-# 20150330: ntp 4.2.8p1
-OLD_FILES+=usr/share/doc/ntp/driver1.html
-OLD_FILES+=usr/share/doc/ntp/driver10.html
-OLD_FILES+=usr/share/doc/ntp/driver11.html
-OLD_FILES+=usr/share/doc/ntp/driver12.html
-OLD_FILES+=usr/share/doc/ntp/driver16.html
-OLD_FILES+=usr/share/doc/ntp/driver18.html
-OLD_FILES+=usr/share/doc/ntp/driver19.html
-OLD_FILES+=usr/share/doc/ntp/driver2.html
-OLD_FILES+=usr/share/doc/ntp/driver20.html
-OLD_FILES+=usr/share/doc/ntp/driver22.html
-OLD_FILES+=usr/share/doc/ntp/driver26.html
-OLD_FILES+=usr/share/doc/ntp/driver27.html
-OLD_FILES+=usr/share/doc/ntp/driver28.html
-OLD_FILES+=usr/share/doc/ntp/driver29.html
-OLD_FILES+=usr/share/doc/ntp/driver3.html
-OLD_FILES+=usr/share/doc/ntp/driver30.html
-OLD_FILES+=usr/share/doc/ntp/driver32.html
-OLD_FILES+=usr/share/doc/ntp/driver33.html
-OLD_FILES+=usr/share/doc/ntp/driver34.html
-OLD_FILES+=usr/share/doc/ntp/driver35.html
-OLD_FILES+=usr/share/doc/ntp/driver36.html
-OLD_FILES+=usr/share/doc/ntp/driver37.html
-OLD_FILES+=usr/share/doc/ntp/driver4.html
-OLD_FILES+=usr/share/doc/ntp/driver5.html
-OLD_FILES+=usr/share/doc/ntp/driver6.html
-OLD_FILES+=usr/share/doc/ntp/driver7.html
-OLD_FILES+=usr/share/doc/ntp/driver8.html
-OLD_FILES+=usr/share/doc/ntp/driver9.html
-OLD_FILES+=usr/share/doc/ntp/ldisc.html
-OLD_FILES+=usr/share/doc/ntp/measure.html
-OLD_FILES+=usr/share/doc/ntp/mx4200data.html
-OLD_FILES+=usr/share/doc/ntp/notes.html
-OLD_FILES+=usr/share/doc/ntp/patches.html
-OLD_FILES+=usr/share/doc/ntp/porting.html
-OLD_FILES+=usr/share/man/man1/sntp.1.gz
-# 20150329
-.if ${TARGET_ARCH} == "arm"
-OLD_FILES+=usr/include/bootconfig.h
-.endif
-# 20150326
-OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz
-# 20150315: new clang import which bumps version from 3.5.1 to 3.6.0
-OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_aes.h
-OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_pclmul.h
-OLD_FILES+=usr/include/clang/3.5.1/altivec.h
-OLD_FILES+=usr/include/clang/3.5.1/ammintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/arm_acle.h
-OLD_FILES+=usr/include/clang/3.5.1/arm_neon.h
-OLD_FILES+=usr/include/clang/3.5.1/avx2intrin.h
-OLD_FILES+=usr/include/clang/3.5.1/avxintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/bmi2intrin.h
-OLD_FILES+=usr/include/clang/3.5.1/bmiintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/cpuid.h
-OLD_FILES+=usr/include/clang/3.5.1/emmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/f16cintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/fma4intrin.h
-OLD_FILES+=usr/include/clang/3.5.1/fmaintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/ia32intrin.h
-OLD_FILES+=usr/include/clang/3.5.1/immintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/lzcntintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.5.1/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.5.1/mmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/module.modulemap
-OLD_FILES+=usr/include/clang/3.5.1/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/popcntintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/prfchwintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/rdseedintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/rtmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/shaintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/smmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/tbmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/x86intrin.h
-OLD_FILES+=usr/include/clang/3.5.1/xmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.1/xopintrin.h
-OLD_DIRS+=usr/include/clang/3.5.1
-OLD_DIRS+=usr/include/clang
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.san-i386.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.san-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan-i386.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.5.1/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.5.1/lib
-OLD_DIRS+=usr/lib/clang/3.5.1
-# 20150302: binutils documentation distributed as a manpage
-OLD_FILES+=usr/share/doc/binutils/as.txt
-OLD_FILES+=usr/share/doc/binutils/ld.txt
-OLD_DIRS+=usr/share/doc/binutils
-# 20150222: Removed bcd(6) and ppt(6)
-OLD_FILES+=usr/bin/bcd
-OLD_FILES+=usr/bin/ppt
-OLD_FILES+=usr/share/man/man6/bcd.6.gz
-OLD_FILES+=usr/share/man/man6/ppt.6.gz
-# 20150217: Removed remnants of ar(4) driver
-OLD_FILES+=usr/include/dev/ic/hd64570.h
-# 20150212: /usr/games moving into /usr/bin
-OLD_FILES+=usr/games/bcd
-OLD_FILES+=usr/games/caesar
-OLD_FILES+=usr/games/factor
-OLD_FILES+=usr/games/fortune
-OLD_FILES+=usr/games/grdc
-OLD_FILES+=usr/games/morse
-OLD_FILES+=usr/games/number
-OLD_FILES+=usr/games/pom
-OLD_FILES+=usr/games/ppt
-OLD_FILES+=usr/games/primes
-OLD_FILES+=usr/games/random
-OLD_FILES+=usr/games/rot13
-OLD_FILES+=usr/games/strfile
-OLD_FILES+=usr/games/unstr
-OLD_DIRS+=usr/games
-# 20150209: liblzma header
-OLD_FILES+=usr/include/lzma/lzma.h
-# 20150124: spl.9 and friends
-OLD_FILES+=usr/share/man/man9/spl.9.gz
-OLD_FILES+=usr/share/man/man9/spl0.9.gz
-OLD_FILES+=usr/share/man/man9/splbio.9.gz
-OLD_FILES+=usr/share/man/man9/splclock.9.gz
-OLD_FILES+=usr/share/man/man9/splhigh.9.gz
-OLD_FILES+=usr/share/man/man9/splimp.9.gz
-OLD_FILES+=usr/share/man/man9/splnet.9.gz
-OLD_FILES+=usr/share/man/man9/splsoftclock.9.gz
-OLD_FILES+=usr/share/man/man9/splsofttty.9.gz
-OLD_FILES+=usr/share/man/man9/splstatclock.9.gz
-OLD_FILES+=usr/share/man/man9/spltty.9.gz
-OLD_FILES+=usr/share/man/man9/splvm.9.gz
-OLD_FILES+=usr/share/man/man9/splx.9.gz
-# 20150118: toeplitz.c moved from netinet to net
-OLD_FILES+=usr/include/netinet/toeplitz.h
-# 20150118: new clang import which bumps version from 3.5.0 to 3.5.1
-OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_aes.h
-OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_pclmul.h
-OLD_FILES+=usr/include/clang/3.5.0/altivec.h
-OLD_FILES+=usr/include/clang/3.5.0/ammintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/arm_acle.h
-OLD_FILES+=usr/include/clang/3.5.0/arm_neon.h
-OLD_FILES+=usr/include/clang/3.5.0/avx2intrin.h
-OLD_FILES+=usr/include/clang/3.5.0/avxintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/bmi2intrin.h
-OLD_FILES+=usr/include/clang/3.5.0/bmiintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/cpuid.h
-OLD_FILES+=usr/include/clang/3.5.0/emmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/f16cintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/fma4intrin.h
-OLD_FILES+=usr/include/clang/3.5.0/fmaintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/ia32intrin.h
-OLD_FILES+=usr/include/clang/3.5.0/immintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/lzcntintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.5.0/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.5.0/mmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/module.modulemap
-OLD_FILES+=usr/include/clang/3.5.0/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/popcntintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/prfchwintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/rdseedintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/rtmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/shaintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/smmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/tbmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/x86intrin.h
-OLD_FILES+=usr/include/clang/3.5.0/xmmintrin.h
-OLD_FILES+=usr/include/clang/3.5.0/xopintrin.h
-OLD_DIRS+=usr/include/clang/3.5.0
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-i386.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-arm.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-i386.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-i386.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-i386.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-x86_64.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a
-OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a
-OLD_DIRS+=usr/lib/clang/3.5.0/lib/freebsd
-OLD_DIRS+=usr/lib/clang/3.5.0/lib
-OLD_DIRS+=usr/lib/clang/3.5.0
-# 20150102: removal of asr(4)
-OLD_FILES+=usr/share/man/man4/asr.4.gz
-# 20150102: removal of texinfo
-OLD_FILES+=usr/bin/info
-OLD_FILES+=usr/bin/infokey
-OLD_FILES+=usr/bin/install-info
-OLD_FILES+=usr/bin/makeinfo
-OLD_FILES+=usr/bin/texindex
-OLD_FILES+=usr/share/info/am-utils.info.gz
-OLD_FILES+=usr/share/info/as.info.gz
-OLD_FILES+=usr/share/info/binutils.info.gz
-OLD_FILES+=usr/share/info/com_err.info.gz
-OLD_FILES+=usr/share/info/cpp.info.gz
-OLD_FILES+=usr/share/info/cppinternals.info.gz
-OLD_FILES+=usr/share/info/diff.info.gz
-OLD_FILES+=usr/share/info/dir
-OLD_FILES+=usr/share/info/gcc.info.gz
-OLD_FILES+=usr/share/info/gccint.info.gz
-OLD_FILES+=usr/share/info/gdb.info.gz
-OLD_FILES+=usr/share/info/gdbint.info.gz
-OLD_FILES+=usr/share/info/gperf.info.gz
-OLD_FILES+=usr/share/info/grep.info.gz
-OLD_FILES+=usr/share/info/groff.info.gz
-OLD_FILES+=usr/share/info/heimdal.info.gz
-OLD_FILES+=usr/share/info/history.info.gz
-OLD_FILES+=usr/share/info/info-stnd.info.gz
-OLD_FILES+=usr/share/info/info.info.gz
-OLD_FILES+=usr/share/info/ld.info.gz
-OLD_FILES+=usr/share/info/regex.info.gz
-OLD_FILES+=usr/share/info/rluserman.info.gz
-OLD_FILES+=usr/share/info/stabs.info.gz
-OLD_FILES+=usr/share/info/texinfo.info.gz
-OLD_FILES+=usr/share/man/man1/info.1.gz
-OLD_FILES+=usr/share/man/man1/infokey.1.gz
-OLD_FILES+=usr/share/man/man1/install-info.1.gz
-OLD_FILES+=usr/share/man/man1/makeinfo.1.gz
-OLD_FILES+=usr/share/man/man1/texindex.1.gz
-OLD_FILES+=usr/share/man/man5/info.5.gz
-OLD_FILES+=usr/share/man/man5/texinfo.5.gz
-OLD_DIRS+=usr/share/info
-# 20141231: new clang import which bumps version from 3.4.1 to 3.5.0
-OLD_FILES+=usr/include/clang/3.4.1/__wmmintrin_aes.h
-OLD_FILES+=usr/include/clang/3.4.1/__wmmintrin_pclmul.h
-OLD_FILES+=usr/include/clang/3.4.1/altivec.h
-OLD_FILES+=usr/include/clang/3.4.1/ammintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/arm_neon.h
-OLD_FILES+=usr/include/clang/3.4.1/avx2intrin.h
-OLD_FILES+=usr/include/clang/3.4.1/avxintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/bmi2intrin.h
-OLD_FILES+=usr/include/clang/3.4.1/bmiintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/cpuid.h
-OLD_FILES+=usr/include/clang/3.4.1/emmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/f16cintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/fma4intrin.h
-OLD_FILES+=usr/include/clang/3.4.1/fmaintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/immintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/lzcntintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.4.1/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.4.1/mmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/module.map
-OLD_FILES+=usr/include/clang/3.4.1/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/popcntintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/prfchwintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/rdseedintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/rtmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/shaintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/smmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/tbmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/x86intrin.h
-OLD_FILES+=usr/include/clang/3.4.1/xmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/xopintrin.h
-OLD_DIRS+=usr/include/clang/3.4.1
-# 20141225: Remove gpib/ieee488
-OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h
-OLD_FILES+=usr/include/dev/ieee488/tnt4882.h
-OLD_FILES+=usr/include/dev/ieee488/ugpib.h
-OLD_FILES+=usr/include/dev/ieee488/upd7210.h
-OLD_DIRS+=usr/include/dev/ieee488
-OLD_FILES+=usr/include/gpib/gpib.h
-OLD_DIRS+=usr/include/gpib
-OLD_FILES+=usr/lib/libgpib.a
-OLD_FILES+=usr/lib/libgpib_p.a
-OLD_FILES+=usr/lib/libgpib.so
-OLD_LIBS+=usr/lib/libgpib.so.3
-OLD_FILES+=usr/share/man/man3/gpib.3.gz
-OLD_FILES+=usr/share/man/man3/ibclr.3.gz
-OLD_FILES+=usr/share/man/man3/ibdev.3.gz
-OLD_FILES+=usr/share/man/man3/ibdma.3.gz
-OLD_FILES+=usr/share/man/man3/ibeos.3.gz
-OLD_FILES+=usr/share/man/man3/ibeot.3.gz
-OLD_FILES+=usr/share/man/man3/ibloc.3.gz
-OLD_FILES+=usr/share/man/man3/ibonl.3.gz
-OLD_FILES+=usr/share/man/man3/ibpad.3.gz
-OLD_FILES+=usr/share/man/man3/ibrd.3.gz
-OLD_FILES+=usr/share/man/man3/ibsad.3.gz
-OLD_FILES+=usr/share/man/man3/ibsic.3.gz
-OLD_FILES+=usr/share/man/man3/ibtmo.3.gz
-OLD_FILES+=usr/share/man/man3/ibtrg.3.gz
-OLD_FILES+=usr/share/man/man3/ibwrt.3.gz
-OLD_FILES+=usr/share/man/man4/gpib.4.gz
-OLD_FILES+=usr/share/man/man4/pcii.4.gz
-OLD_FILES+=usr/share/man/man4/tnt4882.4.gz
-# 20141224: libxo moved to /lib
-MOVED_LIBS+=usr/lib/libxo.so.0
-# 20141223: remove in6_gif.h and in_gif.h
-OLD_FILES+=usr/include/netinet/in_gif.h
-OLD_FILES+=usr/include/netinet6/in6_gif.h
-# 20141209: pw tests broken into a file per command
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_delete
-OLD_FILES+=usr/tests/usr.sbin/pw/pw_modify
-# 20141202: update to mandoc CVS 20141201
-OLD_FILES+=usr.bin/preconv
-OLD_FILES+=usr/share/man/man1/preconv.1.gz
-# 20141129: mrouted rc.d scripts removed from base
-OLD_FILES+=etc/rc.d/mrouted
-# 20141126: convert sbin/mdconfig/tests to ATF format tests
-OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test
-OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test
-OLD_FILES+=usr/tests/sbin/mdconfig/run.pl
-# 20141126: remove xform_ipip decapsulation fallback
-OLD_FILES+=usr/include/netipsec/ipip_var.h
-# 20141122: mandoc updated to 1.13.1
-OLD_FILES+=usr/share/mdocml/external.png
-# 20141111: SF_KQUEUE code removed
-OLD_FILES+=usr/include/sys/sf_base.h
-OLD_FILES+=usr/include/sys/sf_sync.h
-# 20141109: faith/faithd removal
-OLD_FILES+=etc/rc.d/faith
-OLD_FILES+=usr/share/man/man4/faith.4.gz
-OLD_FILES+=usr/share/man/man4/if_faith.4.gz
-OLD_FILES+=usr/sbin/faithd
-OLD_FILES+=usr/share/man/man8/faithd.8.gz
-# 20141107: overhaul if_gre(4)
-OLD_FILES+=usr/include/netinet/ip_gre.h
-# 20141102: postrandom obsoleted by new /dev/random code
-OLD_FILES+=etc/rc.d/postrandom
-# 20141031: initrandom obsoleted by new /dev/random code
-OLD_FILES+=etc/rc.d/initrandom
-# 20141030: atf 0.21 import
-OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz
-# 20141028: debug files accidentally installed as directory name
-OLD_FILES+=usr/lib/debug/usr/lib/i18n
-OLD_FILES+=usr/lib/debug/usr/lib/private
-OLD_FILES+=usr/lib/debug/usr/lib32/i18n
-OLD_FILES+=usr/lib/debug/usr/lib32/private
-# 20141015: OpenSSL 1.0.1j import
-OLD_FILES+=usr/share/openssl/man/man3/CMS_sign_add1_signer.3.gz
-# 20141003: libproc version bump
-OLD_LIBS+=usr/lib/libproc.so.2
-# 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed
-OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz
-OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz
-# 20140917: hv_kvpd rc.d script removed in favor of devd configuration
-OLD_FILES+=etc/rc.d/hv_kvpd
-# 20140917: libnv was accidentally being installed to /usr/lib instead of /lib
-MOVED_LIBS+=usr/lib/libnv.so.0
-# 20140829: rc.d/kerberos removed
-OLD_FILES+=etc/rc.d/kerberos
-# 20140814: libopie version bump
-OLD_LIBS+=usr/lib/libopie.so.7
-# 20140811: otp-sha renamed to otp-sha1
-OLD_FILES+=usr/bin/otp-sha
-OLD_FILES+=usr/share/man/man1/otp-sha.1.gz
-# 20140807: Remove private lib files that should not be installed
-OLD_FILES+=usr/lib/private/libatf-c.a
-OLD_FILES+=usr/lib/private/libatf-c.so
-OLD_FILES+=usr/lib/private/libatf-c_p.a
-OLD_FILES+=usr/lib/private/libatf-c++.a
-OLD_FILES+=usr/lib/private/libatf-c++.so
-OLD_FILES+=usr/lib/private/libatf-c++_p.a
-OLD_FILES+=usr/lib/private/libbsdstat.a
-OLD_FILES+=usr/lib/private/libbsdstat.so
-OLD_FILES+=usr/lib/private/libbsdstat_p.a
-OLD_FILES+=usr/lib/private/libheimipcc.a
-OLD_FILES+=usr/lib/private/libheimipcc.so
-OLD_FILES+=usr/lib/private/libheimipcc_p.a
-OLD_FILES+=usr/lib/private/libheimipcs.a
-OLD_FILES+=usr/lib/private/libheimipcs.so
-OLD_FILES+=usr/lib/private/libheimipcs_p.a
-OLD_FILES+=usr/lib/private/libldns.a
-OLD_FILES+=usr/lib/private/libldns.so
-OLD_FILES+=usr/lib/private/libldns_p.a
-OLD_FILES+=usr/lib/private/libssh.a
-OLD_FILES+=usr/lib/private/libssh.so
-OLD_FILES+=usr/lib/private/libssh_p.a
-OLD_FILES+=usr/lib/private/libunbound.a
-OLD_FILES+=usr/lib/private/libunbound.so
-OLD_FILES+=usr/lib/private/libunbound_p.a
-OLD_FILES+=usr/lib/private/libucl.a
-OLD_FILES+=usr/lib/private/libucl.so
-OLD_FILES+=usr/lib/private/libucl_p.a
-# 20140803: Remove an obsolete man page
-OLD_FILES+=usr/share/man/man9/pmap_change_wiring.9.gz
-# 20140731
-OLD_FILES+=usr/share/man/man9/SYSCTL_ADD_OID.9.gz
-# 20140728: libsbuf restored to old version
-OLD_LIBS+=lib/libsbuf.so.7
-# 20140728: Remove an obsolete man page
-OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz
-OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz
-OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz
-# 20140723: renamed to PCBGROUP.9
-OLD_FILES+=usr/share/man/man9/PCBGROUPS.9.gz
-# 20140722: browse_packages_ftp.sh removed
-OLD_FILES+=usr/share/examples/bsdconfig/browse_packages_ftp.sh
-# 20140718: Remove obsolete man pages
-OLD_FILES+=usr/share/man/man9/zero_copy.9.gz
-OLD_FILES+=usr/share/man/man9/zero_copy_sockets.9.gz
-# 20140718: Remove an obsolete man page
-OLD_FILES+=usr/share/man/man9/pmap_page_protect.9.gz
-# 20140717: Remove an obsolete man page
-OLD_FILES+=usr/share/man/man9/pmap_clear_reference.9.gz
-# 20140716: Remove an incorrectly named man page
-OLD_FILES+=usr/share/man/man9/pmap_ts_modified.9.gz
-# 20140712: Removal of bsd.dtrace.mk
-OLD_FILES+=usr/share/mk/bsd.dtrace.mk
-# 20140705: turn libreadline into an internal lib
-OLD_LIBS+=lib/libreadline.so.8
-OLD_FILES+=usr/lib/libreadline.a
-OLD_FILES+=usr/lib/libreadline_p.a
-OLD_FILES+=usr/lib/libreadline.so
-OLD_FILES+=usr/lib/libhistory.a
-OLD_FILES+=usr/lib/libhistory_p.a
-OLD_FILES+=usr/lib/libhistory.so
-OLD_LIBS+=usr/lib/libhistory.so.8
-OLD_FILES+=usr/include/readline/chardefs.h
-OLD_FILES+=usr/include/readline/history.h
-OLD_FILES+=usr/include/readline/keymaps.h
-OLD_FILES+=usr/include/readline/readline.h
-OLD_FILES+=usr/include/readline/tilde.h
-OLD_FILES+=usr/include/readline/rlconf.h
-OLD_FILES+=usr/include/readline/rlstdc.h
-OLD_FILES+=usr/include/readline/rltypedefs.h
-OLD_FILES+=usr/include/readline/rltypedefs.h
-OLD_DIRS+=usr/include/readline
-OLD_FILES+=usr/share/info/readline.info.gz
-OLD_FILES+=usr/share/man/man3/readline.3.gz
-OLD_FILES+=usr/share/man/man3/rlhistory.3.gz
-# 20140625: csup removal
-OLD_FILES+=usr/bin/csup
-OLD_FILES+=usr/bin/cpasswd
-OLD_FILES+=usr/share/man/man1/csup.1.gz
-OLD_FILES+=usr/share/man/man1/cpasswd.1.gz
-OLD_FILES+=usr/share/examples/cvsup/README
-OLD_FILES+=usr/share/examples/cvsup/cvs-supfile
-OLD_FILES+=usr/share/examples/cvsup/stable-supfile
-OLD_FILES+=usr/share/examples/cvsup/standard-supfile
-OLD_DIRS+=usr/share/examples/cvsup
-# 20140614: send-pr removal
-OLD_FILES+=usr/bin/sendbug
-OLD_FILES+=usr/share/info/send-pr.info.gz
-OLD_FILES+=usr/share/man/man1/send-pr.1.gz
-OLD_FILES+=usr/share/man/man1/sendbug.1.gz
-OLD_FILES+=etc/gnats/freefall
-OLD_DIRS+=etc/gnats
-# 20140512: new clang import which bumps version from 3.4 to 3.4.1
-OLD_FILES+=usr/include/clang/3.4/__wmmintrin_aes.h
-OLD_FILES+=usr/include/clang/3.4/__wmmintrin_pclmul.h
-OLD_FILES+=usr/include/clang/3.4/altivec.h
-OLD_FILES+=usr/include/clang/3.4/ammintrin.h
-OLD_FILES+=usr/include/clang/3.4/avx2intrin.h
-OLD_FILES+=usr/include/clang/3.4/avxintrin.h
-OLD_FILES+=usr/include/clang/3.4/bmi2intrin.h
-OLD_FILES+=usr/include/clang/3.4/bmiintrin.h
-OLD_FILES+=usr/include/clang/3.4/cpuid.h
-OLD_FILES+=usr/include/clang/3.4/emmintrin.h
-OLD_FILES+=usr/include/clang/3.4/f16cintrin.h
-OLD_FILES+=usr/include/clang/3.4/fma4intrin.h
-OLD_FILES+=usr/include/clang/3.4/fmaintrin.h
-OLD_FILES+=usr/include/clang/3.4/immintrin.h
-OLD_FILES+=usr/include/clang/3.4/lzcntintrin.h
-OLD_FILES+=usr/include/clang/3.4/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.4/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.4/mmintrin.h
-OLD_FILES+=usr/include/clang/3.4/module.map
-OLD_FILES+=usr/include/clang/3.4/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.4/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.4/popcntintrin.h
-OLD_FILES+=usr/include/clang/3.4/prfchwintrin.h
-OLD_FILES+=usr/include/clang/3.4/rdseedintrin.h
-OLD_FILES+=usr/include/clang/3.4/rtmintrin.h
-OLD_FILES+=usr/include/clang/3.4/shaintrin.h
-OLD_FILES+=usr/include/clang/3.4/smmintrin.h
-OLD_FILES+=usr/include/clang/3.4/tbmintrin.h
-OLD_FILES+=usr/include/clang/3.4/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.4/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.4/x86intrin.h
-OLD_FILES+=usr/include/clang/3.4/xmmintrin.h
-OLD_FILES+=usr/include/clang/3.4/xopintrin.h
-OLD_FILES+=usr/include/clang/3.4/arm_neon.h
-OLD_FILES+=usr/include/clang/3.4/module.map
-OLD_DIRS+=usr/include/clang/3.4
-# 20140505: Bogusly installing src.opts.mk
-OLD_FILES+=usr/share/mk/src.opts.mk
-# 20140505: Reject PR kern/187551
-OLD_FILES+=usr/tests/sbin/ifconfig/fibs_test
-# 20140502: Removal of lindev(4)
-OLD_FILES+=usr/share/man/man4/lindev.4.gz
-# 20140425
-OLD_FILES+=usr/lib/libssp_p.a
-OLD_FILES+=usr/lib/libstand_p.a
-# 20140314: AppleTalk
-OLD_DIRS+=usr/include/netatalk
-OLD_FILES+=usr/include/netatalk/aarp.h
-OLD_FILES+=usr/include/netatalk/at.h
-OLD_FILES+=usr/include/netatalk/at_extern.h
-OLD_FILES+=usr/include/netatalk/at_var.h
-OLD_FILES+=usr/include/netatalk/ddp.h
-OLD_FILES+=usr/include/netatalk/ddp_pcb.h
-OLD_FILES+=usr/include/netatalk/ddp_var.h
-OLD_FILES+=usr/include/netatalk/endian.h
-OLD_FILES+=usr/include/netatalk/phase2.h
-# 20140314: Remove IPX/SPX
-OLD_LIBS+=lib/libipx.so.5
-OLD_FILES+=usr/include/netipx/ipx.h
-OLD_FILES+=usr/include/netipx/ipx_if.h
-OLD_FILES+=usr/include/netipx/ipx_pcb.h
-OLD_FILES+=usr/include/netipx/ipx_var.h
-OLD_FILES+=usr/include/netipx/spx.h
-OLD_FILES+=usr/include/netipx/spx_debug.h
-OLD_FILES+=usr/include/netipx/spx_timer.h
-OLD_FILES+=usr/include/netipx/spx_var.h
-OLD_DIRS+=usr/include/netipx
-OLD_FILES+=usr/lib/libipx.a
-OLD_FILES+=usr/lib/libipx.so
-OLD_FILES+=usr/lib/libipx_p.a
-OLD_FILES+=usr/sbin/IPXrouted
-OLD_FILES+=usr/share/man/man3/ipx.3.gz
-OLD_FILES+=usr/share/man/man3/ipx_addr.3.gz
-OLD_FILES+=usr/share/man/man3/ipx_ntoa.3.gz
-OLD_FILES+=usr/share/man/man4/ef.4.gz
-OLD_FILES+=usr/share/man/man4/if_ef.4.gz
-OLD_FILES+=usr/share/man/man8/IPXrouted.8.gz
-# 20140314: bsdconfig usermgmt rewrite
-OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/userinput
-# 20140307: bsdconfig groupmgmt rewrite
-OLD_FILES+=usr/libexec/bsdconfig/070.usermgmt/groupinput
-# 20140223: Remove libyaml
-OLD_FILES+=usr/lib/private/libyaml.a
-OLD_FILES+=usr/lib/private/libyaml.so
-OLD_LIBS+=usr/lib/private/libyaml.so.1
-OLD_FILES+=usr/lib/private/libyaml_p.a
-# 20140216: new clang import which bumps version from 3.3 to 3.4
-OLD_FILES+=usr/bin/llvm-prof
-OLD_FILES+=usr/include/clang/3.3/__wmmintrin_aes.h
-OLD_FILES+=usr/include/clang/3.3/__wmmintrin_pclmul.h
-OLD_FILES+=usr/include/clang/3.3/altivec.h
-OLD_FILES+=usr/include/clang/3.3/ammintrin.h
-OLD_FILES+=usr/include/clang/3.3/avx2intrin.h
-OLD_FILES+=usr/include/clang/3.3/avxintrin.h
-OLD_FILES+=usr/include/clang/3.3/bmi2intrin.h
-OLD_FILES+=usr/include/clang/3.3/bmiintrin.h
-OLD_FILES+=usr/include/clang/3.3/cpuid.h
-OLD_FILES+=usr/include/clang/3.3/emmintrin.h
-OLD_FILES+=usr/include/clang/3.3/f16cintrin.h
-OLD_FILES+=usr/include/clang/3.3/fma4intrin.h
-OLD_FILES+=usr/include/clang/3.3/fmaintrin.h
-OLD_FILES+=usr/include/clang/3.3/immintrin.h
-OLD_FILES+=usr/include/clang/3.3/lzcntintrin.h
-OLD_FILES+=usr/include/clang/3.3/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.3/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.3/mmintrin.h
-OLD_FILES+=usr/include/clang/3.3/module.map
-OLD_FILES+=usr/include/clang/3.3/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.3/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.3/popcntintrin.h
-OLD_FILES+=usr/include/clang/3.3/prfchwintrin.h
-OLD_FILES+=usr/include/clang/3.3/rdseedintrin.h
-OLD_FILES+=usr/include/clang/3.3/rtmintrin.h
-OLD_FILES+=usr/include/clang/3.3/smmintrin.h
-OLD_FILES+=usr/include/clang/3.3/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.3/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.3/x86intrin.h
-OLD_FILES+=usr/include/clang/3.3/xmmintrin.h
-OLD_FILES+=usr/include/clang/3.3/xopintrin.h
-OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz
-OLD_DIRS+=usr/include/clang/3.3
-# 20140216: nve(4) removed
-OLD_FILES+=usr/share/man/man4/if_nve.4.gz
-OLD_FILES+=usr/share/man/man4/nve.4.gz
-# 20140205: Open Firmware device moved
-OLD_FILES+=usr/include/dev/ofw/ofw_nexus.h
-# 20140128: libelf and libdwarf import
-OLD_LIBS+=usr/lib/libelf.so.1
-OLD_LIBS+=usr/lib/libdwarf.so.3
-# 20140123: apicvar header moved to x86
-OLD_FILES+=usr/include/machine/apicvar.h
-# 20131215: libcam version bumped
-OLD_LIBS+=lib/libcam.so.6
-# 20131202: libcapsicum and libcasper moved to /lib/
-MOVED_LIBS+=usr/lib/libcapsicum.so.0
-MOVED_LIBS+=usr/lib/libcasper.so.0
-# 20131109: extattr(2) mlinks fixed
-OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz
-OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz
-# 20131107: example files removed
-OLD_FILES+=usr/share/examples/libusb20/aux.c
-OLD_FILES+=usr/share/examples/libusb20/aux.h
-# 20131103: WITH_LIBICONV_COMPAT removal
-OLD_FILES+=usr/include/_libiconv_compat.h
-OLD_FILES+=usr/lib/libiconv.a
-OLD_FILES+=usr/lib/libiconv.so
-OLD_LIBS+=usr/lib/libiconv.so.3
-OLD_FILES+=usr/lib/libiconv_p.a
-# 20131103: removal of utxrm(8), use 'utx rm' instead
-OLD_FILES+=usr/sbin/utxrm
-OLD_FILES+=usr/share/man/man8/utxrm.8.gz
-# 20131031: pkg_install has been removed
-OLD_FILES+=etc/periodic/daily/220.backup-pkgdb
-OLD_FILES+=etc/periodic/daily/490.status-pkg-changes
-OLD_FILES+=etc/periodic/security/460.chkportsum
-OLD_FILES+=etc/periodic/weekly/400.status-pkg
-OLD_FILES+=usr/sbin/pkg_add
-OLD_FILES+=usr/sbin/pkg_create
-OLD_FILES+=usr/sbin/pkg_delete
-OLD_FILES+=usr/sbin/pkg_info
-OLD_FILES+=usr/sbin/pkg_updating
-OLD_FILES+=usr/sbin/pkg_version
-OLD_FILES+=usr/share/man/man1/pkg_add.1.gz
-OLD_FILES+=usr/share/man/man1/pkg_create.1.gz
-OLD_FILES+=usr/share/man/man1/pkg_delete.1.gz
-OLD_FILES+=usr/share/man/man1/pkg_info.1.gz
-OLD_FILES+=usr/share/man/man1/pkg_updating.1.gz
-OLD_FILES+=usr/share/man/man1/pkg_version.1.gz
-# 20131030: /etc/keys moved to /usr/share/keys
-OLD_DIRS+=etc/keys
-OLD_DIRS+=etc/keys/pkg
-OLD_DIRS+=etc/keys/pkg/revoked
-OLD_DIRS+=etc/keys/pkg/trusted
-OLD_FILES+=etc/keys/pkg/trusted/pkg.freebsd.org.2013102301
-# 20131028: ng_fec(4) removed
-OLD_FILES+=usr/include/netgraph/ng_fec.h
-OLD_FILES+=usr/share/man/man4/ng_fec.4.gz
-# 20131027: header moved
-OLD_FILES+=usr/include/net/pf_mtag.h
-# 20131023: remove never used iscsi directory
-OLD_DIRS+=usr/share/examples/iscsi
-# 20131021: isf(4) removed
-OLD_FILES+=usr/sbin/isfctl
-OLD_FILES+=usr/share/man/man4/isf.4.gz
-OLD_FILES+=usr/share/man/man8/isfctl.8.gz
-# 20131014: libbsdyml becomes private
-OLD_FILES+=usr/lib/libbsdyml.a
-OLD_FILES+=usr/lib/libbsdyml.so
-OLD_LIBS+=usr/lib/libbsdyml.so.0
-OLD_FILES+=usr/lib/libbsdyml_p.a
-OLD_FILES+=usr/share/man/man3/libbsdyml.3.gz
-OLD_FILES+=usr/include/bsdyml.h
-# 20131013: Removal of the ATF tools
-OLD_FILES+=etc/atf/FreeBSD.conf
-OLD_FILES+=etc/atf/atf-run.hooks
-OLD_FILES+=etc/atf/common.conf
-OLD_FILES+=usr/bin/atf-config
-OLD_FILES+=usr/bin/atf-report
-OLD_FILES+=usr/bin/atf-run
-OLD_FILES+=usr/bin/atf-version
-OLD_FILES+=usr/share/atf/atf-run.hooks
-OLD_FILES+=usr/share/examples/atf/atf-run.hooks
-OLD_FILES+=usr/share/examples/atf/tests-results.css
-OLD_FILES+=usr/share/man/man1/atf-config.1.gz
-OLD_FILES+=usr/share/man/man1/atf-report.1.gz
-OLD_FILES+=usr/share/man/man1/atf-run.1.gz
-OLD_FILES+=usr/share/man/man1/atf-version.1.gz
-OLD_FILES+=usr/share/man/man5/atf-formats.5.gz
-OLD_FILES+=usr/share/xml/atf/tests-results.dtd
-OLD_FILES+=usr/share/xsl/atf/tests-results.xsl
-OLD_DIRS+=etc/atf
-OLD_DIRS+=usr/share/examples/atf
-OLD_DIRS+=usr/share/xml/atf
-OLD_DIRS+=usr/share/xml
-OLD_DIRS+=usr/share/xsl/atf
-OLD_DIRS+=usr/share/xsl
-# 20131009: freebsd-version moved from /libexec to /bin
-OLD_FILES+=libexec/freebsd-version
-# 20131001: ar and ranlib from binutils not used
-OLD_FILES+=usr/bin/gnu-ar
-OLD_FILES+=usr/bin/gnu-ranlib
-OLD_FILES+=usr/share/man/man1/gnu-ar.1.gz
-OLD_FILES+=usr/share/man/man1/gnu-ranlib.1.gz
-# 20130930: BIND removed from base
-OLD_FILES+=etc/mtree/BIND.chroot.dist
-OLD_FILES+=etc/namedb
-OLD_FILES+=etc/periodic/daily/470.status-named
-OLD_FILES+=usr/bin/dig
-OLD_FILES+=usr/bin/nslookup
-OLD_FILES+=usr/bin/nsupdate
-OLD_DIRS+=usr/include/lwres
-OLD_FILES+=usr/include/lwres/context.h
-OLD_FILES+=usr/include/lwres/int.h
-OLD_FILES+=usr/include/lwres/ipv6.h
-OLD_FILES+=usr/include/lwres/lang.h
-OLD_FILES+=usr/include/lwres/list.h
-OLD_FILES+=usr/include/lwres/lwbuffer.h
-OLD_FILES+=usr/include/lwres/lwpacket.h
-OLD_FILES+=usr/include/lwres/lwres.h
-OLD_FILES+=usr/include/lwres/net.h
-OLD_FILES+=usr/include/lwres/netdb.h
-OLD_FILES+=usr/include/lwres/platform.h
-OLD_FILES+=usr/include/lwres/result.h
-OLD_FILES+=usr/include/lwres/string.h
-OLD_FILES+=usr/include/lwres/version.h
-OLD_FILES+=usr/lib/liblwres.a
-OLD_FILES+=usr/lib/liblwres.so
-OLD_LIBS+=usr/lib/liblwres.so.90
-OLD_FILES+=usr/lib/liblwres_p.a
-OLD_FILES+=usr/sbin/arpaname
-OLD_FILES+=usr/sbin/ddns-confgen
-OLD_FILES+=usr/sbin/dnssec-dsfromkey
-OLD_FILES+=usr/sbin/dnssec-keyfromlabel
-OLD_FILES+=usr/sbin/dnssec-keygen
-OLD_FILES+=usr/sbin/dnssec-revoke
-OLD_FILES+=usr/sbin/dnssec-settime
-OLD_FILES+=usr/sbin/dnssec-signzone
-OLD_FILES+=usr/sbin/dnssec-verify
-OLD_FILES+=usr/sbin/genrandom
-OLD_FILES+=usr/sbin/isc-hmac-fixup
-OLD_FILES+=usr/sbin/lwresd
-OLD_FILES+=usr/sbin/named
-OLD_FILES+=usr/sbin/named-checkconf
-OLD_FILES+=usr/sbin/named-checkzone
-OLD_FILES+=usr/sbin/named-compilezone
-OLD_FILES+=usr/sbin/named-journalprint
-OLD_FILES+=usr/sbin/named.reconfig
-OLD_FILES+=usr/sbin/named.reload
-OLD_FILES+=usr/sbin/nsec3hash
-OLD_FILES+=usr/sbin/rndc
-OLD_FILES+=usr/sbin/rndc-confgen
-OLD_DIRS+=usr/share/doc/bind9
-OLD_FILES+=usr/share/doc/bind9/CHANGES
-OLD_FILES+=usr/share/doc/bind9/COPYRIGHT
-OLD_FILES+=usr/share/doc/bind9/FAQ
-OLD_FILES+=usr/share/doc/bind9/HISTORY
-OLD_FILES+=usr/share/doc/bind9/README
-OLD_DIRS+=usr/share/doc/bind9/arm
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch01.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch02.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch03.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch04.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch05.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch06.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch07.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch08.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch09.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.ch10.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.html
-OLD_FILES+=usr/share/doc/bind9/arm/Bv9ARM.pdf
-OLD_FILES+=usr/share/doc/bind9/arm/man.arpaname.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.ddns-confgen.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.dig.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-dsfromkey.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-keyfromlabel.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-keygen.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-revoke.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-settime.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-signzone.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.dnssec-verify.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.genrandom.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.host.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.isc-hmac-fixup.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.named-checkconf.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.named-checkzone.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.named-journalprint.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.named.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.nsec3hash.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.nsupdate.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.rndc-confgen.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.rndc.conf.html
-OLD_FILES+=usr/share/doc/bind9/arm/man.rndc.html
-OLD_DIRS+=usr/share/doc/bind9/misc
-OLD_FILES+=usr/share/doc/bind9/misc/dnssec
-OLD_FILES+=usr/share/doc/bind9/misc/format-options.pl
-OLD_FILES+=usr/share/doc/bind9/misc/ipv6
-OLD_FILES+=usr/share/doc/bind9/misc/migration
-OLD_FILES+=usr/share/doc/bind9/misc/migration-4to9
-OLD_FILES+=usr/share/doc/bind9/misc/options
-OLD_FILES+=usr/share/doc/bind9/misc/rfc-compliance
-OLD_FILES+=usr/share/doc/bind9/misc/roadmap
-OLD_FILES+=usr/share/doc/bind9/misc/sdb
-OLD_FILES+=usr/share/doc/bind9/misc/sort-options.pl
-OLD_FILES+=usr/share/man/man1/arpaname.1.gz
-OLD_FILES+=usr/share/man/man1/dig.1.gz
-OLD_FILES+=usr/share/man/man1/nslookup.1.gz
-OLD_FILES+=usr/share/man/man1/nsupdate.1.gz
-OLD_FILES+=usr/share/man/man3/lwres.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_addr_parse.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_add.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_back.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_clear.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_first.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_forward.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_getmem.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_getuint16.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_getuint32.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_getuint8.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_init.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_invalidate.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_putmem.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_putuint16.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_putuint32.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_putuint8.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_buffer_subtract.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_conf_clear.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_conf_get.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_conf_init.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_conf_parse.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_conf_print.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_config.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_context.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_context_allocmem.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_context_create.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_context_destroy.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_context_freemem.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_context_initserial.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_context_nextserial.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_context_sendrecv.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_endhostent.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_endhostent_r.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_freeaddrinfo.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_freehostent.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gabn.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gabnrequest_free.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gabnrequest_parse.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gabnrequest_render.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gabnresponse_free.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gabnresponse_parse.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gabnresponse_render.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gai_strerror.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_getaddrinfo.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_getaddrsbyname.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gethostbyaddr.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gethostbyaddr_r.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gethostbyname.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gethostbyname2.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gethostbyname_r.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gethostent.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gethostent_r.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_getipnode.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_getipnodebyaddr.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_getipnodebyname.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_getnamebyaddr.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_getnameinfo.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_getrrsetbyname.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gnba.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gnbarequest_free.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gnbarequest_parse.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gnbarequest_render.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gnbaresponse_free.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gnbaresponse_parse.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_gnbaresponse_render.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_herror.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_hstrerror.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_inetntop.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_lwpacket_parseheader.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_lwpacket_renderheader.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_net_ntop.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_noop.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_nooprequest_free.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_nooprequest_parse.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_nooprequest_render.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_noopresponse_free.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_noopresponse_parse.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_noopresponse_render.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_packet.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_resutil.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_sethostent.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_sethostent_r.3.gz
-OLD_FILES+=usr/share/man/man3/lwres_string_parse.3.gz
-OLD_FILES+=usr/share/man/man5/named.conf.5.gz
-OLD_FILES+=usr/share/man/man5/rndc.conf.5.gz
-OLD_FILES+=usr/share/man/man8/ddns-confgen.8.gz
-OLD_FILES+=usr/share/man/man8/dnssec-dsfromkey.8.gz
-OLD_FILES+=usr/share/man/man8/dnssec-keyfromlabel.8.gz
-OLD_FILES+=usr/share/man/man8/dnssec-keygen.8.gz
-OLD_FILES+=usr/share/man/man8/dnssec-revoke.8.gz
-OLD_FILES+=usr/share/man/man8/dnssec-settime.8.gz
-OLD_FILES+=usr/share/man/man8/dnssec-signzone.8.gz
-OLD_FILES+=usr/share/man/man8/dnssec-verify.8.gz
-OLD_FILES+=usr/share/man/man8/genrandom.8.gz
-OLD_FILES+=usr/share/man/man8/isc-hmac-fixup.8.gz
-OLD_FILES+=usr/share/man/man8/lwresd.8.gz
-OLD_FILES+=usr/share/man/man8/named-checkconf.8.gz
-OLD_FILES+=usr/share/man/man8/named-checkzone.8.gz
-OLD_FILES+=usr/share/man/man8/named-compilezone.8.gz
-OLD_FILES+=usr/share/man/man8/named-journalprint.8.gz
-OLD_FILES+=usr/share/man/man8/named.8.gz
-OLD_FILES+=usr/share/man/man8/named.reconfig.8.gz
-OLD_FILES+=usr/share/man/man8/named.reload.8.gz
-OLD_FILES+=usr/share/man/man8/nsec3hash.8.gz
-OLD_FILES+=usr/share/man/man8/rndc-confgen.8.gz
-OLD_FILES+=usr/share/man/man8/rndc.8.gz
-OLD_DIRS+=var/named/dev
-OLD_DIRS+=var/named/etc
-OLD_DIRS+=var/named/etc/namedb
-OLD_FILES+=var/named/etc/namedb/PROTO.localhost-v6.rev
-OLD_FILES+=var/named/etc/namedb/PROTO.localhost.rev
-OLD_DIRS+=var/named/etc/namedb/dynamic
-OLD_FILES+=var/named/etc/namedb/make-localhost
-OLD_DIRS+=var/named/etc/namedb/master
-OLD_FILES+=var/named/etc/namedb/master/empty.db
-OLD_FILES+=var/named/etc/namedb/master/localhost-forward.db
-OLD_FILES+=var/named/etc/namedb/master/localhost-reverse.db
-#OLD_FILES+=var/named/etc/namedb/named.conf # intentionally left out
-OLD_FILES+=var/named/etc/namedb/named.root
-OLD_DIRS+=var/named/etc/namedb/working
-OLD_DIRS+=var/named/etc/namedb/slave
-OLD_DIRS+=var/named/var
-OLD_DIRS+=var/named/var/dump
-OLD_DIRS+=var/named/var/log
-OLD_DIRS+=var/named/var/run
-OLD_DIRS+=var/named/var/run/named
-OLD_DIRS+=var/named/var/stats
-OLD_DIRS+=var/run/named
-# 20130923: example moved
-OLD_FILES+=usr/share/examples/bsdconfig/browse_packages.sh
-# 20130908: libssh becomes private
-OLD_FILES+=usr/lib/libssh.a
-OLD_FILES+=usr/lib/libssh.so
-OLD_LIBS+=usr/lib/libssh.so.5
-OLD_FILES+=usr/lib/libssh_p.a
-# 20130903: gnupatch is no more
-OLD_FILES+=usr/bin/gnupatch
-OLD_FILES+=usr/share/man/man1/gnupatch.1.gz
-# 20130829: bsdpatch is patch unconditionally
-OLD_FILES+=usr/bin/bsdpatch
-OLD_FILES+=usr/share/man/man1/bsdpatch.1.gz
-# 20130822: bind 9.9.3-P2 import
-OLD_LIBS+=usr/lib/liblwres.so.80
-# 20130814: vm_page_busy(9)
-OLD_FILES+=usr/share/man/man9/vm_page_flash.9.gz
-OLD_FILES+=usr/share/man/man9/vm_page_io.9.gz
-OLD_FILES+=usr/share/man/man9/vm_page_io_finish.9.gz
-OLD_FILES+=usr/share/man/man9/vm_page_io_start.9.gz
-OLD_FILES+=usr/share/man/man9/vm_page_wakeup.9.gz
-# 20130710: libkvm version bump
-OLD_LIBS+=lib/libkvm.so.5
-# 20130623: dialog update from 1.1 to 1.2
-OLD_LIBS+=usr/lib/libdialog.so.7
-# 20130616: vfs_mount.9 removed
-OLD_FILES+=usr/share/man/man9/vfs_mount.9.gz
-# 20130614: remove CVS from base
-OLD_FILES+=usr/bin/cvs
-OLD_FILES+=usr/bin/cvsbug
-OLD_FILES+=usr/share/doc/psd/28.cvs/paper.ascii.gz
-OLD_FILES+=usr/share/doc/psd/28.cvs/paper.ps.gz
-OLD_DIRS+=usr/share/doc/psd/28.cvs
-OLD_FILES+=usr/share/examples/cvs/contrib/README
-OLD_FILES+=usr/share/examples/cvs/contrib/clmerge
-OLD_FILES+=usr/share/examples/cvs/contrib/cln_hist
-OLD_FILES+=usr/share/examples/cvs/contrib/commit_prep
-OLD_FILES+=usr/share/examples/cvs/contrib/cvs2vendor
-OLD_FILES+=usr/share/examples/cvs/contrib/cvs_acls
-OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck
-OLD_FILES+=usr/share/examples/cvs/contrib/cvscheck.man
-OLD_FILES+=usr/share/examples/cvs/contrib/cvshelp.man
-OLD_FILES+=usr/share/examples/cvs/contrib/descend.man
-OLD_FILES+=usr/share/examples/cvs/contrib/easy-import
-OLD_FILES+=usr/share/examples/cvs/contrib/intro.doc
-OLD_FILES+=usr/share/examples/cvs/contrib/log
-OLD_FILES+=usr/share/examples/cvs/contrib/log_accum
-OLD_FILES+=usr/share/examples/cvs/contrib/mfpipe
-OLD_FILES+=usr/share/examples/cvs/contrib/rcs-to-cvs
-OLD_FILES+=usr/share/examples/cvs/contrib/rcs2log
-OLD_FILES+=usr/share/examples/cvs/contrib/rcslock
-OLD_FILES+=usr/share/examples/cvs/contrib/sccs2rcs
-OLD_DIRS+=usr/share/examples/cvs/contrib
-OLD_DIRS+=usr/share/examples/cvs
-OLD_FILES+=usr/share/info/cvs.info.gz
-OLD_FILES+=usr/share/info/cvsclient.info.gz
-OLD_FILES+=usr/share/man/man1/cvs.1.gz
-OLD_FILES+=usr/share/man/man5/cvs.5.gz
-OLD_FILES+=usr/share/man/man8/cvsbug.8.gz
-# 20130607: WITH_DEBUG_FILES added
-OLD_FILES+=lib/libufs.so.6.symbols
-# 20130417: nfs fha moved from nfsserver to nfs
-OLD_FILES+=usr/include/nfsserver/nfs_fha.h
-# 20130411: new clang import which bumps version from 3.2 to 3.3
-OLD_FILES+=usr/include/clang/3.2/__wmmintrin_aes.h
-OLD_FILES+=usr/include/clang/3.2/__wmmintrin_pclmul.h
-OLD_FILES+=usr/include/clang/3.2/altivec.h
-OLD_FILES+=usr/include/clang/3.2/ammintrin.h
-OLD_FILES+=usr/include/clang/3.2/avx2intrin.h
-OLD_FILES+=usr/include/clang/3.2/avxintrin.h
-OLD_FILES+=usr/include/clang/3.2/bmi2intrin.h
-OLD_FILES+=usr/include/clang/3.2/bmiintrin.h
-OLD_FILES+=usr/include/clang/3.2/cpuid.h
-OLD_FILES+=usr/include/clang/3.2/emmintrin.h
-OLD_FILES+=usr/include/clang/3.2/f16cintrin.h
-OLD_FILES+=usr/include/clang/3.2/fma4intrin.h
-OLD_FILES+=usr/include/clang/3.2/fmaintrin.h
-OLD_FILES+=usr/include/clang/3.2/immintrin.h
-OLD_FILES+=usr/include/clang/3.2/lzcntintrin.h
-OLD_FILES+=usr/include/clang/3.2/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.2/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.2/mmintrin.h
-OLD_FILES+=usr/include/clang/3.2/module.map
-OLD_FILES+=usr/include/clang/3.2/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.2/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.2/popcntintrin.h
-OLD_FILES+=usr/include/clang/3.2/rtmintrin.h
-OLD_FILES+=usr/include/clang/3.2/smmintrin.h
-OLD_FILES+=usr/include/clang/3.2/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.2/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.2/x86intrin.h
-OLD_FILES+=usr/include/clang/3.2/xmmintrin.h
-OLD_FILES+=usr/include/clang/3.2/xopintrin.h
-OLD_DIRS+=usr/include/clang/3.2
-# 20130404: legacy ATA stack removed
-OLD_FILES+=etc/periodic/daily/405.status-ata-raid
-OLD_FILES+=rescue/atacontrol
-OLD_FILES+=sbin/atacontrol
-OLD_FILES+=usr/share/man/man8/atacontrol.8.gz
-OLD_FILES+=usr/share/man/man4/atapicam.4.gz
-OLD_FILES+=usr/share/man/man4/ataraid.4.gz
-OLD_FILES+=usr/sbin/burncd
-OLD_FILES+=usr/share/man/man8/burncd.8.gz
-# 20130316: vinum.4 removed
-OLD_FILES+=usr/share/man/man4/vinum.4.gz
-# 20130312: fortunes-o removed
-OLD_FILES+=usr/share/games/fortune/fortunes-o
-OLD_FILES+=usr/share/games/fortune/fortunes-o.dat
-# 20130311: Ports are no more available via cvsup
-OLD_FILES+=usr/share/examples/cvsup/ports-supfile
-OLD_FILES+=usr/share/examples/cvsup/refuse
-OLD_FILES+=usr/share/examples/cvsup/refuse.README
-# 20130309: NWFS and NCP supports removed
-OLD_FILES+=usr/bin/ncplist
-OLD_FILES+=usr/bin/ncplogin
-OLD_FILES+=usr/bin/ncplogout
-OLD_FILES+=usr/include/fs/nwfs/nwfs.h
-OLD_FILES+=usr/include/fs/nwfs/nwfs_mount.h
-OLD_FILES+=usr/include/fs/nwfs/nwfs_node.h
-OLD_FILES+=usr/include/fs/nwfs/nwfs_subr.h
-OLD_DIRS+=usr/include/fs/nwfs
-OLD_FILES+=usr/include/netncp/ncp.h
-OLD_FILES+=usr/include/netncp/ncp_cfg.h
-OLD_FILES+=usr/include/netncp/ncp_conn.h
-OLD_FILES+=usr/include/netncp/ncp_file.h
-OLD_FILES+=usr/include/netncp/ncp_lib.h
-OLD_FILES+=usr/include/netncp/ncp_ncp.h
-OLD_FILES+=usr/include/netncp/ncp_nls.h
-OLD_FILES+=usr/include/netncp/ncp_rcfile.h
-OLD_FILES+=usr/include/netncp/ncp_rq.h
-OLD_FILES+=usr/include/netncp/ncp_sock.h
-OLD_FILES+=usr/include/netncp/ncp_subr.h
-OLD_FILES+=usr/include/netncp/ncp_user.h
-OLD_FILES+=usr/include/netncp/ncpio.h
-OLD_FILES+=usr/include/netncp/nwerror.h
-OLD_DIRS+=usr/include/netncp
-OLD_FILES+=usr/lib/libncp.a
-OLD_FILES+=usr/lib/libncp.so
-OLD_LIBS+=usr/lib/libncp.so.4
-OLD_FILES+=usr/lib/libncp_p.a
-OLD_FILES+=usr/sbin/mount_nwfs
-OLD_FILES+=usr/share/examples/nwclient/dot.nwfsrc
-OLD_FILES+=usr/share/examples/nwclient/nwfs.sh.sample
-OLD_DIRS+=usr/share/examples/nwclient
-OLD_FILES+=usr/share/man/man1/ncplist.1.gz
-OLD_FILES+=usr/share/man/man1/ncplogin.1.gz
-OLD_FILES+=usr/share/man/man1/ncplogout.1.gz
-OLD_FILES+=usr/share/man/man8/mount_nwfs.8.gz
-# 20130302: NTFS support removed
-OLD_FILES+=rescue/mount_ntfs
-OLD_FILES+=sbin/mount_ntfs
-OLD_FILES+=usr/include/fs/ntfs/ntfs.h
-OLD_FILES+=usr/include/fs/ntfs/ntfs_compr.h
-OLD_FILES+=usr/include/fs/ntfs/ntfs_ihash.h
-OLD_FILES+=usr/include/fs/ntfs/ntfs_inode.h
-OLD_FILES+=usr/include/fs/ntfs/ntfs_subr.h
-OLD_FILES+=usr/include/fs/ntfs/ntfs_vfsops.h
-OLD_FILES+=usr/include/fs/ntfs/ntfsmount.h
-OLD_DIRS+=usr/include/fs/ntfs
-OLD_FILES+=usr/share/man/man8/mount_ntfs.8.gz
-# 20130302: PORTALFS support removed
-OLD_FILES+=usr/include/fs/portalfs/portal.h
-OLD_DIRS+=usr/include/fs/portalfs
-OLD_FILES+=usr/sbin/mount_portalfs
-OLD_FILES+=usr/share/examples/portal/README
-OLD_FILES+=usr/share/examples/portal/portal.conf
-OLD_DIRS+=usr/share/examples/portal
-OLD_FILES+=usr/share/man/man8/mount_portalfs.8.gz
-# 20130302: CODAFS support removed
-OLD_FILES+=usr/share/man/man4/coda.4.gz
-# 20130302: XFS support removed
-OLD_FILES+=usr/share/man/man5/xfs.5.gz
-# 20130302: Capsicum overhaul
-OLD_FILES+=usr/share/man/man2/cap_getrights.2.gz
-OLD_FILES+=usr/share/man/man2/cap_new.2.gz
-# 20130213: OpenSSL 1.0.1e import
-OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_verifyrecover.3.gz
-OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_verifyrecover_init.3.gz
-# 20130116: removed long unused directories for .1aout section manpages
-OLD_FILES+=usr/share/man/en.ISO8859-1/man1aout
-OLD_FILES+=usr/share/man/en.UTF-8/man1aout
-OLD_DIRS+=usr/share/man/man1aout
-OLD_DIRS+=usr/share/man/cat1aout
-OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1aout
-OLD_DIRS+=usr/share/man/en.UTF-8/cat1aout
-# 20130103: gnats-supfile removed
-OLD_FILES+=usr/share/examples/cvsup/gnats-supfile
-# 20121230: libdisk removed
-OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h
-OLD_FILES+=usr/lib/libdisk.a
-# 20121230: remove wrongly created directories for auditdistd
-OLD_DIRS+=var/dist
-OLD_DIRS+=var/remote
-# 20121022: remove harp, hfa and idt man page
-OLD_FILES+=usr/share/man/man4/harp.4.gz
-OLD_FILES+=usr/share/man/man4/hfa.4.gz
-OLD_FILES+=usr/share/man/man4/idt.4.gz
-OLD_FILES+=usr/share/man/man4/if_idt.4.gz
-# 20121022: VFS_LOCK_GIANT elimination
-OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz
-OLD_FILES+=usr/share/man/man9/VFS_UNLOCK_GIANT.9.gz
-# 20121004: remove incomplete unwind.h
-OLD_FILES+=usr/include/clang/3.2/unwind.h
-# 20120910: NetBSD compat shims removed
-OLD_FILES+=usr/include/cam/scsi/scsi_low_pisa.h
-OLD_FILES+=usr/include/sys/device_port.h
-# 20120909: doc and www supfiles removed
-OLD_FILES+=usr/share/examples/cvsup/doc-supfile
-OLD_FILES+=usr/share/examples/cvsup/www-supfile
-# 20120908: pf cleanup
-OLD_FILES+=usr/include/net/if_pflow.h
-# 20120816: new clang import which bumps version from 3.1 to 3.2
-OLD_FILES+=usr/bin/llvm-ld
-OLD_FILES+=usr/bin/llvm-stub
-OLD_FILES+=usr/include/clang/3.1/altivec.h
-OLD_FILES+=usr/include/clang/3.1/avx2intrin.h
-OLD_FILES+=usr/include/clang/3.1/avxintrin.h
-OLD_FILES+=usr/include/clang/3.1/bmi2intrin.h
-OLD_FILES+=usr/include/clang/3.1/bmiintrin.h
-OLD_FILES+=usr/include/clang/3.1/cpuid.h
-OLD_FILES+=usr/include/clang/3.1/emmintrin.h
-OLD_FILES+=usr/include/clang/3.1/fma4intrin.h
-OLD_FILES+=usr/include/clang/3.1/immintrin.h
-OLD_FILES+=usr/include/clang/3.1/lzcntintrin.h
-OLD_FILES+=usr/include/clang/3.1/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.1/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.1/mmintrin.h
-OLD_FILES+=usr/include/clang/3.1/module.map
-OLD_FILES+=usr/include/clang/3.1/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.1/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.1/popcntintrin.h
-OLD_FILES+=usr/include/clang/3.1/smmintrin.h
-OLD_FILES+=usr/include/clang/3.1/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.1/unwind.h
-OLD_FILES+=usr/include/clang/3.1/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.1/x86intrin.h
-OLD_FILES+=usr/include/clang/3.1/xmmintrin.h
-OLD_DIRS+=usr/include/clang/3.1
-OLD_FILES+=usr/share/man/man1/llvm-ld.1.gz
-# 20120712: OpenSSL 1.0.1c import
-OLD_LIBS+=lib/libcrypto.so.6
-OLD_LIBS+=usr/lib/libssl.so.6
-OLD_FILES+=usr/include/openssl/aes_locl.h
-OLD_FILES+=usr/include/openssl/bio_lcl.h
-OLD_FILES+=usr/include/openssl/e_os.h
-OLD_FILES+=usr/include/openssl/fips.h
-OLD_FILES+=usr/include/openssl/fips_rand.h
-OLD_FILES+=usr/include/openssl/pq_compat.h
-OLD_FILES+=usr/include/openssl/tmdiff.h
-OLD_FILES+=usr/include/openssl/ui_locl.h
-OLD_FILES+=usr/share/openssl/man/man3/CRYPTO_set_id_callback.3.gz
-# 20120621: remove old man page
-OLD_FILES+=usr/share/man/man8/vnconfig.8.gz
-# 20120619: TOE support updated
-OLD_FILES+=usr/include/netinet/toedev.h
-# 20120613: auth.conf removed
-OLD_FILES+=etc/auth.conf
-OLD_FILES+=usr/share/examples/etc/auth.conf
-OLD_FILES+=usr/share/man/man3/auth.3.gz
-OLD_FILES+=usr/share/man/man3/auth_getval.3.gz
-OLD_FILES+=usr/share/man/man5/auth.conf.5.gz
-# 20120530: kde pam lives now in ports
-OLD_FILES+=etc/pam.d/kde
-# 20120521: byacc import
-OLD_FILES+=usr/bin/yyfix
-OLD_FILES+=usr/share/man/man1/yyfix.1.gz
-# 20120505: new clang import installed a redundant internal header
-OLD_FILES+=usr/include/clang/3.1/stdalign.h
-# 20120428: MD2 removed from libmd
-OLD_LIBS+=lib/libmd.so.5
-OLD_FILES+=usr/include/md2.h
-OLD_FILES+=usr/share/man/man3/MD2Data.3.gz
-OLD_FILES+=usr/share/man/man3/MD2End.3.gz
-OLD_FILES+=usr/share/man/man3/MD2File.3.gz
-OLD_FILES+=usr/share/man/man3/MD2FileChunk.3.gz
-OLD_FILES+=usr/share/man/man3/MD2Final.3.gz
-OLD_FILES+=usr/share/man/man3/MD2Init.3.gz
-OLD_FILES+=usr/share/man/man3/MD2Update.3.gz
-OLD_FILES+=usr/share/man/man3/md2.3.gz
-# 20120425: libusb version bump (r234684)
-OLD_LIBS+=usr/lib/libusb.so.2
-OLD_FILES+=usr/share/man/man3/libsub_get_active_config_descriptor.3.gz
-# 20120415: new clang import which bumps version from 3.0 to 3.1
-OLD_FILES+=usr/include/clang/3.0/altivec.h
-OLD_FILES+=usr/include/clang/3.0/avxintrin.h
-OLD_FILES+=usr/include/clang/3.0/emmintrin.h
-OLD_FILES+=usr/include/clang/3.0/immintrin.h
-OLD_FILES+=usr/include/clang/3.0/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.0/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.0/mmintrin.h
-OLD_FILES+=usr/include/clang/3.0/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.0/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.0/smmintrin.h
-OLD_FILES+=usr/include/clang/3.0/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.0/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.0/x86intrin.h
-OLD_FILES+=usr/include/clang/3.0/xmmintrin.h
-OLD_DIRS+=usr/include/clang/3.0
-# 20120412: BIND 9.8.1 release notes removed
-OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.pdf
-OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.txt
-OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.html
-OLD_FILES+=usr/share/doc/bind9/release-notes.css
-# 20120330: legacy(4) moved to x86
-OLD_FILES+=usr/include/machine/legacyvar.h
-# 20120324: MPI headers updated
-OLD_FILES+=usr/include/dev/mpt/mpilib/mpi_inb.h
-# 20120322: hwpmc_mips24k.h removed
-OLD_FILES+=usr/include/dev/hwpmc/hwpmc_mips24k.h
-# 20120322: Update heimdal to 1.5.1
-OLD_FILES+=usr/include/krb5-v4compat.h \
- usr/include/krb_err.h \
- usr/include/hdb-private.h \
- usr/share/man/man3/krb5_addresses.3.gz \
- usr/share/man/man3/krb5_cc_cursor.3.gz \
- usr/share/man/man3/krb5_cc_ops.3.gz \
- usr/share/man/man3/krb5_config.3.gz \
- usr/share/man/man3/krb5_config_get_int_default.3.gz \
- usr/share/man/man3/krb5_context.3.gz \
- usr/share/man/man3/krb5_data.3.gz \
- usr/share/man/man3/krb5_err.3.gz \
- usr/share/man/man3/krb5_errx.3.gz \
- usr/share/man/man3/krb5_keyblock.3.gz \
- usr/share/man/man3/krb5_keytab_entry.3.gz \
- usr/share/man/man3/krb5_kt_cursor.3.gz \
- usr/share/man/man3/krb5_kt_ops.3.gz \
- usr/share/man/man3/krb5_set_warn_dest.3.gz \
- usr/share/man/man3/krb5_verr.3.gz \
- usr/share/man/man3/krb5_verrx.3.gz \
- usr/share/man/man3/krb5_vwarnx.3.gz \
- usr/share/man/man3/krb5_warn.3.gz \
- usr/share/man/man3/krb5_warnx.3.gz
-OLD_LIBS+=usr/lib/libasn1.so.10 \
- usr/lib/libhdb.so.10 \
- usr/lib/libheimntlm.so.10 \
- usr/lib/libhx509.so.10 \
- usr/lib/libkadm5clnt.so.10 \
- usr/lib/libkadm5srv.so.10 \
- usr/lib/libkafs5.so.10 \
- usr/lib/libkrb5.so.10 \
- usr/lib/libroken.so.10
-# 20120309: Remove fifofs header files
-OLD_FILES+=usr/include/fs/fifofs/fifo.h
-OLD_DIRS+=usr/include/fs/fifofs
-# 20120304: xlocale cleanup
-OLD_FILES+=usr/include/_xlocale_ctype.h
-# 20120225: libarchive 3.0.3
-OLD_FILES+=usr/share/man/man3/archive_read_data_into_buffer.3.gz \
- usr/share/man/man3/archive_read_support_compression_all.3.gz \
- usr/share/man/man3/archive_read_support_compression_bzip2.3.gz \
- usr/share/man/man3/archive_read_support_compression_compress.3.gz \
- usr/share/man/man3/archive_read_support_compression_gzip.3.gz \
- usr/share/man/man3/archive_read_support_compression_lzma.3.gz \
- usr/share/man/man3/archive_read_support_compression_none.3.gz \
- usr/share/man/man3/archive_read_support_compression_program.3.gz \
- usr/share/man/man3/archive_read_support_compression_program_signature.3.gz \
- usr/share/man/man3/archive_read_support_compression_xz.3.gz \
- usr/share/man/man3/archive_write_set_callbacks.3.gz \
- usr/share/man/man3/archive_write_set_compression_bzip2.3.gz \
- usr/share/man/man3/archive_write_set_compression_compress.3.gz \
- usr/share/man/man3/archive_write_set_compression_gzip.3.gz \
- usr/share/man/man3/archive_write_set_compression_none.3.gz \
- usr/share/man/man3/archive_write_set_compression_program.3.gz
-OLD_LIBS+=usr/lib/libarchive.so.5
-# 20120113: removal of wtmpcvt(1)
-OLD_FILES+=usr/bin/wtmpcvt
-OLD_FILES+=usr/share/man/man1/wtmpcvt.1.gz
-# 20111214: eventtimers(7) moved to eventtimers(4)
-OLD_FILES+=usr/share/man/man7/eventtimers.7.gz
-# 20111125: amd(4) removed
-OLD_FILES+=usr/share/man/man4/amd.4.gz
-# 20111125: libodialog removed
-OLD_FILES+=usr/lib/libodialog.a
-OLD_FILES+=usr/lib/libodialog.so
-OLD_LIBS+=usr/lib/libodialog.so.7
-OLD_FILES+=usr/lib/libodialog_p.a
-# 20110930: sysinstall removed
-OLD_FILES+=usr/sbin/sysinstall
-OLD_FILES+=usr/share/man/man8/sysinstall.8.gz
-OLD_FILES+=usr/lib/libftpio.a
-OLD_FILES+=usr/lib/libftpio.so
-OLD_LIBS+=usr/lib/libftpio.so.8
-OLD_FILES+=usr/lib/libftpio_p.a
-OLD_FILES+=usr/include/ftpio.h
-OLD_FILES+=usr/share/man/man3/ftpio.3.gz
-# 20110915: rename congestion control manpages
-OLD_FILES+=usr/share/man/man9/cc.9.gz
-# 20110831: atomic page flags operations
-OLD_FILES+=usr/share/man/man9/vm_page_flag.9.gz
-OLD_FILES+=usr/share/man/man9/vm_page_flag_clear.9.gz
-OLD_FILES+=usr/share/man/man9/vm_page_flag_set.9.gz
-# 20110828: library version bump for 9.0
-OLD_LIBS+=lib/libcam.so.5
-OLD_LIBS+=lib/libpcap.so.7
-OLD_LIBS+=lib/libufs.so.5
-OLD_LIBS+=usr/lib/libbsnmp.so.5
-OLD_LIBS+=usr/lib/libdwarf.so.2
-OLD_LIBS+=usr/lib/libopie.so.6
-OLD_LIBS+=usr/lib/librtld_db.so.1
-OLD_LIBS+=usr/lib/libtacplus.so.4
-# 20110817: no more acd.4, ad.4, afd.4 and ast.4
-OLD_FILES+=usr/share/man/man4/acd.4.gz
-OLD_FILES+=usr/share/man/man4/ad.4.gz
-OLD_FILES+=usr/share/man/man4/afd.4.gz
-OLD_FILES+=usr/share/man/man4/ast.4.gz
-# 20110718: no longer useful in the age of rc.d
-OLD_FILES+=usr/sbin/named.reconfig
-OLD_FILES+=usr/sbin/named.reload
-OLD_FILES+=usr/share/man/man8/named.reconfig.8.gz
-OLD_FILES+=usr/share/man/man8/named.reload.8.gz
-# 20110716: bind 9.8.0 import
-OLD_LIBS+=usr/lib/liblwres.so.50
-OLD_FILES+=usr/share/doc/bind9/KNOWN-DEFECTS
-OLD_FILES+=usr/share/doc/bind9/NSEC3-NOTES
-OLD_FILES+=usr/share/doc/bind9/README.idnkit
-OLD_FILES+=usr/share/doc/bind9/README.pkcs11
-# 20110709: vm_map_clean.9 -> vm_map_sync.9
-OLD_FILES+=usr/share/man/man9/vm_map_clean.9.gz
-# 20110709: Catch up with removal of these functions
-OLD_FILES+=usr/share/man/man9/vm_page_copy.9.gz
-OLD_FILES+=usr/share/man/man9/vm_page_protect.9.gz
-OLD_FILES+=usr/share/man/man9/vm_page_zero_fill.9.gz
-# 20110707: script no longer needed by /etc/rc.d/nfsd
-OLD_FILES+=etc/rc.d/nfsserver
-# 20110705: files moved so both NFS clients can share them
-OLD_FILES+=usr/include/nfsclient/krpc.h
-OLD_FILES+=usr/include/nfsclient/nfsdiskless.h
-# 20110705: the switch of default NFS client to the new one
-OLD_FILES+=sbin/mount_newnfs
-OLD_FILES+=usr/share/man/man8/mount_newnfs.8.gz
-OLD_FILES+=usr/include/nfsclient/nfs_kdtrace.h
-# 20110628: calendar.msk removed
-OLD_FILES+=usr/share/calendar/ru_RU.KOI8-R/calendar.msk
-# 20110517: libpkg removed
-OLD_FILES+=usr/include/pkg.h
-OLD_FILES+=usr/lib/libpkg.a
-OLD_FILES+=usr/lib/libpkg.so
-OLD_LIBS+=usr/lib/libpkg.so.0
-OLD_FILES+=usr/lib/libpkg_p.a
-# 20110517: libsbuf version bump
-OLD_LIBS+=lib/libsbuf.so.5
-# 20110502: new clang import which bumps version from 2.9 to 3.0
-OLD_FILES+=usr/include/clang/2.9/emmintrin.h
-OLD_FILES+=usr/include/clang/2.9/mm_malloc.h
-OLD_FILES+=usr/include/clang/2.9/mmintrin.h
-OLD_FILES+=usr/include/clang/2.9/pmmintrin.h
-OLD_FILES+=usr/include/clang/2.9/tmmintrin.h
-OLD_FILES+=usr/include/clang/2.9/xmmintrin.h
-OLD_DIRS+=usr/include/clang/2.9
-# 20110417: removal of Objective-C support
-OLD_FILES+=usr/include/objc/encoding.h
-OLD_FILES+=usr/include/objc/hash.h
-OLD_FILES+=usr/include/objc/NXConstStr.h
-OLD_FILES+=usr/include/objc/objc-api.h
-OLD_FILES+=usr/include/objc/objc-decls.h
-OLD_FILES+=usr/include/objc/objc-list.h
-OLD_FILES+=usr/include/objc/objc.h
-OLD_FILES+=usr/include/objc/Object.h
-OLD_FILES+=usr/include/objc/Protocol.h
-OLD_FILES+=usr/include/objc/runtime.h
-OLD_FILES+=usr/include/objc/sarray.h
-OLD_FILES+=usr/include/objc/thr.h
-OLD_FILES+=usr/include/objc/typedstream.h
-OLD_FILES+=usr/lib/libobjc.a
-OLD_FILES+=usr/lib/libobjc.so
-OLD_FILES+=usr/lib/libobjc_p.a
-OLD_FILES+=usr/libexec/cc1obj
-OLD_LIBS+=usr/lib/libobjc.so.4
-OLD_DIRS+=usr/include/objc
-# 20110331: firmware.img created at build time
-OLD_FILES+=usr/share/examples/kld/firmware/fwimage/firmware.img
-# 20110224: sticky.8 -> sticky.7
-OLD_FILES+=usr/share/man/man8/sticky.8.gz
-# 20110220: new clang import which bumps version from 2.8 to 2.9
-OLD_FILES+=usr/include/clang/2.8/emmintrin.h
-OLD_FILES+=usr/include/clang/2.8/mm_malloc.h
-OLD_FILES+=usr/include/clang/2.8/mmintrin.h
-OLD_FILES+=usr/include/clang/2.8/pmmintrin.h
-OLD_FILES+=usr/include/clang/2.8/tmmintrin.h
-OLD_FILES+=usr/include/clang/2.8/xmmintrin.h
-OLD_DIRS+=usr/include/clang/2.8
-# 20110119: netinet/sctp_cc_functions.h removed
-OLD_FILES+=usr/include/netinet/sctp_cc_functions.h
-# 20110119: Remove SYSCTL_*X* sysctl additions
-OLD_FILES+=usr/share/man/man9/SYSCTL_XINT.9.gz \
- usr/share/man/man9/SYSCTL_XLONG.9.gz
-
-# 20110112: Update dialog to new version, rename old libdialog to libodialog,
-# removing associated man pages and header files.
-OLD_FILES+=usr/share/man/man3/draw_shadow.3.gz \
- usr/share/man/man3/draw_box.3.gz usr/share/man/man3/line_edit.3.gz \
- usr/share/man/man3/strheight.3.gz usr/share/man/man3/strwidth.3.gz \
- usr/share/man/man3/dialog_create_rc.3.gz \
- usr/share/man/man3/dialog_yesno.3.gz usr/share/man/man3/dialog_noyes.3.gz \
- usr/share/man/man3/dialog_prgbox.3.gz \
- usr/share/man/man3/dialog_textbox.3.gz usr/share/man/man3/dialog_menu.3.gz \
- usr/share/man/man3/dialog_checklist.3.gz \
- usr/share/man/man3/dialog_radiolist.3.gz \
- usr/share/man/man3/dialog_inputbox.3.gz \
- usr/share/man/man3/dialog_clear_norefresh.3.gz \
- usr/share/man/man3/dialog_clear.3.gz usr/share/man/man3/dialog_update.3.gz \
- usr/share/man/man3/dialog_fselect.3.gz \
- usr/share/man/man3/dialog_notify.3.gz \
- usr/share/man/man3/dialog_mesgbox.3.gz \
- usr/share/man/man3/dialog_gauge.3.gz usr/share/man/man3/init_dialog.3.gz \
- usr/share/man/man3/end_dialog.3.gz usr/share/man/man3/use_helpfile.3.gz \
- usr/share/man/man3/use_helpline.3.gz usr/share/man/man3/get_helpline.3.gz \
- usr/share/man/man3/restore_helpline.3.gz \
- usr/share/man/man3/dialog_msgbox.3.gz \
- usr/share/man/man3/dialog_ftree.3.gz usr/share/man/man3/dialog_tree.3.gz \
- usr/share/examples/dialog/README usr/share/examples/dialog/checklist \
- usr/share/examples/dialog/ftreebox usr/share/examples/dialog/infobox \
- usr/share/examples/dialog/inputbox usr/share/examples/dialog/menubox \
- usr/share/examples/dialog/msgbox usr/share/examples/dialog/prgbox \
- usr/share/examples/dialog/radiolist usr/share/examples/dialog/textbox \
- usr/share/examples/dialog/treebox usr/share/examples/dialog/yesno \
- usr/share/examples/libdialog/Makefile usr/share/examples/libdialog/check1.c\
- usr/share/examples/libdialog/check2.c usr/share/examples/libdialog/check3.c\
- usr/share/examples/libdialog/dselect.c \
- usr/share/examples/libdialog/fselect.c \
- usr/share/examples/libdialog/ftree1.c \
- usr/share/examples/libdialog/ftree1.test \
- usr/share/examples/libdialog/ftree2.c \
- usr/share/examples/libdialog/ftree2.test \
- usr/share/examples/libdialog/gauge.c usr/share/examples/libdialog/input1.c \
- usr/share/examples/libdialog/input2.c usr/share/examples/libdialog/menu1.c \
- usr/share/examples/libdialog/menu2.c usr/share/examples/libdialog/menu3.c \
- usr/share/examples/libdialog/msg.c usr/share/examples/libdialog/prgbox.c \
- usr/share/examples/libdialog/radio1.c usr/share/examples/libdialog/radio2.c\
- usr/share/examples/libdialog/radio3.c usr/share/examples/libdialog/text.c \
- usr/share/examples/libdialog/tree.c usr/share/examples/libdialog/yesno.c
-OLD_DIRS+=usr/share/examples/libdialog usr/share/examples/dialog
-# 20101114: Remove long-obsolete MAKEDEV.8
-OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz
-# 20101112: vgonel(9) has gone to private API a while ago
-OLD_FILES+=usr/share/man/man9/vgonel.9.gz
-# 20101112: removed gasp.info
-OLD_FILES+=usr/share/info/gasp.info.gz
-# 20101109: machine/mutex.h removed
-OLD_FILES+=usr/include/machine/mutex.h
-# 20101109: headers moved from machine/ to x86/
-.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/include/machine/mptable.h
-.endif
-# 20101101: headers moved from machine/ to x86/
-.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/include/machine/apicreg.h
-OLD_FILES+=usr/include/machine/mca.h
-.endif
-# 20101020: catch up with vm_page_sleep_if_busy rename
-OLD_FILES+=usr/share/man/man9/vm_page_sleep_busy.9.gz
-# 20101018: taskqueue(9) updates
-OLD_FILES+=usr/share/man/man9/taskqueue_find.9.gz
-# 20101011: removed subblock.h from liblzma
-OLD_FILES+=usr/include/lzma/subblock.h
-# 20101002: removed manpath.config
-OLD_FILES+=etc/manpath.config
-OLD_FILES+=usr/share/examples/etc/manpath.config
-# 20100910: renamed sbuf_overflowed to sbuf_error
-OLD_FILES+=usr/share/man/man9/sbuf_overflowed.9.gz
-# 20100815: retired last traces of chooseproc(9)
-OLD_FILES+=usr/share/man/man9/chooseproc.9.gz
-# 20100806: removal of unused libcompat routines
-OLD_FILES+=usr/share/man/man3/ascftime.3.gz
-OLD_FILES+=usr/share/man/man3/cfree.3.gz
-OLD_FILES+=usr/share/man/man3/cftime.3.gz
-OLD_FILES+=usr/share/man/man3/getpw.3.gz
-# 20100725: acpi_aiboost(4) removal
-OLD_FILES+=usr/share/man/man4/acpi_aiboost.4.gz
-# 20100724: nfsclient/nfs_lock.h moved to nfs/nfs_lock.h
-OLD_FILES+=usr/include/nfsclient/nfs_lock.h
-# 20100720: new clang import which bumps version from 2.0 to 2.8
-OLD_FILES+=usr/include/clang/2.0/emmintrin.h
-OLD_FILES+=usr/include/clang/2.0/mm_malloc.h
-OLD_FILES+=usr/include/clang/2.0/mmintrin.h
-OLD_FILES+=usr/include/clang/2.0/pmmintrin.h
-OLD_FILES+=usr/include/clang/2.0/tmmintrin.h
-OLD_FILES+=usr/include/clang/2.0/xmmintrin.h
-OLD_DIRS+=usr/include/clang/2.0
-# 20100706: removed pc-sysinstall's detect-vmware.sh
-OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-vmware.sh
-# 20100701: [powerpc] removed <machine/intr.h>
-.if ${TARGET_ARCH} == "powerpc"
-OLD_FILES+=usr/include/machine/intr.h
-.endif
-# 20100514: library version bump for versioned symbols for liblzma
-OLD_LIBS+=usr/lib/liblzma.so.0
-# 20100511: move GCC-specific headers to /usr/include/gcc
-.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/include/emmintrin.h
-OLD_FILES+=usr/include/mm_malloc.h
-OLD_FILES+=usr/include/pmmintrin.h
-OLD_FILES+=usr/include/xmmintrin.h
-.endif
-.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "arm"
-OLD_FILES+=usr/include/mmintrin.h
-.endif
-.if ${TARGET_ARCH} == "powerpc"
-OLD_FILES+=usr/include/altivec.h
-OLD_FILES+=usr/include/ppc-asm.h
-OLD_FILES+=usr/include/spe.h
-.endif
-# 20100416: [mips] removed <machine/psl.h>
-.if ${TARGET_ARCH} == "mips"
-OLD_FILES+=usr/include/machine/psl.h
-.endif
-# 20100415: [mips] removed unused headers
-.if ${TARGET_ARCH} == "mips"
-OLD_FILES+=usr/include/machine/archtype.h
-OLD_FILES+=usr/include/machine/segments.h
-OLD_FILES+=usr/include/machine/rm7000.h
-OLD_FILES+=usr/include/machine/defs.h
-OLD_FILES+=usr/include/machine/queue.h
-.endif
-# 20100326: gcpio removal
-OLD_FILES+=usr/bin/gcpio
-OLD_FILES+=usr/share/info/cpio.info.gz
-OLD_FILES+=usr/share/man/man1/gcpio.1.gz
-# 20100322: libz update
-OLD_LIBS+=lib/libz.so.5
-# 20100314: removal of regexp.h
-OLD_FILES+=usr/include/regexp.h
-OLD_FILES+=usr/share/man/man3/regexp.3.gz
-OLD_FILES+=usr/share/man/man3/regsub.3.gz
-# 20100303: actual removal of utmp.h
-OLD_FILES+=usr/include/utmp.h
-# 20100208: man pages moved
-.if ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/share/man/man4/i386/alpm.4.gz
-OLD_FILES+=usr/share/man/man4/i386/amdpm.4.gz
-OLD_FILES+=usr/share/man/man4/i386/mcd.4.gz
-OLD_FILES+=usr/share/man/man4/i386/padlock.4.gz
-OLD_FILES+=usr/share/man/man4/i386/pcf.4.gz
-OLD_FILES+=usr/share/man/man4/i386/scd.4.gz
-OLD_FILES+=usr/share/man/man4/i386/viapm.4.gz
-.endif
-# 20100122: move BSDL bc/dc USD documents to /usr/share/doc/usd
-OLD_FILES+=usr/share/doc/papers/bc.ascii.gz
-OLD_FILES+=usr/share/doc/papers/dc.ascii.gz
-# 20100120: replacing GNU bc/dc with BSDL versions
-OLD_FILES+=usr/share/examples/bc/ckbook.b
-OLD_FILES+=usr/share/examples/bc/pi.b
-OLD_FILES+=usr/share/examples/bc/primes.b
-OLD_FILES+=usr/share/examples/bc/twins.b
-OLD_FILES+=usr/share/info/dc.info.gz
-OLD_DIRS+=usr/share/examples/bc
-# 20100114: removal of ttyslot(3)
-OLD_FILES+=usr/share/man/man3/ttyslot.3.gz
-# 20100113: remove utmp.h, replace it by utmpx.h
-OLD_FILES+=usr/share/man/man3/login.3.gz
-OLD_FILES+=usr/share/man/man3/logout.3.gz
-OLD_FILES+=usr/share/man/man3/logwtmp.3.gz
-OLD_FILES+=usr/share/man/man3/ulog_endutxent.3.gz
-OLD_FILES+=usr/share/man/man3/ulog_getutxent.3.gz
-OLD_FILES+=usr/share/man/man3/ulog_getutxline.3.gz
-OLD_FILES+=usr/share/man/man3/ulog_getutxuser.3.gz
-OLD_FILES+=usr/share/man/man3/ulog_pututxline.3.gz
-OLD_FILES+=usr/share/man/man3/ulog_setutxent.3.gz
-OLD_FILES+=usr/share/man/man3/ulog_setutxfile.3.gz
-OLD_FILES+=usr/share/man/man5/lastlog.5.gz
-OLD_FILES+=usr/share/man/man5/utmp.5.gz
-OLD_FILES+=usr/share/man/man5/wtmp.5.gz
-OLD_LIBS+=lib/libutil.so.8
-# 20100105: new userland semaphore implementation
-OLD_FILES+=usr/include/sys/semaphore.h
-# 20100103: ntptrace(8) removed
-OLD_FILES+=usr/sbin/ntptrace
-OLD_FILES+=usr/share/man/man8/ntptrace.8.gz
-# 20091229: remove no longer relevant examples
-OLD_FILES+=usr/share/examples/pppd/auth-down.sample
-OLD_FILES+=usr/share/examples/pppd/auth-up.sample
-OLD_FILES+=usr/share/examples/pppd/chap-secrets.sample
-OLD_FILES+=usr/share/examples/pppd/chat.sh.sample
-OLD_FILES+=usr/share/examples/pppd/ip-down.sample
-OLD_FILES+=usr/share/examples/pppd/ip-up.sample
-OLD_FILES+=usr/share/examples/pppd/options.sample
-OLD_FILES+=usr/share/examples/pppd/pap-secrets.sample
-OLD_FILES+=usr/share/examples/pppd/ppp.deny.sample
-OLD_FILES+=usr/share/examples/pppd/ppp.shells.sample
-OLD_DIRS+=usr/share/examples/pppd
-OLD_FILES+=usr/share/examples/slattach/unit-command.sh
-OLD_DIRS+=usr/share/examples/slattach
-OLD_FILES+=usr/share/examples/sliplogin/slip.hosts
-OLD_FILES+=usr/share/examples/sliplogin/slip.login
-OLD_FILES+=usr/share/examples/sliplogin/slip.logout
-OLD_FILES+=usr/share/examples/sliplogin/slip.slparms
-OLD_DIRS+=usr/share/examples/sliplogin
-OLD_FILES+=usr/share/examples/startslip/sldown.sh
-OLD_FILES+=usr/share/examples/startslip/slip.sh
-OLD_FILES+=usr/share/examples/startslip/slup.sh
-OLD_DIRS+=usr/share/examples/startslip
-# 20091202: unify rc.firewall and rc.firewall6
-OLD_FILES+=etc/rc.d/ip6fw
-OLD_FILES+=etc/rc.firewall6
-OLD_FILES+=usr/share/examples/etc/rc.firewall6
-# 20091117: removal of rc.early(8) link
-OLD_FILES+=usr/share/man/man8/rc.early.8.gz
-# 20091027: pselect.3 implemented as syscall
-OLD_FILES+=usr/share/man/man3/pselect.3.gz
-# 20091005: fusword.9 and susword.9 removed
-OLD_FILES+=usr/share/man/man9/fusword.9.gz
-OLD_FILES+=usr/share/man/man9/susword.9.gz
-# 20090909: vesa and dpms promoted to be i386/amd64 common
-OLD_FILES+=usr/include/machine/pc/vesa.h
-OLD_FILES+=usr/share/man/man4/i386/dpms.4.gz
-# 20090904: remove lukemftpd
-OLD_FILES+=usr/libexec/lukemftpd
-OLD_FILES+=usr/share/man/man5/ftpd.conf.5.gz
-OLD_FILES+=usr/share/man/man5/ftpusers.5.gz
-OLD_FILES+=usr/share/man/man8/lukemftpd.8.gz
-# 20090902: BSD.{x11,x11-4}.dist are dead and BSD.local.dist lives in ports/
-OLD_FILES+=etc/mtree/BSD.local.dist
-OLD_FILES+=etc/mtree/BSD.x11.dist
-OLD_FILES+=etc/mtree/BSD.x11-4.dist
-# 20090812: net80211 documentation overhaul
-OLD_FILES+=usr/share/man/man9/ieee80211_add_rates.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_add_xrates.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_alloc_node.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_attach.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_begin_scan.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_cfgget.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_cfgset.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_chan2ieee.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_chan2mode.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_create_ibss.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_crypto_attach.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_crypto_detach.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_decap.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_dump_pkt.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_dup_bss.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_encap.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_end_scan.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_find_node.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_fix_rate.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_free_allnodes.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_ieee2mhz.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_ioctl.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_lookup_node.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_media2rate.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_media_change.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_media_init.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_media_status.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_mhz2ieee.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_next_scan.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_node_attach.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_node_detach.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_node_lateattach.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_print_essid.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_proto_attach.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_proto_detach.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_rate2media.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_recv_mgmt.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_send_mgmt.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_setmode.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_timeout_nodes.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_watchdog.9.gz
-OLD_FILES+=usr/share/man/man9/ieee80211_wep_crypt.9.gz
-# 20090801: vimage.h removed in favour of vnet.h
-OLD_FILES+=usr/include/sys/vimage.h
-# 20101208: libbsnmp was moved to usr/lib
-MOVED_LIBS+=lib/libbsnmp.so.5
-# 20090719: library version bump for 8.0
-OLD_LIBS+=lib/libalias.so.6
-OLD_LIBS+=lib/libavl.so.1
-OLD_LIBS+=lib/libbegemot.so.3
-OLD_LIBS+=lib/libbsdxml.so.3
-OLD_LIBS+=lib/libbsnmp.so.4
-OLD_LIBS+=lib/libcam.so.4
-OLD_LIBS+=lib/libcrypt.so.4
-OLD_LIBS+=lib/libcrypto.so.5
-OLD_LIBS+=lib/libctf.so.1
-OLD_LIBS+=lib/libdevstat.so.6
-OLD_LIBS+=lib/libdtrace.so.1
-OLD_LIBS+=lib/libedit.so.6
-OLD_LIBS+=lib/libgeom.so.4
-OLD_LIBS+=lib/libipsec.so.3
-OLD_LIBS+=lib/libipx.so.4
-OLD_LIBS+=lib/libkiconv.so.3
-OLD_LIBS+=lib/libkvm.so.4
-OLD_LIBS+=lib/libmd.so.4
-OLD_LIBS+=lib/libncurses.so.7
-OLD_LIBS+=lib/libncursesw.so.7
-OLD_LIBS+=lib/libnvpair.so.1
-OLD_LIBS+=lib/libpcap.so.6
-OLD_LIBS+=lib/libreadline.so.7
-OLD_LIBS+=lib/libsbuf.so.4
-OLD_LIBS+=lib/libufs.so.4
-OLD_LIBS+=lib/libumem.so.1
-OLD_LIBS+=lib/libutil.so.7
-OLD_LIBS+=lib/libuutil.so.1
-OLD_LIBS+=lib/libz.so.4
-OLD_LIBS+=lib/libzfs.so.1
-OLD_LIBS+=lib/libzpool.so.1
-OLD_LIBS+=usr/lib/libarchive.so.4
-OLD_LIBS+=usr/lib/libauditd.so.4
-OLD_LIBS+=usr/lib/libbluetooth.so.3
-OLD_LIBS+=usr/lib/libbsm.so.2
-OLD_LIBS+=usr/lib/libbz2.so.3
-OLD_LIBS+=usr/lib/libcalendar.so.4
-OLD_LIBS+=usr/lib/libcom_err.so.4
-OLD_LIBS+=usr/lib/libdevinfo.so.4
-OLD_LIBS+=usr/lib/libdialog.so.6
-OLD_LIBS+=usr/lib/libdwarf.so.1
-OLD_LIBS+=usr/lib/libfetch.so.5
-OLD_LIBS+=usr/lib/libform.so.4
-OLD_LIBS+=usr/lib/libformw.so.4
-OLD_LIBS+=usr/lib/libftpio.so.7
-OLD_LIBS+=usr/lib/libgnuregex.so.4
-OLD_LIBS+=usr/lib/libgpib.so.2
-OLD_LIBS+=usr/lib/libhistory.so.7
-OLD_LIBS+=usr/lib/libmagic.so.3
-OLD_LIBS+=usr/lib/libmemstat.so.2
-OLD_LIBS+=usr/lib/libmenu.so.4
-OLD_LIBS+=usr/lib/libmenuw.so.4
-OLD_LIBS+=usr/lib/libmilter.so.4
-OLD_LIBS+=usr/lib/libncp.so.3
-OLD_LIBS+=usr/lib/libnetgraph.so.3
-OLD_LIBS+=usr/lib/libngatm.so.3
-OLD_LIBS+=usr/lib/libobjc.so.3
-OLD_LIBS+=usr/lib/libopie.so.5
-OLD_LIBS+=usr/lib/libpam.so.4
-OLD_LIBS+=usr/lib/libpanel.so.4
-OLD_LIBS+=usr/lib/libpanelw.so.4
-OLD_LIBS+=usr/lib/libpmc.so.4
-OLD_LIBS+=usr/lib/libproc.so.1
-OLD_LIBS+=usr/lib/libradius.so.3
-OLD_LIBS+=usr/lib/librpcsvc.so.4
-OLD_LIBS+=usr/lib/libsdp.so.3
-OLD_LIBS+=usr/lib/libsmb.so.3
-OLD_LIBS+=usr/lib/libssh.so.4
-OLD_LIBS+=usr/lib/libssl.so.5
-OLD_LIBS+=usr/lib/libtacplus.so.3
-OLD_LIBS+=usr/lib/libugidfw.so.3
-OLD_LIBS+=usr/lib/libusb.so.1
-OLD_LIBS+=usr/lib/libusbhid.so.3
-OLD_LIBS+=usr/lib/libvgl.so.5
-OLD_LIBS+=usr/lib/libwrap.so.5
-OLD_LIBS+=usr/lib/libypclnt.so.3
-OLD_LIBS+=usr/lib/pam_chroot.so.4
-OLD_LIBS+=usr/lib/pam_deny.so.4
-OLD_LIBS+=usr/lib/pam_echo.so.4
-OLD_LIBS+=usr/lib/pam_exec.so.4
-OLD_LIBS+=usr/lib/pam_ftpusers.so.4
-OLD_LIBS+=usr/lib/pam_group.so.4
-OLD_LIBS+=usr/lib/pam_guest.so.4
-OLD_LIBS+=usr/lib/pam_krb5.so.4
-OLD_LIBS+=usr/lib/pam_ksu.so.4
-OLD_LIBS+=usr/lib/pam_lastlog.so.4
-OLD_LIBS+=usr/lib/pam_login_access.so.4
-OLD_LIBS+=usr/lib/pam_nologin.so.4
-OLD_LIBS+=usr/lib/pam_opie.so.4
-OLD_LIBS+=usr/lib/pam_opieaccess.so.4
-OLD_LIBS+=usr/lib/pam_passwdqc.so.4
-OLD_LIBS+=usr/lib/pam_permit.so.4
-OLD_LIBS+=usr/lib/pam_radius.so.4
-OLD_LIBS+=usr/lib/pam_rhosts.so.4
-OLD_LIBS+=usr/lib/pam_rootok.so.4
-OLD_LIBS+=usr/lib/pam_securetty.so.4
-OLD_LIBS+=usr/lib/pam_self.so.4
-OLD_LIBS+=usr/lib/pam_ssh.so.4
-OLD_LIBS+=usr/lib/pam_tacplus.so.4
-OLD_LIBS+=usr/lib/pam_unix.so.4
-OLD_LIBS+=usr/lib/snmp_atm.so.5
-OLD_LIBS+=usr/lib/snmp_bridge.so.5
-OLD_LIBS+=usr/lib/snmp_hostres.so.5
-OLD_LIBS+=usr/lib/snmp_mibII.so.5
-OLD_LIBS+=usr/lib/snmp_netgraph.so.5
-OLD_LIBS+=usr/lib/snmp_pf.so.5
-# 20090718: the gdm pam.d file is no longer required
-OLD_FILES+=etc/pam.d/gdm
-# 20090714: net_add_domain(9) renamed to domain_add(9)
-OLD_FILES+=usr/share/man/man9/net_add_domain.9.gz
-# 20090713: vimage container structs removed
-OLD_FILES+=usr/include/netinet/vinet.h
-OLD_FILES+=usr/include/netinet6/vinet6.h
-OLD_FILES+=usr/include/netipsec/vipsec.h
-# 20090712: ieee80211.4 -> net80211.4
-OLD_FILES+=usr/share/man/man4/ieee80211.4.gz
-# 20090711: typo fixed, kproc_resume,.9 -> kproc_resume.9
-OLD_FILES+=usr/share/man/man9/kproc_resume,.9.gz
-# 20090709: msgctl.3 msgget.3 msgrcv.3 msgsnd.3 manual pages moved
-OLD_FILES+=usr/share/man/man3/msgctl.3.gz
-OLD_FILES+=usr/share/man/man3/msgget.3.gz
-OLD_FILES+=usr/share/man/man3/msgrcv.3.gz
-OLD_FILES+=usr/share/man/man3/msgsnd.3.gz
-# 20090630: old kernel RPC implementation removal
-OLD_FILES+=usr/include/nfs/rpcv2.h
-# 20090624: update usbdi(9)
-OLD_FILES+=usr/share/man/man9/usbd_abort_default_pipe.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_abort_pipe.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_alloc_buffer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_alloc_xfer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_stall.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_stall_async.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_clear_endpoint_toggle.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_close_pipe.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_device2interface_handle.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_do_request_async.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_do_request_flags_pipe.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_endpoint_count.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_find_edesc.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_find_idesc.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_free_buffer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_free_xfer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_buffer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_config.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_config_desc.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_config_desc_full.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_config_descriptor.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_device_descriptor.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_endpoint_descriptor.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_interface_altindex.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_interface_descriptor.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_no_alts.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_quirks.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_speed.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_string.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_string_desc.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_get_xfer_status.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_interface2device_handle.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_interface2endpoint_descriptor.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_interface_count.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_open_pipe.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_open_pipe_intr.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_pipe2device_handle.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_set_config_index.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_set_config_no.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_set_interface.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_setup_default_xfer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_setup_isoc_xfer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_setup_xfer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_sync_transfer.9.gz
-OLD_FILES+=usr/share/man/man9/usbd_transfer.9.gz
-OLD_FILES+=usr/share/man/man9/usb_find_desc.9.gz
-# 20090623: number of headers needed for a usb driver reduced
-OLD_FILES+=usr/include/dev/usb/usb_defs.h
-OLD_FILES+=usr/include/dev/usb/usb_error.h
-OLD_FILES+=usr/include/dev/usb/usb_handle_request.h
-OLD_FILES+=usr/include/dev/usb/usb_hid.h
-OLD_FILES+=usr/include/dev/usb/usb_lookup.h
-OLD_FILES+=usr/include/dev/usb/usb_mfunc.h
-OLD_FILES+=usr/include/dev/usb/usb_parse.h
-OLD_FILES+=usr/include/dev/usb/usb_revision.h
-# 20090609: devclass_add_driver is no longer public
-OLD_FILES+=usr/share/man/man9/devclass_add_driver.9.gz
-OLD_FILES+=usr/share/man/man9/devclass_delete_driver.9.gz
-OLD_FILES+=usr/share/man/man9/devclass_find_driver.9.gz
-# 20090605: removal of clists
-OLD_FILES+=usr/include/sys/clist.h
-# 20090602: removal of window(1)
-OLD_FILES+=usr/bin/window
-OLD_FILES+=usr/share/man/man1/window.1.gz
-# 20090531: bind 9.6.1rc1 import
-OLD_LIBS+=usr/lib/liblwres.so.30
-# 20090530: removal of early.sh
-OLD_FILES+=etc/rc.d/early.sh
-# 20090527: renaming of S{LIST,TAILQ}_REMOVE_NEXT() to _REMOVE_AFTER()
-OLD_FILES+=usr/share/man/man3/SLIST_REMOVE_NEXT.3.gz
-OLD_FILES+=usr/share/man/man3/STAILQ_REMOVE_NEXT.3.gz
-# 20090527: removal of legacy USB stack
-OLD_FILES+=usr/include/legacy/dev/usb/dsbr100io.h
-OLD_FILES+=usr/include/legacy/dev/usb/ehcireg.h
-OLD_FILES+=usr/include/legacy/dev/usb/ehcivar.h
-OLD_FILES+=usr/include/legacy/dev/usb/hid.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_urtwreg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_urtwvar.h
-OLD_FILES+=usr/include/legacy/dev/usb/ohcireg.h
-OLD_FILES+=usr/include/legacy/dev/usb/ohcivar.h
-OLD_FILES+=usr/include/legacy/dev/usb/rio500_usb.h
-OLD_FILES+=usr/include/legacy/dev/usb/rt2573_ucode.h
-OLD_FILES+=usr/include/legacy/dev/usb/sl811hsreg.h
-OLD_FILES+=usr/include/legacy/dev/usb/sl811hsvar.h
-OLD_FILES+=usr/include/legacy/dev/usb/ubser.h
-OLD_FILES+=usr/include/legacy/dev/usb/ucomvar.h
-OLD_FILES+=usr/include/legacy/dev/usb/udbp.h
-OLD_FILES+=usr/include/legacy/dev/usb/uftdireg.h
-OLD_FILES+=usr/include/legacy/dev/usb/ugraphire_rdesc.h
-OLD_FILES+=usr/include/legacy/dev/usb/uhcireg.h
-OLD_FILES+=usr/include/legacy/dev/usb/uhcivar.h
-OLD_FILES+=usr/include/legacy/dev/usb/usb.h
-OLD_FILES+=usr/include/legacy/dev/usb/usb_mem.h
-OLD_FILES+=usr/include/legacy/dev/usb/usb_port.h
-OLD_FILES+=usr/include/legacy/dev/usb/usb_quirks.h
-OLD_FILES+=usr/include/legacy/dev/usb/usbcdc.h
-OLD_FILES+=usr/include/legacy/dev/usb/usbdi.h
-OLD_FILES+=usr/include/legacy/dev/usb/usbdi_util.h
-OLD_FILES+=usr/include/legacy/dev/usb/usbdivar.h
-OLD_FILES+=usr/include/legacy/dev/usb/usbhid.h
-OLD_FILES+=usr/include/legacy/dev/usb/uxb360gp_rdesc.h
-OLD_DIRS+=usr/include/legacy/dev/usb
-OLD_DIRS+=usr/include/legacy/dev
-OLD_DIRS+=usr/include/legacy
-# 20090526: removal of makekey(8)
-OLD_FILES+=usr/libexec/makekey
-OLD_FILES+=usr/share/man/man8/makekey.8.gz
-# 20090522: removal of University of Michigan NFSv4 client
-OLD_FILES+=etc/rc.d/idmapd
-OLD_FILES+=sbin/idmapd
-OLD_FILES+=sbin/mount_nfs4
-OLD_FILES+=usr/share/man/man8/idmapd.8.gz
-OLD_FILES+=usr/share/man/man8/mount_nfs4.8.gz
-# 20090513: removal of legacy versions of USB network interface drivers
-OLD_FILES+=usr/include/legacy/dev/usb/if_upgtvar.h
-OLD_FILES+=usr/include/legacy/dev/usb/usb_ethersubr.h
-# 20090417: removal of legacy versions of USB network interface drivers
-OLD_FILES+=usr/include/legacy/dev/usb/if_auereg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_axereg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_cdcereg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_cuereg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_kuereg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_ruereg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_rumreg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_rumvar.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_udavreg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_uralreg.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_uralvar.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_zydfw.h
-OLD_FILES+=usr/include/legacy/dev/usb/if_zydreg.h
-OLD_FILES+=usr/include/legacy/dev/usb/kue_fw.h
-# 20090416: removal of ar(4), ray(4), sr(4), raycontrol(8)
-OLD_FILES+=usr/sbin/raycontrol
-OLD_FILES+=usr/share/man/man4/i386/ar.4.gz
-OLD_FILES+=usr/share/man/man4/i386/ray.4.gz
-OLD_FILES+=usr/share/man/man4/i386/sr.4.gz
-OLD_FILES+=usr/share/man/man8/raycontrol.8.gz
-# 20090410: VOP_LEASE.9 removed
-OLD_FILES+=usr/share/man/man9/VOP_LEASE.9.gz
-# 20090406: usb_sw_transfer.h removed
-OLD_FILES+=usr/include/dev/usb/usb_sw_transfer.h
-# 20090405: removal of if_ppp(4) and if_sl(4)
-OLD_FILES+=sbin/slattach rescue/slattach
-OLD_FILES+=sbin/startslip rescue/startslip
-OLD_FILES+=usr/include/net/if_ppp.h
-OLD_FILES+=usr/include/net/if_pppvar.h
-OLD_FILES+=usr/include/net/if_slvar.h
-OLD_FILES+=usr/include/net/ppp_comp.h
-OLD_FILES+=usr/include/net/slip.h
-OLD_FILES+=usr/sbin/sliplogin
-OLD_FILES+=usr/sbin/slstat
-OLD_FILES+=usr/sbin/pppd
-OLD_FILES+=usr/sbin/pppstats
-OLD_FILES+=usr/share/man/man1/startslip.1.gz
-OLD_FILES+=usr/share/man/man4/if_ppp.4.gz
-OLD_FILES+=usr/share/man/man4/if_sl.4.gz
-OLD_FILES+=usr/share/man/man4/ppp.4.gz
-OLD_FILES+=usr/share/man/man4/sl.4.gz
-OLD_FILES+=usr/share/man/man8/pppd.8.gz
-OLD_FILES+=usr/share/man/man8/pppstats.8.gz
-OLD_FILES+=usr/share/man/man8/slattach.8.gz
-OLD_FILES+=usr/share/man/man8/slip.8.gz
-OLD_FILES+=usr/share/man/man8/sliplogin.8.gz
-OLD_FILES+=usr/share/man/man8/slstat.8.gz
-# 20090321: libpcap upgraded to 1.0.0
-OLD_LIBS+=lib/libpcap.so.5
-# 20090319: uscanner(4) has been removed
-OLD_FILES+=usr/share/man/man4/uscanner.4.gz
-# 20090313: k8temp(4) renamed to amdtemp(4)
-OLD_FILES+=usr/share/man/man4/k8temp.4.gz
-# 20090308: libusb.so.1 renamed
-OLD_LIBS+=usr/lib/libusb20.so.1
-OLD_FILES+=usr/lib/libusb20.a
-OLD_FILES+=usr/lib/libusb20.so
-OLD_FILES+=usr/lib/libusb20_p.a
-OLD_FILES+=usr/include/libusb20_compat01.h
-OLD_FILES+=usr/include/libusb20_compat10.h
-# 20090226: libmp(3) functions renamed
-OLD_LIBS+=usr/lib/libmp.so.6
-# 20090223: changeover of USB stacks
-OLD_FILES+=usr/include/dev/usb2/include/ufm2_ioctl.h
-OLD_FILES+=usr/include/dev/usb2/include/urio2_ioctl.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_cdc.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_defs.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_devid.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_devtable.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_endian.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_error.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_hid.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_ioctl.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_mfunc.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_revision.h
-OLD_FILES+=usr/include/dev/usb2/include/usb2_standard.h
-OLD_DIRS+=usr/include/dev/usb2/include
-OLD_DIRS+=usr/include/dev/usb2
-OLD_FILES+=usr/include/dev/usb/dsbr100io.h
-OLD_FILES+=usr/include/dev/usb/ehcireg.h
-OLD_FILES+=usr/include/dev/usb/ehcivar.h
-OLD_FILES+=usr/include/dev/usb/hid.h
-OLD_FILES+=usr/include/dev/usb/if_auereg.h
-OLD_FILES+=usr/include/dev/usb/if_axereg.h
-OLD_FILES+=usr/include/dev/usb/if_cdcereg.h
-OLD_FILES+=usr/include/dev/usb/if_cuereg.h
-OLD_FILES+=usr/include/dev/usb/if_kuereg.h
-OLD_FILES+=usr/include/dev/usb/if_ruereg.h
-OLD_FILES+=usr/include/dev/usb/if_rumreg.h
-OLD_FILES+=usr/include/dev/usb/if_rumvar.h
-OLD_FILES+=usr/include/dev/usb/if_udavreg.h
-OLD_FILES+=usr/include/dev/usb/if_upgtvar.h
-OLD_FILES+=usr/include/dev/usb/if_uralreg.h
-OLD_FILES+=usr/include/dev/usb/if_uralvar.h
-OLD_FILES+=usr/include/dev/usb/if_urtwreg.h
-OLD_FILES+=usr/include/dev/usb/if_urtwvar.h
-OLD_FILES+=usr/include/dev/usb/if_zydfw.h
-OLD_FILES+=usr/include/dev/usb/if_zydreg.h
-OLD_FILES+=usr/include/dev/usb/kue_fw.h
-OLD_FILES+=usr/include/dev/usb/ohcireg.h
-OLD_FILES+=usr/include/dev/usb/ohcivar.h
-OLD_FILES+=usr/include/dev/usb/rio500_usb.h
-OLD_FILES+=usr/include/dev/usb/rt2573_ucode.h
-OLD_FILES+=usr/include/dev/usb/sl811hsreg.h
-OLD_FILES+=usr/include/dev/usb/sl811hsvar.h
-OLD_FILES+=usr/include/dev/usb/ubser.h
-OLD_FILES+=usr/include/dev/usb/ucomvar.h
-OLD_FILES+=usr/include/dev/usb/udbp.h
-OLD_FILES+=usr/include/dev/usb/uftdireg.h
-OLD_FILES+=usr/include/dev/usb/ugraphire_rdesc.h
-OLD_FILES+=usr/include/dev/usb/uhcireg.h
-OLD_FILES+=usr/include/dev/usb/uhcivar.h
-OLD_FILES+=usr/include/dev/usb/usb_ethersubr.h
-OLD_FILES+=usr/include/dev/usb/usb_mem.h
-OLD_FILES+=usr/include/dev/usb/usb_port.h
-OLD_FILES+=usr/include/dev/usb/usb_quirks.h
-OLD_FILES+=usr/include/dev/usb/usbcdc.h
-OLD_FILES+=usr/include/dev/usb/usbdivar.h
-OLD_FILES+=usr/include/dev/usb/uxb360gp_rdesc.h
-OLD_FILES+=usr/sbin/usbdevs
-OLD_FILES+=usr/share/man/man8/usbdevs.8.gz
-# 20090203: removal of pccard header files
-OLD_FILES+=usr/include/pccard/cardinfo.h
-OLD_FILES+=usr/include/pccard/cis.h
-OLD_DIRS+=usr/include/pccard
-# 20090203: adding_user.8 moved to adding_user.7
-OLD_FILES+=usr/share/man/man8/adding_user.8.gz
-# 20090102: file 4.26 import
-OLD_FILES+=usr/share/misc/magic.mime
-OLD_FILES+=usr/share/misc/magic.mime.mgc
-# 20081223: bind 9.4.3 import, nsupdate.8 moved to nsupdate.1
-OLD_FILES+=usr/share/man/man8/nsupdate.8.gz
-# 20081223: ipprotosw.h removed
-OLD_FILES+=usr/include/netinet/ipprotosw.h
-# 20081123: vfs_mountedon.9 removed
-OLD_FILES+=usr/share/man/man9/vfs_mountedon.9.gz
-# 20081023: FREE.9 and MALLOC.9 removed
-OLD_FILES+=usr/share/man/man9/FREE.9.gz
-OLD_FILES+=usr/share/man/man9/MALLOC.9.gz
-# 20080928: removal of inaccurate device_ids(9) manual page
-OLD_FILES+=usr/share/man/man9/device_ids.9.gz
-OLD_FILES+=usr/share/man/man9/major.9.gz
-OLD_FILES+=usr/share/man/man9/minor.9.gz
-OLD_FILES+=usr/share/man/man9/umajor.9.gz
-OLD_FILES+=usr/share/man/man9/uminor.9.gz
-# 20080917: removal of manpage for axed kernel primitive suser(9)
-OLD_FILES+=usr/share/man/man9/suser.9.gz
-OLD_FILES+=usr/share/man/man9/suser_cred.9.gz
-# 20080913: pax removed from rescue
-OLD_FILES+=rescue/pax
-# 20080823: removal of unneeded pt_chown, to implement grantpt(3)
-OLD_FILES+=usr/libexec/pt_chown
-# 20080822: ntp 4.2.4p5 import
-OLD_FILES+=usr/share/doc/ntp/driver23.html
-OLD_FILES+=usr/share/doc/ntp/driver24.html
-# 20080821: several man pages moved from man4.i386 to man4
-.if ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/share/man/man4/i386/acpi_aiboost.4.gz
-OLD_FILES+=usr/share/man/man4/i386/acpi_asus.4.gz
-OLD_FILES+=usr/share/man/man4/i386/acpi_fujitsu.4.gz
-OLD_FILES+=usr/share/man/man4/i386/acpi_ibm.4.gz
-OLD_FILES+=usr/share/man/man4/i386/acpi_panasonic.4.gz
-OLD_FILES+=usr/share/man/man4/i386/acpi_sony.4.gz
-OLD_FILES+=usr/share/man/man4/i386/acpi_toshiba.4.gz
-OLD_FILES+=usr/share/man/man4/i386/ichwd.4.gz
-OLD_FILES+=usr/share/man/man4/i386/if_ndis.4.gz
-OLD_FILES+=usr/share/man/man4/i386/io.4.gz
-OLD_FILES+=usr/share/man/man4/i386/linux.4.gz
-OLD_FILES+=usr/share/man/man4/i386/ndis.4.gz
-.endif
-# 20080820: MPSAFE TTY layer integrated
-OLD_FILES+=usr/include/sys/linedisc.h
-OLD_FILES+=usr/share/man/man3/posix_openpt.3.gz
-# 20080725: sgtty.h removed
-OLD_FILES+=usr/include/sgtty.h
-# 20080706: bsdlabel(8) removed on powerpc
-.if ${TARGET_ARCH} == "powerpc"
-OLD_FILES+=sbin/bsdlabel
-OLD_FILES+=usr/share/man/man8/bsdlabel.8.gz
-.endif
-# 20080704: sbsh(4) removed
-OLD_FILES+=usr/share/man/man4/if_sbsh.4.gz
-OLD_FILES+=usr/share/man/man4/sbsh.4.gz
-# 20080704: cnw(4) removed
-OLD_FILES+=usr/share/man/man4/if_cnw.4.gz
-OLD_FILES+=usr/share/man/man4/cnw.4.gz
-# 20080704: oltr(4) removed
-.if ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/share/man/man4/i386/if_oltr.4.gz
-OLD_FILES+=usr/share/man/man4/i386/oltr.4.gz
-.endif
-# 20080704: arl(4) removed
-.if ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/sbin/arlcontrol
-OLD_FILES+=usr/share/man/man4/i386/arl.4.gz
-OLD_FILES+=usr/share/man/man8/arlcontrol.8.gz
-.endif
-# 20080703: sunlabel only for sparc64
-.if ${TARGET_ARCH} != "sparc64"
-OLD_FILES+=sbin/sunlabel
-OLD_FILES+=usr/share/man/man8/sunlabel.8.gz
-.endif
-# 20080701: wpa_supplicant.conf moved to share/examples/etc/
-OLD_FILES+=usr/share/examples/wpa_supplicant/wpa_supplicant.conf
-OLD_DIRS+=usr/share/examples/wpa_supplicant
-# 20080614: pecoff image activator removed
-.if ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/include/machine/pecoff_machdep.h
-.endif
-# 20080614: sgtty removed
-OLD_FILES+=usr/include/sys/ttychars.h
-OLD_FILES+=usr/include/sys/ttydev.h
-OLD_FILES+=usr/share/man/man3/gtty.3.gz
-OLD_FILES+=usr/share/man/man3/stty.3.gz
-# 20080609: gpt(8) removed
-OLD_FILES+=sbin/gpt
-OLD_FILES+=usr/share/man/man8/gpt.8.gz
-# 20080525: I4B removed
-OLD_FILES+=etc/isdn/answer
-OLD_FILES+=etc/isdn/isdntel
-OLD_FILES+=etc/isdn/record
-OLD_FILES+=etc/isdn/tell
-OLD_FILES+=etc/isdn/tell-record
-OLD_FILES+=etc/isdn/unknown_incoming
-OLD_FILES+=etc/isdn/holidays.D
-OLD_FILES+=etc/isdn/isdnd.rates.A
-OLD_FILES+=etc/isdn/isdnd.rates.D
-OLD_FILES+=etc/isdn/isdnd.rates.F
-OLD_FILES+=etc/isdn/isdnd.rates.L
-OLD_FILES+=etc/isdn/isdnd.rates.UK.BT
-OLD_FILES+=etc/isdn/isdnd.rc.sample
-OLD_FILES+=etc/isdn/isdntel.alias.sample
-OLD_DIRS+=etc/isdn
-OLD_FILES+=etc/rc.d/isdnd
-OLD_FILES+=usr/include/i4b/i4b_cause.h
-OLD_FILES+=usr/include/i4b/i4b_debug.h
-OLD_FILES+=usr/include/i4b/i4b_ioctl.h
-OLD_FILES+=usr/include/i4b/i4b_rbch_ioctl.h
-OLD_FILES+=usr/include/i4b/i4b_tel_ioctl.h
-OLD_FILES+=usr/include/i4b/i4b_trace.h
-OLD_DIRS+=usr/include/i4b
-OLD_FILES+=usr/sbin/dtmfdecode
-OLD_FILES+=usr/sbin/g711conv
-OLD_FILES+=usr/sbin/isdnd
-OLD_FILES+=usr/sbin/isdndebug
-OLD_FILES+=usr/sbin/isdndecode
-OLD_FILES+=usr/sbin/isdnmonitor
-OLD_FILES+=usr/sbin/isdnphone
-OLD_FILES+=usr/sbin/isdntel
-OLD_FILES+=usr/sbin/isdntelctl
-OLD_FILES+=usr/sbin/isdntrace
-OLD_FILES+=usr/share/isdn/0.al
-OLD_FILES+=usr/share/isdn/1.al
-OLD_FILES+=usr/share/isdn/2.al
-OLD_FILES+=usr/share/isdn/3.al
-OLD_FILES+=usr/share/isdn/4.al
-OLD_FILES+=usr/share/isdn/5.al
-OLD_FILES+=usr/share/isdn/6.al
-OLD_FILES+=usr/share/isdn/7.al
-OLD_FILES+=usr/share/isdn/8.al
-OLD_FILES+=usr/share/isdn/9.al
-OLD_FILES+=usr/share/isdn/beep.al
-OLD_FILES+=usr/share/isdn/msg.al
-OLD_DIRS+=usr/share/isdn
-OLD_FILES+=usr/share/man/man1/dtmfdecode.1.gz
-OLD_FILES+=usr/share/man/man1/g711conv.1.gz
-OLD_FILES+=usr/share/man/man4/i4b.4.gz
-OLD_FILES+=usr/share/man/man4/i4bcapi.4.gz
-OLD_FILES+=usr/share/man/man4/i4bctl.4.gz
-OLD_FILES+=usr/share/man/man4/i4bing.4.gz
-OLD_FILES+=usr/share/man/man4/i4bipr.4.gz
-OLD_FILES+=usr/share/man/man4/i4bisppp.4.gz
-OLD_FILES+=usr/share/man/man4/i4bq921.4.gz
-OLD_FILES+=usr/share/man/man4/i4bq931.4.gz
-OLD_FILES+=usr/share/man/man4/i4brbch.4.gz
-OLD_FILES+=usr/share/man/man4/i4btel.4.gz
-OLD_FILES+=usr/share/man/man4/i4btrc.4.gz
-OLD_FILES+=usr/share/man/man4/iavc.4.gz
-OLD_FILES+=usr/share/man/man4/isic.4.gz
-OLD_FILES+=usr/share/man/man4/ifpi.4.gz
-OLD_FILES+=usr/share/man/man4/ifpi2.4.gz
-OLD_FILES+=usr/share/man/man4/ifpnp.4.gz
-OLD_FILES+=usr/share/man/man4/ihfc.4.gz
-OLD_FILES+=usr/share/man/man4/itjc.4.gz
-OLD_FILES+=usr/share/man/man4/iwic.4.gz
-OLD_FILES+=usr/share/man/man5/isdnd.rc.5.gz
-OLD_FILES+=usr/share/man/man5/isdnd.rates.5.gz
-OLD_FILES+=usr/share/man/man5/isdnd.acct.5.gz
-OLD_FILES+=usr/share/man/man8/isdnd.8.gz
-OLD_FILES+=usr/share/man/man8/isdndebug.8.gz
-OLD_FILES+=usr/share/man/man8/isdndecode.8.gz
-OLD_FILES+=usr/share/man/man8/isdnmonitor.8.gz
-OLD_FILES+=usr/share/man/man8/isdnphone.8.gz
-OLD_FILES+=usr/share/man/man8/isdntel.8.gz
-OLD_FILES+=usr/share/man/man8/isdntelctl.8.gz
-OLD_FILES+=usr/share/man/man8/isdntrace.8.gz
-OLD_FILES+=usr/share/examples/isdn/contrib/README
-OLD_FILES+=usr/share/examples/isdn/contrib/anleitung.ppp
-OLD_FILES+=usr/share/examples/isdn/contrib/answer.c
-OLD_FILES+=usr/share/examples/isdn/contrib/answer.sh
-OLD_FILES+=usr/share/examples/isdn/contrib/convert.sh
-OLD_FILES+=usr/share/examples/isdn/contrib/hplay.c
-OLD_FILES+=usr/share/examples/isdn/contrib/i4b-ppp-newbie.txt
-OLD_FILES+=usr/share/examples/isdn/contrib/isdnctl
-OLD_FILES+=usr/share/examples/isdn/contrib/isdnd_acct
-OLD_FILES+=usr/share/examples/isdn/contrib/isdnd_acct.pl
-OLD_FILES+=usr/share/examples/isdn/contrib/isdntelmux.c
-OLD_FILES+=usr/share/examples/isdn/contrib/mrtg-isp0.sh
-OLD_FILES+=usr/share/examples/isdn/i4brunppp/Makefile
-OLD_FILES+=usr/share/examples/isdn/i4brunppp/README
-OLD_FILES+=usr/share/examples/isdn/i4brunppp/i4brunppp-isdnd.rc
-OLD_FILES+=usr/share/examples/isdn/i4brunppp/i4brunppp.8
-OLD_FILES+=usr/share/examples/isdn/i4brunppp/i4brunppp.c
-OLD_FILES+=usr/share/examples/isdn/v21/Makefile
-OLD_FILES+=usr/share/examples/isdn/v21/README
-OLD_FILES+=usr/share/examples/isdn/v21/v21modem.c
-OLD_FILES+=usr/share/examples/isdn/FAQ
-OLD_FILES+=usr/share/examples/isdn/KERNEL
-OLD_FILES+=usr/share/examples/isdn/Overview
-OLD_FILES+=usr/share/examples/isdn/README
-OLD_FILES+=usr/share/examples/isdn/ROADMAP
-OLD_FILES+=usr/share/examples/isdn/ReleaseNotes
-OLD_FILES+=usr/share/examples/isdn/Resources
-OLD_FILES+=usr/share/examples/isdn/SupportedCards
-OLD_FILES+=usr/share/examples/isdn/ThankYou
-OLD_DIRS+=usr/share/examples/isdn/contrib
-OLD_DIRS+=usr/share/examples/isdn/i4brunppp
-OLD_DIRS+=usr/share/examples/isdn/v21
-OLD_DIRS+=usr/share/examples/isdn
-OLD_FILES+=usr/share/examples/ppp/isdnd.rc
-OLD_FILES+=usr/share/examples/ppp/ppp.conf.isdn
-# 20080525: ng_atmpif removed
-OLD_FILES+=usr/include/netgraph/atm/ng_atmpif.h
-OLD_FILES+=usr/share/man/man4/ng_atmpif.4.gz
-# 20080522: pmap_addr_hint removed
-OLD_FILES+=usr/share/man/man9/pmap_addr_hint.9.gz
-# 20080517: ipsec_osdep.h removed
-OLD_FILES+=usr/include/netipsec/ipsec_osdep.h
-# 20080507: heimdal 1.1 import
-OLD_LIBS+=usr/lib/libasn1.so.9
-OLD_LIBS+=usr/lib/libgssapi.so.9
-OLD_LIBS+=usr/lib/libgssapi_krb5.so.9
-OLD_LIBS+=usr/lib/libhdb.so.9
-OLD_LIBS+=usr/lib/libkadm5clnt.so.9
-OLD_LIBS+=usr/lib/libkadm5srv.so.9
-OLD_LIBS+=usr/lib/libkafs5.so.9
-OLD_LIBS+=usr/lib/libkrb5.so.9
-OLD_LIBS+=usr/lib/libroken.so.9
-# 20080420: Symbol card support dropped
-OLD_FILES+=usr/include/dev/wi/spectrum24t_cf.h
-# 20080420: awi removal
-OLD_FILES+=usr/share/man/man4/awi.4.gz
-OLD_FILES+=usr/share/man/man4/if_awi.4.gz
-# 20080331: pkg_sign has been removed
-OLD_FILES+=usr/sbin/pkg_check
-OLD_FILES+=usr/sbin/pkg_sign
-OLD_FILES+=usr/share/man/man1/pkg_check.1.gz
-OLD_FILES+=usr/share/man/man1/pkg_sign.1.gz
-# 20080314: stack_print(9) mlink fixed
-OLD_FILES+=usr/share/man/man9/stack_printf.9.gz
-# 20080312: libkse removal
-OLD_FILES+=usr/include/sys/kse.h
-OLD_FILES+=usr/lib/libkse.so
-OLD_LIBS+=usr/lib/libkse.so.3
-OLD_FILES+=usr/share/man/man2/kse.2.gz
-OLD_FILES+=usr/share/man/man2/kse_create.2.gz
-OLD_FILES+=usr/share/man/man2/kse_exit.2.gz
-OLD_FILES+=usr/share/man/man2/kse_release.2.gz
-OLD_FILES+=usr/share/man/man2/kse_switchin.2.gz
-OLD_FILES+=usr/share/man/man2/kse_thr_interrupt.2.gz
-OLD_FILES+=usr/share/man/man2/kse_wakeup.2.gz
-# 20080225: bsdar/bsdranlib rename to ar/ranlib
-OLD_FILES+=usr/bin/bsdar
-OLD_FILES+=usr/bin/bsdranlib
-OLD_FILES+=usr/share/man/man1/bsdar.1.gz
-OLD_FILES+=usr/share/man/man1/bsdranlib.1.gz
-# 20080220: geom_lvm rename to geom_linux_lvm
-OLD_FILES+=usr/share/man/man4/geom_lvm.4.gz
-# 20080126: oldcard.4 removal
-OLD_FILES+=usr/share/man/man4/card.4.gz
-OLD_FILES+=usr/share/man/man4/oldcard.4.gz
-# 20080122: Removed from the tree
-OLD_FILES+=usr/share/man/man9/BUF_REFCNT.9.gz
-# 20080108: Moved to section 2
-OLD_FILES+=usr/share/man/man3/shm_open.3.gz
-OLD_FILES+=usr/share/man/man3/shm_unlink.3.gz
-# 20071207: Merged with fortunes-o.real
-OLD_FILES+=usr/share/games/fortune/fortunes2-o
-OLD_FILES+=usr/share/games/fortune/fortunes2-o.dat
-# 20071201: Removal of XRPU driver
-OLD_FILES+=usr/include/sys/xrpuio.h
-# 20071129: Disabled static versions of libkse by default
-OLD_FILES+=usr/lib/libkse.a
-OLD_FILES+=usr/lib/libkse_p.a
-OLD_FILES+=usr/lib/libkse_pic.a
-# 20071129: Removed a Solaris compatibility header
-OLD_FILES+=usr/include/sys/_elf_solaris.h
-# 20071125: Renamed to pmc_get_msr()
-OLD_FILES+=usr/share/man/man3/pmc_x86_get_msr.3.gz
-# 20071108: Removed very crunch OLDCARD support file
-OLD_FILES+=etc/defaults/pccard.conf
-# 20071025: rc.d/nfslocking superseded by rc.d/lockd and rc.d/statd
-OLD_FILES+=etc/rc.d/nfslocking
-# 20070930: rename of cached to nscd
-OLD_FILES+=etc/cached.conf
-OLD_FILES+=etc/rc.d/cached
-OLD_FILES+=usr/sbin/cached
-OLD_FILES+=usr/share/man/man5/cached.conf.5.gz
-OLD_FILES+=usr/share/man/man8/cached.8.gz
-# 20070807: removal of PowerPC specific header file
-.if ${TARGET_ARCH} == "powerpc"
-OLD_FILES+=usr/include/machine/interruptvar.h
-.endif
-# 20070801: fast_ipsec.4 gone
-OLD_FILES+=usr/share/man/man4/fast_ipsec.4.gz
-# 20070715: netatm temporarily disconnected (removed 20080525)
-OLD_FILES+=rescue/atm
-OLD_FILES+=rescue/fore_dnld
-OLD_FILES+=rescue/ilmid
-OLD_FILES+=sbin/atm
-OLD_FILES+=sbin/fore_dnld
-OLD_FILES+=sbin/ilmid
-OLD_FILES+=usr/include/libatm.h
-OLD_FILES+=usr/include/netatm/atm.h
-OLD_FILES+=usr/include/netatm/atm_cm.h
-OLD_FILES+=usr/include/netatm/atm_if.h
-OLD_FILES+=usr/include/netatm/atm_ioctl.h
-OLD_FILES+=usr/include/netatm/atm_pcb.h
-OLD_FILES+=usr/include/netatm/atm_sap.h
-OLD_FILES+=usr/include/netatm/atm_sigmgr.h
-OLD_FILES+=usr/include/netatm/atm_stack.h
-OLD_FILES+=usr/include/netatm/atm_sys.h
-OLD_FILES+=usr/include/netatm/atm_var.h
-OLD_FILES+=usr/include/netatm/atm_vc.h
-OLD_FILES+=usr/include/netatm/ipatm/ipatm.h
-OLD_FILES+=usr/include/netatm/ipatm/ipatm_serv.h
-OLD_FILES+=usr/include/netatm/ipatm/ipatm_var.h
-OLD_FILES+=usr/include/netatm/port.h
-OLD_FILES+=usr/include/netatm/queue.h
-OLD_FILES+=usr/include/netatm/sigpvc/sigpvc_var.h
-OLD_FILES+=usr/include/netatm/spans/spans_cls.h
-OLD_FILES+=usr/include/netatm/spans/spans_kxdr.h
-OLD_FILES+=usr/include/netatm/spans/spans_var.h
-OLD_FILES+=usr/include/netatm/uni/sscf_uni.h
-OLD_FILES+=usr/include/netatm/uni/sscf_uni_var.h
-OLD_FILES+=usr/include/netatm/uni/sscop.h
-OLD_FILES+=usr/include/netatm/uni/sscop_misc.h
-OLD_FILES+=usr/include/netatm/uni/sscop_pdu.h
-OLD_FILES+=usr/include/netatm/uni/sscop_var.h
-OLD_FILES+=usr/include/netatm/uni/uni.h
-OLD_FILES+=usr/include/netatm/uni/uniip_var.h
-OLD_FILES+=usr/include/netatm/uni/unisig.h
-OLD_FILES+=usr/include/netatm/uni/unisig_decode.h
-OLD_FILES+=usr/include/netatm/uni/unisig_mbuf.h
-OLD_FILES+=usr/include/netatm/uni/unisig_msg.h
-OLD_FILES+=usr/include/netatm/uni/unisig_print.h
-OLD_FILES+=usr/include/netatm/uni/unisig_var.h
-OLD_FILES+=usr/lib/libatm.a
-OLD_FILES+=usr/lib/libatm_p.a
-OLD_FILES+=usr/sbin/atmarpd
-OLD_FILES+=usr/sbin/scspd
-OLD_FILES+=usr/share/man/en.ISO8859-1/man8/atm.8.gz
-OLD_FILES+=usr/share/man/en.ISO8859-1/man8/atmarpd.8.gz
-OLD_FILES+=usr/share/man/en.ISO8859-1/man8/fore_dnld.8.gz
-OLD_FILES+=usr/share/man/en.ISO8859-1/man8/ilmid.8.gz
-OLD_FILES+=usr/share/man/en.ISO8859-1/man8/scspd.8.gz
-OLD_FILES+=usr/share/man/man8/atm.8.gz
-OLD_FILES+=usr/share/man/man8/atmarpd.8.gz
-OLD_FILES+=usr/share/man/man8/fore_dnld.8.gz
-OLD_FILES+=usr/share/man/man8/ilmid.8.gz
-OLD_FILES+=usr/share/man/man8/scspd.8.gz
-OLD_FILES+=usr/share/examples/atm/NOTES
-OLD_FILES+=usr/share/examples/atm/README
-OLD_FILES+=usr/share/examples/atm/Startup
-OLD_FILES+=usr/share/examples/atm/atm-config.sh
-OLD_FILES+=usr/share/examples/atm/atm-sockets.txt
-OLD_FILES+=usr/share/examples/atm/cpcs-design.txt
-OLD_FILES+=usr/share/examples/atm/fore-microcode.txt
-OLD_FILES+=usr/share/examples/atm/sscf-design.txt
-OLD_FILES+=usr/share/examples/atm/sscop-design.txt
-OLD_LIBS+=lib/libatm.so.5
-OLD_FILES+=usr/lib/libatm.so
-OLD_DIRS+=usr/include/netatm/sigpvc
-OLD_DIRS+=usr/include/netatm/spans
-OLD_DIRS+=usr/include/netatm/ipatm
-OLD_DIRS+=usr/include/netatm/uni
-OLD_DIRS+=usr/include/netatm
-OLD_DIRS+=usr/share/examples/atm
-# 20070705: I4B headers repo-copied to include/i4b/
-.if ${TARGET_ARCH} == "i386"
-OLD_FILES+=usr/include/machine/i4b_cause.h
-OLD_FILES+=usr/include/machine/i4b_debug.h
-OLD_FILES+=usr/include/machine/i4b_ioctl.h
-OLD_FILES+=usr/include/machine/i4b_rbch_ioctl.h
-OLD_FILES+=usr/include/machine/i4b_tel_ioctl.h
-OLD_FILES+=usr/include/machine/i4b_trace.h
-.endif
-# 20070703: pf 4.1 import
-OLD_FILES+=usr/libexec/ftp-proxy
-# 20070701: KAME IPSec removal
-OLD_FILES+=usr/include/netinet6/ah.h
-OLD_FILES+=usr/include/netinet6/ah6.h
-OLD_FILES+=usr/include/netinet6/ah_aesxcbcmac.h
-OLD_FILES+=usr/include/netinet6/esp.h
-OLD_FILES+=usr/include/netinet6/esp6.h
-OLD_FILES+=usr/include/netinet6/esp_aesctr.h
-OLD_FILES+=usr/include/netinet6/esp_camellia.h
-OLD_FILES+=usr/include/netinet6/esp_rijndael.h
-OLD_FILES+=usr/include/netinet6/ipsec.h
-OLD_FILES+=usr/include/netinet6/ipsec6.h
-OLD_FILES+=usr/include/netinet6/ipcomp.h
-OLD_FILES+=usr/include/netinet6/ipcomp6.h
-OLD_FILES+=usr/include/netkey/key.h
-OLD_FILES+=usr/include/netkey/key_debug.h
-OLD_FILES+=usr/include/netkey/key_var.h
-OLD_FILES+=usr/include/netkey/keydb.h
-OLD_FILES+=usr/include/netkey/keysock.h
-OLD_DIRS+=usr/include/netkey
-# 20070701: remove wicontrol
-OLD_FILES+=usr/sbin/wicontrol
-OLD_FILES+=usr/share/man/man8/wicontrol.8.gz
-# 20070625: umapfs removal
-OLD_FILES+=rescue/mount_umapfs
-OLD_FILES+=sbin/mount_umapfs
-OLD_FILES+=usr/include/fs/umapfs/umap.h
-OLD_FILES+=usr/share/man/man8/mount_umapfs.8.gz
-OLD_DIRS+=usr/include/fs/umapfs
-# 20070618: Removal of the PROTO.localhost* files
-OLD_FILES+=etc/namedb/PROTO.localhost-v6.rev
-OLD_FILES+=etc/namedb/PROTO.localhost.rev
-OLD_FILES+=etc/namedb/make-localhost
-# 20070618: shared library version bump
-OLD_LIBS+=lib/libalias.so.5
-OLD_LIBS+=lib/libbsnmp.so.3
-OLD_LIBS+=lib/libncurses.so.6
-OLD_LIBS+=lib/libncursesw.so.6
-OLD_LIBS+=lib/libreadline.so.6
-OLD_LIBS+=usr/lib/libdialog.so.5
-OLD_LIBS+=usr/lib/libgnuregex.so.3
-OLD_LIBS+=usr/lib/libhistory.so.6
-OLD_LIBS+=usr/lib/libpam.so.3
-OLD_LIBS+=usr/lib/libssh.so.3
-OLD_LIBS+=usr/lib/pam_chroot.so.3
-OLD_LIBS+=usr/lib/pam_deny.so.3
-OLD_LIBS+=usr/lib/pam_echo.so.3
-OLD_LIBS+=usr/lib/pam_exec.so.3
-OLD_LIBS+=usr/lib/pam_ftpusers.so.3
-OLD_LIBS+=usr/lib/pam_group.so.3
-OLD_LIBS+=usr/lib/pam_guest.so.3
-OLD_LIBS+=usr/lib/pam_krb5.so.3
-OLD_LIBS+=usr/lib/pam_ksu.so.3
-OLD_LIBS+=usr/lib/pam_lastlog.so.3
-OLD_LIBS+=usr/lib/pam_login_access.so.3
-OLD_LIBS+=usr/lib/pam_nologin.so.3
-OLD_LIBS+=usr/lib/pam_opie.so.3
-OLD_LIBS+=usr/lib/pam_opieaccess.so.3
-OLD_LIBS+=usr/lib/pam_passwdqc.so.3
-OLD_LIBS+=usr/lib/pam_permit.so.3
-OLD_LIBS+=usr/lib/pam_radius.so.3
-OLD_LIBS+=usr/lib/pam_rhosts.so.3
-OLD_LIBS+=usr/lib/pam_rootok.so.3
-OLD_LIBS+=usr/lib/pam_securetty.so.3
-OLD_LIBS+=usr/lib/pam_self.so.3
-OLD_LIBS+=usr/lib/pam_ssh.so.3
-OLD_LIBS+=usr/lib/pam_tacplus.so.3
-OLD_LIBS+=usr/lib/pam_unix.so.3
-OLD_LIBS+=usr/lib/snmp_atm.so.4
-OLD_LIBS+=usr/lib/snmp_bridge.so.4
-OLD_LIBS+=usr/lib/snmp_hostres.so.4
-OLD_LIBS+=usr/lib/snmp_mibII.so.4
-OLD_LIBS+=usr/lib/snmp_netgraph.so.4
-OLD_LIBS+=usr/lib/snmp_pf.so.4
-# 20070613: IPX over IP tunnel removal
-OLD_FILES+=usr/include/netipx/ipx_ip.h
-# 20070605: sched_core removal
-OLD_FILES+=usr/share/man/man4/sched_core.4.gz
-# 20070603: BIND 9.4.1 import
-OLD_LIBS+=usr/lib/liblwres.so.10
-# 20070521: shared library version bump
-OLD_LIBS+=lib/libatm.so.4
-OLD_LIBS+=lib/libbegemot.so.2
-OLD_LIBS+=lib/libbsdxml.so.2
-OLD_LIBS+=lib/libcam.so.3
-OLD_LIBS+=lib/libcrypt.so.3
-OLD_LIBS+=lib/libdevstat.so.5
-OLD_LIBS+=lib/libedit.so.5
-OLD_LIBS+=lib/libgeom.so.3
-OLD_LIBS+=lib/libipsec.so.2
-OLD_LIBS+=lib/libipx.so.3
-OLD_LIBS+=lib/libkiconv.so.2
-OLD_LIBS+=lib/libkse.so.2
-OLD_LIBS+=lib/libkvm.so.3
-OLD_LIBS+=lib/libm.so.4
-OLD_LIBS+=lib/libmd.so.3
-OLD_LIBS+=lib/libpcap.so.4
-OLD_LIBS+=lib/libpthread.so.2
-OLD_LIBS+=lib/libsbuf.so.3
-OLD_LIBS+=lib/libthr.so.2
-OLD_LIBS+=lib/libufs.so.3
-OLD_LIBS+=lib/libutil.so.6
-OLD_LIBS+=lib/libz.so.3
-OLD_LIBS+=usr/lib/libbluetooth.so.2
-OLD_LIBS+=usr/lib/libbsm.so.1
-OLD_LIBS+=usr/lib/libbz2.so.2
-OLD_LIBS+=usr/lib/libcalendar.so.3
-OLD_LIBS+=usr/lib/libcom_err.so.3
-OLD_LIBS+=usr/lib/libdevinfo.so.3
-OLD_LIBS+=usr/lib/libfetch.so.4
-OLD_LIBS+=usr/lib/libform.so.3
-OLD_LIBS+=usr/lib/libformw.so.3
-OLD_LIBS+=usr/lib/libftpio.so.6
-OLD_LIBS+=usr/lib/libgpib.so.1
-OLD_LIBS+=usr/lib/libkse.so.2
-OLD_LIBS+=usr/lib/libmagic.so.2
-OLD_LIBS+=usr/lib/libmemstat.so.1
-OLD_LIBS+=usr/lib/libmenu.so.3
-OLD_LIBS+=usr/lib/libmenuw.so.3
-OLD_LIBS+=usr/lib/libmilter.so.3
-OLD_LIBS+=usr/lib/libmp.so.5
-OLD_LIBS+=usr/lib/libncp.so.2
-OLD_LIBS+=usr/lib/libnetgraph.so.2
-OLD_LIBS+=usr/lib/libngatm.so.2
-OLD_LIBS+=usr/lib/libopie.so.4
-OLD_LIBS+=usr/lib/libpanel.so.3
-OLD_LIBS+=usr/lib/libpanelw.so.3
-OLD_LIBS+=usr/lib/libpmc.so.3
-OLD_LIBS+=usr/lib/libradius.so.2
-OLD_LIBS+=usr/lib/librpcsvc.so.3
-OLD_LIBS+=usr/lib/libsdp.so.2
-OLD_LIBS+=usr/lib/libsmb.so.2
-OLD_LIBS+=usr/lib/libstdc++.so.5
-OLD_LIBS+=usr/lib/libtacplus.so.2
-OLD_LIBS+=usr/lib/libthr.so.2
-OLD_LIBS+=usr/lib/libthread_db.so.2
-OLD_LIBS+=usr/lib/libugidfw.so.2
-OLD_LIBS+=usr/lib/libusbhid.so.2
-OLD_LIBS+=usr/lib/libvgl.so.4
-OLD_LIBS+=usr/lib/libwrap.so.4
-OLD_LIBS+=usr/lib/libypclnt.so.2
-OLD_LIBS+=usr/lib/snmp_bridge.so.3
-OLD_LIBS+=usr/lib/snmp_hostres.so.3
-# 20070519: GCC 4.2
-OLD_FILES+=usr/bin/f77
-OLD_FILES+=usr/bin/protoize
-OLD_FILES+=usr/include/g2c.h
-OLD_FILES+=usr/libexec/f771
-OLD_FILES+=usr/share/info/g77.info.gz
-OLD_FILES+=usr/share/man/man1/f77.1.gz
-OLD_FILES+=usr/include/c++/3.4/algorithm
-OLD_FILES+=usr/include/c++/3.4/backward/algo.h
-OLD_FILES+=usr/include/c++/3.4/backward/algobase.h
-OLD_FILES+=usr/include/c++/3.4/backward/alloc.h
-OLD_FILES+=usr/include/c++/3.4/backward/backward_warning.h
-OLD_FILES+=usr/include/c++/3.4/backward/bvector.h
-OLD_FILES+=usr/include/c++/3.4/backward/complex.h
-OLD_FILES+=usr/include/c++/3.4/backward/defalloc.h
-OLD_FILES+=usr/include/c++/3.4/backward/deque.h
-OLD_FILES+=usr/include/c++/3.4/backward/fstream.h
-OLD_FILES+=usr/include/c++/3.4/backward/function.h
-OLD_FILES+=usr/include/c++/3.4/backward/hash_map.h
-OLD_FILES+=usr/include/c++/3.4/backward/hash_set.h
-OLD_FILES+=usr/include/c++/3.4/backward/hashtable.h
-OLD_FILES+=usr/include/c++/3.4/backward/heap.h
-OLD_FILES+=usr/include/c++/3.4/backward/iomanip.h
-OLD_FILES+=usr/include/c++/3.4/backward/iostream.h
-OLD_FILES+=usr/include/c++/3.4/backward/istream.h
-OLD_FILES+=usr/include/c++/3.4/backward/iterator.h
-OLD_FILES+=usr/include/c++/3.4/backward/list.h
-OLD_FILES+=usr/include/c++/3.4/backward/map.h
-OLD_FILES+=usr/include/c++/3.4/backward/multimap.h
-OLD_FILES+=usr/include/c++/3.4/backward/multiset.h
-OLD_FILES+=usr/include/c++/3.4/backward/new.h
-OLD_FILES+=usr/include/c++/3.4/backward/ostream.h
-OLD_FILES+=usr/include/c++/3.4/backward/pair.h
-OLD_FILES+=usr/include/c++/3.4/backward/queue.h
-OLD_FILES+=usr/include/c++/3.4/backward/rope.h
-OLD_FILES+=usr/include/c++/3.4/backward/set.h
-OLD_FILES+=usr/include/c++/3.4/backward/slist.h
-OLD_FILES+=usr/include/c++/3.4/backward/stack.h
-OLD_FILES+=usr/include/c++/3.4/backward/stream.h
-OLD_FILES+=usr/include/c++/3.4/backward/streambuf.h
-OLD_FILES+=usr/include/c++/3.4/backward/strstream
-OLD_FILES+=usr/include/c++/3.4/backward/tempbuf.h
-OLD_FILES+=usr/include/c++/3.4/backward/tree.h
-OLD_FILES+=usr/include/c++/3.4/backward/vector.h
-OLD_FILES+=usr/include/c++/3.4/bits/allocator.h
-OLD_FILES+=usr/include/c++/3.4/bits/atomic_word.h
-OLD_FILES+=usr/include/c++/3.4/bits/atomicity.h
-OLD_FILES+=usr/include/c++/3.4/bits/basic_file.h
-OLD_FILES+=usr/include/c++/3.4/bits/basic_ios.h
-OLD_FILES+=usr/include/c++/3.4/bits/basic_ios.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/basic_string.h
-OLD_FILES+=usr/include/c++/3.4/bits/basic_string.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/boost_concept_check.h
-OLD_FILES+=usr/include/c++/3.4/bits/c++allocator.h
-OLD_FILES+=usr/include/c++/3.4/bits/c++config.h
-OLD_FILES+=usr/include/c++/3.4/bits/c++io.h
-OLD_FILES+=usr/include/c++/3.4/bits/c++locale.h
-OLD_FILES+=usr/include/c++/3.4/bits/c++locale_internal.h
-OLD_FILES+=usr/include/c++/3.4/bits/char_traits.h
-OLD_FILES+=usr/include/c++/3.4/bits/cmath.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/codecvt.h
-OLD_FILES+=usr/include/c++/3.4/bits/codecvt_specializations.h
-OLD_FILES+=usr/include/c++/3.4/bits/concept_check.h
-OLD_FILES+=usr/include/c++/3.4/bits/concurrence.h
-OLD_FILES+=usr/include/c++/3.4/bits/cpp_type_traits.h
-OLD_FILES+=usr/include/c++/3.4/bits/ctype_base.h
-OLD_FILES+=usr/include/c++/3.4/bits/ctype_inline.h
-OLD_FILES+=usr/include/c++/3.4/bits/ctype_noninline.h
-OLD_FILES+=usr/include/c++/3.4/bits/deque.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/fstream.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/functexcept.h
-OLD_FILES+=usr/include/c++/3.4/bits/gslice.h
-OLD_FILES+=usr/include/c++/3.4/bits/gslice_array.h
-OLD_FILES+=usr/include/c++/3.4/bits/gthr-default.h
-OLD_FILES+=usr/include/c++/3.4/bits/gthr-posix.h
-OLD_FILES+=usr/include/c++/3.4/bits/gthr-single.h
-OLD_FILES+=usr/include/c++/3.4/bits/gthr.h
-OLD_FILES+=usr/include/c++/3.4/bits/indirect_array.h
-OLD_FILES+=usr/include/c++/3.4/bits/ios_base.h
-OLD_FILES+=usr/include/c++/3.4/bits/istream.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/list.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/locale_classes.h
-OLD_FILES+=usr/include/c++/3.4/bits/locale_facets.h
-OLD_FILES+=usr/include/c++/3.4/bits/locale_facets.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/localefwd.h
-OLD_FILES+=usr/include/c++/3.4/bits/mask_array.h
-OLD_FILES+=usr/include/c++/3.4/bits/messages_members.h
-OLD_FILES+=usr/include/c++/3.4/bits/os_defines.h
-OLD_FILES+=usr/include/c++/3.4/bits/ostream.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/postypes.h
-OLD_FILES+=usr/include/c++/3.4/bits/slice_array.h
-OLD_FILES+=usr/include/c++/3.4/bits/sstream.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/stl_algo.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_algobase.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_bvector.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_construct.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_deque.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_function.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_heap.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator_base_funcs.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator_base_types.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_list.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_map.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_multimap.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_multiset.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_numeric.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_pair.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_queue.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_raw_storage_iter.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_relops.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_set.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_stack.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_tempbuf.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_threads.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_tree.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_uninitialized.h
-OLD_FILES+=usr/include/c++/3.4/bits/stl_vector.h
-OLD_FILES+=usr/include/c++/3.4/bits/stream_iterator.h
-OLD_FILES+=usr/include/c++/3.4/bits/streambuf.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/streambuf_iterator.h
-OLD_FILES+=usr/include/c++/3.4/bits/stringfwd.h
-OLD_FILES+=usr/include/c++/3.4/bits/time_members.h
-OLD_FILES+=usr/include/c++/3.4/bits/type_traits.h
-OLD_FILES+=usr/include/c++/3.4/bits/valarray_after.h
-OLD_FILES+=usr/include/c++/3.4/bits/valarray_array.h
-OLD_FILES+=usr/include/c++/3.4/bits/valarray_array.tcc
-OLD_FILES+=usr/include/c++/3.4/bits/valarray_before.h
-OLD_FILES+=usr/include/c++/3.4/bits/vector.tcc
-OLD_FILES+=usr/include/c++/3.4/bitset
-OLD_FILES+=usr/include/c++/3.4/cassert
-OLD_FILES+=usr/include/c++/3.4/cctype
-OLD_FILES+=usr/include/c++/3.4/cerrno
-OLD_FILES+=usr/include/c++/3.4/cfloat
-OLD_FILES+=usr/include/c++/3.4/ciso646
-OLD_FILES+=usr/include/c++/3.4/climits
-OLD_FILES+=usr/include/c++/3.4/clocale
-OLD_FILES+=usr/include/c++/3.4/cmath
-OLD_FILES+=usr/include/c++/3.4/complex
-OLD_FILES+=usr/include/c++/3.4/csetjmp
-OLD_FILES+=usr/include/c++/3.4/csignal
-OLD_FILES+=usr/include/c++/3.4/cstdarg
-OLD_FILES+=usr/include/c++/3.4/cstddef
-OLD_FILES+=usr/include/c++/3.4/cstdio
-OLD_FILES+=usr/include/c++/3.4/cstdlib
-OLD_FILES+=usr/include/c++/3.4/cstring
-OLD_FILES+=usr/include/c++/3.4/ctime
-OLD_FILES+=usr/include/c++/3.4/cwchar
-OLD_FILES+=usr/include/c++/3.4/cwctype
-OLD_FILES+=usr/include/c++/3.4/cxxabi.h
-OLD_FILES+=usr/include/c++/3.4/debug/bitset
-OLD_FILES+=usr/include/c++/3.4/debug/debug.h
-OLD_FILES+=usr/include/c++/3.4/debug/deque
-OLD_FILES+=usr/include/c++/3.4/debug/formatter.h
-OLD_FILES+=usr/include/c++/3.4/debug/hash_map
-OLD_FILES+=usr/include/c++/3.4/debug/hash_map.h
-OLD_FILES+=usr/include/c++/3.4/debug/hash_multimap.h
-OLD_FILES+=usr/include/c++/3.4/debug/hash_multiset.h
-OLD_FILES+=usr/include/c++/3.4/debug/hash_set
-OLD_FILES+=usr/include/c++/3.4/debug/hash_set.h
-OLD_FILES+=usr/include/c++/3.4/debug/list
-OLD_FILES+=usr/include/c++/3.4/debug/map
-OLD_FILES+=usr/include/c++/3.4/debug/map.h
-OLD_FILES+=usr/include/c++/3.4/debug/multimap.h
-OLD_FILES+=usr/include/c++/3.4/debug/multiset.h
-OLD_FILES+=usr/include/c++/3.4/debug/safe_base.h
-OLD_FILES+=usr/include/c++/3.4/debug/safe_iterator.h
-OLD_FILES+=usr/include/c++/3.4/debug/safe_iterator.tcc
-OLD_FILES+=usr/include/c++/3.4/debug/safe_sequence.h
-OLD_FILES+=usr/include/c++/3.4/debug/set
-OLD_FILES+=usr/include/c++/3.4/debug/set.h
-OLD_FILES+=usr/include/c++/3.4/debug/string
-OLD_FILES+=usr/include/c++/3.4/debug/vector
-OLD_FILES+=usr/include/c++/3.4/deque
-OLD_FILES+=usr/include/c++/3.4/exception
-OLD_FILES+=usr/include/c++/3.4/exception_defines.h
-OLD_FILES+=usr/include/c++/3.4/ext/algorithm
-OLD_FILES+=usr/include/c++/3.4/ext/bitmap_allocator.h
-OLD_FILES+=usr/include/c++/3.4/ext/debug_allocator.h
-OLD_FILES+=usr/include/c++/3.4/ext/enc_filebuf.h
-OLD_FILES+=usr/include/c++/3.4/ext/functional
-OLD_FILES+=usr/include/c++/3.4/ext/hash_fun.h
-OLD_FILES+=usr/include/c++/3.4/ext/hash_map
-OLD_FILES+=usr/include/c++/3.4/ext/hash_set
-OLD_FILES+=usr/include/c++/3.4/ext/hashtable.h
-OLD_FILES+=usr/include/c++/3.4/ext/iterator
-OLD_FILES+=usr/include/c++/3.4/ext/malloc_allocator.h
-OLD_FILES+=usr/include/c++/3.4/ext/memory
-OLD_FILES+=usr/include/c++/3.4/ext/mt_allocator.h
-OLD_FILES+=usr/include/c++/3.4/ext/new_allocator.h
-OLD_FILES+=usr/include/c++/3.4/ext/numeric
-OLD_FILES+=usr/include/c++/3.4/ext/pod_char_traits.h
-OLD_FILES+=usr/include/c++/3.4/ext/pool_allocator.h
-OLD_FILES+=usr/include/c++/3.4/ext/rb_tree
-OLD_FILES+=usr/include/c++/3.4/ext/rope
-OLD_FILES+=usr/include/c++/3.4/ext/ropeimpl.h
-OLD_FILES+=usr/include/c++/3.4/ext/slist
-OLD_FILES+=usr/include/c++/3.4/ext/stdio_filebuf.h
-OLD_FILES+=usr/include/c++/3.4/ext/stdio_sync_filebuf.h
-OLD_FILES+=usr/include/c++/3.4/fstream
-OLD_FILES+=usr/include/c++/3.4/functional
-OLD_FILES+=usr/include/c++/3.4/iomanip
-OLD_FILES+=usr/include/c++/3.4/ios
-OLD_FILES+=usr/include/c++/3.4/iosfwd
-OLD_FILES+=usr/include/c++/3.4/iostream
-OLD_FILES+=usr/include/c++/3.4/istream
-OLD_FILES+=usr/include/c++/3.4/iterator
-OLD_FILES+=usr/include/c++/3.4/limits
-OLD_FILES+=usr/include/c++/3.4/list
-OLD_FILES+=usr/include/c++/3.4/locale
-OLD_FILES+=usr/include/c++/3.4/map
-OLD_FILES+=usr/include/c++/3.4/memory
-OLD_FILES+=usr/include/c++/3.4/new
-OLD_FILES+=usr/include/c++/3.4/numeric
-OLD_FILES+=usr/include/c++/3.4/ostream
-OLD_FILES+=usr/include/c++/3.4/queue
-OLD_FILES+=usr/include/c++/3.4/set
-OLD_FILES+=usr/include/c++/3.4/sstream
-OLD_FILES+=usr/include/c++/3.4/stack
-OLD_FILES+=usr/include/c++/3.4/stdexcept
-OLD_FILES+=usr/include/c++/3.4/streambuf
-OLD_FILES+=usr/include/c++/3.4/string
-OLD_FILES+=usr/include/c++/3.4/typeinfo
-OLD_FILES+=usr/include/c++/3.4/utility
-OLD_FILES+=usr/include/c++/3.4/valarray
-OLD_FILES+=usr/include/c++/3.4/vector
-OLD_DIRS+=usr/include/c++/3.4/backward
-OLD_DIRS+=usr/include/c++/3.4/bits
-OLD_DIRS+=usr/include/c++/3.4/debug
-OLD_DIRS+=usr/include/c++/3.4/ext
-OLD_DIRS+=usr/include/c++/3.4
-# 20070510: zpool/zfs moved to /sbin
-OLD_FILES+=usr/sbin/zfs
-OLD_FILES+=usr/sbin/zpool
-# 20070423: rc.bluetooth (examples) removed
-OLD_FILES+=usr/share/examples/netgraph/bluetooth/rc.bluetooth
-OLD_DIRS+=usr/share/examples/netgraph/bluetooth
-# 20070421: worm.4 removed
-OLD_FILES+=usr/share/man/man4/worm.4.gz
-# 20070417: trunk(4) renamed to lagg(4)
-OLD_FILES+=usr/include/net/if_trunk.h
-# 20070409: uuidgen moved to /bin/
-OLD_FILES+=usr/bin/uuidgen
-# 20070328: bzip2 1.0.4
-OLD_FILES+=usr/share/info/bzip2.info.gz
-# 20070303: libarchive 2.0
-OLD_LIBS+=usr/lib/libarchive.so.3
-# 20070301: remove addr2ascii and ascii2addr
-OLD_FILES+=usr/share/man/man3/addr2ascii.3.gz
-OLD_FILES+=usr/share/man/man3/ascii2addr.3.gz
-# 20070225: vm_page_unmanage() removed
-OLD_FILES+=usr/share/man/man9/vm_page_unmanage.9.gz
-# 20070216: VFS_VPTOFH(9) -> VOP_VPTOFH(9)
-OLD_FILES+=usr/share/man/man9/VFS_VPTOFH.9.gz
-# 20070212: kame.4 removed
-OLD_FILES+=usr/share/man/man4/kame.4.gz
-# 20070201: remove libmytinfo link
-OLD_FILES+=usr/lib/libmytinfo.a
-OLD_FILES+=usr/lib/libmytinfo.so
-OLD_FILES+=usr/lib/libmytinfo_p.a
-OLD_FILES+=usr/lib/libmytinfow.a
-OLD_FILES+=usr/lib/libmytinfow.so
-OLD_FILES+=usr/lib/libmytinfow_p.a
-# 20070128: remove vnconfig
-OLD_FILES+=usr/sbin/vnconfig
-# 20070127: remove bpf_compat.h
-OLD_FILES+=usr/include/net/bpf_compat.h
-# 20070125: objformat bites the dust
-OLD_FILES+=usr/bin/objformat
-OLD_FILES+=usr/share/man/man1/objformat.1.gz
-OLD_FILES+=usr/include/objformat.h
-OLD_FILES+=usr/share/man/man3/getobjformat.3.gz
-# 20061008: rename *.so.4 libalias modules to *.so and move to /lib
-# This uses MOVED_LIBS because the new files are libraries even though
-# the old files to remove are symlinks
-MOVED_LIBS+=usr/lib/libalias_cuseeme.so
-MOVED_LIBS+=usr/lib/libalias_dummy.so
-MOVED_LIBS+=usr/lib/libalias_ftp.so
-MOVED_LIBS+=usr/lib/libalias_irc.so
-MOVED_LIBS+=usr/lib/libalias_nbt.so
-MOVED_LIBS+=usr/lib/libalias_pptp.so
-MOVED_LIBS+=usr/lib/libalias_skinny.so
-MOVED_LIBS+=usr/lib/libalias_smedia.so
-OLD_LIBS+=lib/libalias_cuseeme.so.4
-OLD_LIBS+=lib/libalias_dummy.so.4
-OLD_LIBS+=lib/libalias_ftp.so.4
-OLD_LIBS+=lib/libalias_irc.so.4
-OLD_LIBS+=lib/libalias_nbt.so.4
-OLD_LIBS+=lib/libalias_pptp.so.4
-OLD_LIBS+=lib/libalias_skinny.so.4
-OLD_LIBS+=lib/libalias_smedia.so.4
-# 20061126: remove old man page
-OLD_FILES+=usr/share/man/man3/archive_read_set_bytes_per_block.3.gz
-# 20061125: remove old man page
-OLD_FILES+=usr/share/man/man9/devsw.9.gz
-# 20061122: remove obsolete mount programs
-OLD_FILES+=sbin/mount_devfs
-OLD_FILES+=sbin/mount_ext2fs
-OLD_FILES+=sbin/mount_fdescfs
-OLD_FILES+=sbin/mount_linprocfs
-OLD_FILES+=sbin/mount_procfs
-OLD_FILES+=sbin/mount_std
-OLD_FILES+=rescue/mount_devfs
-OLD_FILES+=rescue/mount_ext2fs
-OLD_FILES+=rescue/mount_fdescfs
-OLD_FILES+=rescue/mount_linprocfs
-OLD_FILES+=rescue/mount_procfs
-OLD_FILES+=rescue/mount_std
-OLD_FILES+=usr/share/man/man8/mount_devfs.8.gz
-OLD_FILES+=usr/share/man/man8/mount_ext2fs.8.gz
-OLD_FILES+=usr/share/man/man8/mount_fdescfs.8.gz
-OLD_FILES+=usr/share/man/man8/mount_linprocfs.8.gz
-OLD_FILES+=usr/share/man/man8/mount_procfs.8.gz
-OLD_FILES+=usr/share/man/man8/mount_std.8.gz
-# 20061116: uhidev.4 removed
-OLD_FILES+=usr/share/man/man4/uhidev.4.gz
-# 20061106: archive_write_prepare.3 removed
-OLD_FILES+=usr/share/man/man3/archive_write_prepare.3.gz
-# 20061018: pccardc removed
-OLD_FILES+=usr/sbin/pccardc usr/share/man/man8/pccardc.8.gz
-# 20060930: demangle.h from contrib/libstdc++/include/ext/
-OLD_FILES+=usr/include/c++/3.4/ext/demangle.h
-# 20060929: mrouted removed
-OLD_FILES+=usr/sbin/map-mbone
-OLD_FILES+=usr/sbin/mrinfo
-OLD_FILES+=usr/sbin/mrouted
-OLD_FILES+=usr/sbin/mtrace
-OLD_FILES+=usr/share/man/man8/map-mbone.8.gz
-OLD_FILES+=usr/share/man/man8/mrinfo.8.gz
-OLD_FILES+=usr/share/man/man8/mrouted.8.gz
-OLD_FILES+=usr/share/man/man8/mtrace.8.gz
-# 20060924: tcpslice removed
-OLD_FILES+=usr/sbin/tcpslice
-OLD_FILES+=usr/share/man/man1/tcpslice.1.gz
-# 20060829: kvmdb cleanup script removed
-OLD_FILES+=etc/periodic/weekly/120.clean-kvmdb
-# 20060822: ramdisk{,-own} have been replaced by mdconfig{,2}
-OLD_FILES+=etc/rc.d/ramdisk
-OLD_FILES+=etc/rc.d/ramdisk-own
-# 20060729: OpenSSL 0.9.7e -> 0.9.8b upgrade
-OLD_FILES+=usr/include/openssl/eng_int.h
-OLD_FILES+=usr/include/openssl/hw_4758_cca_err.h
-OLD_FILES+=usr/include/openssl/hw_aep_err.h
-OLD_FILES+=usr/include/openssl/hw_atalla_err.h
-OLD_FILES+=usr/include/openssl/hw_cswift_err.h
-OLD_FILES+=usr/include/openssl/hw_ncipher_err.h
-OLD_FILES+=usr/include/openssl/hw_nuron_err.h
-OLD_FILES+=usr/include/openssl/hw_sureware_err.h
-OLD_FILES+=usr/include/openssl/hw_ubsec_err.h
-# 20060713: mount_linsysfs(8) never existed in 7.x
-OLD_FILES+=sbin/mount_linsysfs
-OLD_FILES+=usr/share/man/man8/mount_linsysfs.8.gz
-# 20060704: KAME compat file net_osdep.h removed
-OLD_FILES+=usr/include/net/net_osdep.h
-# 20060605: man page links removed by OpenBSM 1.0 alpha 6 import
-OLD_FILES+=usr/share/man/man3/au_to_socket.3.gz
-OLD_FILES+=usr/share/man/man3/au_to_socket_ex_128.3.gz
-OLD_FILES+=usr/share/man/man3/au_to_socket_ex_32.3.gz
-# 20060517: pcvt removed
-OLD_FILES+=usr/share/pcvt/README.FIRST
-OLD_FILES+=usr/share/pcvt/Etc/xmodmap-german
-OLD_FILES+=usr/share/pcvt/Etc/pcvt.sh
-OLD_FILES+=usr/share/pcvt/Etc/pcvt.el
-OLD_FILES+=usr/share/pcvt/Etc/Terminfo
-OLD_FILES+=usr/share/pcvt/Etc/Termcap
-OLD_DIRS+=usr/share/pcvt/Etc
-OLD_FILES+=usr/share/pcvt/Doc/NotesAndHints
-OLD_FILES+=usr/share/pcvt/Doc/Keyboard.VT
-OLD_FILES+=usr/share/pcvt/Doc/Keyboard.HP
-OLD_FILES+=usr/share/pcvt/Doc/EscapeSequences
-OLD_FILES+=usr/share/pcvt/Doc/Charsets
-OLD_FILES+=usr/share/pcvt/Doc/CharGen
-OLD_FILES+=usr/share/pcvt/Doc/Bibliography
-OLD_FILES+=usr/share/pcvt/Doc/Acknowledgements
-OLD_DIRS+=usr/share/pcvt/Doc
-OLD_DIRS+=usr/share/pcvt
-OLD_FILES+=usr/share/misc/pcvtfonts/vt220l.816
-OLD_FILES+=usr/share/misc/pcvtfonts/vt220l.814
-OLD_FILES+=usr/share/misc/pcvtfonts/vt220l.810
-OLD_FILES+=usr/share/misc/pcvtfonts/vt220l.808
-OLD_FILES+=usr/share/misc/pcvtfonts/vt220h.816
-OLD_FILES+=usr/share/misc/pcvtfonts/vt220h.814
-OLD_FILES+=usr/share/misc/pcvtfonts/vt220h.810
-OLD_FILES+=usr/share/misc/pcvtfonts/vt220h.808
-OLD_DIRS+=usr/share/misc/pcvtfonts
-OLD_FILES+=usr/share/misc/keycap.pcvt
-OLD_FILES+=usr/share/man/man8/ispcvt.8.gz
-OLD_FILES+=usr/share/man/man5/keycap.5.gz
-OLD_FILES+=usr/share/man/man4/pcvt.4.gz
-OLD_FILES+=usr/share/man/man3/kgetstr.3.gz
-OLD_FILES+=usr/share/man/man3/kgetnum.3.gz
-OLD_FILES+=usr/share/man/man3/kgetflag.3.gz
-OLD_FILES+=usr/share/man/man3/kgetent.3.gz
-OLD_FILES+=usr/share/man/man3/keycap.3.gz
-OLD_FILES+=usr/share/man/man1/vt220keys.1.gz
-OLD_FILES+=usr/share/man/man1/scon.1.gz
-OLD_FILES+=usr/share/man/man1/loadfont.1.gz
-OLD_FILES+=usr/share/man/man1/kcon.1.gz
-OLD_FILES+=usr/share/man/man1/fontedit.1.gz
-OLD_FILES+=usr/share/man/man1/cursor.1.gz
-OLD_FILES+=usr/sbin/vt220keys
-OLD_FILES+=usr/sbin/scon
-OLD_FILES+=usr/sbin/loadfont
-OLD_FILES+=usr/sbin/kcon
-OLD_FILES+=usr/sbin/ispcvt
-OLD_FILES+=usr/sbin/fontedit
-OLD_FILES+=usr/sbin/cursor
-OLD_FILES+=usr/lib/libkeycap_p.a
-OLD_FILES+=usr/lib/libkeycap.a
-OLD_FILES+=usr/include/machine/pcvt_ioctl.h
-# 20060514: lnc(4) replaced by le(4)
-OLD_FILES+=usr/share/man/man4/i386/lnc.4.gz
-# 20060512: remove ip6fw
-OLD_FILES+=etc/periodic/security/600.ip6fwdenied
-OLD_FILES+=etc/periodic/security/650.ip6fwlimit
-OLD_FILES+=sbin/ip6fw
-OLD_FILES+=usr/include/netinet6/ip6_fw.h
-OLD_FILES+=usr/share/man/man8/ip6fw.8.gz
-# 20060424: sab(4) removed
-OLD_FILES+=usr/share/man/man4/sab.4.gz
-# 20060328: remove redundant rc.d script
-OLD_FILES+=etc/rc.d/ike
-# 20060127: revert libdisk to static-only
-OLD_FILES+=usr/lib/libdisk.so
-# 20060115: sys/pccard includes cleanup
-OLD_FILES+=usr/include/pccard/driver.h
-OLD_FILES+=usr/include/pccard/i82365.h
-OLD_FILES+=usr/include/pccard/meciareg.h
-OLD_FILES+=usr/include/pccard/pccard_nbk.h
-OLD_FILES+=usr/include/pccard/pcic_pci.h
-OLD_FILES+=usr/include/pccard/pcicvar.h
-OLD_FILES+=usr/include/pccard/slot.h
-# 20051215: rescue/nextboot.sh renamed to rescue/nextboot
-OLD_FILES+=rescue/nextboot.sh
-# 20051214: usbd(8) removed
-OLD_FILES+=etc/rc.d/usbd
-OLD_FILES+=etc/usbd.conf
-OLD_FILES+=usr/sbin/usbd
-OLD_FILES+=usr/share/man/man8/usbd.8.gz
-# 20051029: rc.d/ppp-user renamed to rc.d/ppp for convenience
-OLD_FILES+=etc/rc.d/ppp-user
-# 20051012: setkey(8) moved to /sbin/
-OLD_FILES+=usr/sbin/setkey
-# 20050930: pccardd(8) removed
-OLD_FILES+=usr/sbin/pccardd
-OLD_FILES+=usr/share/man/man5/pccard.conf.5.gz
-OLD_FILES+=usr/share/man/man8/pccardd.8.gz
-# 20050927: bridge(4) replaced by if_bridge(4)
-OLD_FILES+=usr/include/net/bridge.h
-# 20050831: not implemented
-OLD_FILES+=usr/share/man/man3/getino.3.gz
-OLD_FILES+=usr/share/man/man3/putino.3.gz
-# 20050825: T/TCP retired several months ago
-OLD_FILES+=usr/share/man/man4/ttcp.4.gz
-# 20050805 tn3270 retired long ago
-OLD_FILES+=usr/share/misc/map3270
-# 20050801: too old to be interesting here
-OLD_FILES+=usr/share/doc/papers/px.ps.gz
-# 20050721: moved to ports
-OLD_FILES+=usr/sbin/vttest
-OLD_FILES+=usr/share/man/man1/vttest.1.gz
-# 20050617: wpa man pages moved to section 8
-OLD_FILES+=usr/share/man/man1/hostapd.1.gz
-OLD_FILES+=usr/share/man/man1/hostapd_cli.1.gz
-OLD_FILES+=usr/share/man/man1/wpa_cli.1.gz
-OLD_FILES+=usr/share/man/man1/wpa_supplicant.1.gz
-# 20050610: rexecd (insecure by design)
-OLD_FILES+=etc/pam.d/rexecd
-OLD_FILES+=usr/share/man/man8/rexecd.8.gz
-OLD_FILES+=usr/libexec/rexecd
-# 20050606: OpenBSD dhclient replaces ISC one
-OLD_FILES+=bin/omshell
-OLD_FILES+=sbin/omshell
-OLD_FILES+=usr/share/man/man1/omshell.1.gz
-OLD_FILES+=usr/share/man/man5/dhcp-eval.5.gz
-# 200504XX: ipf tools moved from /usr to /
-OLD_FILES+=rescue/ipfs
-OLD_FILES+=rescue/ipfstat
-OLD_FILES+=rescue/ipmon
-OLD_FILES+=rescue/ipnat
-OLD_FILES+=usr/sbin/ipftest
-OLD_FILES+=usr/sbin/ipresend
-OLD_FILES+=usr/sbin/ipsend
-OLD_FILES+=usr/sbin/iptest
-OLD_FILES+=usr/share/man/man1/ipnat.1.gz
-OLD_FILES+=usr/share/man/man1/ipsend.1.gz
-OLD_FILES+=usr/share/man/man1/iptest.1.gz
-OLD_FILES+=usr/share/man/man5/ipsend.5.gz
-# 200503XX: bsdtar takes over gtar
-OLD_FILES+=usr/bin/gtar
-OLD_FILES+=usr/share/man/man1/gtar.1.gz
-# 200503XX
-OLD_FILES+=usr/share/man/man3/exp10.3.gz
-OLD_FILES+=usr/share/man/man3/exp10f.3.gz
-OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz
-# 20050324: updated release infrastructure
-OLD_FILES+=usr/share/man/man5/drivers.conf.5.gz
-# 20050317: removed from BIND 9 distribution
-OLD_FILES+=usr/share/doc/bind9/KNOWN_DEFECTS
-# 2005XXXX:
-OLD_FILES+=sbin/mount_autofs
-OLD_FILES+=usr/lib/libautofs.a
-OLD_FILES+=usr/lib/libautofs.so
-OLD_FILES+=usr/share/man/man8/mount_autofs.8.gz
-# 20050203: Merged with fortunes
-OLD_FILES+=usr/share/games/fortune/fortunes2
-OLD_FILES+=usr/share/games/fortune/fortunes2.dat
-# 200501XX:
-OLD_FILES+=usr/libexec/getNAME
-# 200411XX: gvinum replaces vinum
-OLD_FILES+=bin/vinum
-OLD_FILES+=rescue/vinum
-OLD_FILES+=sbin/vinum
-OLD_FILES+=usr/share/man/man8/vinum.8.gz
-# 200411XX: libxpg4 removal
-OLD_FILES+=usr/lib/libxpg4.a
-OLD_FILES+=usr/lib/libxpg4.so
-OLD_FILES+=usr/lib/libxpg4_p.a
-# 20041109: replaced by em(4)
-OLD_FILES+=usr/share/man/man4/gx.4.gz
-OLD_FILES+=usr/share/man/man4/if_gx.4.gz
-# 20041017: rune interface removed
-OLD_FILES+=usr/include/rune.h
-OLD_FILES+=usr/share/man/man3/fgetrune.3.gz
-OLD_FILES+=usr/share/man/man3/fputrune.3.gz
-OLD_FILES+=usr/share/man/man3/fungetrune.3.gz
-OLD_FILES+=usr/share/man/man3/mbrrune.3.gz
-OLD_FILES+=usr/share/man/man3/mbrune.3.gz
-OLD_FILES+=usr/share/man/man3/rune.3.gz
-OLD_FILES+=usr/share/man/man3/setinvalidrune.3.gz
-OLD_FILES+=usr/share/man/man3/sgetrune.3.gz
-OLD_FILES+=usr/share/man/man3/sputrune.3.gz
-# 20040925: bind9 import
-OLD_FILES+=usr/bin/dnskeygen
-OLD_FILES+=usr/bin/dnsquery
-OLD_FILES+=usr/lib/libisc.a
-OLD_FILES+=usr/lib/libisc.so
-OLD_FILES+=usr/lib/libisc_p.a
-OLD_FILES+=usr/libexec/named-xfer
-OLD_FILES+=usr/sbin/named.restart
-OLD_FILES+=usr/sbin/ndc
-OLD_FILES+=usr/sbin/nslookup
-OLD_FILES+=usr/sbin/nsupdate
-OLD_FILES+=usr/share/doc/bind/html/acl.html
-OLD_FILES+=usr/share/doc/bind/html/address_list.html
-OLD_FILES+=usr/share/doc/bind/html/comments.html
-OLD_FILES+=usr/share/doc/bind/html/config.html
-OLD_FILES+=usr/share/doc/bind/html/controls.html
-OLD_FILES+=usr/share/doc/bind/html/docdef.html
-OLD_FILES+=usr/share/doc/bind/html/example.html
-OLD_FILES+=usr/share/doc/bind/html/include.html
-OLD_FILES+=usr/share/doc/bind/html/index.html
-OLD_FILES+=usr/share/doc/bind/html/key.html
-OLD_FILES+=usr/share/doc/bind/html/logging.html
-OLD_FILES+=usr/share/doc/bind/html/master.html
-OLD_FILES+=usr/share/doc/bind/html/options.html
-OLD_FILES+=usr/share/doc/bind/html/server.html
-OLD_FILES+=usr/share/doc/bind/html/trusted-keys.html
-OLD_FILES+=usr/share/doc/bind/html/zone.html
-OLD_FILES+=usr/share/doc/bind/misc/DynamicUpdate
-OLD_FILES+=usr/share/doc/bind/misc/FAQ.1of2
-OLD_FILES+=usr/share/doc/bind/misc/FAQ.2of2
-OLD_FILES+=usr/share/doc/bind/misc/rfc2317-notes.txt
-OLD_FILES+=usr/share/doc/bind/misc/style.txt
-OLD_FILES+=usr/share/man/man1/dnskeygen.1.gz
-OLD_FILES+=usr/share/man/man1/dnsquery.1.gz
-OLD_FILES+=usr/share/man/man8/named-bootconf.8.gz
-OLD_FILES+=usr/share/man/man8/named-xfer.8.gz
-OLD_FILES+=usr/share/man/man8/named.restart.8.gz
-OLD_FILES+=usr/share/man/man8/ndc.8.gz
-OLD_FILES+=usr/share/man/man8/nslookup.8.gz
-# 200409XX
-OLD_FILES+=usr/share/man/man3/ENSURE.3.gz
-OLD_FILES+=usr/share/man/man3/ENSURE_ERR.3.gz
-OLD_FILES+=usr/share/man/man3/INSIST.3.gz
-OLD_FILES+=usr/share/man/man3/INSIST_ERR.3.gz
-OLD_FILES+=usr/share/man/man3/INVARIANT.3.gz
-OLD_FILES+=usr/share/man/man3/INVARIANT_ERR.3.gz
-OLD_FILES+=usr/share/man/man3/REQUIRE.3.gz
-OLD_FILES+=usr/share/man/man3/REQUIRE_ERR.3.gz
-OLD_FILES+=usr/share/man/man3/assertion_type_to_text.3.gz
-OLD_FILES+=usr/share/man/man3/assertions.3.gz
-OLD_FILES+=usr/share/man/man3/bitncmp.3.gz
-OLD_FILES+=usr/share/man/man3/evAddTime.3.gz
-OLD_FILES+=usr/share/man/man3/evCancelConn.3.gz
-OLD_FILES+=usr/share/man/man3/evCancelRW.3.gz
-OLD_FILES+=usr/share/man/man3/evClearIdleTimer.3.gz
-OLD_FILES+=usr/share/man/man3/evClearTimer.3.gz
-OLD_FILES+=usr/share/man/man3/evCmpTime.3.gz
-OLD_FILES+=usr/share/man/man3/evConnFunc.3.gz
-OLD_FILES+=usr/share/man/man3/evConnect.3.gz
-OLD_FILES+=usr/share/man/man3/evConsIovec.3.gz
-OLD_FILES+=usr/share/man/man3/evConsTime.3.gz
-OLD_FILES+=usr/share/man/man3/evCreate.3.gz
-OLD_FILES+=usr/share/man/man3/evDefer.3.gz
-OLD_FILES+=usr/share/man/man3/evDeselectFD.3.gz
-OLD_FILES+=usr/share/man/man3/evDestroy.3.gz
-OLD_FILES+=usr/share/man/man3/evDispatch.3.gz
-OLD_FILES+=usr/share/man/man3/evDo.3.gz
-OLD_FILES+=usr/share/man/man3/evDrop.3.gz
-OLD_FILES+=usr/share/man/man3/evFileFunc.3.gz
-OLD_FILES+=usr/share/man/man3/evGetNext.3.gz
-OLD_FILES+=usr/share/man/man3/evHold.3.gz
-OLD_FILES+=usr/share/man/man3/evInitID.3.gz
-OLD_FILES+=usr/share/man/man3/evLastEventTime.3.gz
-OLD_FILES+=usr/share/man/man3/evListen.3.gz
-OLD_FILES+=usr/share/man/man3/evMainLoop.3.gz
-OLD_FILES+=usr/share/man/man3/evNowTime.3.gz
-OLD_FILES+=usr/share/man/man3/evPrintf.3.gz
-OLD_FILES+=usr/share/man/man3/evRead.3.gz
-OLD_FILES+=usr/share/man/man3/evResetTimer.3.gz
-OLD_FILES+=usr/share/man/man3/evSelectFD.3.gz
-OLD_FILES+=usr/share/man/man3/evSetDebug.3.gz
-OLD_FILES+=usr/share/man/man3/evSetIdleTimer.3.gz
-OLD_FILES+=usr/share/man/man3/evSetTimer.3.gz
-OLD_FILES+=usr/share/man/man3/evStreamFunc.3.gz
-OLD_FILES+=usr/share/man/man3/evSubTime.3.gz
-OLD_FILES+=usr/share/man/man3/evTestID.3.gz
-OLD_FILES+=usr/share/man/man3/evTimeRW.3.gz
-OLD_FILES+=usr/share/man/man3/evTimeSpec.3.gz
-OLD_FILES+=usr/share/man/man3/evTimeVal.3.gz
-OLD_FILES+=usr/share/man/man3/evTimerFunc.3.gz
-OLD_FILES+=usr/share/man/man3/evTouchIdleTimer.3.gz
-OLD_FILES+=usr/share/man/man3/evTryAccept.3.gz
-OLD_FILES+=usr/share/man/man3/evUnhold.3.gz
-OLD_FILES+=usr/share/man/man3/evUntimeRW.3.gz
-OLD_FILES+=usr/share/man/man3/evUnwait.3.gz
-OLD_FILES+=usr/share/man/man3/evWaitFor.3.gz
-OLD_FILES+=usr/share/man/man3/evWaitFunc.3.gz
-OLD_FILES+=usr/share/man/man3/evWrite.3.gz
-OLD_FILES+=usr/share/man/man3/eventlib.3.gz
-OLD_FILES+=usr/share/man/man3/heap.3.gz
-OLD_FILES+=usr/share/man/man3/heap_decreased.3.gz
-OLD_FILES+=usr/share/man/man3/heap_delete.3.gz
-OLD_FILES+=usr/share/man/man3/heap_element.3.gz
-OLD_FILES+=usr/share/man/man3/heap_for_each.3.gz
-OLD_FILES+=usr/share/man/man3/heap_free.3.gz
-OLD_FILES+=usr/share/man/man3/heap_increased.3.gz
-OLD_FILES+=usr/share/man/man3/heap_insert.3.gz
-OLD_FILES+=usr/share/man/man3/heap_new.3.gz
-OLD_FILES+=usr/share/man/man3/log_add_channel.3.gz
-OLD_FILES+=usr/share/man/man3/log_category_is_active.3.gz
-OLD_FILES+=usr/share/man/man3/log_close_stream.3.gz
-OLD_FILES+=usr/share/man/man3/log_dec_references.3.gz
-OLD_FILES+=usr/share/man/man3/log_free_channel.3.gz
-OLD_FILES+=usr/share/man/man3/log_free_context.3.gz
-OLD_FILES+=usr/share/man/man3/log_get_filename.3.gz
-OLD_FILES+=usr/share/man/man3/log_get_stream.3.gz
-OLD_FILES+=usr/share/man/man3/log_inc_references.3.gz
-OLD_FILES+=usr/share/man/man3/log_new_context.3.gz
-OLD_FILES+=usr/share/man/man3/log_new_file_channel.3.gz
-OLD_FILES+=usr/share/man/man3/log_new_null_channel.3.gz
-OLD_FILES+=usr/share/man/man3/log_new_syslog_channel.3.gz
-OLD_FILES+=usr/share/man/man3/log_open_stream.3.gz
-OLD_FILES+=usr/share/man/man3/log_option.3.gz
-OLD_FILES+=usr/share/man/man3/log_remove_channel.3.gz
-OLD_FILES+=usr/share/man/man3/log_set_file_owner.3.gz
-OLD_FILES+=usr/share/man/man3/log_vwrite.3.gz
-OLD_FILES+=usr/share/man/man3/log_write.3.gz
-OLD_FILES+=usr/share/man/man3/logging.3.gz
-OLD_FILES+=usr/share/man/man3/memcluster.3.gz
-OLD_FILES+=usr/share/man/man3/memget.3.gz
-OLD_FILES+=usr/share/man/man3/memput.3.gz
-OLD_FILES+=usr/share/man/man3/memstats.3.gz
-OLD_FILES+=usr/share/man/man3/set_assertion_failure_callback.3.
-OLD_FILES+=usr/share/man/man3/sigwait.3.gz
-OLD_FILES+=usr/share/man/man3/tree_add.3.gz
-OLD_FILES+=usr/share/man/man3/tree_delete.3.gz
-OLD_FILES+=usr/share/man/man3/tree_init.3.gz
-OLD_FILES+=usr/share/man/man3/tree_mung.3.gz
-OLD_FILES+=usr/share/man/man3/tree_srch.3.gz
-OLD_FILES+=usr/share/man/man3/tree_trav.3.gz
-# 2004XXYY: OS internal libs, no ports use them, no need to use OLD_LIBS
-OLD_LIBS+=lib/geom/geom_concat.so.1
-OLD_LIBS+=lib/geom/geom_label.so.1
-OLD_LIBS+=lib/geom/geom_nop.so.1
-OLD_LIBS+=lib/geom/geom_stripe.so.1
-# 20040728: GCC 3.4.2
-OLD_DIRS+=usr/include/c++/3.3
-OLD_FILES+=usr/include/c++/3.3/FlexLexer.h
-OLD_FILES+=usr/include/c++/3.3/algorithm
-OLD_FILES+=usr/include/c++/3.3/backward/algo.h
-OLD_FILES+=usr/include/c++/3.3/backward/algobase.h
-OLD_FILES+=usr/include/c++/3.3/backward/alloc.h
-OLD_FILES+=usr/include/c++/3.3/backward/backward_warning.h
-OLD_FILES+=usr/include/c++/3.3/backward/bvector.h
-OLD_FILES+=usr/include/c++/3.3/backward/complex.h
-OLD_FILES+=usr/include/c++/3.3/backward/defalloc.h
-OLD_FILES+=usr/include/c++/3.3/backward/deque.h
-OLD_FILES+=usr/include/c++/3.3/backward/fstream.h
-OLD_FILES+=usr/include/c++/3.3/backward/function.h
-OLD_FILES+=usr/include/c++/3.3/backward/hash_map.h
-OLD_FILES+=usr/include/c++/3.3/backward/hash_set.h
-OLD_FILES+=usr/include/c++/3.3/backward/hashtable.h
-OLD_FILES+=usr/include/c++/3.3/backward/heap.h
-OLD_FILES+=usr/include/c++/3.3/backward/iomanip.h
-OLD_FILES+=usr/include/c++/3.3/backward/iostream.h
-OLD_FILES+=usr/include/c++/3.3/backward/istream.h
-OLD_FILES+=usr/include/c++/3.3/backward/iterator.h
-OLD_FILES+=usr/include/c++/3.3/backward/list.h
-OLD_FILES+=usr/include/c++/3.3/backward/map.h
-OLD_FILES+=usr/include/c++/3.3/backward/multimap.h
-OLD_FILES+=usr/include/c++/3.3/backward/multiset.h
-OLD_FILES+=usr/include/c++/3.3/backward/new.h
-OLD_FILES+=usr/include/c++/3.3/backward/ostream.h
-OLD_FILES+=usr/include/c++/3.3/backward/pair.h
-OLD_FILES+=usr/include/c++/3.3/backward/queue.h
-OLD_FILES+=usr/include/c++/3.3/backward/rope.h
-OLD_FILES+=usr/include/c++/3.3/backward/set.h
-OLD_FILES+=usr/include/c++/3.3/backward/slist.h
-OLD_FILES+=usr/include/c++/3.3/backward/stack.h
-OLD_FILES+=usr/include/c++/3.3/backward/stream.h
-OLD_FILES+=usr/include/c++/3.3/backward/streambuf.h
-OLD_FILES+=usr/include/c++/3.3/backward/strstream
-OLD_FILES+=usr/include/c++/3.3/backward/strstream.h
-OLD_FILES+=usr/include/c++/3.3/backward/tempbuf.h
-OLD_FILES+=usr/include/c++/3.3/backward/tree.h
-OLD_FILES+=usr/include/c++/3.3/backward/vector.h
-OLD_DIRS+=usr/include/c++/3.3/backward
-OLD_FILES+=usr/include/c++/3.3/bits/atomicity.h
-OLD_FILES+=usr/include/c++/3.3/bits/basic_file.h
-OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.h
-OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/basic_string.h
-OLD_FILES+=usr/include/c++/3.3/bits/basic_string.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/boost_concept_check.h
-OLD_FILES+=usr/include/c++/3.3/bits/c++config.h
-OLD_FILES+=usr/include/c++/3.3/bits/c++io.h
-OLD_FILES+=usr/include/c++/3.3/bits/c++locale.h
-OLD_FILES+=usr/include/c++/3.3/bits/c++locale_internal.h
-OLD_FILES+=usr/include/c++/3.3/bits/char_traits.h
-OLD_FILES+=usr/include/c++/3.3/bits/cmath.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/codecvt.h
-OLD_FILES+=usr/include/c++/3.3/bits/codecvt_specializations.h
-OLD_FILES+=usr/include/c++/3.3/bits/concept_check.h
-OLD_FILES+=usr/include/c++/3.3/bits/cpp_type_traits.h
-OLD_FILES+=usr/include/c++/3.3/bits/ctype_base.h
-OLD_FILES+=usr/include/c++/3.3/bits/ctype_inline.h
-OLD_FILES+=usr/include/c++/3.3/bits/ctype_noninline.h
-OLD_FILES+=usr/include/c++/3.3/bits/deque.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/fpos.h
-OLD_FILES+=usr/include/c++/3.3/bits/fstream.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/functexcept.h
-OLD_FILES+=usr/include/c++/3.3/bits/generic_shadow.h
-OLD_FILES+=usr/include/c++/3.3/bits/gslice.h
-OLD_FILES+=usr/include/c++/3.3/bits/gslice_array.h
-OLD_FILES+=usr/include/c++/3.3/bits/gthr-default.h
-OLD_FILES+=usr/include/c++/3.3/bits/gthr-posix.h
-OLD_FILES+=usr/include/c++/3.3/bits/gthr-single.h
-OLD_FILES+=usr/include/c++/3.3/bits/gthr.h
-OLD_FILES+=usr/include/c++/3.3/bits/indirect_array.h
-OLD_FILES+=usr/include/c++/3.3/bits/ios_base.h
-OLD_FILES+=usr/include/c++/3.3/bits/istream.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/list.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/locale_classes.h
-OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.h
-OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/localefwd.h
-OLD_FILES+=usr/include/c++/3.3/bits/mask_array.h
-OLD_FILES+=usr/include/c++/3.3/bits/messages_members.h
-OLD_FILES+=usr/include/c++/3.3/bits/os_defines.h
-OLD_FILES+=usr/include/c++/3.3/bits/ostream.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/pthread_allocimpl.h
-OLD_FILES+=usr/include/c++/3.3/bits/slice.h
-OLD_FILES+=usr/include/c++/3.3/bits/slice_array.h
-OLD_FILES+=usr/include/c++/3.3/bits/sstream.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/stl_algo.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_algobase.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_alloc.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_bvector.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_construct.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_deque.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_function.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_heap.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_funcs.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_types.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_list.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_map.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_multimap.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_multiset.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_numeric.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_pair.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_pthread_alloc.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_queue.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_raw_storage_iter.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_relops.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_set.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_stack.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_tempbuf.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_threads.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_tree.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_uninitialized.h
-OLD_FILES+=usr/include/c++/3.3/bits/stl_vector.h
-OLD_FILES+=usr/include/c++/3.3/bits/stream_iterator.h
-OLD_FILES+=usr/include/c++/3.3/bits/streambuf.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/streambuf_iterator.h
-OLD_FILES+=usr/include/c++/3.3/bits/stringfwd.h
-OLD_FILES+=usr/include/c++/3.3/bits/time_members.h
-OLD_FILES+=usr/include/c++/3.3/bits/type_traits.h
-OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.h
-OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.tcc
-OLD_FILES+=usr/include/c++/3.3/bits/valarray_meta.h
-OLD_FILES+=usr/include/c++/3.3/bits/vector.tcc
-OLD_DIRS+=usr/include/c++/3.3/bits
-OLD_FILES+=usr/include/c++/3.3/bitset
-OLD_FILES+=usr/include/c++/3.3/cassert
-OLD_FILES+=usr/include/c++/3.3/cctype
-OLD_FILES+=usr/include/c++/3.3/cerrno
-OLD_FILES+=usr/include/c++/3.3/cfloat
-OLD_FILES+=usr/include/c++/3.3/ciso646
-OLD_FILES+=usr/include/c++/3.3/climits
-OLD_FILES+=usr/include/c++/3.3/clocale
-OLD_FILES+=usr/include/c++/3.3/cmath
-OLD_FILES+=usr/include/c++/3.3/complex
-OLD_FILES+=usr/include/c++/3.3/csetjmp
-OLD_FILES+=usr/include/c++/3.3/csignal
-OLD_FILES+=usr/include/c++/3.3/cstdarg
-OLD_FILES+=usr/include/c++/3.3/cstddef
-OLD_FILES+=usr/include/c++/3.3/cstdio
-OLD_FILES+=usr/include/c++/3.3/cstdlib
-OLD_FILES+=usr/include/c++/3.3/cstring
-OLD_FILES+=usr/include/c++/3.3/ctime
-OLD_FILES+=usr/include/c++/3.3/cwchar
-OLD_FILES+=usr/include/c++/3.3/cwctype
-OLD_FILES+=usr/include/c++/3.3/cxxabi.h
-OLD_FILES+=usr/include/c++/3.3/deque
-OLD_FILES+=usr/include/c++/3.3/exception
-OLD_FILES+=usr/include/c++/3.3/exception_defines.h
-OLD_FILES+=usr/include/c++/3.3/ext/algorithm
-OLD_FILES+=usr/include/c++/3.3/ext/enc_filebuf.h
-OLD_FILES+=usr/include/c++/3.3/ext/functional
-OLD_FILES+=usr/include/c++/3.3/ext/hash_map
-OLD_FILES+=usr/include/c++/3.3/ext/hash_set
-OLD_FILES+=usr/include/c++/3.3/ext/iterator
-OLD_FILES+=usr/include/c++/3.3/ext/memory
-OLD_FILES+=usr/include/c++/3.3/ext/numeric
-OLD_FILES+=usr/include/c++/3.3/ext/rb_tree
-OLD_FILES+=usr/include/c++/3.3/ext/rope
-OLD_FILES+=usr/include/c++/3.3/ext/ropeimpl.h
-OLD_FILES+=usr/include/c++/3.3/ext/slist
-OLD_FILES+=usr/include/c++/3.3/ext/stdio_filebuf.h
-OLD_FILES+=usr/include/c++/3.3/ext/stl_hash_fun.h
-OLD_FILES+=usr/include/c++/3.3/ext/stl_hashtable.h
-OLD_FILES+=usr/include/c++/3.3/ext/stl_rope.h
-OLD_DIRS+=usr/include/c++/3.3/ext
-OLD_FILES+=usr/include/c++/3.3/fstream
-OLD_FILES+=usr/include/c++/3.3/functional
-OLD_FILES+=usr/include/c++/3.3/iomanip
-OLD_FILES+=usr/include/c++/3.3/ios
-OLD_FILES+=usr/include/c++/3.3/iosfwd
-OLD_FILES+=usr/include/c++/3.3/iostream
-OLD_FILES+=usr/include/c++/3.3/istream
-OLD_FILES+=usr/include/c++/3.3/iterator
-OLD_FILES+=usr/include/c++/3.3/limits
-OLD_FILES+=usr/include/c++/3.3/list
-OLD_FILES+=usr/include/c++/3.3/locale
-OLD_FILES+=usr/include/c++/3.3/map
-OLD_FILES+=usr/include/c++/3.3/memory
-OLD_FILES+=usr/include/c++/3.3/new
-OLD_FILES+=usr/include/c++/3.3/numeric
-OLD_FILES+=usr/include/c++/3.3/ostream
-OLD_FILES+=usr/include/c++/3.3/queue
-OLD_FILES+=usr/include/c++/3.3/set
-OLD_FILES+=usr/include/c++/3.3/sstream
-OLD_FILES+=usr/include/c++/3.3/stack
-OLD_FILES+=usr/include/c++/3.3/stdexcept
-OLD_FILES+=usr/include/c++/3.3/streambuf
-OLD_FILES+=usr/include/c++/3.3/string
-OLD_FILES+=usr/include/c++/3.3/typeinfo
-OLD_FILES+=usr/include/c++/3.3/utility
-OLD_FILES+=usr/include/c++/3.3/valarray
-OLD_FILES+=usr/include/c++/3.3/vector
-# 20040713: fla(4) removed
-OLD_FILES+=usr/share/man/man4/fla.4.gz
-# 200407XX
-OLD_FILES+=usr/sbin/kernbb
-OLD_FILES+=usr/sbin/ntp-genkeys
-OLD_FILES+=usr/sbin/ntptimeset
-OLD_FILES+=usr/share/man/man8/kernbb.8.gz
-OLD_FILES+=usr/share/man/man8/ntp-genkeys.8.gz
-# 20040627: usbdevs.h and usbdevs_data.h removal
-OLD_FILES+=usr/include/dev/usb/usbdevs.h
-OLD_FILES+=usr/include/dev/usb/usbdevs_data.h
-# 200406XX
-OLD_FILES+=usr/bin/gasp
-OLD_FILES+=usr/bin/gdbreplay
-OLD_FILES+=usr/share/man/man1/gasp.1.gz
-OLD_FILES+=sbin/mountd
-OLD_FILES+=sbin/mount_fdesc
-OLD_FILES+=sbin/mount_umap
-OLD_FILES+=sbin/mount_union
-OLD_FILES+=sbin/mount_msdos
-OLD_FILES+=sbin/mount_null
-OLD_FILES+=sbin/mount_kernfs
-# 200405XX: arl
-OLD_FILES+=usr/sbin/arlconfig
-OLD_FILES+=usr/share/man/man8/arlconfig.8.gz
-# 200403XX
-OLD_FILES+=bin/raidctl
-OLD_FILES+=sbin/raidctl
-OLD_FILES+=usr/bin/sasc
-OLD_FILES+=usr/sbin/sgsc
-OLD_FILES+=usr/sbin/stlload
-OLD_FILES+=usr/sbin/stlstats
-OLD_FILES+=usr/share/man/man1/sasc.1.gz
-OLD_FILES+=usr/share/man/man1/sgsc.1.gz
-OLD_FILES+=usr/share/man/man4/i386/stl.4.gz
-OLD_FILES+=usr/share/man/man8/raidctl.8.gz
-# 20040229: clean_environment() was removed after 3 days
-OLD_FILES+=usr/share/man/man3/clean_environment.3.gz
-# 20040119: installed as `isdntel' in newer systems
-OLD_FILES+=etc/isdn/isdntel.sh
-# 200XYYZZ: /lib transition clitches
-OLD_FILES+=lib/libalias.so
-OLD_FILES+=lib/libatm.so
-OLD_FILES+=lib/libbsdxml.so
-OLD_FILES+=lib/libc.so
-OLD_FILES+=lib/libcam.so
-OLD_FILES+=lib/libcrypt.so
-OLD_FILES+=lib/libcrypto.so
-OLD_FILES+=lib/libdevstat.so
-OLD_FILES+=lib/libedit.so
-OLD_FILES+=lib/libgeom.so
-OLD_FILES+=lib/libipsec.so
-OLD_FILES+=lib/libipx.so
-OLD_FILES+=lib/libkvm.so
-OLD_FILES+=lib/libm.so
-OLD_FILES+=lib/libmd.so
-OLD_FILES+=lib/libncurses.so
-OLD_FILES+=lib/libreadline.so
-OLD_FILES+=lib/libsbuf.so
-OLD_FILES+=lib/libufs.so
-OLD_FILES+=lib/libz.so
-# 200312XX
-OLD_FILES+=bin/cxconfig
-OLD_FILES+=sbin/cxconfig
-OLD_FILES+=usr/share/man/man8/cxconfig.8.gz
-# 20031016: MULTI_DRIVER_MODULE macro removed
-OLD_FILES+=usr/share/man/man9/MULTI_DRIVER_MODULE.9.gz
-# 200309XX
-OLD_FILES+=usr/bin/symorder
-OLD_FILES+=usr/share/man/man1/symorder.1.gz
-# 200308XX
-OLD_FILES+=usr/sbin/amldb
-OLD_FILES+=usr/share/man/man8/amldb.8.gz
-# 200307XX
-OLD_FILES+=sbin/mount_nwfs
-OLD_FILES+=sbin/mount_portalfs
-OLD_FILES+=sbin/mount_smbfs
-# 200306XX
-OLD_FILES+=usr/sbin/dev_mkdb
-OLD_FILES+=usr/share/man/man8/dev_mkdb.8.gz
-# 200304XX
-OLD_FILES+=usr/lib/libcipher.a
-OLD_FILES+=usr/lib/libcipher.so
-OLD_FILES+=usr/lib/libcipher_p.a
-OLD_FILES+=usr/lib/libgmp.a
-OLD_FILES+=usr/lib/libgmp.so
-OLD_FILES+=usr/lib/libgmp_p.a
-OLD_FILES+=usr/lib/libperl.a
-OLD_FILES+=usr/lib/libperl.so
-OLD_FILES+=usr/lib/libperl_p.a
-OLD_FILES+=usr/lib/libposix1e.a
-OLD_FILES+=usr/lib/libposix1e.so
-OLD_FILES+=usr/lib/libposix1e_p.a
-OLD_FILES+=usr/lib/libskey.a
-OLD_FILES+=usr/lib/libskey.so
-OLD_FILES+=usr/lib/libskey_p.a
-OLD_FILES+=usr/libexec/tradcpp0
-OLD_FILES+=usr/libexec/cpp0
-# 200304XX: removal of xten
-OLD_FILES+=usr/libexec/xtend
-OLD_FILES+=usr/sbin/xten
-OLD_FILES+=usr/share/man/man1/xten.1.gz
-OLD_FILES+=usr/share/man/man8/xtend.8.gz
-# 200303XX
-OLD_FILES+=usr/lib/libacl.so
-OLD_FILES+=usr/lib/libdescrypt.so
-OLD_FILES+=usr/lib/libf2c.so
-OLD_FILES+=usr/lib/libg++.so
-OLD_FILES+=usr/lib/libkdb.so
-OLD_FILES+=usr/lib/librsaINTL.so
-OLD_FILES+=usr/lib/libscrypt.so
-OLD_FILES+=usr/lib/libss.so
-# 200302XX
-OLD_FILES+=usr/lib/libacl.a
-OLD_FILES+=usr/lib/libacl_p.a
-OLD_FILES+=usr/lib/libkadm.a
-OLD_FILES+=usr/lib/libkadm.so
-OLD_FILES+=usr/lib/libkadm_p.a
-OLD_FILES+=usr/lib/libkafs.a
-OLD_FILES+=usr/lib/libkafs.so
-OLD_FILES+=usr/lib/libkafs_p.a
-OLD_FILES+=usr/lib/libkdb.a
-OLD_FILES+=usr/lib/libkdb_p.a
-OLD_FILES+=usr/lib/libkrb.a
-OLD_FILES+=usr/lib/libkrb.so
-OLD_FILES+=usr/lib/libkrb_p.a
-OLD_FILES+=usr/share/man/man3/SSL_CIPHER_get_name.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_COMP_add_compression_method.3
-OLD_FILES+=usr/share/man/man3/SSL_CTX_add_extra_chain_cert.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_add_session.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_ctrl.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_flush_sessions.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_free.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_get_verify_mode.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_load_verify_locations.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_new.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_sess_number.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_sess_set_cache_size.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_sess_set_get_cb.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_sessions.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_cert_store.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_cert_verify_callback.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_cipher_list.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_client_CA_list.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_client_cert_cb.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_default_passwd_cb.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_generate_session_id.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_info_callback.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_max_cert_list.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_mode.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_msg_callback.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_options.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_quiet_shutdown.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_session_cache_mode.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_session_id_context.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_ssl_version.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_timeout.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_tmp_dh_callback.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_tmp_rsa_callback.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_set_verify.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_use_certificate.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_SESSION_free.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_SESSION_get_ex_new_index.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_SESSION_get_time.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_accept.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_alert_type_string.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_clear.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_connect.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_do_handshake.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_free.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_SSL_CTX.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_ciphers.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_client_CA_list.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_current_cipher.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_default_timeout.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_error.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_ex_data_X509_STORE_CTX_idx.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_fd.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_peer_cert_chain.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_peer_certificate.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_rbio.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_session.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_verify_result.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_get_version.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_library_init.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_load_client_CA_file.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_new.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_pending.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_read.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_rstate_string.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_session_reused.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_set_bio.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_set_connect_state.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_set_fd.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_set_session.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_set_shutdown.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_set_verify_result.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_shutdown.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_state_string.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_want.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_write.3.gz
-OLD_FILES+=usr/share/man/man3/d2i_SSL_SESSION.3.gz
-# 200301XX
-OLD_FILES+=usr/share/man/man3/des_3cbc_encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/des_3ecb_encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/des_cbc_cksum.3.gz
-OLD_FILES+=usr/share/man/man3/des_cbc_encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/des_cfb_encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/des_ecb_encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/des_enc_read.3.gz
-OLD_FILES+=usr/share/man/man3/des_enc_write.3.gz
-OLD_FILES+=usr/share/man/man3/des_is_weak_key.3.gz
-OLD_FILES+=usr/share/man/man3/des_key_sched.3.gz
-OLD_FILES+=usr/share/man/man3/des_ofb_encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/des_pcbc_encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/des_quad_cksum.3.gz
-OLD_FILES+=usr/share/man/man3/des_random_key.3.gz
-OLD_FILES+=usr/share/man/man3/des_read_2password.3.gz
-OLD_FILES+=usr/share/man/man3/des_read_password.3.gz
-OLD_FILES+=usr/share/man/man3/des_read_pw_string.3.gz
-OLD_FILES+=usr/share/man/man3/des_set_key.3.gz
-OLD_FILES+=usr/share/man/man3/des_set_odd_parity.3.gz
-OLD_FILES+=usr/share/man/man3/des_string_to_2key.3.gz
-OLD_FILES+=usr/share/man/man3/des_string_to_key.3.gz
-# 200212XX
-OLD_FILES+=usr/sbin/kenv
-OLD_FILES+=usr/bin/kenv
-OLD_FILES+=usr/sbin/elf2aout
-# 200210XX
-OLD_FILES+=usr/include/libusbhid.h
-OLD_FILES+=usr/share/man/man3/All_FreeBSD.3.gz
-OLD_FILES+=usr/share/man/man3/CheckRules.3.gz
-OLD_FILES+=usr/share/man/man3/ChunkCanBeRoot.3.gz
-OLD_FILES+=usr/share/man/man3/Clone_Disk.3.gz
-OLD_FILES+=usr/share/man/man3/Collapse_Chunk.3.gz
-OLD_FILES+=usr/share/man/man3/Collapse_Disk.3.gz
-OLD_FILES+=usr/share/man/man3/Create_Chunk.3.gz
-OLD_FILES+=usr/share/man/man3/Create_Chunk_DWIM.3.gz
-OLD_FILES+=usr/share/man/man3/Cyl_Aligned.3.gz
-OLD_FILES+=usr/share/man/man3/Debug_Disk.3.gz
-OLD_FILES+=usr/share/man/man3/Delete_Chunk.3.gz
-OLD_FILES+=usr/share/man/man3/Disk_Names.3.gz
-OLD_FILES+=usr/share/man/man3/Free_Disk.3.gz
-OLD_FILES+=usr/share/man/man3/MakeDev.3.gz
-OLD_FILES+=usr/share/man/man3/MakeDevDisk.3.gz
-OLD_FILES+=usr/share/man/man3/Next_Cyl_Aligned.3.gz
-OLD_FILES+=usr/share/man/man3/Next_Track_Aligned.3.gz
-OLD_FILES+=usr/share/man/man3/Open_Disk.3.gz
-OLD_FILES+=usr/share/man/man3/Prev_Cyl_Aligned.3.gz
-OLD_FILES+=usr/share/man/man3/Prev_Track_Aligned.3.gz
-OLD_FILES+=usr/share/man/man3/Set_Bios_Geom.3.gz
-OLD_FILES+=usr/share/man/man3/Set_Boot_Blocks.3.gz
-OLD_FILES+=usr/share/man/man3/Set_Boot_Mgr.3.gz
-OLD_FILES+=usr/share/man/man3/ShowChunkFlags.3.gz
-OLD_FILES+=usr/share/man/man3/Track_Aligned.3.gz
-OLD_FILES+=usr/share/man/man3/Write_Disk.3.gz
-OLD_FILES+=usr/share/man/man3/slice_type_name.3.gz
-# 200210XX: most games moved to ports
-OLD_FILES+=usr/share/man/man6/adventure.6.gz
-OLD_FILES+=usr/share/man/man6/arithmetic.6.gz
-OLD_FILES+=usr/share/man/man6/atc.6.gz
-OLD_FILES+=usr/share/man/man6/backgammon.6.gz
-OLD_FILES+=usr/share/man/man6/battlestar.6.gz
-OLD_FILES+=usr/share/man/man6/bs.6.gz
-OLD_FILES+=usr/share/man/man6/canfield.6.gz
-OLD_FILES+=usr/share/man/man6/cfscores.6.gz
-OLD_FILES+=usr/share/man/man6/cribbage.6.gz
-OLD_FILES+=usr/share/man/man6/fish.6.gz
-OLD_FILES+=usr/share/man/man6/hack.6.gz
-OLD_FILES+=usr/share/man/man6/hangman.6.gz
-OLD_FILES+=usr/share/man/man6/larn.6.gz
-OLD_FILES+=usr/share/man/man6/mille.6.gz
-OLD_FILES+=usr/share/man/man6/phantasia.6.gz
-OLD_FILES+=usr/share/man/man6/piano.6.gz
-OLD_FILES+=usr/share/man/man6/pig.6.gz
-OLD_FILES+=usr/share/man/man6/quiz.6.gz
-OLD_FILES+=usr/share/man/man6/rain.6.gz
-OLD_FILES+=usr/share/man/man6/robots.6.gz
-OLD_FILES+=usr/share/man/man6/rogue.6.gz
-OLD_FILES+=usr/share/man/man6/sail.6.gz
-OLD_FILES+=usr/share/man/man6/snake.6.gz
-OLD_FILES+=usr/share/man/man6/snscore.6.gz
-OLD_FILES+=usr/share/man/man6/trek.6.gz
-OLD_FILES+=usr/share/man/man6/wargames.6.gz
-OLD_FILES+=usr/share/man/man6/worm.6.gz
-OLD_FILES+=usr/share/man/man6/worms.6.gz
-OLD_FILES+=usr/share/man/man6/wump.6.gz
-# 200207XX
-OLD_FILES+=usr/share/man/man1aout/ar.1aout.gz
-OLD_FILES+=usr/share/man/man1aout/as.1aout.gz
-OLD_FILES+=usr/share/man/man1aout/ld.1aout.gz
-OLD_FILES+=usr/share/man/man1aout/nm.1aout.gz
-OLD_FILES+=usr/share/man/man1aout/ranlib.1aout.gz
-OLD_FILES+=usr/share/man/man1aout/size.1aout.gz
-OLD_FILES+=usr/share/man/man1aout/strings.1aout.gz
-OLD_FILES+=usr/share/man/man1aout/strip.1aout.gz
-OLD_FILES+=bin/mountd
-OLD_FILES+=bin/nfsd
-# 20020707 sbin/nfsd -> usr.sbin/nfsd
-OLD_FILES+=sbin/nfsd
-# 200206XX
-OLD_FILES+=usr/lib/libpam_ssh.a
-OLD_FILES+=usr/lib/libpam_ssh_p.a
-OLD_FILES+=usr/bin/help
-OLD_FILES+=usr/bin/sccs
-.if ${TARGET_ARCH} != "amd64" && ${TARGET} != "arm" && ${TARGET_ARCH} != "i386" && ${TARGET} != "powerpc"
-OLD_FILES+=usr/bin/gdbserver
-.endif
-OLD_FILES+=usr/bin/ssh-keysign
-OLD_FILES+=usr/sbin/gifconfig
-OLD_FILES+=usr/sbin/prefix
-# 200205XX
-OLD_FILES+=usr/bin/doscmd
-# 200204XX
-OLD_FILES+=usr/bin/a2p
-OLD_FILES+=usr/bin/ptx
-OLD_FILES+=usr/bin/pod2text
-OLD_FILES+=usr/bin/pod2man
-OLD_FILES+=usr/bin/pod2latex
-OLD_FILES+=usr/bin/pod2html
-OLD_FILES+=usr/bin/h2ph
-OLD_FILES+=usr/bin/dprofpp
-OLD_FILES+=usr/bin/c2ph
-OLD_FILES+=usr/bin/h2xs
-OLD_FILES+=usr/bin/pl2pm
-OLD_FILES+=usr/bin/splain
-OLD_FILES+=usr/bin/s2p
-OLD_FILES+=usr/bin/find2perl
-OLD_FILES+=usr/sbin/pkg_update
-OLD_FILES+=usr/sbin/scriptdump
-# 20020409 GC kget(1), userconfig is long dead.
-OLD_FILES+=sbin/kget
-OLD_FILES+=usr/share/man/man8/kget.8.gz
-# 200203XX
-OLD_FILES+=usr/lib/libss.a
-OLD_FILES+=usr/lib/libss_p.a
-OLD_FILES+=usr/lib/libtelnet.a
-OLD_FILES+=usr/lib/libtelnet_p.a
-OLD_FILES+=usr/sbin/diskpart
-# 200202XX
-OLD_FILES+=usr/bin/gprof4
-# 200201XX
-OLD_FILES+=usr/sbin/linux
-# 2001XXXX
-OLD_FILES+=usr/bin/joy
-OLD_FILES+=usr/sbin/ibcs2
-OLD_FILES+=usr/sbin/svr4
-OLD_FILES+=usr/bin/chflags
-OLD_FILES+=usr/sbin/uuconv
-OLD_FILES+=usr/sbin/uuchk
-OLD_FILES+=usr/sbin/portmap
-OLD_FILES+=usr/sbin/pmap_set
-OLD_FILES+=usr/sbin/pmap_dump
-OLD_FILES+=usr/sbin/mcon
-OLD_FILES+=usr/sbin/stlstty
-OLD_FILES+=usr/sbin/ispppcontrol
-OLD_FILES+=usr/sbin/rndcontrol
-# 20011001: UUCP migration to ports
-OLD_FILES+=usr/bin/uucp
-OLD_FILES+=usr/bin/uulog
-OLD_FILES+=usr/bin/uuname
-OLD_FILES+=usr/bin/uupick
-OLD_FILES+=usr/bin/uusched
-OLD_FILES+=usr/bin/uustat
-OLD_FILES+=usr/bin/uuto
-OLD_FILES+=usr/bin/uux
-OLD_FILES+=usr/libexec/uucp/uucico
-OLD_FILES+=usr/libexec/uucp/uuxqt
-OLD_FILES+=usr/libexec/uucpd
-OLD_FILES+=usr/share/man/man1/uuconv.1.gz
-OLD_FILES+=usr/share/man/man1/uucp.1.gz
-OLD_FILES+=usr/share/man/man1/uulog.1.gz
-OLD_FILES+=usr/share/man/man1/uuname.1.gz
-OLD_FILES+=usr/share/man/man1/uupick.1.gz
-OLD_FILES+=usr/share/man/man1/uustat.1.gz
-OLD_FILES+=usr/share/man/man1/uuto.1.gz
-OLD_FILES+=usr/share/man/man1/uux.1.gz
-OLD_FILES+=usr/share/man/man8/uuchk.8.gz
-OLD_FILES+=usr/share/man/man8/uucico.8.gz
-OLD_FILES+=usr/share/man/man8/uucpd.8.gz
-OLD_FILES+=usr/share/man/man8/uusched.8.gz
-OLD_FILES+=usr/share/man/man8/uuxqt.8.gz
-# 20010523 mount_portal -> mount_portalfs
-OLD_FILES+=sbin/mount_portal
-OLD_FILES+=usr/share/man/man8/mount_portal.8.gz
-# 200104XX
-OLD_FILES+=usr/lib/libdescrypt.a
-OLD_FILES+=usr/lib/libscrypt.a
-OLD_FILES+=usr/lib/libscrypt_p.a
-OLD_FILES+=usr/sbin/pim6stat
-OLD_FILES+=usr/sbin/pim6sd
-OLD_FILES+=usr/sbin/pim6dd
-# 20010217
-OLD_FILES+=usr/share/doc/bind/misc/dns-setup
-# 20001200
-OLD_FILES+=usr/lib/libgcc_r_pic.a
-# 200009XX
-OLD_FILES+=usr/lib/libRSAglue.a
-OLD_FILES+=usr/lib/libRSAglue.so
-OLD_FILES+=usr/lib/librsaINTL.a
-OLD_FILES+=usr/lib/librsaUSA.a
-OLD_FILES+=usr/lib/librsaUSA.so
-# 200002XX ?
-OLD_FILES+=usr/lib/libf2c.a
-OLD_FILES+=usr/lib/libf2c_p.a
-OLD_FILES+=usr/lib/libg++.a
-OLD_FILES+=usr/lib/libg++_p.a
-# 20001006
-OLD_FILES+=usr/bin/miniperl
-# 20000810
-OLD_FILES+=usr/bin/sperl
-# 200001XX
-OLD_FILES+=usr/sbin/apmconf
-## unsorted
-# do we still support aout builds?
-#OLD_FILES+=usr/lib/aout/c++rt0.o
-#OLD_FILES+=usr/lib/aout/crt0.o
-#OLD_FILES+=usr/lib/aout/gcrt0.o
-#OLD_FILES+=usr/lib/aout/scrt0.o
-#OLD_FILES+=usr/lib/aout/sgcrt0.o
-OLD_FILES+=usr/lib/pam_ftp.so
-OLD_FILES+=usr/share/man/man1/CA.pl.1.gz
-OLD_FILES+=usr/share/man/man1/asn1parse.1.gz
-OLD_FILES+=usr/share/man/man1/ca.1.gz
-OLD_FILES+=usr/share/man/man1/ciphers.1.gz
-OLD_FILES+=usr/share/man/man1/config.1.gz
-OLD_FILES+=usr/share/man/man1/crl.1.gz
-OLD_FILES+=usr/share/man/man1/crl2pkcs7.1.gz
-OLD_FILES+=usr/share/man/man1/dgst.1.gz
-OLD_FILES+=usr/share/man/man1/dhparam.1.gz
-OLD_FILES+=usr/share/man/man1/doscmd.1.gz
-OLD_FILES+=usr/share/man/man1/dsa.1.gz
-OLD_FILES+=usr/share/man/man1/dsaparam.1.gz
-OLD_FILES+=usr/share/man/man1/enc.1.gz
-OLD_FILES+=usr/share/man/man1/gendsa.1.gz
-OLD_FILES+=usr/share/man/man1/genrsa.1.gz
-OLD_FILES+=usr/share/man/man1/getNAME.1.gz
-OLD_FILES+=usr/share/man/man1/nseq.1.gz
-OLD_FILES+=usr/share/man/man1/ocsp.1.gz
-OLD_FILES+=usr/share/man/man1/openssl.1.gz
-OLD_FILES+=usr/share/man/man1/pkcs12.1.gz
-OLD_FILES+=usr/share/man/man1/pkcs7.1.gz
-OLD_FILES+=usr/share/man/man1/pkcs8.1.gz
-OLD_FILES+=usr/share/man/man1/rand.1.gz
-OLD_FILES+=usr/share/man/man1/req.1.gz
-OLD_FILES+=usr/share/man/man1/rsa.1.gz
-OLD_FILES+=usr/share/man/man1/rsautl.1.gz
-OLD_FILES+=usr/share/man/man1/s_client.1.gz
-OLD_FILES+=usr/share/man/man1/s_server.1.gz
-OLD_FILES+=usr/share/man/man1/sess_id.1.gz
-OLD_FILES+=usr/share/man/man1/smime.1.gz
-OLD_FILES+=usr/share/man/man1/speed.1.gz
-OLD_FILES+=usr/share/man/man1/spkac.1.gz
-OLD_FILES+=usr/share/man/man1/verify.1.gz
-OLD_FILES+=usr/share/man/man1/version.1.gz
-OLD_FILES+=usr/share/man/man1/x509.1.gz
-OLD_FILES+=usr/share/man/man3/SSL_COMP_add_compression_method.3.gz
-OLD_FILES+=usr/share/man/man3/SSL_CTX_get_ex_new_index.3.gz
-OLD_FILES+=usr/share/man/man3/archive_entry_dup.3.gz
-OLD_FILES+=usr/share/man/man3/archive_entry_set_tartype.3.gz
-OLD_FILES+=usr/share/man/man3/archive_entry_tartype.3.gz
-OLD_FILES+=usr/share/man/man3/archive_read_data_into_file.3.gz
-OLD_FILES+=usr/share/man/man3/archive_read_open_tar.3.gz
-OLD_FILES+=usr/share/man/man3/archive_read_support_format_gnutar.3.gz
-OLD_FILES+=usr/share/man/man3/cipher.3.gz
-OLD_FILES+=usr/share/man/man3/des_cipher.3.gz
-OLD_FILES+=usr/share/man/man3/des_setkey.3.gz
-OLD_FILES+=usr/share/man/man3/encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/endvfsent.3.gz
-OLD_FILES+=usr/share/man/man3/getvfsbytype.3.gz
-OLD_FILES+=usr/share/man/man3/getvfsent.3.gz
-OLD_FILES+=usr/share/man/man3/isnanf.3.gz
-OLD_FILES+=usr/share/man/man3/libautofs.3.gz
-OLD_FILES+=usr/share/man/man3/pthread_attr_setsstack.3.gz
-OLD_FILES+=usr/share/man/man3/pthread_getcancelstate.3.gz
-OLD_FILES+=usr/share/man/man3/set_assertion_failure_callback.3.gz
-OLD_FILES+=usr/share/man/man3/setkey.3.gz
-OLD_FILES+=usr/share/man/man3/setvfsent.3.gz
-OLD_FILES+=usr/share/man/man3/ssl.3.gz
-OLD_FILES+=usr/share/man/man3/vfsisloadable.3.gz
-OLD_FILES+=usr/share/man/man3/vfsload.3.gz
-OLD_FILES+=usr/share/man/man4/als4000.4.gz
-OLD_FILES+=usr/share/man/man4/csa.4.gz
-OLD_FILES+=usr/share/man/man4/emu10k1.4.gz
-OLD_FILES+=usr/share/man/man4/euc.4.gz
-OLD_FILES+=usr/share/man/man4/gusc.4.gz
-OLD_FILES+=usr/share/man/man4/if_fwp.4.gz
-OLD_FILES+=usr/share/man/man4/lomac.4.gz
-OLD_FILES+=usr/share/man/man4/maestro3.4.gz
-OLD_FILES+=usr/share/man/man4/raid.4.gz
-OLD_FILES+=usr/share/man/man4/sbc.4.gz
-OLD_FILES+=usr/share/man/man4/sd.4.gz
-OLD_FILES+=usr/share/man/man4/snc.4.gz
-OLD_FILES+=usr/share/man/man4/st.4.gz
-OLD_FILES+=usr/share/man/man4/uaudio.4.gz
-OLD_FILES+=usr/share/man/man4/utf2.4.gz
-OLD_FILES+=usr/share/man/man4/vinumdebug.4.gz
-OLD_FILES+=usr/share/man/man5/disklabel.5.gz
-OLD_FILES+=usr/share/man/man5/dm.conf.5.gz
-OLD_FILES+=usr/share/man/man5/ranlib.5.gz
-OLD_FILES+=usr/share/man/man5/utf2.5.gz
-OLD_FILES+=usr/share/man/man7/groff_mwww.7.gz
-OLD_FILES+=usr/share/man/man7/mmroff.7.gz
-OLD_FILES+=usr/share/man/man7/mwww.7.gz
-OLD_FILES+=usr/share/man/man8/dm.8.gz
-OLD_FILES+=usr/share/man/man8/pam_ftp.8.gz
-OLD_FILES+=usr/share/man/man8/pam_wheel.8.gz
-OLD_FILES+=usr/share/man/man8/ssl.8.gz
-OLD_FILES+=usr/share/man/man8/wlconfig.8.gz
-OLD_FILES+=usr/share/man/man9/CURSIG.9.gz
-OLD_FILES+=usr/share/man/man9/VFS_INIT.9.gz
-OLD_FILES+=usr/share/man/man9/at_exit.9.gz
-OLD_FILES+=usr/share/man/man9/at_fork.9.gz
-OLD_FILES+=usr/share/man/man9/cdevsw_add.9.gz
-OLD_FILES+=usr/share/man/man9/cdevsw_remove.9.gz
-OLD_FILES+=usr/share/man/man9/cv_waitq_empty.9.gz
-OLD_FILES+=usr/share/man/man9/cv_waitq_remove.9.gz
-OLD_FILES+=usr/share/man/man9/endtsleep.9.gz
-OLD_FILES+=usr/share/man/man9/jumbo.9.gz
-OLD_FILES+=usr/share/man/man9/jumbo_freem.9.gz
-OLD_FILES+=usr/share/man/man9/jumbo_pg_alloc.9.gz
-OLD_FILES+=usr/share/man/man9/jumbo_pg_free.9.gz
-OLD_FILES+=usr/share/man/man9/jumbo_pg_steal.9.gz
-OLD_FILES+=usr/share/man/man9/jumbo_phys_to_kva.9.gz
-OLD_FILES+=usr/share/man/man9/jumbo_vm_init.9.gz
-OLD_FILES+=usr/share/man/man9/mac_biba.9.gz
-OLD_FILES+=usr/share/man/man9/mac_bsdextended.9.gz
-OLD_FILES+=usr/share/man/man9/mono_time.9.gz
-OLD_FILES+=usr/share/man/man9/p1003_1b.9.gz
-OLD_FILES+=usr/share/man/man9/pmap_prefault.9.gz
-OLD_FILES+=usr/share/man/man9/posix4.9.gz
-OLD_FILES+=usr/share/man/man9/resource_query_name.9.gz
-OLD_FILES+=usr/share/man/man9/resource_query_string.9.gz
-OLD_FILES+=usr/share/man/man9/resource_query_unit.9.gz
-OLD_FILES+=usr/share/man/man9/rm_at_exit.9.gz
-OLD_FILES+=usr/share/man/man9/rm_at_fork.9.gz
-OLD_FILES+=usr/share/man/man9/runtime.9.gz
-OLD_FILES+=usr/share/man/man9/sleepinit.9.gz
-OLD_FILES+=usr/share/man/man9/unsleep.9.gz
-OLD_FILES+=usr/share/games/atc/Game_List
-OLD_FILES+=usr/share/games/atc/Killer
-OLD_FILES+=usr/share/games/atc/crossover
-OLD_FILES+=usr/share/games/atc/default
-OLD_FILES+=usr/share/games/atc/easy
-OLD_FILES+=usr/share/games/atc/game_2
-OLD_FILES+=usr/share/games/larn/larnmaze
-OLD_FILES+=usr/share/games/larn/larnopts
-OLD_FILES+=usr/share/games/larn/larn.help
-OLD_FILES+=usr/share/games/quiz.db/africa
-OLD_FILES+=usr/share/games/quiz.db/america
-OLD_FILES+=usr/share/games/quiz.db/areas
-OLD_FILES+=usr/share/games/quiz.db/arith
-OLD_FILES+=usr/share/games/quiz.db/asia
-OLD_FILES+=usr/share/games/quiz.db/babies
-OLD_FILES+=usr/share/games/quiz.db/bard
-OLD_FILES+=usr/share/games/quiz.db/chinese
-OLD_FILES+=usr/share/games/quiz.db/collectives
-OLD_FILES+=usr/share/games/quiz.db/ed
-OLD_FILES+=usr/share/games/quiz.db/elements
-OLD_FILES+=usr/share/games/quiz.db/europe
-OLD_FILES+=usr/share/games/quiz.db/flowers
-OLD_FILES+=usr/share/games/quiz.db/greek
-OLD_FILES+=usr/share/games/quiz.db/inca
-OLD_FILES+=usr/share/games/quiz.db/index
-OLD_FILES+=usr/share/games/quiz.db/latin
-OLD_FILES+=usr/share/games/quiz.db/locomotive
-OLD_FILES+=usr/share/games/quiz.db/midearth
-OLD_FILES+=usr/share/games/quiz.db/morse
-OLD_FILES+=usr/share/games/quiz.db/murders
-OLD_FILES+=usr/share/games/quiz.db/poetry
-OLD_FILES+=usr/share/games/quiz.db/posneg
-OLD_FILES+=usr/share/games/quiz.db/pres
-OLD_FILES+=usr/share/games/quiz.db/province
-OLD_FILES+=usr/share/games/quiz.db/seq-easy
-OLD_FILES+=usr/share/games/quiz.db/seq-hard
-OLD_FILES+=usr/share/games/quiz.db/sexes
-OLD_FILES+=usr/share/games/quiz.db/sov
-OLD_FILES+=usr/share/games/quiz.db/spell
-OLD_FILES+=usr/share/games/quiz.db/state
-OLD_FILES+=usr/share/games/quiz.db/trek
-OLD_FILES+=usr/share/games/quiz.db/ucc
-OLD_FILES+=usr/share/games/cribbage.instr
-OLD_FILES+=usr/share/games/fish.instr
-OLD_FILES+=usr/share/games/wump.info
-OLD_FILES+=usr/games/hide/adventure
-OLD_FILES+=usr/games/hide/arithmetic
-OLD_FILES+=usr/games/hide/atc
-OLD_FILES+=usr/games/hide/backgammon
-OLD_FILES+=usr/games/hide/teachgammon
-OLD_FILES+=usr/games/hide/battlestar
-OLD_FILES+=usr/games/hide/bs
-OLD_FILES+=usr/games/hide/canfield
-OLD_FILES+=usr/games/hide/cribbage
-OLD_FILES+=usr/games/hide/fish
-OLD_FILES+=usr/games/hide/hack
-OLD_FILES+=usr/games/hide/hangman
-OLD_FILES+=usr/games/hide/larn
-OLD_FILES+=usr/games/hide/mille
-OLD_FILES+=usr/games/hide/phantasia
-OLD_FILES+=usr/games/hide/quiz
-OLD_FILES+=usr/games/hide/robots
-OLD_FILES+=usr/games/hide/rogue
-OLD_FILES+=usr/games/hide/sail
-OLD_FILES+=usr/games/hide/snake
-OLD_FILES+=usr/games/hide/trek
-OLD_FILES+=usr/games/hide/worm
-OLD_FILES+=usr/games/hide/wump
-OLD_FILES+=usr/games/adventure
-OLD_FILES+=usr/games/arithmetic
-OLD_FILES+=usr/games/atc
-OLD_FILES+=usr/games/backgammon
-OLD_FILES+=usr/games/teachgammon
-OLD_FILES+=usr/games/battlestar
-OLD_FILES+=usr/games/bs
-OLD_FILES+=usr/games/canfield
-OLD_FILES+=usr/games/cfscores
-OLD_FILES+=usr/games/cribbage
-OLD_FILES+=usr/games/dm
-OLD_FILES+=usr/games/fish
-OLD_FILES+=usr/games/hack
-OLD_FILES+=usr/games/hangman
-OLD_FILES+=usr/games/larn
-OLD_FILES+=usr/games/mille
-OLD_FILES+=usr/games/phantasia
-OLD_FILES+=usr/games/piano
-OLD_FILES+=usr/games/pig
-OLD_FILES+=usr/games/quiz
-OLD_FILES+=usr/games/rain
-OLD_FILES+=usr/games/robots
-OLD_FILES+=usr/games/rogue
-OLD_FILES+=usr/games/sail
-OLD_FILES+=usr/games/snake
-OLD_FILES+=usr/games/snscore
-OLD_FILES+=usr/games/trek
-OLD_FILES+=usr/games/wargames
-OLD_FILES+=usr/games/worm
-OLD_FILES+=usr/games/worms
-OLD_FILES+=usr/games/wump
-OLD_FILES+=sbin/mount_reiserfs
-OLD_FILES+=usr/include/cam/cam_extend.h
-OLD_FILES+=usr/include/dev/wi/wi_hostap.h
-OLD_FILES+=usr/include/disktab.h
-OLD_FILES+=usr/include/g++/FlexLexer.h
-OLD_FILES+=usr/include/g++/PlotFile.h
-OLD_FILES+=usr/include/g++/SFile.h
-OLD_FILES+=usr/include/g++/_G_config.h
-OLD_FILES+=usr/include/g++/algo.h
-OLD_FILES+=usr/include/g++/algobase.h
-OLD_FILES+=usr/include/g++/algorithm
-OLD_FILES+=usr/include/g++/alloc.h
-OLD_FILES+=usr/include/g++/bitset
-OLD_FILES+=usr/include/g++/builtinbuf.h
-OLD_FILES+=usr/include/g++/bvector.h
-OLD_FILES+=usr/include/g++/cassert
-OLD_FILES+=usr/include/g++/cctype
-OLD_FILES+=usr/include/g++/cerrno
-OLD_FILES+=usr/include/g++/cfloat
-OLD_FILES+=usr/include/g++/ciso646
-OLD_FILES+=usr/include/g++/climits
-OLD_FILES+=usr/include/g++/clocale
-OLD_FILES+=usr/include/g++/cmath
-OLD_FILES+=usr/include/g++/complex
-OLD_FILES+=usr/include/g++/complex.h
-OLD_FILES+=usr/include/g++/csetjmp
-OLD_FILES+=usr/include/g++/csignal
-OLD_FILES+=usr/include/g++/cstdarg
-OLD_FILES+=usr/include/g++/cstddef
-OLD_FILES+=usr/include/g++/cstdio
-OLD_FILES+=usr/include/g++/cstdlib
-OLD_FILES+=usr/include/g++/cstring
-OLD_FILES+=usr/include/g++/ctime
-OLD_FILES+=usr/include/g++/cwchar
-OLD_FILES+=usr/include/g++/cwctype
-OLD_FILES+=usr/include/g++/defalloc.h
-OLD_FILES+=usr/include/g++/deque
-OLD_FILES+=usr/include/g++/deque.h
-OLD_FILES+=usr/include/g++/editbuf.h
-OLD_FILES+=usr/include/g++/exception
-OLD_FILES+=usr/include/g++/floatio.h
-OLD_FILES+=usr/include/g++/fstream
-OLD_FILES+=usr/include/g++/fstream.h
-OLD_FILES+=usr/include/g++/function.h
-OLD_FILES+=usr/include/g++/functional
-OLD_FILES+=usr/include/g++/hash_map
-OLD_FILES+=usr/include/g++/hash_map.h
-OLD_FILES+=usr/include/g++/hash_set
-OLD_FILES+=usr/include/g++/hash_set.h
-OLD_FILES+=usr/include/g++/hashtable.h
-OLD_FILES+=usr/include/g++/heap.h
-OLD_FILES+=usr/include/g++/indstream.h
-OLD_FILES+=usr/include/g++/iolibio.h
-OLD_FILES+=usr/include/g++/iomanip
-OLD_FILES+=usr/include/g++/iomanip.h
-OLD_FILES+=usr/include/g++/iosfwd
-OLD_FILES+=usr/include/g++/iostdio.h
-OLD_FILES+=usr/include/g++/iostream
-OLD_FILES+=usr/include/g++/iostream.h
-OLD_FILES+=usr/include/g++/iostreamP.h
-OLD_FILES+=usr/include/g++/istream.h
-OLD_FILES+=usr/include/g++/iterator
-OLD_FILES+=usr/include/g++/iterator.h
-OLD_FILES+=usr/include/g++/libio.h
-OLD_FILES+=usr/include/g++/libioP.h
-OLD_FILES+=usr/include/g++/list
-OLD_FILES+=usr/include/g++/list.h
-OLD_FILES+=usr/include/g++/map
-OLD_FILES+=usr/include/g++/map.h
-OLD_FILES+=usr/include/g++/memory
-OLD_FILES+=usr/include/g++/multimap.h
-OLD_FILES+=usr/include/g++/multiset.h
-OLD_FILES+=usr/include/g++/new
-OLD_FILES+=usr/include/g++/new.h
-OLD_FILES+=usr/include/g++/numeric
-OLD_FILES+=usr/include/g++/ostream.h
-OLD_FILES+=usr/include/g++/pair.h
-OLD_FILES+=usr/include/g++/parsestream.h
-OLD_FILES+=usr/include/g++/pfstream.h
-OLD_FILES+=usr/include/g++/procbuf.h
-OLD_FILES+=usr/include/g++/pthread_alloc
-OLD_FILES+=usr/include/g++/pthread_alloc.h
-OLD_FILES+=usr/include/g++/queue
-OLD_FILES+=usr/include/g++/rope
-OLD_FILES+=usr/include/g++/rope.h
-OLD_FILES+=usr/include/g++/ropeimpl.h
-OLD_FILES+=usr/include/g++/set
-OLD_FILES+=usr/include/g++/set.h
-OLD_FILES+=usr/include/g++/slist
-OLD_FILES+=usr/include/g++/slist.h
-OLD_FILES+=usr/include/g++/sstream
-OLD_FILES+=usr/include/g++/stack
-OLD_FILES+=usr/include/g++/stack.h
-OLD_FILES+=usr/include/g++/std/bastring.cc
-OLD_FILES+=usr/include/g++/std/bastring.h
-OLD_FILES+=usr/include/g++/std/complext.cc
-OLD_FILES+=usr/include/g++/std/complext.h
-OLD_FILES+=usr/include/g++/std/dcomplex.h
-OLD_FILES+=usr/include/g++/std/fcomplex.h
-OLD_FILES+=usr/include/g++/std/gslice.h
-OLD_FILES+=usr/include/g++/std/gslice_array.h
-OLD_FILES+=usr/include/g++/std/indirect_array.h
-OLD_FILES+=usr/include/g++/std/ldcomplex.h
-OLD_FILES+=usr/include/g++/std/mask_array.h
-OLD_FILES+=usr/include/g++/std/slice.h
-OLD_FILES+=usr/include/g++/std/slice_array.h
-OLD_FILES+=usr/include/g++/std/std_valarray.h
-OLD_FILES+=usr/include/g++/std/straits.h
-OLD_FILES+=usr/include/g++/std/valarray_array.h
-OLD_FILES+=usr/include/g++/std/valarray_array.tcc
-OLD_FILES+=usr/include/g++/std/valarray_meta.h
-OLD_FILES+=usr/include/g++/stdexcept
-OLD_FILES+=usr/include/g++/stdiostream.h
-OLD_FILES+=usr/include/g++/stl.h
-OLD_FILES+=usr/include/g++/stl_algo.h
-OLD_FILES+=usr/include/g++/stl_algobase.h
-OLD_FILES+=usr/include/g++/stl_alloc.h
-OLD_FILES+=usr/include/g++/stl_bvector.h
-OLD_FILES+=usr/include/g++/stl_config.h
-OLD_FILES+=usr/include/g++/stl_construct.h
-OLD_FILES+=usr/include/g++/stl_deque.h
-OLD_FILES+=usr/include/g++/stl_function.h
-OLD_FILES+=usr/include/g++/stl_hash_fun.h
-OLD_FILES+=usr/include/g++/stl_hash_map.h
-OLD_FILES+=usr/include/g++/stl_hash_set.h
-OLD_FILES+=usr/include/g++/stl_hashtable.h
-OLD_FILES+=usr/include/g++/stl_heap.h
-OLD_FILES+=usr/include/g++/stl_iterator.h
-OLD_FILES+=usr/include/g++/stl_list.h
-OLD_FILES+=usr/include/g++/stl_map.h
-OLD_FILES+=usr/include/g++/stl_multimap.h
-OLD_FILES+=usr/include/g++/stl_multiset.h
-OLD_FILES+=usr/include/g++/stl_numeric.h
-OLD_FILES+=usr/include/g++/stl_pair.h
-OLD_FILES+=usr/include/g++/stl_queue.h
-OLD_FILES+=usr/include/g++/stl_raw_storage_iter.h
-OLD_FILES+=usr/include/g++/stl_relops.h
-OLD_FILES+=usr/include/g++/stl_rope.h
-OLD_FILES+=usr/include/g++/stl_set.h
-OLD_FILES+=usr/include/g++/stl_slist.h
-OLD_FILES+=usr/include/g++/stl_stack.h
-OLD_FILES+=usr/include/g++/stl_tempbuf.h
-OLD_FILES+=usr/include/g++/stl_tree.h
-OLD_FILES+=usr/include/g++/stl_uninitialized.h
-OLD_FILES+=usr/include/g++/stl_vector.h
-OLD_FILES+=usr/include/g++/stream.h
-OLD_FILES+=usr/include/g++/streambuf.h
-OLD_FILES+=usr/include/g++/strfile.h
-OLD_FILES+=usr/include/g++/string
-OLD_FILES+=usr/include/g++/strstream
-OLD_FILES+=usr/include/g++/strstream.h
-OLD_FILES+=usr/include/g++/tempbuf.h
-OLD_FILES+=usr/include/g++/tree.h
-OLD_FILES+=usr/include/g++/type_traits.h
-OLD_FILES+=usr/include/g++/typeinfo
-OLD_FILES+=usr/include/g++/utility
-OLD_FILES+=usr/include/g++/valarray
-OLD_FILES+=usr/include/g++/vector
-OLD_FILES+=usr/include/g++/vector.h
-OLD_FILES+=usr/include/gmp.h
-OLD_FILES+=usr/include/isc/assertions.h
-OLD_FILES+=usr/include/isc/ctl.h
-OLD_FILES+=usr/include/isc/dst.h
-OLD_FILES+=usr/include/isc/eventlib.h
-OLD_FILES+=usr/include/isc/heap.h
-OLD_FILES+=usr/include/isc/irpmarshall.h
-OLD_FILES+=usr/include/isc/list.h
-OLD_FILES+=usr/include/isc/logging.h
-OLD_FILES+=usr/include/isc/memcluster.h
-OLD_FILES+=usr/include/isc/misc.h
-OLD_FILES+=usr/include/isc/tree.h
-OLD_FILES+=usr/include/machine/ansi.h
-OLD_FILES+=usr/include/machine/apic.h
-OLD_FILES+=usr/include/machine/asc_ioctl.h
-OLD_FILES+=usr/include/machine/asnames.h
-OLD_FILES+=usr/include/machine/bus_at386.h
-OLD_FILES+=usr/include/machine/bus_memio.h
-OLD_FILES+=usr/include/machine/bus_pc98.h
-OLD_FILES+=usr/include/machine/bus_pio.h
-OLD_FILES+=usr/include/machine/cdk.h
-OLD_FILES+=usr/include/machine/comstats.h
-OLD_FILES+=usr/include/machine/console.h
-OLD_FILES+=usr/include/machine/critical.h
-OLD_FILES+=usr/include/machine/cronyx.h
-OLD_FILES+=usr/include/machine/dvcfg.h
-OLD_FILES+=usr/include/machine/globaldata.h
-OLD_FILES+=usr/include/machine/globals.h
-OLD_FILES+=usr/include/machine/gsc.h
-OLD_FILES+=usr/include/machine/i4b_isppp.h
-OLD_FILES+=usr/include/machine/if_wavelan_ieee.h
-OLD_FILES+=usr/include/machine/iic.h
-OLD_FILES+=usr/include/machine/ioctl_ctx.h
-OLD_FILES+=usr/include/machine/ioctl_fd.h
-OLD_FILES+=usr/include/machine/ipl.h
-OLD_FILES+=usr/include/machine/lock.h
-OLD_FILES+=usr/include/machine/mouse.h
-OLD_FILES+=usr/include/machine/mpapic.h
-OLD_FILES+=usr/include/machine/mtpr.h
-OLD_FILES+=usr/include/machine/pc/msdos.h
-OLD_FILES+=usr/include/machine/physio_proc.h
-OLD_FILES+=usr/include/machine/smb.h
-OLD_FILES+=usr/include/machine/spigot.h
-OLD_FILES+=usr/include/machine/types.h
-OLD_FILES+=usr/include/machine/uc_device.h
-OLD_FILES+=usr/include/machine/ultrasound.h
-OLD_FILES+=usr/include/machine/wtio.h
-OLD_FILES+=usr/include/msdosfs/bootsect.h
-OLD_FILES+=usr/include/msdosfs/bpb.h
-OLD_FILES+=usr/include/msdosfs/denode.h
-OLD_FILES+=usr/include/msdosfs/direntry.h
-OLD_FILES+=usr/include/msdosfs/fat.h
-OLD_FILES+=usr/include/msdosfs/msdosfsmount.h
-OLD_FILES+=usr/include/net/hostcache.h
-OLD_FILES+=usr/include/net/if_faith.h
-OLD_FILES+=usr/include/net/if_ieee80211.h
-OLD_FILES+=usr/include/net/if_tunvar.h
-OLD_FILES+=usr/include/net/intrq.h
-OLD_FILES+=usr/include/netatm/kern_include.h
-OLD_FILES+=usr/include/netinet/if_fddi.h
-OLD_FILES+=usr/include/netinet/in_hostcache.h
-OLD_FILES+=usr/include/netinet/ip_flow.h
-OLD_FILES+=usr/include/netinet/ip_fw2.h
-OLD_FILES+=usr/include/netinet6/in6_prefix.h
-OLD_FILES+=usr/include/netns/idp.h
-OLD_FILES+=usr/include/netns/idp_var.h
-OLD_FILES+=usr/include/netns/ns.h
-OLD_FILES+=usr/include/netns/ns_error.h
-OLD_FILES+=usr/include/netns/ns_if.h
-OLD_FILES+=usr/include/netns/ns_pcb.h
-OLD_FILES+=usr/include/netns/sp.h
-OLD_FILES+=usr/include/netns/spidp.h
-OLD_FILES+=usr/include/netns/spp_debug.h
-OLD_FILES+=usr/include/netns/spp_timer.h
-OLD_FILES+=usr/include/netns/spp_var.h
-OLD_FILES+=usr/include/nfs/nfs.h
-OLD_FILES+=usr/include/nfs/nfsm_subs.h
-OLD_FILES+=usr/include/nfs/nfsmount.h
-OLD_FILES+=usr/include/nfs/nfsnode.h
-OLD_FILES+=usr/include/nfs/nfsrtt.h
-OLD_FILES+=usr/include/nfs/nfsrvcache.h
-OLD_FILES+=usr/include/nfs/nfsv2.h
-OLD_FILES+=usr/include/nfs/nqnfs.h
-OLD_FILES+=usr/include/ntfs/ntfs.h
-OLD_FILES+=usr/include/ntfs/ntfs_compr.h
-OLD_FILES+=usr/include/ntfs/ntfs_ihash.h
-OLD_FILES+=usr/include/ntfs/ntfs_inode.h
-OLD_FILES+=usr/include/ntfs/ntfs_subr.h
-OLD_FILES+=usr/include/ntfs/ntfs_vfsops.h
-OLD_FILES+=usr/include/ntfs/ntfsmount.h
-OLD_FILES+=usr/include/nwfs/nwfs.h
-OLD_FILES+=usr/include/nwfs/nwfs_mount.h
-OLD_FILES+=usr/include/nwfs/nwfs_node.h
-OLD_FILES+=usr/include/nwfs/nwfs_subr.h
-OLD_FILES+=usr/include/posix4/_semaphore.h
-OLD_FILES+=usr/include/posix4/aio.h
-OLD_FILES+=usr/include/posix4/ksem.h
-OLD_FILES+=usr/include/posix4/mqueue.h
-OLD_FILES+=usr/include/posix4/posix4.h
-OLD_FILES+=usr/include/posix4/sched.h
-OLD_FILES+=usr/include/posix4/semaphore.h
-OLD_DIRS+=usr/include/posix4
-OLD_FILES+=usr/include/security/_pam_compat.h
-OLD_FILES+=usr/include/security/_pam_macros.h
-OLD_FILES+=usr/include/security/_pam_types.h
-OLD_FILES+=usr/include/security/pam_malloc.h
-OLD_FILES+=usr/include/security/pam_misc.h
-OLD_FILES+=usr/include/skey.h
-OLD_FILES+=usr/include/strhash.h
-OLD_FILES+=usr/include/struct.h
-OLD_FILES+=usr/include/sys/_label.h
-OLD_FILES+=usr/include/sys/_posix.h
-OLD_FILES+=usr/include/sys/bus_private.h
-OLD_FILES+=usr/include/sys/ccdvar.h
-OLD_FILES+=usr/include/sys/diskslice.h
-OLD_FILES+=usr/include/sys/dmap.h
-OLD_FILES+=usr/include/sys/inttypes.h
-OLD_FILES+=usr/include/sys/jumbo.h
-OLD_FILES+=usr/include/sys/mac_policy.h
-OLD_FILES+=usr/include/sys/pbioio.h
-OLD_FILES+=usr/include/sys/syscall-hide.h
-OLD_FILES+=usr/include/sys/tprintf.h
-OLD_FILES+=usr/include/sys/vnioctl.h
-OLD_FILES+=usr/include/sys/wormio.h
-OLD_FILES+=usr/include/telnet.h
-OLD_FILES+=usr/include/ufs/mfs/mfs_extern.h
-OLD_FILES+=usr/include/ufs/mfs/mfsnode.h
-OLD_FILES+=usr/include/values.h
-OLD_FILES+=usr/include/vm/vm_zone.h
-OLD_FILES+=usr/share/examples/etc/usbd.conf
-OLD_FILES+=usr/share/examples/meteor/README
-OLD_FILES+=usr/share/examples/meteor/rgb16.c
-OLD_FILES+=usr/share/examples/meteor/rgb24.c
-OLD_FILES+=usr/share/examples/meteor/test-n.c
-OLD_FILES+=usr/share/examples/meteor/yuvpk.c
-OLD_FILES+=usr/share/examples/meteor/yuvpl.c
-OLD_FILES+=usr/share/examples/worm/README
-OLD_FILES+=usr/share/examples/worm/makecdfs.sh
-OLD_FILES+=usr/share/groff_font/devlj4/Makefile
-OLD_FILES+=usr/share/groff_font/devlj4/text.map
-OLD_FILES+=usr/share/groff_font/devlj4/special.map
-OLD_FILES+=usr/share/misc/nslookup.help
-OLD_FILES+=usr/share/sendmail/cf/feature/nodns.m4
-OLD_FILES+=usr/share/syscons/keymaps/lat-amer.kbd
-OLD_FILES+=usr/share/vi/catalog/ru_SU.KOI8-R
-OLD_FILES+=usr/share/zoneinfo/SystemV/YST9
-OLD_FILES+=usr/share/zoneinfo/SystemV/PST8
-OLD_FILES+=usr/share/zoneinfo/SystemV/EST5EDT
-OLD_FILES+=usr/share/zoneinfo/SystemV/CST6CDT
-OLD_FILES+=usr/share/zoneinfo/SystemV/MST7MDT
-OLD_FILES+=usr/share/zoneinfo/SystemV/PST8PDT
-OLD_FILES+=usr/share/zoneinfo/SystemV/YST9YDT
-OLD_FILES+=usr/share/zoneinfo/SystemV/HST10
-OLD_FILES+=usr/share/zoneinfo/SystemV/MST7
-OLD_FILES+=usr/share/zoneinfo/SystemV/EST5
-OLD_FILES+=usr/share/zoneinfo/SystemV/AST4ADT
-OLD_FILES+=usr/share/zoneinfo/SystemV/CST6
-OLD_FILES+=usr/share/zoneinfo/SystemV/AST4
-OLD_DIRS+=usr/share/zoneinfo/SystemV
-OLD_FILES+=usr/share/doc/ntp/accopt.htm
-OLD_FILES+=usr/share/doc/ntp/assoc.htm
-OLD_FILES+=usr/share/doc/ntp/audio.htm
-OLD_FILES+=usr/share/doc/ntp/authopt.htm
-OLD_FILES+=usr/share/doc/ntp/biblio.htm
-OLD_FILES+=usr/share/doc/ntp/build.htm
-OLD_FILES+=usr/share/doc/ntp/clockopt.htm
-OLD_FILES+=usr/share/doc/ntp/config.htm
-OLD_FILES+=usr/share/doc/ntp/confopt.htm
-OLD_FILES+=usr/share/doc/ntp/copyright.htm
-OLD_FILES+=usr/share/doc/ntp/debug.htm
-OLD_FILES+=usr/share/doc/ntp/driver1.htm
-OLD_FILES+=usr/share/doc/ntp/driver10.htm
-OLD_FILES+=usr/share/doc/ntp/driver11.htm
-OLD_FILES+=usr/share/doc/ntp/driver12.htm
-OLD_FILES+=usr/share/doc/ntp/driver16.htm
-OLD_FILES+=usr/share/doc/ntp/driver18.htm
-OLD_FILES+=usr/share/doc/ntp/driver19.htm
-OLD_FILES+=usr/share/doc/ntp/driver2.htm
-OLD_FILES+=usr/share/doc/ntp/driver20.htm
-OLD_FILES+=usr/share/doc/ntp/driver22.htm
-OLD_FILES+=usr/share/doc/ntp/driver23.htm
-OLD_FILES+=usr/share/doc/ntp/driver24.htm
-OLD_FILES+=usr/share/doc/ntp/driver26.htm
-OLD_FILES+=usr/share/doc/ntp/driver27.htm
-OLD_FILES+=usr/share/doc/ntp/driver28.htm
-OLD_FILES+=usr/share/doc/ntp/driver29.htm
-OLD_FILES+=usr/share/doc/ntp/driver3.htm
-OLD_FILES+=usr/share/doc/ntp/driver30.htm
-OLD_FILES+=usr/share/doc/ntp/driver32.htm
-OLD_FILES+=usr/share/doc/ntp/driver33.htm
-OLD_FILES+=usr/share/doc/ntp/driver34.htm
-OLD_FILES+=usr/share/doc/ntp/driver35.htm
-OLD_FILES+=usr/share/doc/ntp/driver36.htm
-OLD_FILES+=usr/share/doc/ntp/driver37.htm
-OLD_FILES+=usr/share/doc/ntp/driver4.htm
-OLD_FILES+=usr/share/doc/ntp/driver5.htm
-OLD_FILES+=usr/share/doc/ntp/driver6.htm
-OLD_FILES+=usr/share/doc/ntp/driver7.htm
-OLD_FILES+=usr/share/doc/ntp/driver8.htm
-OLD_FILES+=usr/share/doc/ntp/driver9.htm
-OLD_FILES+=usr/share/doc/ntp/exec.htm
-OLD_FILES+=usr/share/doc/ntp/extern.htm
-OLD_FILES+=usr/share/doc/ntp/gadget.htm
-OLD_FILES+=usr/share/doc/ntp/hints.htm
-OLD_FILES+=usr/share/doc/ntp/howto.htm
-OLD_FILES+=usr/share/doc/ntp/htmlprimer.htm
-OLD_FILES+=usr/share/doc/ntp/index.htm
-OLD_FILES+=usr/share/doc/ntp/kern.htm
-OLD_FILES+=usr/share/doc/ntp/kernpps.htm
-OLD_FILES+=usr/share/doc/ntp/ldisc.htm
-OLD_FILES+=usr/share/doc/ntp/measure.htm
-OLD_FILES+=usr/share/doc/ntp/miscopt.htm
-OLD_FILES+=usr/share/doc/ntp/monopt.htm
-OLD_FILES+=usr/share/doc/ntp/mx4200data.htm
-OLD_FILES+=usr/share/doc/ntp/notes.htm
-OLD_FILES+=usr/share/doc/ntp/ntpd.htm
-OLD_FILES+=usr/share/doc/ntp/ntpdate.htm
-OLD_FILES+=usr/share/doc/ntp/ntpdc.htm
-OLD_FILES+=usr/share/doc/ntp/ntpq.htm
-OLD_FILES+=usr/share/doc/ntp/ntptime.htm
-OLD_FILES+=usr/share/doc/ntp/ntptrace.htm
-OLD_FILES+=usr/share/doc/ntp/parsedata.htm
-OLD_FILES+=usr/share/doc/ntp/parsenew.htm
-OLD_FILES+=usr/share/doc/ntp/patches.htm
-OLD_FILES+=usr/share/doc/ntp/porting.htm
-OLD_FILES+=usr/share/doc/ntp/pps.htm
-OLD_FILES+=usr/share/doc/ntp/prefer.htm
-OLD_FILES+=usr/share/doc/ntp/qth.htm
-OLD_FILES+=usr/share/doc/ntp/quick.htm
-OLD_FILES+=usr/share/doc/ntp/rdebug.htm
-OLD_FILES+=usr/share/doc/ntp/refclock.htm
-OLD_FILES+=usr/share/doc/ntp/release.htm
-OLD_FILES+=usr/share/doc/ntp/tickadj.htm
-OLD_FILES+=usr/share/doc/papers/nqnfs.ascii.gz
-OLD_FILES+=usr/share/doc/papers/px.ascii.gz
-OLD_FILES+=usr/share/man/man3/exp10.3.gz
-OLD_FILES+=usr/share/man/man3/exp10f.3.gz
-OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz
-OLD_FILES+=usr/share/man/man3/gss_krb5_compat_des3_mic.3.gz
-OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz
-OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz
-OLD_FILES+=usr/share/man/man3/mbmb.3.gz
-OLD_FILES+=usr/share/man/man3/setrunelocale.3.gz
-OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz
-.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64"
-OLD_FILES+=usr/share/man/man8/boot_i386.8.gz
-.endif
-OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz
-OLD_FILES+=usr/share/man/man9/VFS_START.9.gz
-OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz
-OLD_FILES+=usr/share/man/man9/cpu_critical_enter.9.gz
-OLD_FILES+=usr/share/info/annotate.info.gz
-OLD_FILES+=usr/share/info/tar.info.gz
-OLD_FILES+=usr/share/bsnmp/defs/tree.def
-OLD_FILES+=usr/share/bsnmp/defs/mibII_tree.def
-OLD_FILES+=usr/share/bsnmp/defs/netgraph_tree.def
-OLD_FILES+=usr/share/bsnmp/mibs/FOKUS-MIB.txt
-OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-MIB.txt
-OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-SNMPD.txt
-OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-NETGRAPH.txt
-OLD_FILES+=usr/libdata/msdosfs/iso22dos
-OLD_FILES+=usr/libdata/msdosfs/iso72dos
-OLD_FILES+=usr/libdata/msdosfs/koi2dos
-OLD_FILES+=usr/libdata/msdosfs/koi8u2dos
-# The following files are *not* obsolete, they just don't get touched at
-# install, so don't add them:
-# - boot/loader.rc
-# - usr/share/tmac/man.local
-# - usr/share/tmac/mm/locale
-# - usr/share/tmac/mm/se_locale
-# - var/yp/Makefile
-
-# Early entries split OLD_FILES, OLD_LIBS, and OLD_DIRS into separate sections
-# in this file, but this practice was abandoned in the mid-2000s.
-#
-# 20071120: shared library version bump
-OLD_LIBS+=usr/lib/libasn1.so.8
-OLD_LIBS+=usr/lib/libgssapi.so.8
-OLD_LIBS+=usr/lib/libgssapi_krb5.so.8
-OLD_LIBS+=usr/lib/libhdb.so.8
-OLD_LIBS+=usr/lib/libkadm5clnt.so.8
-OLD_LIBS+=usr/lib/libkadm5srv.so.8
-OLD_LIBS+=usr/lib/libkafs5.so.8
-OLD_LIBS+=usr/lib/libkrb5.so.8
-OLD_LIBS+=usr/lib/libobjc.so.2
-# 20070519: GCC 4.2
-OLD_FILES+=usr/lib/libg2c.a
-OLD_FILES+=usr/lib/libg2c.so
-OLD_LIBS+=usr/lib/libg2c.so.2
-OLD_FILES+=usr/lib/libg2c_p.a
-OLD_FILES+=usr/lib/libgcc_pic.a
-# 20060729: OpenSSL 0.9.7e -> 0.9.8b upgrade
-OLD_LIBS+=lib/libcrypto.so.4
-OLD_LIBS+=usr/lib/libssl.so.4
-# 20060521: gethostbyaddr(3) ABI change
-OLD_LIBS+=usr/lib/libroken.so.8
-OLD_LIBS+=lib/libatm.so.3
-OLD_LIBS+=lib/libc.so.6
-OLD_LIBS+=lib/libutil.so.5
-# 20060413: shared library moved to /usr/lib
-MOVED_LIBS+=lib/libgpib.so.1
-# 20060413: libpcap.so.4 moved to /lib/
-MOVED_LIBS+=usr/lib/libpcap.so.4
-# 20060412: libpthread.so.2 moved to /lib/
-MOVED_LIBS+=usr/lib/libpthread.so.2
-# 20060127: revert libdisk to static-only
-OLD_LIBS+=usr/lib/libdisk.so.3
-# 20051027: libc_r discontinued (removed 20101113)
-OLD_FILES+=usr/lib/libc_r.a
-OLD_FILES+=usr/lib/libc_r.so
-OLD_LIBS+=usr/lib/libc_r.so.7
-OLD_FILES+=usr/lib/libc_r_p.a
-# 20050722: bump for 6.0-RELEASE
-OLD_LIBS+=lib/libalias.so.4
-OLD_LIBS+=lib/libatm.so.2
-OLD_LIBS+=lib/libbegemot.so.1
-OLD_LIBS+=lib/libbsdxml.so.1
-OLD_LIBS+=lib/libbsnmp.so.2
-OLD_LIBS+=lib/libc.so.5
-OLD_LIBS+=lib/libcam.so.2
-OLD_LIBS+=lib/libcrypt.so.2
-OLD_LIBS+=lib/libcrypto.so.3
-OLD_LIBS+=lib/libdevstat.so.4
-OLD_LIBS+=lib/libedit.so.4
-OLD_LIBS+=lib/libgeom.so.2
-OLD_LIBS+=lib/libgpib.so.0
-OLD_LIBS+=lib/libipsec.so.1
-OLD_LIBS+=lib/libipx.so.2
-OLD_LIBS+=lib/libkiconv.so.1
-OLD_LIBS+=lib/libkvm.so.2
-OLD_LIBS+=lib/libm.so.3
-OLD_LIBS+=lib/libmd.so.2
-OLD_LIBS+=lib/libncurses.so.5
-OLD_LIBS+=lib/libreadline.so.5
-OLD_LIBS+=lib/libsbuf.so.2
-OLD_LIBS+=lib/libufs.so.2
-OLD_LIBS+=lib/libutil.so.4
-OLD_LIBS+=lib/libz.so.2
-OLD_LIBS+=usr/lib/libarchive.so.1
-OLD_LIBS+=usr/lib/libasn1.so.7
-OLD_LIBS+=usr/lib/libbluetooth.so.1
-OLD_LIBS+=usr/lib/libbz2.so.1
-OLD_LIBS+=usr/lib/libc_r.so.5
-OLD_LIBS+=usr/lib/libcalendar.so.2
-OLD_LIBS+=usr/lib/libcom_err.so.2
-OLD_LIBS+=usr/lib/libdevinfo.so.2
-OLD_LIBS+=usr/lib/libdialog.so.4
-OLD_LIBS+=usr/lib/libfetch.so.3
-OLD_LIBS+=usr/lib/libform.so.2
-OLD_LIBS+=usr/lib/libftpio.so.5
-OLD_LIBS+=usr/lib/libg2c.so.1
-OLD_LIBS+=usr/lib/libgnuregex.so.2
-OLD_LIBS+=usr/lib/libgssapi.so.7
-OLD_LIBS+=usr/lib/libhdb.so.7
-OLD_LIBS+=usr/lib/libhistory.so.5
-OLD_LIBS+=usr/lib/libkadm5clnt.so.7
-OLD_LIBS+=usr/lib/libkadm5srv.so.7
-OLD_LIBS+=usr/lib/libkafs5.so.7
-OLD_LIBS+=usr/lib/libkrb5.so.7
-OLD_LIBS+=usr/lib/libmagic.so.1
-OLD_LIBS+=usr/lib/libmenu.so.2
-OLD_LIBS+=usr/lib/libmilter.so.2
-OLD_LIBS+=usr/lib/libmp.so.4
-OLD_LIBS+=usr/lib/libncp.so.1
-OLD_LIBS+=usr/lib/libnetgraph.so.1
-OLD_LIBS+=usr/lib/libngatm.so.1
-OLD_LIBS+=usr/lib/libobjc.so.1
-OLD_LIBS+=usr/lib/libopie.so.3
-OLD_LIBS+=usr/lib/libpam.so.2
-OLD_LIBS+=usr/lib/libpanel.so.2
-OLD_LIBS+=usr/lib/libpcap.so.3
-OLD_LIBS+=usr/lib/libpmc.so.2
-OLD_LIBS+=usr/lib/libpthread.so.1
-OLD_LIBS+=usr/lib/libradius.so.1
-OLD_LIBS+=usr/lib/libroken.so.7
-OLD_LIBS+=usr/lib/librpcsvc.so.2
-OLD_LIBS+=usr/lib/libsdp.so.1
-OLD_LIBS+=usr/lib/libsmb.so.1
-OLD_LIBS+=usr/lib/libssh.so.2
-OLD_LIBS+=usr/lib/libssl.so.3
-OLD_LIBS+=usr/lib/libstdc++.so.4
-OLD_LIBS+=usr/lib/libtacplus.so.1
-OLD_LIBS+=usr/lib/libthr.so.1
-OLD_LIBS+=usr/lib/libthread_db.so.1
-OLD_LIBS+=usr/lib/libugidfw.so.1
-OLD_LIBS+=usr/lib/libusbhid.so.1
-OLD_LIBS+=usr/lib/libvgl.so.3
-OLD_LIBS+=usr/lib/libwrap.so.3
-OLD_LIBS+=usr/lib/libypclnt.so.1
-OLD_LIBS+=usr/lib/pam_chroot.so.2
-OLD_LIBS+=usr/lib/pam_deny.so.2
-OLD_LIBS+=usr/lib/pam_echo.so.2
-OLD_LIBS+=usr/lib/pam_exec.so.2
-OLD_LIBS+=usr/lib/pam_ftpusers.so.2
-OLD_LIBS+=usr/lib/pam_group.so.2
-OLD_LIBS+=usr/lib/pam_guest.so.2
-OLD_LIBS+=usr/lib/pam_krb5.so.2
-OLD_LIBS+=usr/lib/pam_ksu.so.2
-OLD_LIBS+=usr/lib/pam_lastlog.so.2
-OLD_LIBS+=usr/lib/pam_login_access.so.2
-OLD_LIBS+=usr/lib/pam_nologin.so.2
-OLD_LIBS+=usr/lib/pam_opie.so.2
-OLD_LIBS+=usr/lib/pam_opieaccess.so.2
-OLD_LIBS+=usr/lib/pam_passwdqc.so.2
-OLD_LIBS+=usr/lib/pam_permit.so.2
-OLD_LIBS+=usr/lib/pam_radius.so.2
-OLD_LIBS+=usr/lib/pam_rhosts.so.2
-OLD_LIBS+=usr/lib/pam_rootok.so.2
-OLD_LIBS+=usr/lib/pam_securetty.so.2
-OLD_LIBS+=usr/lib/pam_self.so.2
-OLD_LIBS+=usr/lib/pam_ssh.so.2
-OLD_LIBS+=usr/lib/pam_tacplus.so.2
-OLD_LIBS+=usr/lib/pam_unix.so.2
-OLD_LIBS+=usr/lib/snmp_atm.so.3
-OLD_LIBS+=usr/lib/snmp_mibII.so.3
-OLD_LIBS+=usr/lib/snmp_netgraph.so.3
-OLD_LIBS+=usr/lib/snmp_pf.so.3
-# 200505XX: ?
-OLD_LIBS+=usr/lib/snmp_atm.so.2
-OLD_LIBS+=usr/lib/snmp_mibII.so.2
-OLD_LIBS+=usr/lib/snmp_netgraph.so.2
-OLD_LIBS+=usr/lib/snmp_pf.so.2
-# 2005XXXX: not ready for primetime yet
-OLD_LIBS+=usr/lib/libautofs.so.1
-# 200411XX: libxpg4 removal
-OLD_LIBS+=usr/lib/libxpg4.so.3
-# 200410XX: libm compatibility fix
-OLD_LIBS+=lib/libm.so.2
-# 20041001: version bump
-OLD_LIBS+=lib/libreadline.so.4
-OLD_LIBS+=usr/lib/libhistory.so.4
-OLD_LIBS+=usr/lib/libopie.so.2
-OLD_LIBS+=usr/lib/libpcap.so.2
-# 20040925: bind9 import
-OLD_LIBS+=usr/lib/libisc.so.1
-# 200408XX
-OLD_LIBS+=usr/lib/snmp_netgraph.so.1
-# 200404XX
-OLD_LIBS+=usr/lib/libsnmp.so.1
-OLD_LIBS+=usr/lib/snmp_mibII.so.1
-# 200309XX
-OLD_LIBS+=usr/lib/libasn1.so.6
-OLD_LIBS+=usr/lib/libhdb.so.6
-OLD_LIBS+=usr/lib/libkadm5clnt.so.6
-OLD_LIBS+=usr/lib/libkadm5srv.so.6
-OLD_LIBS+=usr/lib/libkrb5.so.6
-OLD_LIBS+=usr/lib/libroken.so.6
-# 200304XX
-OLD_LIBS+=usr/lib/libc.so.4
-OLD_LIBS+=usr/lib/libc_r.so.4
-OLD_LIBS+=usr/lib/libdevstat.so.2
-OLD_LIBS+=usr/lib/libedit.so.3
-OLD_LIBS+=usr/lib/libgmp.so.3
-OLD_LIBS+=usr/lib/libmp.so.3
-OLD_LIBS+=usr/lib/libpam.so.1
-OLD_LIBS+=usr/lib/libposix1e.so.2
-OLD_LIBS+=usr/lib/libskey.so.2
-OLD_LIBS+=usr/lib/libusbhid.so.0
-OLD_LIBS+=usr/lib/libvgl.so.2
-# 20030218: OpenSSL 0.9.7 import
-OLD_FILES+=usr/include/des.h
-OLD_FILES+=usr/lib/libdes.a
-OLD_FILES+=usr/lib/libdes.so
-OLD_LIBS+=usr/lib/libdes.so.3
-OLD_FILES+=usr/lib/libdes_p.a
-# 200302XX
-OLD_LIBS+=usr/lib/libacl.so.3
-OLD_LIBS+=usr/lib/libasn1.so.5
-OLD_LIBS+=usr/lib/libcrypto.so.2
-OLD_LIBS+=usr/lib/libgssapi.so.5
-OLD_LIBS+=usr/lib/libhdb.so.5
-OLD_LIBS+=usr/lib/libkadm.so.3
-OLD_LIBS+=usr/lib/libkadm5clnt.so.5
-OLD_LIBS+=usr/lib/libkadm5srv.so.5
-OLD_LIBS+=usr/lib/libkafs.so.3
-OLD_LIBS+=usr/lib/libkafs5.so.5
-OLD_LIBS+=usr/lib/libkdb.so.3
-OLD_LIBS+=usr/lib/libkrb.so.3
-OLD_LIBS+=usr/lib/libroken.so.5
-OLD_LIBS+=usr/lib/libssl.so.2
-OLD_LIBS+=usr/lib/pam_kerberosIV.so
-# 200208XX
-OLD_LIBS+=usr/lib/libgssapi.so.4
-# 200203XX
-OLD_LIBS+=usr/lib/libss.so.3
-OLD_LIBS+=usr/lib/libusb.so.0
-# 200112XX
-OLD_LIBS+=usr/lib/libfetch.so.2
-# 200110XX
-OLD_LIBS+=usr/lib/libgssapi.so.3
-# 200104XX
-OLD_LIBS+=usr/lib/libdescrypt.so.2
-OLD_LIBS+=usr/lib/libscrypt.so.2
-# 200102XX
-OLD_LIBS+=usr/lib/libcrypto.so.1
-OLD_LIBS+=usr/lib/libssl.so.1
-# 200009XX
-OLD_LIBS+=usr/lib/libRSAglue.so.1
-OLD_LIBS+=usr/lib/librsaINTL.so.1
-OLD_LIBS+=usr/lib/librsaUSA.so.1
-# 200006XX
-OLD_LIBS+=usr/lib/libalias.so.3
-OLD_LIBS+=usr/lib/libfetch.so.1
-OLD_LIBS+=usr/lib/libipsec.so.0
-# 200005XX
-OLD_LIBS+=usr/lib/libxpg4.so.2
-# 200002XX
-OLD_LIBS+=usr/lib/libc.so.3
-OLD_LIBS+=usr/lib/libcurses.so.2
-OLD_LIBS+=usr/lib/libdialog.so.3
-OLD_LIBS+=usr/lib/libedit.so.2
-OLD_LIBS+=usr/lib/libf2c.so.2
-OLD_LIBS+=usr/lib/libftpio.so.4
-OLD_LIBS+=usr/lib/libg++.so.4
-OLD_LIBS+=usr/lib/libhistory.so.3
-OLD_LIBS+=usr/lib/libmytinfo.so.2
-OLD_LIBS+=usr/lib/libncurses.so.3
-OLD_LIBS+=usr/lib/libreadline.so.3
-OLD_LIBS+=usr/lib/libss.so.2
-OLD_LIBS+=usr/lib/libtermcap.so.2
-OLD_LIBS+=usr/lib/libutil.so.2
-OLD_LIBS+=usr/lib/libvgl.so.1
-OLD_LIBS+=usr/lib/libwrap.so.2
-# ???
-OLD_LIBS+=usr/lib/libarchive.so.2
-OLD_LIBS+=usr/lib/libbsnmp.so.1
-OLD_LIBS+=usr/lib/libc_r.so.6
-OLD_LIBS+=usr/lib/libcipher.so.2
-OLD_LIBS+=usr/lib/libgssapi.so.6
-OLD_LIBS+=usr/lib/libkse.so.1
-OLD_LIBS+=usr/lib/liblwres.so.3
-OLD_LIBS+=usr/lib/pam_ftp.so.2
-
-# 20040925: bind9 import
-OLD_DIRS+=usr/share/doc/bind/html
-OLD_DIRS+=usr/share/doc/bind/misc
-OLD_DIRS+=usr/share/doc/bind/
-# ???
-OLD_DIRS+=usr/include/g++/std
-OLD_DIRS+=usr/include/msdosfs
-OLD_DIRS+=usr/include/ntfs
-OLD_DIRS+=usr/include/nwfs
-OLD_DIRS+=usr/include/ufs/mfs
-# 20011001: UUCP migration to ports
-OLD_DIRS+=usr/libexec/uucp
-
.include "tools/build/mk/OptionalObsoleteFiles.inc"
diff --git a/UPDATING b/UPDATING
index 60c974198934..1e729624f1e9 100644
--- a/UPDATING
+++ b/UPDATING
@@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW:
world, or to merely disable the most expensive debugging functionality
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20250806:
+ if_epair(4) now uses ether_gen_addr(9) to generate a stable MAC
+ address.
+ To keep using the random address, set the loader tunable
+ net.link.epair.ether_gen_addr=0.
+
20250804:
bsdconfig (including sysrc(8)) has moved to the new bsdconfig
package. If you use pkgbase and wish to use bsdconfig, you should
diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile
index d44e5cb19ab4..13fd6d96f2af 100644
--- a/cddl/lib/libspl/Makefile
+++ b/cddl/lib/libspl/Makefile
@@ -16,6 +16,7 @@ SRCS = \
os/freebsd/zone.c \
page.c \
timestamp.c \
+ tunables.c \
include/sys/list.h \
include/sys/list_impl.h
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index 5a69843d6c8e..4da3840e59f0 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -175,6 +175,8 @@ KERNEL_C = \
zfeature.c \
zfs_byteswap.c \
zfs_chksum.c \
+ zfs_crrd.c \
+ zfs_debug_common.c \
zfs_fm.c \
zfs_fuid.c \
zfs_sa.c \
diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog
index 5a1c30a95750..e8f1567733e4 100644
--- a/contrib/bmake/ChangeLog
+++ b/contrib/bmake/ChangeLog
@@ -1,3 +1,12 @@
+2025-08-04 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * VERSION (_MAKE_VERSION): 20250804
+ Merge with NetBSD make, pick up
+ o meta.c: allow printing only partial string to meta file
+ in jobs mode, otherwise we end up with duplicated output when
+ buffer does not end in newline.
+ Add a suitable unit test.
+
2025-07-07 Simon J Gerraty <sjg@beast.crufty.net>
* VERSION (_MAKE_VERSION): 20250707
diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES
index 1cec16b73ef4..28465b6a8c39 100644
--- a/contrib/bmake/FILES
+++ b/contrib/bmake/FILES
@@ -431,6 +431,8 @@ unit-tests/make-exported.exp
unit-tests/make-exported.mk
unit-tests/meta-cmd-cmp.exp
unit-tests/meta-cmd-cmp.mk
+unit-tests/meta-output.exp
+unit-tests/meta-output.mk
unit-tests/meta-ignore.inc
unit-tests/moderrs.exp
unit-tests/moderrs.mk
diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION
index eef1ef4b8ba9..e301cfafab72 100644
--- a/contrib/bmake/VERSION
+++ b/contrib/bmake/VERSION
@@ -1,2 +1,2 @@
# keep this compatible with sh and make
-_MAKE_VERSION=20250707
+_MAKE_VERSION=20250804
diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c
index 0c54e710afeb..e62d1ee84df5 100644
--- a/contrib/bmake/job.c
+++ b/contrib/bmake/job.c
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.517 2025/07/06 07:11:31 rillig Exp $ */
+/* $NetBSD: job.c,v 1.519 2025/08/04 15:40:39 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -137,7 +137,7 @@
#include "trace.h"
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.517 2025/07/06 07:11:31 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.519 2025/08/04 15:40:39 sjg Exp $");
#ifdef USE_SELECT
@@ -1884,7 +1884,7 @@ again:
SwitchOutputTo(job->node);
#ifdef USE_META
if (useMeta)
- meta_job_output(job, p);
+ meta_job_output(job, p, (i < max) ? i : max);
#endif
(void)fwrite(p, 1, (size_t)(job->outBuf + i - p), stdout);
(void)fflush(stdout);
diff --git a/contrib/bmake/meta.c b/contrib/bmake/meta.c
index 5d8d17f19700..f87f51c3b0a3 100644
--- a/contrib/bmake/meta.c
+++ b/contrib/bmake/meta.c
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.c,v 1.215 2025/06/13 06:13:19 rillig Exp $ */
+/* $NetBSD: meta.c,v 1.219 2025/08/04 18:57:20 rillig Exp $ */
/*
* Implement 'meta' mode.
@@ -767,7 +767,7 @@ meta_job_error(Job *job, GNode *gn, bool ignerr, int status)
}
void
-meta_job_output(Job *job, const char *cp)
+meta_job_output(Job *job, const char *cp, size_t len)
{
BuildMon *pbm;
@@ -790,7 +790,7 @@ meta_job_output(Job *job, const char *cp)
cp++;
}
}
- fprintf(pbm->mfp, "%s", cp);
+ fprintf(pbm->mfp, "%.*s", (int)len, cp);
}
}
@@ -1703,7 +1703,7 @@ meta_compat_parent(pid_t child)
fwrite(buf, 1, (size_t)nread, stdout);
fflush(stdout);
buf[nread] = '\0';
- meta_job_output(NULL, buf);
+ meta_job_output(NULL, buf, (size_t)nread);
} while (false);
if (metafd != -1 && FD_ISSET(metafd, &readfds) != 0) {
if (meta_job_event(NULL) <= 0)
diff --git a/contrib/bmake/meta.h b/contrib/bmake/meta.h
index a7478cbc3e5d..4796cdeb3c01 100644
--- a/contrib/bmake/meta.h
+++ b/contrib/bmake/meta.h
@@ -1,4 +1,4 @@
-/* $NetBSD: meta.h,v 1.13 2025/06/13 06:13:19 rillig Exp $ */
+/* $NetBSD: meta.h,v 1.15 2025/08/04 03:47:26 sjg Exp $ */
/*
* Things needed for 'meta' mode.
@@ -49,7 +49,7 @@ void meta_job_parent(struct Job *, pid_t);
int meta_job_fd(struct Job *) MAKE_ATTR_USE;
int meta_job_event(struct Job *) MAKE_ATTR_USE;
void meta_job_error(struct Job *, GNode *, bool, int);
-void meta_job_output(struct Job *, const char *);
+void meta_job_output(struct Job *, const char *, size_t);
int meta_cmd_finish(void *);
int meta_job_finish(struct Job *);
bool meta_oodate(GNode *, bool) MAKE_ATTR_USE;
diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog
index db524d2343b6..fda6d8b02158 100644
--- a/contrib/bmake/mk/ChangeLog
+++ b/contrib/bmake/mk/ChangeLog
@@ -1,3 +1,20 @@
+2025-07-24 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * install-mk (MK_VERSION): 20250724
+
+ * meta2deps: Allow X record to have 3 or 4 args.
+ V4 filemon on Linux produces 3
+ V5 filemon on FreeBSD produces 4
+
+2025-07-22 Simon J Gerraty <sjg@beast.crufty.net>
+
+ * install-mk (MK_VERSION): 20250721
+
+ * meta2deps.{py,sh}: detect corrupted filemon output (an issue on
+ Linux) by checking each record type has the correct number of
+ words. Throw an error if necessary so that gendirdeps.mk will not
+ update Makefile.depend
+
2025-07-04 Simon J Gerraty <sjg@beast.crufty.net>
* prog.mk: .MADE is a special source not a target!
diff --git a/contrib/bmake/mk/install-mk b/contrib/bmake/mk/install-mk
index 8d354de17cb9..3ed5fd63ee5c 100644..100755
--- a/contrib/bmake/mk/install-mk
+++ b/contrib/bmake/mk/install-mk
@@ -59,7 +59,7 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
-# $Id: install-mk,v 1.266 2025/05/29 01:48:06 sjg Exp $
+# $Id: install-mk,v 1.268 2025/07/24 15:55:48 sjg Exp $
#
# @(#) Copyright (c) 1994-2025 Simon J. Gerraty
#
@@ -74,7 +74,7 @@
# sjg@crufty.net
#
-MK_VERSION=20250528
+MK_VERSION=20250724
OWNER=
GROUP=
MODE=444
diff --git a/contrib/bmake/mk/meta2deps.py b/contrib/bmake/mk/meta2deps.py
index 70b121003988..77ed86397a0f 100755
--- a/contrib/bmake/mk/meta2deps.py
+++ b/contrib/bmake/mk/meta2deps.py
@@ -39,7 +39,7 @@ We only pay attention to a subset of the information in the
SPDX-License-Identifier: BSD-2-Clause
RCSid:
- $Id: meta2deps.py,v 1.51 2025/05/16 20:03:43 sjg Exp $
+ $Id: meta2deps.py,v 1.54 2025/07/24 16:05:48 sjg Exp $
Copyright (c) 2011-2025, Simon J. Gerraty
Copyright (c) 2011-2017, Juniper Networks, Inc.
@@ -441,7 +441,7 @@ class MetaFile:
# Bye bye
We go to some effort to avoid processing a dependency more than once.
- Of the above record types only C,E,F,L,R,V and W are of interest.
+ Of the above record types only C,E,F,L,M,R,V,W and X are of interest.
"""
version = 0 # unknown
@@ -465,8 +465,8 @@ class MetaFile:
if self.sb and self.name.startswith(self.sb):
error_name = self.name.replace(self.sb+'/','')
else:
- error_name = self.name
- interesting = '#CEFLRVX'
+ error_name = self.name
+ interesting = '#CEFLMRVX'
for line in f:
self.line += 1
# ignore anything we don't care about
@@ -475,6 +475,7 @@ class MetaFile:
if self.debug > 2:
print("input:", line, end=' ', file=self.debug_out)
w = line.split()
+ wlen = len(w)
if skip:
if w[0] == 'V':
@@ -498,6 +499,23 @@ class MetaFile:
if line.find('Bye') > 0:
eof_token = True
continue
+ else:
+ # before we go further check we have a sane number of args
+ # the Linux filemon module is rather unreliable.
+ if w[0] in 'LM':
+ elen = 4
+ elif w[0] == 'X':
+ # at least V4 on Linux does 3 args
+ if wlen == 3:
+ elen = 3
+ else:
+ elen = 4
+ else:
+ elen = 3
+ if self.debug > 2:
+ print('op={} elen={} wlen={} line="{}"'.format(w[0], elen, wlen, line.strip()), file=self.debug_out)
+ if wlen != elen:
+ raise AssertionError('corrupted filemon data: wrong number of words: expected {} got {} in: {}'.format(elen, wlen, line))
pid = int(w[1])
if pid != last_pid:
@@ -540,7 +558,7 @@ class MetaFile:
print("seen:", w[2], file=self.debug_out)
continue
# file operations
- if w[0] in 'ML':
+ if w[0] in 'LM':
# these are special, tread src as read and
# target as write
self.parse_path(w[3].strip("'"), cwd, 'W', w)
diff --git a/contrib/bmake/mk/meta2deps.sh b/contrib/bmake/mk/meta2deps.sh
index e46e5a2e55c1..21c0d0134be5 100755
--- a/contrib/bmake/mk/meta2deps.sh
+++ b/contrib/bmake/mk/meta2deps.sh
@@ -75,7 +75,7 @@
# RCSid:
-# $Id: meta2deps.sh,v 1.22 2025/05/16 20:03:43 sjg Exp $
+# $Id: meta2deps.sh,v 1.24 2025/07/24 15:55:48 sjg Exp $
# SPDX-License-Identifier: BSD-2-Clause
#
@@ -249,11 +249,21 @@ meta2deps() {
;;
*) cat /dev/null "$@";;
esac 2> /dev/null |
- sed -e 's,^CWD,C C,;/^[#CREFLMVX] /!d' -e "s,',,g" |
+ sed -e 's,^CWD,C C,;/^[#CREFLMVWX] /!d' -e "s,',,g" |
$_excludes | ( version=no epids= xpids= eof_token=no
while read op pid path path2
do
: op=$op pid=$pid path=$path path2=$path2
+ # first a sanity check - filemon on Linux is not very reliable
+ # path2 should only be non-empty for op L or M
+ # and it should not contain spaces.
+ case "$op,$path2" in
+ \#*) ;; # ok
+ [LM],) error "missing path2 in: '$op $pid $path'";;
+ [LMX],*" "*) error "wrong number of words in: '$op $pid $path $path2'";;
+ *,|[LMX],*) ;; # ok
+ *) error "wrong number of words in: '$op $pid $path $path2'";;
+ esac
# we track cwd and ldir (of interest) per pid
# CWD is bmake's cwd
case "$lpid,$pid" in
diff --git a/contrib/bmake/unit-tests/Makefile b/contrib/bmake/unit-tests/Makefile
index 4e639056815a..f6c298679a62 100644
--- a/contrib/bmake/unit-tests/Makefile
+++ b/contrib/bmake/unit-tests/Makefile
@@ -1,6 +1,6 @@
-# $Id: Makefile,v 1.240 2025/06/30 18:40:54 sjg Exp $
+# $Id: Makefile,v 1.245 2025/08/05 16:18:07 sjg Exp $
#
-# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $
+# $NetBSD: Makefile,v 1.372 2025/08/04 22:44:49 sjg Exp $
#
# Unit tests for make(1)
#
@@ -234,6 +234,7 @@ TESTS+= jobs-error-nested-make
TESTS+= lint
TESTS+= make-exported
TESTS+= meta-cmd-cmp
+TESTS+= meta-output
TESTS+= moderrs
TESTS+= modmisc
.if ${.MAKE.UID} > 0
@@ -592,6 +593,7 @@ SED_CMDS.directive-include-guard= \
-e '/^ParseDependency/d' \
-e '/^ParseEOF:/d'
SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d'
+SED_CMDS.export+= -e '/^DIFF/d'
.if ${.MAKE.OS:NCygwin} == ""
SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d'
.endif
@@ -802,6 +804,7 @@ EGREP= grep -E
EGREP?= egrep
MAKE_TEST_ENV= EGREP="${EGREP}"
+MAKE_TEST_ENV+= DIFF="${TOOL_DIFF}" DIFF_FLAGS="${DIFF_FLAGS}"
MAKE_TEST_ENV+= MALLOC_OPTIONS="JA" # for jemalloc 100
MAKE_TEST_ENV+= MALLOC_CONF="junk:true" # for jemalloc 510
MAKE_TEST_ENV+= TMPDIR=${TMPDIR}
diff --git a/contrib/bmake/unit-tests/meta-output.exp b/contrib/bmake/unit-tests/meta-output.exp
new file mode 100644
index 000000000000..37ef54b4e49e
--- /dev/null
+++ b/contrib/bmake/unit-tests/meta-output.exp
@@ -0,0 +1,11 @@
+Test -B output
+test1: Done
+test2: Done
+test3: Done
+
+Test -j1 output
+test1: Done
+test2: Done
+test3: Done
+
+exit status 0
diff --git a/contrib/bmake/unit-tests/meta-output.mk b/contrib/bmake/unit-tests/meta-output.mk
new file mode 100644
index 000000000000..104091df5d00
--- /dev/null
+++ b/contrib/bmake/unit-tests/meta-output.mk
@@ -0,0 +1,30 @@
+#
+
+.MAIN: all
+
+.if make(output)
+.MAKE.MODE= meta curDirOk=true nofilemon
+.else
+.MAKE.MODE= compat
+.endif
+
+all: output.-B output.-j1
+
+_mf := ${.PARSEDIR}/${.PARSEFILE}
+
+# This output should be accurately reflected in the .meta file.
+# We append an extra newline to ${.TARGET} (after it has been
+# written to stdout) to match what meta_cmd_finish() will do.
+output: .NOPATH
+ @{ echo Test ${tag} output; \
+ for i in 1 2 3; do \
+ printf "test$$i: "; sleep 0; echo " Done"; \
+ done; echo; } | tee ${.TARGET}; echo >> ${.TARGET}
+
+# The diff at the end should produce nothing.
+output.-B output.-j1:
+ @{ rm -f ${TMPDIR}/output; mkdir -p ${TMPDIR}/obj; \
+ MAKEFLAGS= ${.MAKE} -r -C ${TMPDIR} ${.TARGET:E} tag=${.TARGET:E} -f ${_mf} output; \
+ sed '1,/command output/d' ${TMPDIR}/obj/output.meta > ${TMPDIR}/obj/output-meta; \
+ ${DIFF:Udiff} ${TMPDIR}/obj/output ${TMPDIR}/obj/output-meta; }
+
diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c
index 73cc9a7dc657..14d3d41b6e21 100644
--- a/contrib/pf/authpf/authpf.c
+++ b/contrib/pf/authpf/authpf.c
@@ -863,9 +863,9 @@ change_table(int add, const char *ip_src)
}
if (add)
- ret = pfctl_table_add_addrs(pfctl_fd(pfh), &tbl, &addr, 1, NULL, 0);
+ ret = pfctl_table_add_addrs_h(pfh, &tbl, &addr, 1, NULL, 0);
else
- ret = pfctl_table_del_addrs(pfctl_fd(pfh), &tbl, &addr, 1, NULL, 0);
+ ret = pfctl_table_del_addrs_h(pfh, &tbl, &addr, 1, NULL, 0);
if (ret != 0 && ret != ESRCH) {
diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist
index ffdd82ae9911..68977a6b8282 100644
--- a/etc/mtree/BSD.usr.dist
+++ b/etc/mtree/BSD.usr.dist
@@ -267,8 +267,6 @@
..
dtrace
..
- et
- ..
examples
BSD_daemon
..
diff --git a/lib/libc/sys/accept.c b/lib/libc/sys/accept.c
index 95c8b4a58c74..c6fb040ab6d6 100644
--- a/lib/libc/sys/accept.c
+++ b/lib/libc/sys/accept.c
@@ -34,8 +34,6 @@
#include <sys/socket.h>
#include "libc_private.h"
-__weak_reference(__sys_accept, __accept);
-
#pragma weak accept
int
accept(int s, struct sockaddr *addr, socklen_t *addrlen)
diff --git a/lib/libc/sys/accept4.c b/lib/libc/sys/accept4.c
index 1a1f75c9f528..146dde9ae6fa 100644
--- a/lib/libc/sys/accept4.c
+++ b/lib/libc/sys/accept4.c
@@ -34,8 +34,6 @@
#include <sys/socket.h>
#include "libc_private.h"
-__weak_reference(__sys_accept4, __accept4);
-
#pragma weak accept4
int
accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags)
diff --git a/lib/libc/sys/aio_suspend.c b/lib/libc/sys/aio_suspend.c
index 592cb5b0e1d7..5a7774705ac2 100644
--- a/lib/libc/sys/aio_suspend.c
+++ b/lib/libc/sys/aio_suspend.c
@@ -33,8 +33,6 @@
#include <sys/aio.h>
#include "libc_private.h"
-__weak_reference(__sys_aio_suspend, __aio_suspend);
-
#pragma weak aio_suspend
int
aio_suspend(const struct aiocb * const iocbs[], int niocb,
diff --git a/lib/libc/sys/clock_nanosleep.c b/lib/libc/sys/clock_nanosleep.c
index a50af30e1fb3..db14bd46f85e 100644
--- a/lib/libc/sys/clock_nanosleep.c
+++ b/lib/libc/sys/clock_nanosleep.c
@@ -34,8 +34,6 @@
#include <time.h>
#include "libc_private.h"
-__weak_reference(__sys_clock_nanosleep, __clock_nanosleep);
-
#pragma weak clock_nanosleep
int
clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp,
diff --git a/lib/libc/sys/close.c b/lib/libc/sys/close.c
index 08a5419361a9..8aa2b9b6ad13 100644
--- a/lib/libc/sys/close.c
+++ b/lib/libc/sys/close.c
@@ -34,8 +34,6 @@
#include <unistd.h>
#include "libc_private.h"
-__weak_reference(__sys_close, __close);
-
#pragma weak close
int
close(int fd)
diff --git a/lib/libc/sys/connect.c b/lib/libc/sys/connect.c
index e64451683abc..f27813b63df0 100644
--- a/lib/libc/sys/connect.c
+++ b/lib/libc/sys/connect.c
@@ -34,8 +34,6 @@
#include <sys/socket.h>
#include "libc_private.h"
-__weak_reference(__sys_connect, __connect);
-
#pragma weak connect
int
connect(int s, const struct sockaddr *addr, socklen_t addrlen)
diff --git a/lib/libc/sys/fork.c b/lib/libc/sys/fork.c
index e907c51b5cee..3af81c14ffb3 100644
--- a/lib/libc/sys/fork.c
+++ b/lib/libc/sys/fork.c
@@ -33,8 +33,6 @@
#include <unistd.h>
#include "libc_private.h"
-__weak_reference(__sys_fork, __fork);
-
#pragma weak fork
pid_t
fork(void)
diff --git a/lib/libc/sys/fsync.c b/lib/libc/sys/fsync.c
index e542c8cdea48..c58b29ca6a77 100644
--- a/lib/libc/sys/fsync.c
+++ b/lib/libc/sys/fsync.c
@@ -34,8 +34,6 @@
#include <unistd.h>
#include "libc_private.h"
-__weak_reference(__sys_fsync, __fsync);
-
int
fsync(int fd)
{
diff --git a/lib/libc/sys/kevent.c b/lib/libc/sys/kevent.c
index f16ac89a36c6..e395e16c67f5 100644
--- a/lib/libc/sys/kevent.c
+++ b/lib/libc/sys/kevent.c
@@ -34,8 +34,6 @@
#include <sys/time.h>
#include "libc_private.h"
-__weak_reference(__sys_kevent, __kevent);
-
#pragma weak kevent
int
kevent(int kq, const struct kevent *changelist, int nchanges,
diff --git a/lib/libc/sys/msync.c b/lib/libc/sys/msync.c
index f825db97b947..11dd988300eb 100644
--- a/lib/libc/sys/msync.c
+++ b/lib/libc/sys/msync.c
@@ -34,8 +34,6 @@
#include <sys/mman.h>
#include "libc_private.h"
-__weak_reference(__sys_msync, __msync);
-
#pragma weak msync
int
msync(void *addr, size_t len, int flags)
diff --git a/lib/libc/sys/nanosleep.c b/lib/libc/sys/nanosleep.c
index bd0794c3af8e..23c07e3bf5fc 100644
--- a/lib/libc/sys/nanosleep.c
+++ b/lib/libc/sys/nanosleep.c
@@ -33,8 +33,6 @@
#include <time.h>
#include "libc_private.h"
-__weak_reference(__sys_nanosleep, __nanosleep);
-
#pragma weak nanosleep
int
nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
diff --git a/lib/libc/sys/open.c b/lib/libc/sys/open.c
index 57c07637d2aa..dd7bedebf141 100644
--- a/lib/libc/sys/open.c
+++ b/lib/libc/sys/open.c
@@ -34,8 +34,6 @@
#include <stdarg.h>
#include "libc_private.h"
-__weak_reference(__sys_open, __open);
-
#pragma weak open
int
open(const char *path, int flags, ...)
diff --git a/lib/libc/sys/openat.c b/lib/libc/sys/openat.c
index 1cd8e7d90745..ba937cae3a3e 100644
--- a/lib/libc/sys/openat.c
+++ b/lib/libc/sys/openat.c
@@ -34,7 +34,6 @@
#include <stdarg.h>
#include "libc_private.h"
-__weak_reference(__sys_openat, __openat);
__sym_compat(openat, __impl_openat, FBSD_1.1);
__weak_reference(openat, __impl_openat);
__sym_default(openat, openat, FBSD_1.2);
diff --git a/lib/libc/sys/poll.c b/lib/libc/sys/poll.c
index 5e000f7e728f..8c6a89adb2cb 100644
--- a/lib/libc/sys/poll.c
+++ b/lib/libc/sys/poll.c
@@ -34,8 +34,6 @@
#include <ssp/ssp.h>
#include "libc_private.h"
-__weak_reference(__sys_poll, __poll);
-
int __weak_symbol
__ssp_real(poll)(struct pollfd pfd[], nfds_t nfds, int timeout)
{
diff --git a/lib/libc/sys/ppoll.c b/lib/libc/sys/ppoll.c
index 72c0b5d5e421..5ffc35a8cbb0 100644
--- a/lib/libc/sys/ppoll.c
+++ b/lib/libc/sys/ppoll.c
@@ -34,8 +34,6 @@
#include <ssp/ssp.h>
#include "libc_private.h"
-__weak_reference(__sys_ppoll, __ppoll);
-
int __weak_symbol
__ssp_real(ppoll)(struct pollfd pfd[], nfds_t nfds,
const struct timespec *__restrict timeout,
diff --git a/lib/libc/sys/pselect.c b/lib/libc/sys/pselect.c
index 38477e39af44..2c1c9896d6b9 100644
--- a/lib/libc/sys/pselect.c
+++ b/lib/libc/sys/pselect.c
@@ -33,8 +33,6 @@
#include <sys/select.h>
#include "libc_private.h"
-__weak_reference(__sys_pselect, __pselect);
-
#pragma weak pselect
int
pselect(int n, fd_set *rs, fd_set *ws, fd_set *es, const struct timespec *t,
diff --git a/lib/libc/sys/read.c b/lib/libc/sys/read.c
index b4610e0c38c3..75cc7e42b013 100644
--- a/lib/libc/sys/read.c
+++ b/lib/libc/sys/read.c
@@ -34,8 +34,6 @@
#include <unistd.h>
#include "libc_private.h"
-__weak_reference(__sys_read, __read);
-
#pragma weak read
ssize_t
read(int fd, void *buf, size_t nbytes)
diff --git a/lib/libc/sys/readv.c b/lib/libc/sys/readv.c
index 2729f6ed99da..83b4bf9ba3e6 100644
--- a/lib/libc/sys/readv.c
+++ b/lib/libc/sys/readv.c
@@ -36,8 +36,6 @@
#include <ssp/ssp.h>
#include "libc_private.h"
-__weak_reference(__sys_readv, __readv);
-
ssize_t __weak_symbol
__ssp_real(readv)(int fd, const struct iovec *iov, int iovcnt)
{
diff --git a/lib/libc/sys/recvfrom.c b/lib/libc/sys/recvfrom.c
index 0cdbd8a4ccaa..f7e2dd2ca6c8 100644
--- a/lib/libc/sys/recvfrom.c
+++ b/lib/libc/sys/recvfrom.c
@@ -35,8 +35,6 @@
#include <ssp/ssp.h>
#include "libc_private.h"
-__weak_reference(__sys_recvfrom, __recvfrom);
-
ssize_t __weak_symbol
__ssp_real(recvfrom)(int s, void *buf, size_t len, int flags,
struct sockaddr * __restrict from, socklen_t * __restrict fromlen)
diff --git a/lib/libc/sys/recvmsg.c b/lib/libc/sys/recvmsg.c
index ce0f5e0478cd..7c820c47b325 100644
--- a/lib/libc/sys/recvmsg.c
+++ b/lib/libc/sys/recvmsg.c
@@ -35,8 +35,6 @@
#include <ssp/ssp.h>
#include "libc_private.h"
-__weak_reference(__sys_recvmsg, __recvmsg);
-
ssize_t __weak_symbol
__ssp_real(recvmsg)(int s, struct msghdr *msg, int flags)
{
diff --git a/lib/libc/sys/select.c b/lib/libc/sys/select.c
index bbbcfc8bf1e0..909449f17da8 100644
--- a/lib/libc/sys/select.c
+++ b/lib/libc/sys/select.c
@@ -33,8 +33,6 @@
#include <sys/select.h>
#include "libc_private.h"
-__weak_reference(__sys_select, __select);
-
#pragma weak select
int
select(int n, fd_set *rs, fd_set *ws, fd_set *es, struct timeval *t)
diff --git a/lib/libc/sys/sendmsg.c b/lib/libc/sys/sendmsg.c
index fd4e41837c48..6c5fb4021ce3 100644
--- a/lib/libc/sys/sendmsg.c
+++ b/lib/libc/sys/sendmsg.c
@@ -34,8 +34,6 @@
#include <sys/socket.h>
#include "libc_private.h"
-__weak_reference(__sys_sendmsg, __sendmsg);
-
#pragma weak sendmsg
ssize_t
sendmsg(int s, const struct msghdr *msg, int flags)
diff --git a/lib/libc/sys/sendto.c b/lib/libc/sys/sendto.c
index 708fc6ec9368..b8a173f434a9 100644
--- a/lib/libc/sys/sendto.c
+++ b/lib/libc/sys/sendto.c
@@ -34,8 +34,6 @@
#include <sys/socket.h>
#include "libc_private.h"
-__weak_reference(__sys_sendto, __sendto);
-
#pragma weak sendto
ssize_t
sendto(int s, const void *msg, size_t len, int flags,
diff --git a/lib/libc/sys/setcontext.c b/lib/libc/sys/setcontext.c
index 96b5dc115067..a750c4dfea30 100644
--- a/lib/libc/sys/setcontext.c
+++ b/lib/libc/sys/setcontext.c
@@ -33,7 +33,6 @@
#include <ucontext.h>
#include "libc_private.h"
-__weak_reference(__sys_setcontext, __setcontext);
__sym_compat(setcontext, __impl_setcontext, FBSD_1.0);
__weak_reference(setcontext, __impl_setcontext);
__sym_default(setcontext, setcontext, FBSD_1.2);
diff --git a/lib/libc/sys/sigaction.c b/lib/libc/sys/sigaction.c
index 809881ca4d3f..7ce177895c81 100644
--- a/lib/libc/sys/sigaction.c
+++ b/lib/libc/sys/sigaction.c
@@ -33,7 +33,6 @@
#include <signal.h>
#include "libc_private.h"
-__weak_reference(__sys_sigaction, __sigaction);
__weak_reference(sigaction, __libc_sigaction);
#pragma weak sigaction
diff --git a/lib/libc/sys/sigprocmask.c b/lib/libc/sys/sigprocmask.c
index 96cb9586509b..8b7fb6fb8e74 100644
--- a/lib/libc/sys/sigprocmask.c
+++ b/lib/libc/sys/sigprocmask.c
@@ -33,7 +33,6 @@
#include <signal.h>
#include "libc_private.h"
-__weak_reference(__sys_sigprocmask, __sigprocmask);
__weak_reference(sigprocmask, __libc_sigprocmask);
#pragma weak sigprocmask
diff --git a/lib/libc/sys/sigsuspend.c b/lib/libc/sys/sigsuspend.c
index e5a9495f9f39..ac117650ed1b 100644
--- a/lib/libc/sys/sigsuspend.c
+++ b/lib/libc/sys/sigsuspend.c
@@ -33,7 +33,6 @@
#include <signal.h>
#include "libc_private.h"
-__weak_reference(__sys_sigsuspend, __sigsuspend);
__weak_reference(sigsuspend, __libc_sigsuspend);
#pragma weak sigsuspend
diff --git a/lib/libc/sys/sigtimedwait.c b/lib/libc/sys/sigtimedwait.c
index 839e5fe4d992..4efa69555f39 100644
--- a/lib/libc/sys/sigtimedwait.c
+++ b/lib/libc/sys/sigtimedwait.c
@@ -33,8 +33,6 @@
#include <signal.h>
#include "libc_private.h"
-__weak_reference(__sys_sigtimedwait, __sigtimedwait);
-
#pragma weak sigtimedwait
int
sigtimedwait(const sigset_t * __restrict set, siginfo_t * __restrict info,
diff --git a/lib/libc/sys/sigwaitinfo.c b/lib/libc/sys/sigwaitinfo.c
index 611d09c3c221..e94777b731e6 100644
--- a/lib/libc/sys/sigwaitinfo.c
+++ b/lib/libc/sys/sigwaitinfo.c
@@ -33,8 +33,6 @@
#include <signal.h>
#include "libc_private.h"
-__weak_reference(__sys_sigwaitinfo, __sigwaitinfo);
-
#pragma weak sigwaitinfo
int
sigwaitinfo(const sigset_t * __restrict set, siginfo_t * __restrict info)
diff --git a/lib/libc/sys/swapcontext.c b/lib/libc/sys/swapcontext.c
index b69a5b19e698..69d4dfea16b5 100644
--- a/lib/libc/sys/swapcontext.c
+++ b/lib/libc/sys/swapcontext.c
@@ -35,7 +35,6 @@
#include <stddef.h>
#include "libc_private.h"
-__weak_reference(__sys_swapcontext, __swapcontext);
__sym_compat(swapcontext, __impl_swapcontext, FBSD_1.0);
__weak_reference(swapcontext, __impl_swapcontext);
__sym_default(swapcontext, swapcontext, FBSD_1.2);
diff --git a/lib/libc/sys/wait4.c b/lib/libc/sys/wait4.c
index 57b0071ef87f..1d30c2d44c19 100644
--- a/lib/libc/sys/wait4.c
+++ b/lib/libc/sys/wait4.c
@@ -33,8 +33,6 @@
#include <sys/wait.h>
#include "libc_private.h"
-__weak_reference(__sys_wait4, __wait4);
-
#pragma weak wait4
pid_t
wait4(pid_t pid, int *status, int options, struct rusage *ru)
diff --git a/lib/libc/sys/wait6.c b/lib/libc/sys/wait6.c
index 118a7ef6b99e..70817bdb441c 100644
--- a/lib/libc/sys/wait6.c
+++ b/lib/libc/sys/wait6.c
@@ -34,8 +34,6 @@
#include <signal.h>
#include "libc_private.h"
-__weak_reference(__sys_wait6, __wait6);
-
#pragma weak wait6
pid_t
wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *ru,
diff --git a/lib/libc/sys/write.c b/lib/libc/sys/write.c
index 5880856b8af8..15e2d22fdbc5 100644
--- a/lib/libc/sys/write.c
+++ b/lib/libc/sys/write.c
@@ -34,8 +34,6 @@
#include <unistd.h>
#include "libc_private.h"
-__weak_reference(__sys_write, __write);
-
#pragma weak write
ssize_t
write(int fd, const void *buf, size_t nbytes)
diff --git a/lib/libc/sys/writev.c b/lib/libc/sys/writev.c
index 9a32cb603ab8..b642c6af9a89 100644
--- a/lib/libc/sys/writev.c
+++ b/lib/libc/sys/writev.c
@@ -35,8 +35,6 @@
#include <unistd.h>
#include "libc_private.h"
-__weak_reference(__sys_writev, __writev);
-
#pragma weak writev
ssize_t
writev(int fd, const struct iovec *iov, int iovcnt)
diff --git a/lib/libnvmf/libnvmf.h b/lib/libnvmf/libnvmf.h
index 6b38fd286596..f095af8bb02a 100644
--- a/lib/libnvmf/libnvmf.h
+++ b/lib/libnvmf/libnvmf.h
@@ -51,6 +51,8 @@ struct nvmf_qpair_params {
};
};
+__BEGIN_DECLS
+
/* Transport-independent APIs. */
/*
@@ -384,4 +386,6 @@ int nvmf_reconnect_host(int fd, const struct nvme_discovery_log_entry *dle,
*/
int nvmf_connection_status(int fd, nvlist_t **nvlp);
+__END_DECLS
+
#endif /* !__LIBNVMF_H__ */
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index 104777352d8b..cbd9d4677146 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -2397,6 +2397,151 @@ pfctl_table_add_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
return (0);
}
+static void
+snl_add_msg_attr_table(struct snl_writer *nw, uint32_t type,
+ const struct pfr_table *tbl)
+{
+ int off;
+
+ off = snl_add_msg_attr_nested(nw, type);
+
+ snl_add_msg_attr_string(nw, PF_T_ANCHOR, tbl->pfrt_anchor);
+ snl_add_msg_attr_string(nw, PF_T_NAME, tbl->pfrt_name);
+ snl_add_msg_attr_u32(nw, PF_T_TABLE_FLAGS, tbl->pfrt_flags);
+
+ snl_end_attr_nested(nw, off);
+}
+
+static void
+snl_add_msg_attr_pfr_addr(struct snl_writer *nw, uint32_t type,
+ const struct pfr_addr *addr)
+{
+ int off;
+
+ off = snl_add_msg_attr_nested(nw, type);
+
+ snl_add_msg_attr_u8(nw, PFR_A_AF, addr->pfra_af);
+ snl_add_msg_attr_u8(nw, PFR_A_NET, addr->pfra_net);
+ snl_add_msg_attr_bool(nw, PFR_A_NOT, addr->pfra_not);
+ snl_add_msg_attr_ip6(nw, PFR_A_ADDR, &addr->pfra_ip6addr);
+
+ snl_end_attr_nested(nw, off);
+}
+
+static struct snl_attr_parser ap_table_add_addr[] = {
+ { .type = PF_TA_NBR_ADDED, .off = 0, .cb = snl_attr_get_uint32 },
+};
+SNL_DECLARE_PARSER(table_add_addr_parser, struct genlmsghdr, snl_f_p_empty, ap_table_add_addr);
+
+static int
+_pfctl_table_add_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr
+ *addrs, int size, int *nadd, int flags)
+{
+ struct snl_writer nw;
+ struct snl_errmsg_data e = {};
+ struct nlmsghdr *hdr;
+ uint32_t seq_id;
+ uint32_t added;
+ int family_id;
+
+ family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME);
+ if (family_id == 0)
+ return (ENOTSUP);
+
+ snl_init_writer(&h->ss, &nw);
+ hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_TABLE_ADD_ADDR);
+
+ snl_add_msg_attr_table(&nw, PF_TA_TABLE, tbl);
+ snl_add_msg_attr_u32(&nw, PF_TA_FLAGS, flags);
+ for (int i = 0; i < size && i < 256; i++)
+ snl_add_msg_attr_pfr_addr(&nw, PF_TA_ADDR, &addrs[i]);
+
+ if ((hdr = snl_finalize_msg(&nw)) == NULL)
+ return (ENXIO);
+ seq_id = hdr->nlmsg_seq;
+
+ if (! snl_send_message(&h->ss, hdr))
+ return (ENXIO);
+
+ while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) {
+ if (! snl_parse_nlmsg(&h->ss, hdr, &table_add_addr_parser, &added))
+ continue;
+ }
+
+ if (nadd)
+ *nadd = added;
+
+ return (e.error);
+}
+
+int
+pfctl_table_add_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr
+ *addr, int size, int *nadd, int flags)
+{
+ int ret;
+ int off = 0;
+ int partial_added;
+
+ do {
+ ret = _pfctl_table_add_addrs_h(h, tbl, &addr[off], size - off, &partial_added, flags);
+ if (ret != 0)
+ break;
+ if (nadd)
+ *nadd += partial_added;
+ off += partial_added;
+ } while (off < size);
+
+ if (nadd)
+ *nadd = off;
+
+ return (ret);
+}
+
+static struct snl_attr_parser ap_table_del_addr[] = {
+ { .type = PF_TA_NBR_DELETED, .off = 0, .cb = snl_attr_get_uint32 },
+};
+SNL_DECLARE_PARSER(table_del_addr_parser, struct genlmsghdr, snl_f_p_empty, ap_table_del_addr);
+static int
+_pfctl_table_del_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr
+ *addrs, int size, int *ndel, int flags)
+{
+ struct snl_writer nw;
+ struct snl_errmsg_data e = {};
+ struct nlmsghdr *hdr;
+ uint32_t seq_id;
+ uint32_t deleted;
+ int family_id;
+
+ family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME);
+ if (family_id == 0)
+ return (ENOTSUP);
+
+ snl_init_writer(&h->ss, &nw);
+ hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_TABLE_DEL_ADDR);
+
+ snl_add_msg_attr_table(&nw, PF_TA_TABLE, tbl);
+ snl_add_msg_attr_u32(&nw, PF_TA_FLAGS, flags);
+ for (int i = 0; i < size && i < 256; i++)
+ snl_add_msg_attr_pfr_addr(&nw, PF_TA_ADDR, &addrs[i]);
+
+ if ((hdr = snl_finalize_msg(&nw)) == NULL)
+ return (ENXIO);
+ seq_id = hdr->nlmsg_seq;
+
+ if (! snl_send_message(&h->ss, hdr))
+ return (ENXIO);
+
+ while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) {
+ if (! snl_parse_nlmsg(&h->ss, hdr, &table_del_addr_parser, &deleted))
+ continue;
+ }
+
+ if (ndel)
+ *ndel = deleted;
+
+ return (e.error);
+}
+
int
pfctl_table_del_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
*addr, int size, int *ndel, int flags)
@@ -2421,6 +2566,30 @@ pfctl_table_del_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
}
int
+pfctl_table_del_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr
+ *addr, int size, int *ndel, int flags)
+{
+ int ret;
+ int off = 0;
+ int partial_deleted;
+
+ do {
+ ret = _pfctl_table_del_addrs_h(h, tbl, &addr[off], size - off,
+ &partial_deleted, flags);
+ if (ret != 0)
+ break;
+ if (ndel)
+ *ndel += partial_deleted;
+ off += partial_deleted;
+ } while (off < size);
+
+ if (ndel)
+ *ndel = off;
+
+ return (ret);
+}
+
+int
pfctl_table_set_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
*addr, int size, int *size2, int *nadd, int *ndel, int *nchange, int flags)
{
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
index 116f9243fda9..f6c8f6a2ccdb 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -511,8 +511,12 @@ int pfctl_clear_nat(int dev, const char *anchorname);
int pfctl_clear_eth_rules(int dev, const char *anchorname);
int pfctl_set_syncookies(int dev, const struct pfctl_syncookies *s);
int pfctl_get_syncookies(int dev, struct pfctl_syncookies *s);
+int pfctl_table_add_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr
+ *addr, int size, int *nadd, int flags);
int pfctl_table_add_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
*addr, int size, int *nadd, int flags);
+int pfctl_table_del_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl,
+ struct pfr_addr *addr, int size, int *ndel, int flags);
int pfctl_table_del_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
*addr, int size, int *ndel, int flags);
int pfctl_table_set_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
index 3eb4bf85153d..7871731dcdcd 100644
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -135,15 +135,28 @@ FEATURE_NOTE='\#include <sys/elf_common.h>\nGNU_PROPERTY_AARCH64_FEATURE_1_NOTE(
FEATURE_NOTE=''
.endif
-${SASM}:
- printf '/* %sgenerated by libc/sys/Makefile.inc */\n' @ > ${.TARGET}
+# Add this file as a dependency of the generated assembly along with
+# the two included files compat.h and SYS.h. Depending on this Makefile
+# will cause some needless regenerations, but handles both changes in
+# generated assembly and movement between MIASM and PSEUDO/INTERPOSED.
+# The dependency on compat.h and SYS.h should properly be on the
+# <foo>.S-><foo>.o rules, but there are too many .o variants for it to
+# be easy and touching the geneated source files has the same effect in
+# practice.
+__makefile_sys:= ${.PARSEDIR}/${.PARSEFILE}
+__asm_deps= ${__makefile_sys} \
+ ${LIBC_SRCTOP}/include/compat.h \
+ ${LIBSYS_SRCTOP}/${LIBC_ARCH}/SYS.h
+
+${SASM}: ${__asm_deps}
+ printf '/* %sgenerated by libsys/Makefile.sys */\n' @ > ${.TARGET}
printf '#include "compat.h"\n' >> ${.TARGET}
printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' >> ${.TARGET}
printf ${NOTE_GNU_STACK} >>${.TARGET}
printf ${FEATURE_NOTE} >> ${.TARGET}
-${SPSEUDO}:
- printf '/* %sgenerated by libc/sys/Makefile.inc */\n' @ > ${.TARGET}
+${SPSEUDO}: ${__asm_deps}
+ printf '/* %sgenerated by libsys/Makefile.sys */\n' @ > ${.TARGET}
printf '#include "compat.h"\n' >> ${.TARGET}
printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \
>> ${.TARGET}
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c
index 64cf7d004070..0f9e3749d75f 100644
--- a/lib/libthr/thread/thr_init.c
+++ b/lib/libthr/thread/thr_init.c
@@ -170,7 +170,6 @@ STATIC_LIB_REQUIRE(_sem_trywait);
STATIC_LIB_REQUIRE(_sem_wait);
STATIC_LIB_REQUIRE(_sigaction);
STATIC_LIB_REQUIRE(_sigprocmask);
-STATIC_LIB_REQUIRE(_sigsuspend);
STATIC_LIB_REQUIRE(_sigtimedwait);
STATIC_LIB_REQUIRE(_sigwait);
STATIC_LIB_REQUIRE(_sigwaitinfo);
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c
index 2cd3de512d1c..4bff5497a804 100644
--- a/lib/libthr/thread/thr_sig.c
+++ b/lib/libthr/thread/thr_sig.c
@@ -683,14 +683,6 @@ _thr_sigmask(int how, const sigset_t *set, sigset_t *oset)
}
int
-_sigsuspend(const sigset_t *set)
-{
- sigset_t newset;
-
- return (__sys_sigsuspend(thr_remove_thr_signals(set, &newset)));
-}
-
-int
__thr_sigsuspend(const sigset_t *set)
{
struct pthread *curthread;
diff --git a/lib/libusb/libusb.3 b/lib/libusb/libusb.3
index 9dc752f0fd7b..607a7f645d95 100644
--- a/lib/libusb/libusb.3
+++ b/lib/libusb/libusb.3
@@ -209,6 +209,14 @@ Decrement the reference counter of the device
.Fa dev .
.Pp
.Ft int
+.Fn libusb_wrap_sys_device "libusb_context *ctx" "intptr_t sys_dev" "libusb_device_handle **dev_handle"
+This function creates a libusb handler from a previously opened fd
+.Fa sys_dev .
+This function is provided for compatibility and is currently unimplemented.
+It always returns
+.Dv LIBUSB_ERROR_NOT_SUPPORTED .
+.Pp
+.Ft int
.Fn libusb_open "libusb_device *dev" "libusb_device_handle **devh"
Open a device and obtain a device_handle.
Returns 0 on success,
@@ -536,6 +544,21 @@ libusb_free_container_id_descriptor function.
.Fn libusb_free_container_id_descriptor "struct libusb_container_id_descriptor *container_id"
This function is NULL safe and frees a parsed container ID descriptor given by
.Fa container_id .
+.Pp
+.Ft int
+.Fn libusb_get_platform_descriptor "struct libusb_context *ctx" "struct libusb_bos_dev_capability_descriptor *dev_cap" "struct libusb_platform_descriptor **platform_descriptor"
+This function parses the platform descriptor from the descriptor given by
+.Fa dev_cap
+and stores a pointer to the parsed descriptor into
+.Fa platform_descriptor .
+Returns zero on success and a LIBUSB_ERROR code on failure.
+On success the parsed platform descriptor must be freed using the
+libusb_free_platform_descriptor function.
+.Pp
+.Ft void
+.Fn libusb_free_platform_descriptor "struct libusb_platform_descriptor *platform_descriptor"
+This function is NULL safe and frees a parsed platform descriptor given by
+.Fa platform_descriptor .
.Sh USB ASYNCHRONOUS I/O
.Ft struct libusb_transfer *
.Fn libusb_alloc_transfer "int iso_packets"
@@ -734,6 +757,14 @@ another thread is already doing so.
Must be called with the event lock held.
.Pp
.Ft int
+.Fn libusb_pollfds_handle_timeouts "libusb_context *ctx"
+This function determines whether applications maintaining libusb events using
+.Fn libusb_get_pollfds
+are responsible for handling timeout events themselves.
+Returns 1 if libusb handles the timeout internally, 0 if the application
+needs to set a dedicated timer to handle it.
+.Pp
+.Ft int
.Fn libusb_get_next_timeout "libusb_context *ctx" "struct timeval *tv"
Determine the next internal timeout that libusb needs to handle.
Returns 0
diff --git a/lib/libusb/libusb.h b/lib/libusb/libusb.h
index 1803ff637738..623b56fb273b 100644
--- a/lib/libusb/libusb.h
+++ b/lib/libusb/libusb.h
@@ -66,6 +66,7 @@ enum libusb_class_code {
LIBUSB_CLASS_PERSONAL_HEALTHCARE = 15,
LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 0xdc,
LIBUSB_CLASS_WIRELESS = 0xe0,
+ LIBUSB_CLASS_MISCELLANEOUS = 0xef,
LIBUSB_CLASS_APPLICATION = 0xfe,
LIBUSB_CLASS_VENDOR_SPEC = 0xff,
};
@@ -106,6 +107,7 @@ enum libusb_device_capability_type {
#define LIBUSB_BT_USB_2_0_EXTENSION_SIZE 7
#define LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE 10
#define LIBUSB_BT_CONTAINER_ID_SIZE 20
+#define LIBUSB_BT_PLATFORM_DESCRIPTOR_MIN_SIZE 20
#define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f
#define LIBUSB_ENDPOINT_DIR_MASK 0x80
@@ -172,11 +174,23 @@ enum libusb_iso_usage_type {
LIBUSB_ISO_USAGE_TYPE_IMPLICIT = 2,
};
+enum libusb_usb_2_0_extension_attributes {
+ LIBUSB_BM_LPM_SUPPORT = 0x2,
+};
+
+enum libusb_supported_speed {
+ LIBUSB_LOW_SPEED_OPERATION = (1 << 0),
+ LIBUSB_FULL_SPEED_OPERATION = (1 << 1),
+ LIBUSB_HIGH_SPEED_OPERATION = (1 << 2),
+ LIBUSB_SUPER_SPEED_OPERATION = (1 << 3),
+};
+
enum libusb_bos_type {
LIBUSB_BT_WIRELESS_USB_DEVICE_CAPABILITY = 1,
LIBUSB_BT_USB_2_0_EXTENSION = 2,
LIBUSB_BT_SS_USB_DEVICE_CAPABILITY = 3,
LIBUSB_BT_CONTAINER_ID = 4,
+ LIBUSB_BT_PLATFORM_DESCRIPTOR = 5,
};
enum libusb_capability {
@@ -434,6 +448,15 @@ typedef struct libusb_container_id_descriptor {
uint8_t ContainerID[16];
} libusb_container_id_descriptor __aligned(sizeof(void *));
+typedef struct libusb_platform_descriptor {
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDevCapabilityType;
+ uint8_t bReserved;
+ uint8_t PlatformCapabilityUUID[16];
+ uint8_t CapabilityData[];
+} libusb_platform_descriptor __aligned(sizeof(void *));
+
typedef struct libusb_control_setup {
uint8_t bmRequestType;
uint8_t bRequest;
@@ -495,6 +518,7 @@ int libusb_get_max_packet_size(libusb_device * dev, uint8_t endpoint);
int libusb_get_max_iso_packet_size(libusb_device * dev, uint8_t endpoint);
libusb_device *libusb_ref_device(libusb_device * dev);
void libusb_unref_device(libusb_device * dev);
+int libusb_wrap_sys_device(libusb_context *ctx, intptr_t sys_dev, libusb_device_handle **dev_handle);
int libusb_open(libusb_device * dev, libusb_device_handle ** devh);
libusb_device_handle *libusb_open_device_with_vid_pid(libusb_context * ctx, uint16_t vendor_id, uint16_t product_id);
void libusb_close(libusb_device_handle * devh);
@@ -541,6 +565,8 @@ int libusb_get_ss_usb_device_capability_descriptor(struct libusb_context *ctx, s
void libusb_free_ss_usb_device_capability_descriptor(struct libusb_ss_usb_device_capability_descriptor *ss_usb_device_capability);
int libusb_get_container_id_descriptor(struct libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_container_id_descriptor **container_id);
void libusb_free_container_id_descriptor(struct libusb_container_id_descriptor *container_id);
+int libusb_get_platform_descriptor(libusb_context *ctx, struct libusb_bos_dev_capability_descriptor *dev_cap, struct libusb_platform_descriptor **platform_descriptor);
+void libusb_free_platform_descriptor(struct libusb_platform_descriptor *platform_descriptor);
/* Asynchronous device I/O */
@@ -556,6 +582,7 @@ struct libusb_control_setup *libusb_control_transfer_get_setup(struct libusb_tra
void libusb_fill_control_setup(uint8_t *buf, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength);
void libusb_fill_control_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t *buf, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout);
void libusb_fill_bulk_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout);
+void libusb_fill_bulk_stream_transfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, uint32_t stream_id, unsigned char *buffer, int length, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout);
void libusb_fill_interrupt_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout);
void libusb_fill_iso_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, int npacket, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout);
@@ -575,6 +602,7 @@ int libusb_handle_events_completed(libusb_context * ctx, int *completed);
int libusb_handle_events_timeout(libusb_context * ctx, struct timeval *tv);
int libusb_handle_events(libusb_context * ctx);
int libusb_handle_events_locked(libusb_context * ctx, struct timeval *tv);
+int libusb_pollfds_handle_timeouts(libusb_context *ctx);
int libusb_get_next_timeout(libusb_context * ctx, struct timeval *tv);
void libusb_set_pollfd_notifiers(libusb_context * ctx, libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, void *user_data);
const struct libusb_pollfd **libusb_get_pollfds(libusb_context *ctx);
diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c
index 5c116b39ea17..e226def0b7b6 100644
--- a/lib/libusb/libusb10.c
+++ b/lib/libusb/libusb10.c
@@ -1918,3 +1918,10 @@ libusb_dev_mem_free(libusb_device_handle *devh, unsigned char *buffer,
{
return (LIBUSB_ERROR_NOT_SUPPORTED);
}
+
+int
+libusb_wrap_sys_device(libusb_context *ctx, intptr_t sys_dev,
+ libusb_device_handle **dev_handle)
+{
+ return (LIBUSB_ERROR_NOT_SUPPORTED);
+}
diff --git a/lib/libusb/libusb10_desc.c b/lib/libusb/libusb10_desc.c
index 5f4c46740688..7da5c84f4ad2 100644
--- a/lib/libusb/libusb10_desc.c
+++ b/lib/libusb/libusb10_desc.c
@@ -711,6 +711,55 @@ void
libusb_free_container_id_descriptor(
struct libusb_container_id_descriptor *container_id)
{
-
free(container_id);
}
+
+int
+libusb_get_platform_descriptor(libusb_context *ctx,
+ struct libusb_bos_dev_capability_descriptor *bos_cap,
+ struct libusb_platform_descriptor **pd)
+{
+ struct libusb_platform_descriptor *desc;
+ uint8_t *cap_data;
+
+ if (bos_cap == NULL ||
+ bos_cap->bDescriptorType != LIBUSB_BT_PLATFORM_DESCRIPTOR ||
+ pd == NULL)
+ return (LIBUSB_ERROR_INVALID_PARAM);
+
+ if (bos_cap->bLength < LIBUSB_BT_PLATFORM_DESCRIPTOR_MIN_SIZE)
+ return (LIBUSB_ERROR_IO);
+
+ cap_data = bos_cap->dev_capability_data;
+ desc = calloc(1, bos_cap->bLength);
+ if (desc == NULL)
+ return (LIBUSB_ERROR_NO_MEM);
+
+ desc->bLength = bos_cap->bLength;
+ desc->bDescriptorType = LIBUSB_BT_PLATFORM_DESCRIPTOR;
+ desc->bDevCapabilityType = bos_cap->bDevCapabilityType;
+ desc->bReserved = cap_data[0];
+ memcpy(desc->PlatformCapabilityUUID, cap_data + 1,
+ sizeof(desc->PlatformCapabilityUUID));
+
+ /*
+ * UUID (16 bytes) + bReserved
+ */
+ cap_data += sizeof(desc->PlatformCapabilityUUID) + 1;
+ /*
+ * UUID (16 bytes) + bReserved + bLength + bDescriptortype +
+ * bDevCapabilitytype
+ */
+ memcpy(desc->CapabilityData, cap_data,
+ bos_cap->bLength - (sizeof(desc->PlatformCapabilityUUID) + 4));
+ *pd = desc;
+
+ return (LIBUSB_SUCCESS);
+}
+
+void
+libusb_free_platform_descriptor(
+ struct libusb_platform_descriptor *platform_descriptor)
+{
+ free(platform_descriptor);
+}
diff --git a/lib/libusb/libusb10_io.c b/lib/libusb/libusb10_io.c
index c99586ff650d..2047712e9e39 100644
--- a/lib/libusb/libusb10_io.c
+++ b/lib/libusb/libusb10_io.c
@@ -422,6 +422,12 @@ libusb_get_next_timeout(libusb_context *ctx, struct timeval *tv)
return (0);
}
+int
+libusb_pollfds_handle_timeouts(libusb_context *ctx)
+{
+ return (1);
+}
+
void
libusb_set_pollfd_notifiers(libusb_context *ctx,
libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb,
diff --git a/lib/libutil/Symbol.map b/lib/libutil/Symbol.map
index 8c8fff451cd1..2b28456f4406 100644
--- a/lib/libutil/Symbol.map
+++ b/lib/libutil/Symbol.map
@@ -13,6 +13,7 @@ FBSD_1.8 {
cpuset_parselist;
domainset_parselist;
expand_number;
+ expand_unsigned;
flopen;
flopenat;
forkpty;
@@ -119,6 +120,14 @@ FBSD_1.8 {
uu_lock;
uu_lockerr;
uu_unlock;
+
+ /*
+ * login_setcryptfmt() uses crypt_set_format() from libcrypt. To
+ * avoid forcing a hard dependency on libcrypt, we provide a weak
+ * stub. Applications that use login_setcryptfmt() should link
+ * with libcrypt, whose crypt_set_format() will override the stub.
+ */
+ crypt_set_format;
};
FBSDprivate_1.0 {
diff --git a/lib/libutil/expand_number.3 b/lib/libutil/expand_number.3
index 1b932400de69..b1833cedf406 100644
--- a/lib/libutil/expand_number.3
+++ b/lib/libutil/expand_number.3
@@ -24,11 +24,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 25, 2025
+.Dd August 6, 2025
.Dt EXPAND_NUMBER 3
.Os
.Sh NAME
-.Nm expand_number
+.Nm expand_number ,
+.Nm expand_unsigned
.Nd parse a number from human readable form
.Sh LIBRARY
.Lb libutil
@@ -38,6 +39,10 @@
.Fo expand_number
.Fa "const char *buf" "int64_t *num"
.Fc
+.Ft int
+.Fo expand_unsigned
+.Fa "const char *buf" "uint64_t *num"
+.Fc
.Sh DESCRIPTION
The
.Fn expand_number
@@ -48,6 +53,17 @@ quantity in the location pointed to by its
.Fa *num
argument.
.Pp
+The
+.Fn expand_unsigned
+function is similar to
+.Fn expand_number ,
+but accepts only positive numbers in the range
+.Bq 0, Ns Dv UINT64_MAX .
+.Pp
+Both functions interpret the input
+.Dq -0
+as 0.
+.Pp
The input string must consist of a decimal number, optionally preceded
by a
.Sq +
@@ -81,20 +97,38 @@ is interpreted as 5, and
.Dq 5kb
is interpreted as 5,120).
However, the usage of this suffix is discouraged.
+.Pp
+For backward compatibility reasons, if the compiler supports generic
+selection, a macro is provided which automatically replaces calls to
+.Fn expand_number
+with calls to
+.Fn expand_unsigned
+if the type of the actual
+.Va num
+argument is compatible with
+.Vt uint64_t * .
.Sh RETURN VALUES
.Rv -std
.Sh ERRORS
The
.Fn expand_number
-function will fail if:
+and
+.Fn expand_unsigned
+functions will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The given string does not contain a valid number.
.It Bq Er EINVAL
An unrecognized suffix was encountered.
.It Bq Er ERANGE
-The given string represents a number which does not fit into a
-.Vt int64_t .
+The given string represents a number which does not fit into an
+.Vt int64_t
+(for
+.Fn expand_number )
+or
+.Vt uint64_t
+(for
+.Fn expand_unsigned ) .
.El
.Sh SEE ALSO
.Xr humanize_number 3
@@ -103,3 +137,17 @@ The
.Fn expand_number
function first appeared in
.Fx 6.3 .
+The original implementation did not handle negative numbers correctly,
+and it was switched to taking a
+.Vt uint64_t *
+and accepting only positive numbers in
+.Fx 9.0 .
+The
+.Fn expand_unsigned
+function was added,
+and
+.Fn expand_number
+switched back to
+.Vt int64_t * ,
+in
+.Fx 15.0 .
diff --git a/lib/libutil/expand_number.c b/lib/libutil/expand_number.c
index f4c19d7867a3..a3313ba39d98 100644
--- a/lib/libutil/expand_number.c
+++ b/lib/libutil/expand_number.c
@@ -37,13 +37,12 @@
#include <stdbool.h>
#include <stdint.h>
-int
-expand_number(const char *buf, int64_t *num)
+static int
+expand_impl(const char *buf, uint64_t *num, bool *neg)
{
char *endptr;
uintmax_t number;
unsigned int shift;
- bool neg;
int serrno;
/*
@@ -52,10 +51,10 @@ expand_number(const char *buf, int64_t *num)
while (isspace((unsigned char)*buf))
buf++;
if (*buf == '-') {
- neg = true;
+ *neg = true;
buf++;
} else {
- neg = false;
+ *neg = false;
if (*buf == '+')
buf++;
}
@@ -127,6 +126,22 @@ expand_number(const char *buf, int64_t *num)
}
number <<= shift;
+ *num = number;
+ return (0);
+}
+
+int
+(expand_number)(const char *buf, int64_t *num)
+{
+ uint64_t number;
+ bool neg;
+
+ /*
+ * Parse the number.
+ */
+ if (expand_impl(buf, &number, &neg) != 0)
+ return (-1);
+
/*
* Apply the sign and check for overflow.
*/
@@ -146,3 +161,27 @@ expand_number(const char *buf, int64_t *num)
return (0);
}
+
+int
+expand_unsigned(const char *buf, uint64_t *num)
+{
+ uint64_t number;
+ bool neg;
+
+ /*
+ * Parse the number.
+ */
+ if (expand_impl(buf, &number, &neg) != 0)
+ return (-1);
+
+ /*
+ * Negative numbers are out of range.
+ */
+ if (neg && number > 0) {
+ errno = ERANGE;
+ return (-1);
+ }
+
+ *num = number;
+ return (0);
+}
diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h
index d27262e44daf..9b5b2abe7f09 100644
--- a/lib/libutil/libutil.h
+++ b/lib/libutil/libutil.h
@@ -89,6 +89,14 @@ __BEGIN_DECLS
void clean_environment(const char * const *_white,
const char * const *_more_white);
int expand_number(const char *_buf, int64_t *_num);
+int expand_unsigned(const char *_buf, uint64_t *_num);
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
+ __has_extension(c_generic_selections)
+#define expand_number(_buf, _num) \
+ _Generic((_num), \
+ uint64_t *: expand_unsigned, \
+ default: expand_number)((_buf), (_num))
+#endif
int extattr_namespace_to_string(int _attrnamespace, char **_string);
int extattr_string_to_namespace(const char *_string, int *_attrnamespace);
int flopen(const char *_path, int _flags, ...);
diff --git a/lib/libutil/tests/expand_number_test.c b/lib/libutil/tests/expand_number_test.c
index 8e7458994de4..9bd339298575 100644
--- a/lib/libutil/tests/expand_number_test.c
+++ b/lib/libutil/tests/expand_number_test.c
@@ -206,10 +206,89 @@ ATF_TC_BODY(expand_number__bad, tp)
require_error(" + 1", EINVAL);
}
+ATF_TC_WITHOUT_HEAD(expand_unsigned);
+ATF_TC_BODY(expand_unsigned, tp)
+{
+ static struct tc {
+ const char *str;
+ uint64_t num;
+ int error;
+ } tcs[] = {
+ { "0", 0, 0 },
+ { "+0", 0, 0 },
+ { "-0", 0, 0 },
+ { "1", 1, 0 },
+ { "+1", 1, 0 },
+ { "-1", 0, ERANGE },
+ { "18446744073709551615", UINT64_MAX, 0 },
+ { "+18446744073709551615", UINT64_MAX, 0 },
+ { "-18446744073709551615", 0, ERANGE },
+ { 0 },
+ };
+ struct tc *tc;
+ uint64_t num;
+ int error, ret;
+
+ for (tc = tcs; tc->str != NULL; tc++) {
+ ret = expand_number(tc->str, &num);
+ error = errno;
+ if (tc->error == 0) {
+ ATF_REQUIRE_EQ_MSG(0, ret,
+ "%s ret = %d", tc->str, ret);
+ ATF_REQUIRE_EQ_MSG(tc->num, num,
+ "%s num = %ju", tc->str, (uintmax_t)num);
+ } else {
+ ATF_REQUIRE_EQ_MSG(-1, ret,
+ "%s ret = %d", tc->str, ret);
+ ATF_REQUIRE_EQ_MSG(tc->error, error,
+ "%s errno = %d", tc->str, error);
+ }
+ }
+}
+
+ATF_TC_WITHOUT_HEAD(expand_generic);
+ATF_TC_BODY(expand_generic, tp)
+{
+ uint64_t uint64;
+ int64_t int64;
+#ifdef __LP64__
+ size_t size;
+#endif
+ off_t off;
+
+ ATF_REQUIRE_EQ(0, expand_number("18446744073709551615", &uint64));
+ ATF_REQUIRE_EQ(UINT64_MAX, uint64);
+ ATF_REQUIRE_EQ(-1, expand_number("-1", &uint64));
+ ATF_REQUIRE_EQ(ERANGE, errno);
+
+ ATF_REQUIRE_EQ(0, expand_number("9223372036854775807", &int64));
+ ATF_REQUIRE_EQ(INT64_MAX, int64);
+ ATF_REQUIRE_EQ(-1, expand_number("9223372036854775808", &int64));
+ ATF_REQUIRE_EQ(ERANGE, errno);
+ ATF_REQUIRE_EQ(0, expand_number("-9223372036854775808", &int64));
+ ATF_REQUIRE_EQ(INT64_MIN, int64);
+
+#ifdef __LP64__
+ ATF_REQUIRE_EQ(0, expand_number("18446744073709551615", &size));
+ ATF_REQUIRE_EQ(UINT64_MAX, size);
+ ATF_REQUIRE_EQ(-1, expand_number("-1", &size));
+ ATF_REQUIRE_EQ(ERANGE, errno);
+#endif
+
+ ATF_REQUIRE_EQ(0, expand_number("9223372036854775807", &off));
+ ATF_REQUIRE_EQ(INT64_MAX, off);
+ ATF_REQUIRE_EQ(-1, expand_number("9223372036854775808", &off));
+ ATF_REQUIRE_EQ(ERANGE, errno);
+ ATF_REQUIRE_EQ(0, expand_number("-9223372036854775808", &off));
+ ATF_REQUIRE_EQ(INT64_MIN, off);
+}
+
ATF_TP_ADD_TCS(tp)
{
ATF_TP_ADD_TC(tp, expand_number__ok);
ATF_TP_ADD_TC(tp, expand_number__bad);
+ ATF_TP_ADD_TC(tp, expand_unsigned);
+ ATF_TP_ADD_TC(tp, expand_generic);
return (atf_no_error());
}
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index 46473b92a637..d4829b17cebb 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -268,7 +268,7 @@ typedef struct Struct_Obj_Entry {
bool unholdfree : 1; /* unmap upon last unhold */
bool doomed : 1; /* Object cannot be referenced */
- MD_OBJ_ENTRY;
+ MD_OBJ_ENTRY
struct link_map linkmap; /* For GDB and dlinfo() */
Objlist dldags; /* Object belongs to these dlopened DAGs (%) */
diff --git a/release/packages/ucl/libutil++-all.ucl b/release/packages/ucl/libutil++-all.ucl
new file mode 100644
index 000000000000..dfd77215dbc5
--- /dev/null
+++ b/release/packages/ucl/libutil++-all.ucl
@@ -0,0 +1,4 @@
+comment = "C++ utility library"
+desc = <<EOD
+libutil++ contains various C++ utility classes used by the base system.
+EOD
diff --git a/sbin/hastd/nv.c b/sbin/hastd/nv.c
index 0730e4f2a794..16ab95cf0dc6 100644
--- a/sbin/hastd/nv.c
+++ b/sbin/hastd/nv.c
@@ -97,7 +97,7 @@ struct nvhdr {
} __packed;
#define NVH_DATA(nvh) ((unsigned char *)nvh + NVH_HSIZE(nvh))
#define NVH_HSIZE(nvh) \
- (sizeof(struct nvhdr) + roundup2((nvh)->nvh_namesize, 8))
+ (sizeof(struct nvhdr) + roundup2((size_t)(nvh)->nvh_namesize, 8))
#define NVH_DSIZE(nvh) \
(((nvh)->nvh_type & NV_ORDER_MASK) == NV_ORDER_HOST ? \
(nvh)->nvh_dsize : \
@@ -247,11 +247,8 @@ nv_validate(struct nv *nv, size_t *extrap)
break;
}
dsize = NVH_DSIZE(nvh);
- if (dsize == 0) {
- error = EINVAL;
- break;
- }
- if (size < NVH_SIZE(nvh)) {
+ if (roundup2(dsize, 8) == 0 ||
+ roundup2(dsize, 8) > size - NVH_HSIZE(nvh)) {
error = EINVAL;
break;
}
diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c
index 335ed9bf513f..eff443447c13 100644
--- a/sbin/ifconfig/ifbridge.c
+++ b/sbin/ifconfig/ifbridge.c
@@ -60,6 +60,10 @@
#include "ifconfig.h"
+static int parse_vlans(ifbvlan_set_t *set, const char *str);
+static int get_val(const char *cp, u_long *valp);
+static int get_vlan_id(const char *cp, ether_vlanid_t *valp);
+
static const char *stpstates[] = { STP_STATES };
static const char *stpproto[] = { STP_PROTOS };
static const char *stproles[] = { STP_ROLES };
@@ -190,6 +194,21 @@ print_vlans(ifbvlan_set_t *vlans)
}
}
+static char const *
+vlan_proto_name(uint16_t proto)
+{
+ switch (proto) {
+ case 0:
+ return "none";
+ case ETHERTYPE_VLAN:
+ return "802.1q";
+ case ETHERTYPE_QINQ:
+ return "802.1ad";
+ default:
+ return "unknown";
+ }
+}
+
static void
bridge_status(if_ctx *ctx)
{
@@ -261,6 +280,9 @@ bridge_status(if_ctx *ctx)
else
printf(" <unknown state %d>", state);
}
+ if (member->ifbr_vlanproto != 0)
+ printf(" vlan protocol %s",
+ vlan_proto_name(member->ifbr_vlanproto));
if (member->ifbr_pvid != 0)
printf(" untagged %u", (unsigned)member->ifbr_pvid);
print_vlans(&bridge->member_vlans[i]);
@@ -270,15 +292,62 @@ bridge_status(if_ctx *ctx)
ifconfig_bridge_free_bridge_status(bridge);
}
-static void
-setbridge_add(if_ctx *ctx, const char *val, int dummy __unused)
+static int
+setbridge_add(if_ctx *ctx, int argc, const char *const *argv)
{
struct ifbreq req;
+ struct ifbif_vlan_req vlreq;
+ int oargc = argc;
memset(&req, 0, sizeof(req));
- strlcpy(req.ifbr_ifsname, val, sizeof(req.ifbr_ifsname));
+ memset(&vlreq, 0, sizeof(vlreq));
+
+ if (argc < 1)
+ errx(1, "usage: addm <interface> [opts ...]");
+
+ strlcpy(req.ifbr_ifsname, argv[0], sizeof(req.ifbr_ifsname));
+ --argc; ++argv;
+
+ while (argc) {
+ if (strcmp(argv[0], "untagged") == 0) {
+ if (argc < 2)
+ errx(1, "usage: untagged <vlan id>");
+
+ if (get_vlan_id(argv[1], &req.ifbr_pvid) < 0)
+ errx(1, "invalid VLAN identifier: %s", argv[1]);
+
+ argc -= 2;
+ argv += 2;
+ } else if (strcmp(argv[0], "tagged") == 0) {
+ if (argc < 2)
+ errx(1, "usage: tagged <vlan set>");
+
+ vlreq.bv_op = BRDG_VLAN_OP_SET;
+ strlcpy(vlreq.bv_ifname, req.ifbr_ifsname,
+ sizeof(vlreq.bv_ifname));
+ if (parse_vlans(&vlreq.bv_set, argv[1]) != 0)
+ errx(1, "invalid vlan set: %s", argv[1]);
+
+ argc -= 2;
+ argv += 2;
+ } else {
+ break;
+ }
+ }
+
if (do_cmd(ctx, BRDGADD, &req, sizeof(req), 1) < 0)
- err(1, "BRDGADD %s", val);
+ err(1, "BRDGADD %s", req.ifbr_ifsname);
+
+ if (req.ifbr_pvid != 0 &&
+ do_cmd(ctx, BRDGSIFPVID, &req, sizeof(req), 1) < 0)
+ err(1, "BRDGSIFPVID %s %u", req.ifbr_ifsname,
+ (unsigned)req.ifbr_pvid);
+
+ if (vlreq.bv_op != 0 &&
+ do_cmd(ctx, BRDGSIFVLANSET, &vlreq, sizeof(vlreq), 1) < 0)
+ err(1, "BRDGSIFVLANSET %s", req.ifbr_ifsname);
+
+ return (oargc - argc);
}
static void
@@ -666,7 +735,7 @@ setbridge_ifpathcost(if_ctx *ctx, const char *ifn, const char *cost)
}
static void
-setbridge_untagged(if_ctx *ctx, const char *ifn, const char *vlanid)
+setbridge_ifuntagged(if_ctx *ctx, const char *ifn, const char *vlanid)
{
struct ifbreq req;
@@ -681,7 +750,7 @@ setbridge_untagged(if_ctx *ctx, const char *ifn, const char *vlanid)
}
static void
-unsetbridge_untagged(if_ctx *ctx, const char *ifn, int dummy __unused)
+unsetbridge_ifuntagged(if_ctx *ctx, const char *ifn, int dummy __unused)
{
struct ifbreq req;
@@ -813,19 +882,19 @@ set_bridge_vlanset(if_ctx *ctx, const char *ifn, const char *vlans, int op)
}
static void
-setbridge_tagged(if_ctx *ctx, const char *ifn, const char *vlans)
+setbridge_iftagged(if_ctx *ctx, const char *ifn, const char *vlans)
{
set_bridge_vlanset(ctx, ifn, vlans, BRDG_VLAN_OP_SET);
}
static void
-addbridge_tagged(if_ctx *ctx, const char *ifn, const char *vlans)
+addbridge_iftagged(if_ctx *ctx, const char *ifn, const char *vlans)
{
set_bridge_vlanset(ctx, ifn, vlans, BRDG_VLAN_OP_ADD);
}
static void
-delbridge_tagged(if_ctx *ctx, const char *ifn, const char *vlans)
+delbridge_iftagged(if_ctx *ctx, const char *ifn, const char *vlans)
{
set_bridge_vlanset(ctx, ifn, vlans, BRDG_VLAN_OP_DEL);
}
@@ -883,8 +952,39 @@ unsetbridge_defuntagged(if_ctx *ctx, const char *val __unused, int dummy __unuse
err(1, "BRDGSDEFPVID");
}
+static void
+setbridge_qinq(if_ctx *ctx, const char *val, int dummy __unused)
+{
+ do_bridgeflag(ctx, val, IFBIF_QINQ, 1);
+}
+
+static void
+unsetbridge_qinq(if_ctx *ctx, const char *val, int dummy __unused)
+{
+ do_bridgeflag(ctx, val, IFBIF_QINQ, 0);
+}
+
+static void
+setbridge_ifvlanproto(if_ctx *ctx, const char *ifname, const char *proto)
+{
+ struct ifbreq req;
+
+ memset(&req, 0, sizeof(req));
+ strlcpy(req.ifbr_ifsname, ifname, sizeof(req.ifbr_ifsname));
+
+ if (strcmp(proto, "802.1q") == 0)
+ req.ifbr_vlanproto = ETHERTYPE_VLAN;
+ else if (strcmp(proto, "802.1ad") == 0)
+ req.ifbr_vlanproto = ETHERTYPE_QINQ;
+ else
+ errx(1, "unrecognised VLAN protocol: %s", proto);
+
+ if (do_cmd(ctx, BRDGSIFVLANPROTO, &req, sizeof(req), 1) < 0)
+ err(1, "BRDGSIFVLANPROTO");
+}
+
static struct cmd bridge_cmds[] = {
- DEF_CMD_ARG("addm", setbridge_add),
+ DEF_CMD_VARG("addm", setbridge_add),
DEF_CMD_ARG("deletem", setbridge_delete),
DEF_CMD_ARG("discover", setbridge_discover),
DEF_CMD_ARG("-discover", unsetbridge_discover),
@@ -919,11 +1019,12 @@ static struct cmd bridge_cmds[] = {
DEF_CMD_ARG2("ifpriority", setbridge_ifpriority),
DEF_CMD_ARG2("ifpathcost", setbridge_ifpathcost),
DEF_CMD_ARG2("ifmaxaddr", setbridge_ifmaxaddr),
- DEF_CMD_ARG2("untagged", setbridge_untagged),
- DEF_CMD_ARG("-untagged", unsetbridge_untagged),
- DEF_CMD_ARG2("tagged", setbridge_tagged),
- DEF_CMD_ARG2("+tagged", addbridge_tagged),
- DEF_CMD_ARG2("-tagged", delbridge_tagged),
+ DEF_CMD_ARG2("ifuntagged", setbridge_ifuntagged),
+ DEF_CMD_ARG("-ifuntagged", unsetbridge_ifuntagged),
+ DEF_CMD_ARG2("iftagged", setbridge_iftagged),
+ DEF_CMD_ARG2("+iftagged", addbridge_iftagged),
+ DEF_CMD_ARG2("-iftagged", delbridge_iftagged),
+ DEF_CMD_ARG2("ifvlanproto", setbridge_ifvlanproto),
DEF_CMD_ARG("timeout", setbridge_timeout),
DEF_CMD_ARG("private", setbridge_private),
DEF_CMD_ARG("-private", unsetbridge_private),
@@ -933,6 +1034,12 @@ static struct cmd bridge_cmds[] = {
unsetbridge_flags),
DEF_CMD_ARG("defuntagged", setbridge_defuntagged),
DEF_CMD("-defuntagged", 0, unsetbridge_defuntagged),
+ DEF_CMD("defqinq", (int32_t)IFBRF_DEFQINQ,
+ setbridge_flags),
+ DEF_CMD("-defqinq", (int32_t)IFBRF_DEFQINQ,
+ unsetbridge_flags),
+ DEF_CMD_ARG("qinq", setbridge_qinq),
+ DEF_CMD_ARG("-qinq", unsetbridge_qinq),
};
static struct afswtch af_bridge = {
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 06ec62197fba..b562f9e4c0c5 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 30, 2025
+.Dd August 5, 2025
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -2494,12 +2494,27 @@ compatibility.
.Ss Bridge Interface Parameters
The following parameters are specific to bridge interfaces:
.Bl -tag -width indent
-.It Cm addm Ar interface
+.It Cm addm Ar interface Op Ar options ...
Add the interface named by
.Ar interface
as a member of the bridge.
The interface is put into promiscuous mode
so that it can receive every packet sent on the network.
+.Pp
+The interface name may be followed by one or more of the following
+.Ar options :
+.Bl -tag -width ".Cm untagged Ar vlan-id"
+.It Cm untagged Ar vlan-id
+Set the untagged VLAN identifier for the interface.
+This is equivalent to the
+.Cm ifuntagged
+command.
+.It Cm tagged Ar vlan-set
+Set the allowed VLAN list for the interface.
+This is equivalent to the
+.Cm iftagged
+command.
+.El
.It Cm deletem Ar interface
Remove the interface named by
.Ar interface
@@ -2715,9 +2730,9 @@ Enable VLAN filtering on the bridge.
.It Cm -vlanfilter
Disable VLAN filtering on the bridge.
This is the default.
-.It Cm untagged Ar interface Ar vlan-id
+.It Cm ifuntagged Ar interface Ar vlan-id
Set the untagged VLAN identifier for an interface.
-.It Cm -untagged Ar interface Ar vlan-id
+.It Cm -ifuntagged Ar interface Ar vlan-id
Clear the untagged VLAN identifier for an interface.
.It Cm defuntagged Ar vlan-id
Enable the
@@ -2727,7 +2742,7 @@ option by default on newly added members.
Do not enable the
.Cm untagged
option by default on newly added members.
-.It Cm tagged Ar interface Ar vlan-list
+.It Cm iftagged Ar interface Ar vlan-list
Set the interface's VLAN access list to the provided list of VLANs.
The list should be a comma-separated list of one or more VLAN IDs
or ranges formatted as
@@ -2738,15 +2753,44 @@ meaning the empty set,
or the value
.Dq all
meaning all VLANs (1-4094).
-.It Cm +tagged Ar interface Ar vlan-list
+.It Cm +iftagged Ar interface Ar vlan-list
Add the provided list of VLAN IDs to the interface's VLAN access list.
The list should be formatted as described for
-.Cm tagged .
-.It Cm -tagged Ar interface Ar vlan-list
+.Cm iftagged .
+.It Cm -iftagged Ar interface Ar vlan-list
Remove the provided list of VLAN IDs from the interface's VLAN access
list.
The list should be formatted as described for
-.Cm tagged .
+.Cm iftagged .
+.It Cm qinq Ar interface
+Allow this interface to send 802.1ad
+.Dq Q-in-Q
+frames.
+.It Cm -qinq Ar interface
+Do not allow this interface to send 802.1ad
+.Dq Q-in-Q
+frames.
+This is the default behavior.
+.It Cm defqinq
+Enable the
+.Cm qinq
+option by default on newly added members.
+.It Cm -defqinq
+Do not enable the
+.Cm qinq
+option by default on newly added members.
+This is the default behavior.
+.It Cm ifvlanproto Ar interface Ar proto
+Set the VLAN encapsulation protocol on
+.Ar interface
+to
+.Ar proto ,
+which must be either
+.Dq 802.1q
+or
+.Dq 802.1ad .
+The default is
+.Dq 802.1q .
.El
.Ss Link Aggregation and Link Failover Parameters
The following parameters are specific to lagg interfaces:
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 9aa50a73ba04..36bdd9705830 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -183,6 +183,8 @@ static const struct {
{ "src-nodes", PF_LIMIT_SRC_NODES },
{ "frags", PF_LIMIT_FRAGS },
{ "table-entries", PF_LIMIT_TABLE_ENTRIES },
+ { "anchors", PF_LIMIT_ANCHORS },
+ { "eth-anchors", PF_LIMIT_ETH_ANCHORS },
{ NULL, 0 }
};
@@ -3137,6 +3139,7 @@ pfctl_reset(int dev, int opts)
struct pfr_buffer t;
int i;
+ memset(&pf, 0, sizeof(pf));
pf.dev = dev;
pf.h = pfh;
pfctl_init_options(&pf);
diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c
index 00e4207d377b..0fe9ca8813bb 100644
--- a/sbin/pfctl/pfctl_radix.c
+++ b/sbin/pfctl/pfctl_radix.c
@@ -122,7 +122,7 @@ pfr_add_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size,
{
int ret;
- ret = pfctl_table_add_addrs(dev, tbl, addr, size, nadd, flags);
+ ret = pfctl_table_add_addrs_h(pfh, tbl, addr, size, nadd, flags);
if (ret) {
errno = ret;
return (-1);
@@ -136,7 +136,7 @@ pfr_del_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size,
{
int ret;
- ret = pfctl_table_del_addrs(dev, tbl, addr, size, ndel, flags);
+ ret = pfctl_table_del_addrs_h(pfh, tbl, addr, size, ndel, flags);
if (ret) {
errno = ret;
return (-1);
diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5
index 8954e872c231..a9ae823257a4 100644
--- a/share/man/man5/pf.conf.5
+++ b/share/man/man5/pf.conf.5
@@ -27,7 +27,7 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd July 9, 2025
+.Dd July 30, 2025
.Dt PF.CONF 5
.Os
.Sh NAME
@@ -392,50 +392,37 @@ See
.Xr zone 9
for an explanation of memory pools.
.Pp
-For example,
-.Bd -literal -offset indent
-set limit states 20000
-.Ed
-.Pp
-sets the maximum number of entries in the memory pool used by state table
-entries (generated by
+Limits can be set on the following:
+.Bl -tag -width pktdelay_pkts
+.It Cm states
+Set the maximum number of entries in the memory pool used by state table
+entries (those generated by
.Ar pass
rules which do not specify
-.Ar no state )
-to 20000.
-Using
-.Bd -literal -offset indent
-set limit frags 20000
-.Ed
-.Pp
-sets the maximum number of entries in the memory pool used for fragment
-reassembly (generated by the
-.Ar set reassemble
-option or
-.Ar scrub
-rules) to 20000.
-Using
-.Bd -literal -offset indent
-set limit src-nodes 2000
-.Ed
-.Pp
-sets the maximum number of entries in the memory pool used for tracking
+.Cm no state ) .
+The default is 100000.
+.It Cm src-nodes
+Set the maximum number of entries in the memory pool used for tracking
source IP addresses (generated by the
.Ar sticky-address
and
.Ar src.track
-options) to 2000.
-Using
-.Bd -literal -offset indent
-set limit table-entries 100000
-.Ed
-.Pp
-sets the limit on the overall number of addresses that can be stored
-in tables to 100000.
+options).
+The default is 10000.
+.It Cm table-entries
+Set the number of addresses that can be stored in tables.
+The default is 200000.
+.It Cm anchors
+Set the number of anchors that can exist.
+The default is 512.
+.It Cm eth-anchors
+Set the number of anchors that can exist.
+The default is 512.
+.El
.Pp
-Various limits can be combined on a single line:
+Multiple limits can be combined on a single line:
.Bd -literal -offset indent
-set limit { states 20000, frags 20000, src-nodes 2000 }
+set limit { states 20000, frags 2000, src-nodes 2000 }
.Ed
.It Ar set ruleset-optimization
.Bl -tag -width xxxxxxxx -compact
@@ -855,7 +842,15 @@ modifier to ensure unique IP identifiers.
.It Ar min-ttl Aq Ar number
Enforces a minimum TTL for matching IP packets.
.It Ar max-mss Aq Ar number
-Enforces a maximum MSS for matching TCP packets.
+Reduces the maximum segment size (MSS)
+on TCP SYN packets to be no greater than
+.Ar number .
+This is sometimes required in scenarios where the two endpoints
+of a TCP connection are not able to carry similar sized packets
+and the resulting mismatch can lead to packet fragmentation or loss.
+Note that setting the MSS this way can have undesirable effects,
+such as interfering with the OS detection features of
+.Xr pf 4 .
.It Xo Ar set-tos Aq Ar string
.No \*(Ba Aq Ar number
.Xc
diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9
index 20485059a4c8..0ca04f921f82 100644
--- a/share/man/man9/cpuset.9
+++ b/share/man/man9/cpuset.9
@@ -22,7 +22,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd September 23, 2022
+.Dd August 7, 2025
.Dt CPUSET 9
.Os
.Sh NAME
@@ -50,8 +50,10 @@
.Nm CPU_ANDNOT ,
.Nm CPU_XOR ,
.Nm CPU_CLR_ATOMIC ,
+.Nm CPU_TEST_CLR_ATOMIC ,
.Nm CPU_SET_ATOMIC ,
.Nm CPU_SET_ATOMIC_ACQ ,
+.Nm CPU_TEST_SET_ATOMIC ,
.Nm CPU_AND_ATOMIC ,
.Nm CPU_OR_ATOMIC ,
.Nm CPU_COPY_STORE_REL
@@ -93,8 +95,10 @@
.Fn CPU_XOR "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2"
.\"
.Fn CPU_CLR_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_TEST_CLR_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
.Fn CPU_SET_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
.Fn CPU_SET_ATOMIC_ACQ "size_t cpu_idx" "cpuset_t *cpuset"
+.Fn CPU_TEST_SET_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset"
.\"
.Fn CPU_AND_ATOMIC "cpuset_t *dst" "cpuset_t *src"
.Fn CPU_OR_ATOMIC "cpuset_t *dst" "cpuset_t *src"
@@ -143,6 +147,10 @@ The
.Fn CPU_CLR_ATOMIC
macro is identical, but the bit representing the CPU is cleared with atomic
machine instructions.
+The
+.Fn CPU_TEST_CLR_ATOMIC
+macro atomically clears the bit representing the CPU and returns whether it
+was set.
.Pp
The
.Fn CPU_COPY
@@ -176,6 +184,10 @@ machine instructions.
The
.Fn CPU_SET_ATOMIC_ACQ
macro sets the bit representing the CPU with atomic acquire semantics.
+The
+.Fn CPU_TEST_SET_ATOMIC
+macro atomically sets the bit representing the CPU and returns whether it was
+set.
.Pp
The
.Fn CPU_ISSET
diff --git a/stand/libsa/zfs/spl/sys/zfs_context.h b/stand/libsa/zfs/spl/sys/zfs_context.h
index 48f164317611..9f12955dd05f 100644
--- a/stand/libsa/zfs/spl/sys/zfs_context.h
+++ b/stand/libsa/zfs/spl/sys/zfs_context.h
@@ -20,7 +20,7 @@
#include_next <sys/zfs_context.h>
-#define ZFS_MODULE_PARAM_ARGS void
+#define SYSCTL_HANDLER_ARGS void
/*
* Not sure why I need these, but including the canonical stand.h fails because
diff --git a/sys/arm64/arm64/copyinout.S b/sys/arm64/arm64/copyinout.S
index 26dd0b4cf14f..e41c4b5f6734 100644
--- a/sys/arm64/arm64/copyinout.S
+++ b/sys/arm64/arm64/copyinout.S
@@ -37,7 +37,14 @@
#include "assym.inc"
.macro check_user_access user_arg, size_arg, bad_access_func
- adds x6, x\user_arg, x\size_arg
+ /*
+ * TBI is enabled from 15.0. Clear the top byte of the userspace
+ * address before checking whether it's within the given limit.
+ * The later load/store instructions will fault if TBI is disabled
+ * for the current process.
+ */
+ and x6, x\user_arg, #(~TBI_ADDR_MASK)
+ adds x6, x6, x\size_arg
b.cs \bad_access_func
ldr x7, =VM_MAXUSER_ADDRESS
cmp x6, x7
@@ -100,13 +107,20 @@ ENTRY(copyinstr)
adr x6, copyio_fault /* Get the handler address */
SET_FAULT_HANDLER(x6, x7) /* Set the handler */
+ /*
+ * As in check_user_access mask off the TBI bits for the cmp
+ * instruction. The load will fail trap if TBI is disabled, but we
+ * need to check the address didn't wrap.
+ */
+ and x6, x0, #(~TBI_ADDR_MASK)
ldr x7, =VM_MAXUSER_ADDRESS
-1: cmp x0, x7
+1: cmp x6, x7
b.cs copyio_fault
ldtrb w4, [x0] /* Load from uaddr */
add x0, x0, #1 /* Next char */
strb w4, [x1], #1 /* Store in kaddr */
add x5, x5, #1 /* count++ */
+ add x6, x6, #1 /* Increment masked address */
cbz w4, 2f /* Break when NUL-terminated */
sub x2, x2, #1 /* len-- */
cbnz x2, 1b
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
index f200195906ac..4a10a2b4f2d3 100644
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -319,14 +319,12 @@ LEND(mpentry_common)
* - Configure EL2 to support running the kernel at EL1 and exit to that
*/
LENTRY(enter_kernel_el)
-#define INIT_SCTLR_EL1 (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_EIS | \
- SCTLR_TSCXT | SCTLR_EOS)
mrs x23, CurrentEL
and x23, x23, #(CURRENTEL_EL_MASK)
cmp x23, #(CURRENTEL_EL_EL2)
b.eq 1f
- ldr x2, =INIT_SCTLR_EL1
+ ldr x2, =SCTLR_MMU_OFF
msr sctlr_el1, x2
/* SCTLR_EOS is set so eret is a context synchronizing event so we
* need an isb here to ensure it's observed by later instructions,
@@ -370,7 +368,7 @@ LENTRY(enter_kernel_el)
msr vmpidr_el2, x2
/* Set the initial sctlr_el1 */
- ldr x2, =INIT_SCTLR_EL1
+ ldr x2, =SCTLR_MMU_OFF
msr sctlr_el1, x2
/* Check for VHE */
@@ -442,7 +440,6 @@ LENTRY(enter_kernel_el)
isb
eret
-#undef INIT_SCTLR_EL1
LEND(enter_kernel_el)
/*
@@ -1037,11 +1034,7 @@ LENTRY(start_mmu)
/*
* Setup SCTLR.
*/
- ldr x2, sctlr_set
- ldr x3, sctlr_clear
- mrs x1, sctlr_el1
- bic x1, x1, x3 /* Clear the required bits */
- orr x1, x1, x2 /* Set the required bits */
+ ldr x1, =SCTLR_MMU_ON
msr sctlr_el1, x1
isb
@@ -1066,16 +1059,6 @@ tcr:
.quad (TCR_TxSZ(64 - VIRT_BITS) | TCR_TG | \
TCR_SH1_IS | TCR_ORGN1_WBWA | TCR_IRGN1_WBWA | \
TCR_SH0_IS | TCR_ORGN0_WBWA | TCR_IRGN0_WBWA)
-sctlr_set:
- /* Bits to set */
- .quad (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_UCI | SCTLR_SPAN | \
- SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \
- SCTLR_I | SCTLR_SED | SCTLR_SA0 | SCTLR_SA | SCTLR_C | \
- SCTLR_M | SCTLR_CP15BEN | SCTLR_BT1 | SCTLR_BT0)
-sctlr_clear:
- /* Bits to clear */
- .quad (SCTLR_EE | SCTLR_E0E | SCTLR_IESB | SCTLR_WXN | SCTLR_UMA | \
- SCTLR_ITD | SCTLR_A)
LEND(start_mmu)
ENTRY(abort)
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index 2152f7fcc1c6..07955866bd1c 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -2915,13 +2915,13 @@ retry:
l1 = pmap_l1(pmap, va);
if (l1 != NULL && (pmap_load(l1) & ATTR_DESCR_MASK) == L1_TABLE) {
l2 = pmap_l1_to_l2(l1, va);
- if (!ADDR_IS_KERNEL(va)) {
+ if (ADDR_IS_USER(va)) {
/* Add a reference to the L2 page. */
l2pg = PTE_TO_VM_PAGE(pmap_load(l1));
l2pg->ref_count++;
} else
l2pg = NULL;
- } else if (!ADDR_IS_KERNEL(va)) {
+ } else if (ADDR_IS_USER(va)) {
/* Allocate a L2 page. */
l2pindex = pmap_l2_pindex(va) >> Ln_ENTRIES_SHIFT;
l2pg = _pmap_alloc_l3(pmap, NUL2E + l2pindex, lockp);
@@ -4082,7 +4082,7 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_offset_t sva,
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
KASSERT(rounddown2(sva, L2_SIZE) + L2_SIZE == roundup2(eva, L2_SIZE),
("pmap_remove_l3_range: range crosses an L3 page table boundary"));
- l3pg = !ADDR_IS_KERNEL(sva) ? PTE_TO_VM_PAGE(l2e) : NULL;
+ l3pg = ADDR_IS_USER(sva) ? PTE_TO_VM_PAGE(l2e) : NULL;
va = eva;
for (l3 = pmap_l2_to_l3(&l2e, sva); sva != eva; l3++, sva += L3_SIZE) {
old_l3 = pmap_load(l3);
@@ -5310,7 +5310,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
if ((flags & PMAP_ENTER_WIRED) != 0)
new_l3 |= ATTR_SW_WIRED;
if (pmap->pm_stage == PM_STAGE1) {
- if (!ADDR_IS_KERNEL(va))
+ if (ADDR_IS_USER(va))
new_l3 |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN;
else
new_l3 |= ATTR_S1_UXN;
@@ -5401,7 +5401,7 @@ retry:
pde = pmap_pde(pmap, va, &lvl);
if (pde != NULL && lvl == 2) {
l3 = pmap_l2_to_l3(pde, va);
- if (!ADDR_IS_KERNEL(va) && mpte == NULL) {
+ if (ADDR_IS_USER(va) && mpte == NULL) {
mpte = PTE_TO_VM_PAGE(pmap_load(pde));
mpte->ref_count++;
}
@@ -5411,7 +5411,7 @@ retry:
if ((pmap_load(l2) & ATTR_DESCR_MASK) == L2_BLOCK &&
(l3 = pmap_demote_l2_locked(pmap, l2, va, &lock)) != NULL) {
l3 = &l3[pmap_l3_index(va)];
- if (!ADDR_IS_KERNEL(va)) {
+ if (ADDR_IS_USER(va)) {
mpte = PTE_TO_VM_PAGE(pmap_load(l2));
mpte->ref_count++;
}
@@ -5419,7 +5419,7 @@ retry:
}
/* We need to allocate an L3 table. */
}
- if (!ADDR_IS_KERNEL(va)) {
+ if (ADDR_IS_USER(va)) {
nosleep = (flags & PMAP_ENTER_NOSLEEP) != 0;
/*
@@ -5657,7 +5657,7 @@ pmap_enter_l2_rx(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
if ((prot & VM_PROT_EXECUTE) == 0 ||
m->md.pv_memattr == VM_MEMATTR_DEVICE)
new_l2 |= ATTR_S1_XN;
- if (!ADDR_IS_KERNEL(va))
+ if (ADDR_IS_USER(va))
new_l2 |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN;
else
new_l2 |= ATTR_S1_UXN;
@@ -5745,7 +5745,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags,
"pmap_enter_l2: no space for va %#lx"
" in pmap %p", va, pmap);
return (KERN_NO_SPACE);
- } else if (!ADDR_IS_KERNEL(va) ||
+ } else if (ADDR_IS_USER(va) ||
!pmap_every_pte_zero(PTE_TO_PHYS(old_l2))) {
if (l2pg != NULL)
l2pg->ref_count--;
@@ -5796,7 +5796,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags,
}
KASSERT(pmap_load(l2) == 0,
("pmap_enter_l2: non-zero L2 entry %p", l2));
- if (!ADDR_IS_KERNEL(va)) {
+ if (ADDR_IS_USER(va)) {
vm_page_free_pages_toq(&free, true);
} else {
KASSERT(SLIST_EMPTY(&free),
@@ -5916,7 +5916,7 @@ pmap_enter_l3c_rx(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *ml3p,
if ((prot & VM_PROT_EXECUTE) == 0 ||
m->md.pv_memattr == VM_MEMATTR_DEVICE)
l3e |= ATTR_S1_XN;
- if (!ADDR_IS_KERNEL(va))
+ if (ADDR_IS_USER(va))
l3e |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN;
else
l3e |= ATTR_S1_UXN;
@@ -5948,7 +5948,7 @@ pmap_enter_l3c(pmap_t pmap, vm_offset_t va, pt_entry_t l3e, u_int flags,
/*
* If the L3 PTP is not resident, we attempt to create it here.
*/
- if (!ADDR_IS_KERNEL(va)) {
+ if (ADDR_IS_USER(va)) {
/*
* Were we given the correct L3 PTP? If so, we can simply
* increment its ref count.
@@ -6224,7 +6224,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m,
* In the case that a page table page is not
* resident, we are creating it here.
*/
- if (!ADDR_IS_KERNEL(va)) {
+ if (ADDR_IS_USER(va)) {
vm_pindex_t l2pindex;
/*
@@ -6310,7 +6310,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m,
if ((prot & VM_PROT_EXECUTE) == 0 ||
m->md.pv_memattr == VM_MEMATTR_DEVICE)
l3_val |= ATTR_S1_XN;
- if (!ADDR_IS_KERNEL(va))
+ if (ADDR_IS_USER(va))
l3_val |= ATTR_S1_AP(ATTR_S1_AP_USER) | ATTR_S1_PXN;
else
l3_val |= ATTR_S1_UXN;
@@ -8528,7 +8528,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va,
* region and early kernel memory are the only parts of the
* kernel address space that must be handled here.
*/
- KASSERT(!ADDR_IS_KERNEL(va) || VIRT_IN_DMAP(va) ||
+ KASSERT(ADDR_IS_USER(va) || VIRT_IN_DMAP(va) ||
(va >= VM_MIN_KERNEL_ADDRESS && va < kernel_vm_end),
("pmap_demote_l2: No saved mpte for va %#lx", va));
@@ -8555,7 +8555,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va,
}
ml3->pindex = pmap_l2_pindex(va);
- if (!ADDR_IS_KERNEL(va)) {
+ if (ADDR_IS_USER(va)) {
ml3->ref_count = NL3PG;
pmap_resident_count_inc(pmap, 1);
}
diff --git a/sys/arm64/arm64/support.S b/sys/arm64/arm64/support.S
index 2d067c7f7730..bf6fc931e4b0 100644
--- a/sys/arm64/arm64/support.S
+++ b/sys/arm64/arm64/support.S
@@ -39,8 +39,15 @@
#include "assym.inc"
.macro check_user_access user_arg, limit, bad_addr_func
+ /*
+ * TBI is enabled from 15.0. Clear the top byte of the userspace
+ * address before checking whether it's within the given limit.
+ * The later load/store instructions will fault if TBI is disabled
+ * for the current process.
+ */
+ and x6, x\user_arg, #(~TBI_ADDR_MASK)
ldr x7, =(\limit)
- cmp x\user_arg, x7
+ cmp x6, x7
b.cs \bad_addr_func
.endm
diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
index 38b7f57f7853..500f35c48787 100644
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -2608,6 +2608,26 @@
#define SCTLR_EnALS (UL(0x1) << 56)
#define SCTLR_EPAN (UL(0x1) << 57)
+#define SCTLR_MMU_OFF \
+ (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_EIS | SCTLR_TSCXT | SCTLR_EOS)
+#define SCTLR_MMU_ON \
+ (SCTLR_MMU_OFF | \
+ SCTLR_BT1 | \
+ SCTLR_BT0 | \
+ SCTLR_UCI | \
+ SCTLR_SPAN | \
+ SCTLR_nTWE | \
+ SCTLR_nTWI | \
+ SCTLR_UCT | \
+ SCTLR_DZE | \
+ SCTLR_I | \
+ SCTLR_SED | \
+ SCTLR_CP15BEN | \
+ SCTLR_SA0 | \
+ SCTLR_SA | \
+ SCTLR_C | \
+ SCTLR_M)
+
/* SCTLR_EL12 */
#define SCTLR_EL12_REG MRS_REG_ALT_NAME(SCTLR_EL12)
#define SCTLR_EL12_op0 3
diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h
index 1d783cdacb0d..73b5b4a09591 100644
--- a/sys/arm64/include/vmm.h
+++ b/sys/arm64/include/vmm.h
@@ -89,6 +89,7 @@ enum vm_reg_name {
VM_REG_GUEST_TTBR1_EL1,
VM_REG_GUEST_TCR_EL1,
VM_REG_GUEST_TCR2_EL1,
+ VM_REG_GUEST_MPIDR_EL1,
VM_REG_LAST
};
diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h
index 349849845e73..c30ca1b2bff4 100644
--- a/sys/arm64/include/vmparam.h
+++ b/sys/arm64/include/vmparam.h
@@ -211,8 +211,13 @@
/* The address bits that hold a pointer authentication code */
#define PAC_ADDR_MASK (0xff7f000000000000UL)
+/* The top-byte ignore address bits */
+#define TBI_ADDR_MASK 0xff00000000000000UL
+
/* If true addr is in the kernel address space */
#define ADDR_IS_KERNEL(addr) (((addr) & (1ul << 55)) == (1ul << 55))
+/* If true addr is in the user address space */
+#define ADDR_IS_USER(addr) (((addr) & (1ul << 55)) == 0)
/* If true addr is in its canonical form (i.e. no TBI, PAC, etc.) */
#define ADDR_IS_CANONICAL(addr) \
(((addr) & 0xffff000000000000UL) == 0 || \
diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c
index de2425aae0a1..e293c99a6646 100644
--- a/sys/arm64/vmm/vmm_arm64.c
+++ b/sys/arm64/vmm/vmm_arm64.c
@@ -1251,6 +1251,8 @@ hypctx_regptr(struct hypctx *hypctx, int reg)
return (&hypctx->tcr_el1);
case VM_REG_GUEST_TCR2_EL1:
return (&hypctx->tcr2_el1);
+ case VM_REG_GUEST_MPIDR_EL1:
+ return (&hypctx->vmpidr_el2);
default:
break;
}
diff --git a/sys/conf/files b/sys/conf/files
index b7c19fae0b8e..be65ed20d6aa 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -359,6 +359,7 @@ contrib/openzfs/module/zfs/zcp_synctask.c optional zfs compile-with "${ZFS_C}"
contrib/openzfs/module/zfs/zfeature.c optional zfs compile-with "${ZFS_C}"
contrib/openzfs/module/zfs/zfs_byteswap.c optional zfs compile-with "${ZFS_C}"
contrib/openzfs/module/zfs/zfs_chksum.c optional zfs compile-with "${ZFS_C}"
+contrib/openzfs/module/zfs/zfs_crrd.c optional zfs compile-with "${ZFS_C}"
contrib/openzfs/module/zfs/zfs_fm.c optional zfs compile-with "${ZFS_C} ${NO_WUNUSED_BUT_SET_VARIABLE}"
contrib/openzfs/module/zfs/zfs_fuid.c optional zfs compile-with "${ZFS_C}"
contrib/openzfs/module/zfs/zfs_impl.c optional zfs compile-with "${ZFS_C}"
diff --git a/sys/contrib/openzfs/.cirrus.yml b/sys/contrib/openzfs/.cirrus.yml
deleted file mode 100644
index 366bb87fbb14..000000000000
--- a/sys/contrib/openzfs/.cirrus.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-env:
- CIRRUS_CLONE_DEPTH: 1
- ARCH: amd64
-
-build_task:
- matrix:
- freebsd_instance:
- image_family: freebsd-13-5
- freebsd_instance:
- image_family: freebsd-14-2
- freebsd_instance:
- image_family: freebsd-15-0-snap
- prepare_script:
- - pkg install -y autoconf automake libtool gettext-runtime gmake ksh93 py311-packaging py311-cffi py311-sysctl
- configure_script:
- - env MAKE=gmake ./autogen.sh
- - env MAKE=gmake ./configure --with-config="user" --with-python=3.11
- build_script:
- - gmake -j `sysctl -n kern.smp.cpus`
- install_script:
- - gmake install
diff --git a/sys/contrib/openzfs/.github/codeql-cpp.yml b/sys/contrib/openzfs/.github/codeql-cpp.yml
index 88b8c6086025..d99cdb559244 100644
--- a/sys/contrib/openzfs/.github/codeql-cpp.yml
+++ b/sys/contrib/openzfs/.github/codeql-cpp.yml
@@ -2,3 +2,4 @@ name: "Custom CodeQL Analysis"
queries:
- uses: ./.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql
+ - uses: ./.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql
diff --git a/sys/contrib/openzfs/.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql b/sys/contrib/openzfs/.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql
new file mode 100644
index 000000000000..fb5dae35092f
--- /dev/null
+++ b/sys/contrib/openzfs/.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql
@@ -0,0 +1,34 @@
+/**
+ * @name Detect mismatched dsl_dataset_hold/_rele pairs
+ * @description Flags instances of issue #12014 where
+ * - a dataset held with dsl_dataset_hold_obj() ends up in dsl_dataset_rele_flags(), or
+ * - a dataset held with dsl_dataset_hold_obj_flags() ends up in dsl_dataset_rele().
+ * @kind problem
+ * @severity error
+ * @tags correctness
+ * @id cpp/dslDatasetHoldReleMismatch
+ */
+
+import cpp
+
+from Variable ds, Call holdCall, Call releCall, string message
+where
+ ds.getType().toString() = "dsl_dataset_t *" and
+ holdCall.getASuccessor*() = releCall and
+ (
+ (holdCall.getTarget().getName() = "dsl_dataset_hold_obj_flags" and
+ holdCall.getArgument(4).(AddressOfExpr).getOperand().(VariableAccess).getTarget() = ds and
+ releCall.getTarget().getName() = "dsl_dataset_rele" and
+ releCall.getArgument(0).(VariableAccess).getTarget() = ds and
+ message = "Held with dsl_dataset_hold_obj_flags but released with dsl_dataset_rele")
+ or
+ (holdCall.getTarget().getName() = "dsl_dataset_hold_obj" and
+ holdCall.getArgument(3).(AddressOfExpr).getOperand().(VariableAccess).getTarget() = ds and
+ releCall.getTarget().getName() = "dsl_dataset_rele_flags" and
+ releCall.getArgument(0).(VariableAccess).getTarget() = ds and
+ message = "Held with dsl_dataset_hold_obj but released with dsl_dataset_rele_flags")
+ )
+select releCall,
+ "Mismatched release: held with $@ but released with " + releCall.getTarget().getName() + " for dataset $@",
+ holdCall, holdCall.getTarget().getName(),
+ ds, ds.toString()
diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh
index 7e20a98c2faf..885a64037f89 100755
--- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh
+++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh
@@ -71,14 +71,6 @@ case "$OS" in
OSv="fedora-unknown"
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
;;
- freebsd13-4r)
- FreeBSD="13.4-RELEASE"
- OSNAME="FreeBSD $FreeBSD"
- OSv="freebsd13.0"
- URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
- KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
- NIC="rtl8139"
- ;;
freebsd13-5r)
FreeBSD="13.5-RELEASE"
OSNAME="FreeBSD $FreeBSD"
diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh
index a581b13c2f58..c41ecd09d52e 100755
--- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh
+++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh
@@ -28,6 +28,7 @@ function debian() {
export DEBIAN_FRONTEND="noninteractive"
echo "##[group]Running apt-get update+upgrade"
+ sudo sed -i '/[[:alpha:]]-backports/d' /etc/apt/sources.list
sudo apt-get update -y
sudo apt-get upgrade -y
echo "##[endgroup]"
@@ -51,7 +52,7 @@ function freebsd() {
echo "##[group]Install Development Tools"
sudo pkg install -y autoconf automake autotools base64 checkbashisms fio \
- gdb gettext gettext-runtime git gmake gsed jq ksh93 lcov libtool lscpu \
+ gdb gettext gettext-runtime git gmake gsed jq ksh lcov libtool lscpu \
pkgconf python python3 pamtester pamtester qemu-guest-agent rsync xxhash
sudo pkg install -xy \
'^samba4[[:digit:]]+$' \
diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh
index e8e6adecd62f..5ab822f4f076 100755
--- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh
+++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh
@@ -21,11 +21,13 @@ function prefix() {
S=$((DIFF-(M*60)))
CTR=$(cat /tmp/ctr)
- echo $LINE| grep -q "^Test[: ]" && CTR=$((CTR+1)) && echo $CTR > /tmp/ctr
+ echo $LINE| grep -q '^\[.*] Test[: ]' && CTR=$((CTR+1)) && echo $CTR > /tmp/ctr
BASE="$HOME/work/zfs/zfs"
COLOR="$BASE/scripts/zfs-tests-color.sh"
- CLINE=$(echo $LINE| grep "^Test[ :]" | sed -e 's|/usr/local|/usr|g' \
+ CLINE=$(echo $LINE| grep '^\[.*] Test[: ]' \
+ | sed -e 's|^\[.*] Test|Test|g' \
+ | sed -e 's|/usr/local|/usr|g' \
| sed -e 's| /usr/share/zfs/zfs-tests/tests/| |g' | $COLOR)
if [ -z "$CLINE" ]; then
printf "vm${ID}: %s\n" "$LINE"
diff --git a/sys/contrib/openzfs/.github/workflows/zfs-qemu.yml b/sys/contrib/openzfs/.github/workflows/zfs-qemu.yml
index 035d8be7e227..cda620313189 100644
--- a/sys/contrib/openzfs/.github/workflows/zfs-qemu.yml
+++ b/sys/contrib/openzfs/.github/workflows/zfs-qemu.yml
@@ -5,16 +5,6 @@ on:
pull_request:
workflow_dispatch:
inputs:
- include_stream9:
- type: boolean
- required: false
- default: false
- description: 'Test on CentOS 9 stream'
- include_stream10:
- type: boolean
- required: false
- default: false
- description: 'Test on CentOS 10 stream'
fedora_kernel_ver:
type: string
required: false
@@ -39,7 +29,7 @@ jobs:
- name: Generate OS config and CI type
id: os
run: |
- FULL_OS='["almalinux8", "almalinux9", "almalinux10", "debian11", "debian12", "fedora41", "fedora42", "freebsd13-4r", "freebsd14-3s", "freebsd15-0c", "ubuntu22", "ubuntu24"]'
+ FULL_OS='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian11", "debian12", "fedora41", "fedora42", "freebsd13-5r", "freebsd14-3s", "freebsd15-0c", "ubuntu22", "ubuntu24"]'
QUICK_OS='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd14-3s", "ubuntu24"]'
# determine CI type when running on PR
ci_type="full"
@@ -63,14 +53,6 @@ jobs:
os_json=$(echo ${os_selection} | jq -c)
fi
- # Add optional runners
- if [ "${{ github.event.inputs.include_stream9 }}" == 'true' ]; then
- os_json=$(echo $os_json | jq -c '. += ["centos-stream9"]')
- fi
- if [ "${{ github.event.inputs.include_stream10 }}" == 'true' ]; then
- os_json=$(echo $os_json | jq -c '. += ["centos-stream10"]')
- fi
-
echo $os_json
echo "os=$os_json" >> $GITHUB_OUTPUT
echo "ci_type=$ci_type" >> $GITHUB_OUTPUT
@@ -85,7 +67,7 @@ jobs:
# debian: debian11, debian12, ubuntu22, ubuntu24
# misc: archlinux, tumbleweed
# FreeBSD variants of 2025-06:
- # FreeBSD Release: freebsd13-4r, freebsd13-5r, freebsd14-1r, freebsd14-2r, freebsd14-3r
+ # FreeBSD Release: freebsd13-5r, freebsd14-2r, freebsd14-3r
# FreeBSD Stable: freebsd13-5s, freebsd14-3s
# FreeBSD Current: freebsd15-0c
os: ${{ fromJson(needs.test-config.outputs.test_os) }}
diff --git a/sys/contrib/openzfs/.github/workflows/zloop.yml b/sys/contrib/openzfs/.github/workflows/zloop.yml
index 7b3bf49d90d5..4ae3ccdc5484 100644
--- a/sys/contrib/openzfs/.github/workflows/zloop.yml
+++ b/sys/contrib/openzfs/.github/workflows/zloop.yml
@@ -12,7 +12,8 @@ jobs:
zloop:
runs-on: ubuntu-24.04
env:
- TEST_DIR: /var/tmp/zloop
+ WORK_DIR: /mnt/zloop
+ CORE_DIR: /mnt/zloop/cores
steps:
- uses: actions/checkout@v4
with:
@@ -40,38 +41,37 @@ jobs:
sudo modprobe zfs
- name: Tests
run: |
- sudo mkdir -p $TEST_DIR
- # run for 10 minutes or at most 6 iterations for a maximum runner
- # time of 60 minutes.
- sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -- -T 120 -P 60
+ sudo truncate -s 256G /mnt/vdev
+ sudo zpool create cipool -m $WORK_DIR -O compression=on -o autotrim=on /mnt/vdev
+ sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -c $CORE_DIR -f $WORK_DIR -- -T 120 -P 60
- name: Prepare artifacts
if: failure()
run: |
- sudo chmod +r -R $TEST_DIR/
+ sudo chmod +r -R $WORK_DIR/
- name: Ztest log
if: failure()
run: |
- grep -B10 -A1000 'ASSERT' $TEST_DIR/*/ztest.out || tail -n 1000 $TEST_DIR/*/ztest.out
+ grep -B10 -A1000 'ASSERT' $CORE_DIR/*/ztest.out || tail -n 1000 $CORE_DIR/*/ztest.out
- name: Gdb log
if: failure()
run: |
- sed -n '/Backtraces (full)/q;p' $TEST_DIR/*/ztest.gdb
+ sed -n '/Backtraces (full)/q;p' $CORE_DIR/*/ztest.gdb
- name: Zdb log
if: failure()
run: |
- cat $TEST_DIR/*/ztest.zdb
+ cat $CORE_DIR/*/ztest.zdb
- uses: actions/upload-artifact@v4
if: failure()
with:
name: Logs
path: |
- /var/tmp/zloop/*/
- !/var/tmp/zloop/*/vdev/
+ /mnt/zloop/*/
+ !/mnt/zloop/cores/*/vdev/
if-no-files-found: ignore
- uses: actions/upload-artifact@v4
if: failure()
with:
name: Pool files
path: |
- /var/tmp/zloop/*/vdev/
+ /mnt/zloop/cores/*/vdev/
if-no-files-found: ignore
diff --git a/sys/contrib/openzfs/cmd/arc_summary b/sys/contrib/openzfs/cmd/arc_summary
index c1319573220c..e60c6b64e8a1 100755
--- a/sys/contrib/openzfs/cmd/arc_summary
+++ b/sys/contrib/openzfs/cmd/arc_summary
@@ -559,6 +559,7 @@ def section_arc(kstats_dict):
print()
compressed_size = arc_stats['compressed_size']
+ uncompressed_size = arc_stats['uncompressed_size']
overhead_size = arc_stats['overhead_size']
bonus_size = arc_stats['bonus_size']
dnode_size = arc_stats['dnode_size']
@@ -671,6 +672,8 @@ def section_arc(kstats_dict):
print()
print('ARC misc:')
+ prt_i2('Uncompressed size:', f_perc(uncompressed_size, compressed_size),
+ f_bytes(uncompressed_size))
prt_i1('Memory throttles:', arc_stats['memory_throttle_count'])
prt_i1('Memory direct reclaims:', arc_stats['memory_direct_count'])
prt_i1('Memory indirect reclaims:', arc_stats['memory_indirect_count'])
diff --git a/sys/contrib/openzfs/cmd/zdb/zdb.c b/sys/contrib/openzfs/cmd/zdb/zdb.c
index 45eb9c783659..bf44d9c322b4 100644
--- a/sys/contrib/openzfs/cmd/zdb/zdb.c
+++ b/sys/contrib/openzfs/cmd/zdb/zdb.c
@@ -208,7 +208,7 @@ sublivelist_verify_blkptr(void *arg, const blkptr_t *bp, boolean_t free,
sublivelist_verify_block_t svb = {
.svb_dva = bp->blk_dva[i],
.svb_allocated_txg =
- BP_GET_LOGICAL_BIRTH(bp)
+ BP_GET_BIRTH(bp)
};
if (zfs_btree_find(&sv->sv_leftover, &svb,
@@ -619,8 +619,9 @@ livelist_metaslab_validate(spa_t *spa)
metaslab_calculate_range_tree_type(vd, m,
&start, &shift);
metaslab_verify_t mv;
- mv.mv_allocated = zfs_range_tree_create(NULL,
- type, NULL, start, shift);
+ mv.mv_allocated = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ 0, "livelist_metaslab_validate:mv_allocated");
mv.mv_vdid = vd->vdev_id;
mv.mv_msid = m->ms_id;
mv.mv_start = m->ms_start;
@@ -797,8 +798,8 @@ usage(void)
"[default is 200]\n");
(void) fprintf(stderr, " -K --key=KEY "
"decryption key for encrypted dataset\n");
- (void) fprintf(stderr, " -o --option=\"OPTION=INTEGER\" "
- "set global variable to an unsigned 32-bit integer\n");
+ (void) fprintf(stderr, " -o --option=\"NAME=VALUE\" "
+ "set the named tunable to the given value\n");
(void) fprintf(stderr, " -p --path==PATH "
"use one or more with -e to specify path to vdev dir\n");
(void) fprintf(stderr, " -P --parseable "
@@ -1991,7 +1992,7 @@ dump_ddt_log(ddt_t *ddt)
c += strlcpy(&flagstr[c], " UNKNOWN",
sizeof (flagstr) - c);
flagstr[1] = '[';
- flagstr[c++] = ']';
+ flagstr[c] = ']';
}
uint64_t count = avl_numnodes(&ddl->ddl_tree);
@@ -2568,7 +2569,7 @@ snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp,
(u_longlong_t)BP_GET_PSIZE(bp),
(u_longlong_t)BP_GET_FILL(bp),
(u_longlong_t)BP_GET_LOGICAL_BIRTH(bp),
- (u_longlong_t)BP_GET_BIRTH(bp));
+ (u_longlong_t)BP_GET_PHYSICAL_BIRTH(bp));
if (bp_freed)
(void) snprintf(blkbuf + strlen(blkbuf),
buflen - strlen(blkbuf), " %s", "FREE");
@@ -2618,7 +2619,7 @@ visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
{
int err = 0;
- if (BP_GET_LOGICAL_BIRTH(bp) == 0)
+ if (BP_GET_BIRTH(bp) == 0)
return (0);
print_indirect(spa, bp, zb, dnp);
@@ -2806,7 +2807,7 @@ dump_bptree_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx)
(void) arg, (void) tx;
char blkbuf[BP_SPRINTF_LEN];
- if (BP_GET_LOGICAL_BIRTH(bp) != 0) {
+ if (BP_GET_BIRTH(bp) != 0) {
snprintf_blkptr(blkbuf, sizeof (blkbuf), bp);
(void) printf("\t%s\n", blkbuf);
}
@@ -2847,7 +2848,7 @@ dump_bpobj_cb(void *arg, const blkptr_t *bp, boolean_t bp_freed, dmu_tx_t *tx)
(void) arg, (void) tx;
char blkbuf[BP_SPRINTF_LEN];
- ASSERT(BP_GET_LOGICAL_BIRTH(bp) != 0);
+ ASSERT(BP_GET_BIRTH(bp) != 0);
snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp, bp_freed);
(void) printf("\t%s\n", blkbuf);
return (0);
@@ -5921,11 +5922,11 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t *zilog, const blkptr_t *bp,
* entry back to the block pointer before we claim it.
*/
if (v == DDT_PHYS_FLAT) {
- ASSERT3U(BP_GET_BIRTH(bp), ==,
+ ASSERT3U(BP_GET_PHYSICAL_BIRTH(bp), ==,
ddt_phys_birth(dde->dde_phys, v));
tempbp = *bp;
ddt_bp_fill(dde->dde_phys, v, &tempbp,
- BP_GET_BIRTH(bp));
+ BP_GET_PHYSICAL_BIRTH(bp));
bp = &tempbp;
}
@@ -6151,7 +6152,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
if (zb->zb_level == ZB_DNODE_LEVEL)
return (0);
- if (dump_opt['b'] >= 5 && BP_GET_LOGICAL_BIRTH(bp) > 0) {
+ if (dump_opt['b'] >= 5 && BP_GET_BIRTH(bp) > 0) {
char blkbuf[BP_SPRINTF_LEN];
snprintf_blkptr(blkbuf, sizeof (blkbuf), bp);
(void) printf("objset %llu object %llu "
@@ -6322,8 +6323,9 @@ zdb_claim_removing(spa_t *spa, zdb_cb_t *zcb)
ASSERT0(zfs_range_tree_space(svr->svr_allocd_segs));
- zfs_range_tree_t *allocs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ zfs_range_tree_t *allocs = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ 0, "zdb_claim_removing:allocs");
for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) {
metaslab_t *msp = vd->vdev_ms[msi];
@@ -6750,6 +6752,7 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
spa->spa_normal_class->mc_ops = &zdb_metaslab_ops;
spa->spa_log_class->mc_ops = &zdb_metaslab_ops;
spa->spa_embedded_log_class->mc_ops = &zdb_metaslab_ops;
+ spa->spa_special_embedded_log_class->mc_ops = &zdb_metaslab_ops;
zcb->zcb_vd_obsolete_counts =
umem_zalloc(rvd->vdev_children * sizeof (uint32_t *),
@@ -6887,7 +6890,9 @@ zdb_leak_fini(spa_t *spa, zdb_cb_t *zcb)
for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
metaslab_t *msp = vd->vdev_ms[m];
ASSERT3P(msp->ms_group, ==, (msp->ms_group->mg_class ==
- spa_embedded_log_class(spa)) ?
+ spa_embedded_log_class(spa) ||
+ msp->ms_group->mg_class ==
+ spa_special_embedded_log_class(spa)) ?
vd->vdev_log_mg : vd->vdev_mg);
/*
@@ -7121,6 +7126,8 @@ dump_block_stats(spa_t *spa)
zcb->zcb_totalasize += metaslab_class_get_alloc(spa_dedup_class(spa));
zcb->zcb_totalasize +=
metaslab_class_get_alloc(spa_embedded_log_class(spa));
+ zcb->zcb_totalasize +=
+ metaslab_class_get_alloc(spa_special_embedded_log_class(spa));
zcb->zcb_start = zcb->zcb_lastprint = gethrtime();
err = traverse_pool(spa, 0, flags, zdb_blkptr_cb, zcb);
@@ -7169,6 +7176,7 @@ dump_block_stats(spa_t *spa)
total_alloc = norm_alloc +
metaslab_class_get_alloc(spa_log_class(spa)) +
metaslab_class_get_alloc(spa_embedded_log_class(spa)) +
+ metaslab_class_get_alloc(spa_special_embedded_log_class(spa)) +
metaslab_class_get_alloc(spa_special_class(spa)) +
metaslab_class_get_alloc(spa_dedup_class(spa)) +
get_unflushed_alloc_space(spa);
@@ -7252,6 +7260,18 @@ dump_block_stats(spa_t *spa)
100.0 * alloc / space);
}
+ if (spa_special_embedded_log_class(spa)->mc_allocator[0].mca_rotor
+ != NULL) {
+ uint64_t alloc = metaslab_class_get_alloc(
+ spa_special_embedded_log_class(spa));
+ uint64_t space = metaslab_class_get_space(
+ spa_special_embedded_log_class(spa));
+
+ (void) printf("\t%-16s %14llu used: %5.2f%%\n",
+ "Special embedded log", (u_longlong_t)alloc,
+ 100.0 * alloc / space);
+ }
+
for (i = 0; i < NUM_BP_EMBEDDED_TYPES; i++) {
if (zcb->zcb_embedded_blocks[i] == 0)
continue;
@@ -7706,7 +7726,8 @@ zdb_set_skip_mmp(char *target)
* applies to the new_path parameter if allocated.
*/
static char *
-import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path)
+import_checkpointed_state(char *target, nvlist_t *cfg, boolean_t target_is_spa,
+ char **new_path)
{
int error = 0;
char *poolname, *bogus_name = NULL;
@@ -7714,11 +7735,11 @@ import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path)
/* If the target is not a pool, the extract the pool name */
char *path_start = strchr(target, '/');
- if (path_start != NULL) {
+ if (target_is_spa || path_start == NULL) {
+ poolname = target;
+ } else {
size_t poolname_len = path_start - target;
poolname = strndup(target, poolname_len);
- } else {
- poolname = target;
}
if (cfg == NULL) {
@@ -7749,10 +7770,11 @@ import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path)
"with error %d\n", bogus_name, error);
}
- if (new_path != NULL && path_start != NULL) {
- if (asprintf(new_path, "%s%s", bogus_name, path_start) == -1) {
+ if (new_path != NULL && !target_is_spa) {
+ if (asprintf(new_path, "%s%s", bogus_name,
+ path_start != NULL ? path_start : "") == -1) {
free(bogus_name);
- if (path_start != NULL)
+ if (!target_is_spa && path_start != NULL)
free(poolname);
return (NULL);
}
@@ -7981,7 +8003,7 @@ verify_checkpoint_blocks(spa_t *spa)
* name) so we can do verification on it against the current state
* of the pool.
*/
- checkpoint_pool = import_checkpointed_state(spa->spa_name, NULL,
+ checkpoint_pool = import_checkpointed_state(spa->spa_name, NULL, B_TRUE,
NULL);
ASSERT(strcmp(spa->spa_name, checkpoint_pool) != 0);
@@ -8451,8 +8473,9 @@ dump_zpool(spa_t *spa)
if (dump_opt['d'] || dump_opt['i']) {
spa_feature_t f;
- mos_refd_objs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ mos_refd_objs = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ 0, "dump_zpool:mos_refd_objs");
dump_objset(dp->dp_meta_objset);
if (dump_opt['d'] >= 3) {
@@ -8588,9 +8611,9 @@ zdb_dump_indirect(blkptr_t *bp, int nbps, int flags)
}
static void
-zdb_dump_gbh(void *buf, int flags)
+zdb_dump_gbh(void *buf, uint64_t size, int flags)
{
- zdb_dump_indirect((blkptr_t *)buf, SPA_GBH_NBLKPTRS, flags);
+ zdb_dump_indirect((blkptr_t *)buf, gbh_nblkptrs(size), flags);
}
static void
@@ -8780,7 +8803,6 @@ zdb_decompress_block(abd_t *pabd, void *buf, void *lbuf, uint64_t lsize,
(void) buf;
uint64_t orig_lsize = lsize;
boolean_t tryzle = ((getenv("ZDB_NO_ZLE") == NULL));
- boolean_t found = B_FALSE;
/*
* We don't know how the data was compressed, so just try
* every decompress function at every inflated blocksize.
@@ -8823,20 +8845,19 @@ zdb_decompress_block(abd_t *pabd, void *buf, void *lbuf, uint64_t lsize,
for (cfuncp = cfuncs; *cfuncp; cfuncp++) {
if (try_decompress_block(pabd, lsize, psize, flags,
*cfuncp, lbuf, lbuf2)) {
- found = B_TRUE;
+ tryzle = B_FALSE;
break;
}
}
if (*cfuncp != 0)
break;
}
- if (!found && tryzle) {
+ if (tryzle) {
for (lsize = orig_lsize; lsize <= maxlsize;
lsize += SPA_MINBLOCKSIZE) {
if (try_decompress_block(pabd, lsize, psize, flags,
ZIO_COMPRESS_ZLE, lbuf, lbuf2)) {
*cfuncp = ZIO_COMPRESS_ZLE;
- found = B_TRUE;
break;
}
}
@@ -9073,7 +9094,7 @@ zdb_read_block(char *thing, spa_t *spa)
zdb_dump_indirect((blkptr_t *)buf,
orig_lsize / sizeof (blkptr_t), flags);
else if (flags & ZDB_FLAG_GBH)
- zdb_dump_gbh(buf, flags);
+ zdb_dump_gbh(buf, lsize, flags);
else
zdb_dump_block(thing, buf, lsize, flags);
@@ -9120,7 +9141,7 @@ zdb_read_block(char *thing, spa_t *spa)
ck_zio->io_offset =
DVA_GET_OFFSET(&bp->blk_dva[0]);
ck_zio->io_bp = bp;
- zio_checksum_compute(ck_zio, ck, pabd, lsize);
+ zio_checksum_compute(ck_zio, ck, pabd, psize);
printf(
"%12s\t"
"cksum=%016llx:%016llx:%016llx:%016llx\n",
@@ -9377,9 +9398,11 @@ main(int argc, char **argv)
while (*optarg != '\0') { *optarg++ = '*'; }
break;
case 'o':
- error = set_global_var(optarg);
+ dump_opt[c]++;
+ dump_all = 0;
+ error = handle_tunable_option(optarg, B_FALSE);
if (error != 0)
- usage();
+ zdb_exit(1);
break;
case 'p':
if (searchdirs == NULL) {
@@ -9545,6 +9568,12 @@ main(int argc, char **argv)
error = 0;
goto fini;
}
+ if (dump_opt['o'])
+ /*
+ * Avoid blasting tunable options off the top of the
+ * screen.
+ */
+ zdb_exit(1);
usage();
}
@@ -9697,7 +9726,7 @@ main(int argc, char **argv)
char *checkpoint_target = NULL;
if (dump_opt['k']) {
checkpoint_pool = import_checkpointed_state(target, cfg,
- &checkpoint_target);
+ target_is_spa, &checkpoint_target);
if (checkpoint_target != NULL)
target = checkpoint_target;
diff --git a/sys/contrib/openzfs/cmd/zdb/zdb_il.c b/sys/contrib/openzfs/cmd/zdb/zdb_il.c
index 6b90b08ca1b1..62e290cd122c 100644
--- a/sys/contrib/openzfs/cmd/zdb/zdb_il.c
+++ b/sys/contrib/openzfs/cmd/zdb/zdb_il.c
@@ -176,7 +176,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
(void) printf("%shas blkptr, %s\n", tab_prefix,
- !BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) >=
+ !BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) >=
spa_min_claim_txg(zilog->zl_spa) ?
"will claim" : "won't claim");
print_log_bp(bp, tab_prefix);
@@ -189,7 +189,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
(void) printf("%s<hole>\n", tab_prefix);
return;
}
- if (BP_GET_LOGICAL_BIRTH(bp) < zilog->zl_header->zh_claim_txg) {
+ if (BP_GET_BIRTH(bp) < zilog->zl_header->zh_claim_txg) {
(void) printf("%s<block already committed>\n",
tab_prefix);
return;
@@ -240,7 +240,7 @@ zil_prt_rec_write_enc(zilog_t *zilog, int txtype, const void *arg)
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
(void) printf("%shas blkptr, %s\n", tab_prefix,
- !BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) >=
+ !BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) >=
spa_min_claim_txg(zilog->zl_spa) ?
"will claim" : "won't claim");
print_log_bp(bp, tab_prefix);
@@ -476,7 +476,7 @@ print_log_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
if (claim_txg != 0)
claim = "already claimed";
- else if (BP_GET_LOGICAL_BIRTH(bp) >= spa_min_claim_txg(zilog->zl_spa))
+ else if (BP_GET_BIRTH(bp) >= spa_min_claim_txg(zilog->zl_spa))
claim = "will claim";
else
claim = "won't claim";
diff --git a/sys/contrib/openzfs/cmd/zed/agents/zfs_agents.c b/sys/contrib/openzfs/cmd/zed/agents/zfs_agents.c
index 8718dbde03b6..c0590edc7516 100644
--- a/sys/contrib/openzfs/cmd/zed/agents/zfs_agents.c
+++ b/sys/contrib/openzfs/cmd/zed/agents/zfs_agents.c
@@ -134,11 +134,13 @@ zfs_agent_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *arg)
* of blkid cache and L2ARC VDEV does not contain pool guid in its
* blkid, so this is a special case for L2ARC VDEV.
*/
- else if (gsp->gs_vdev_guid != 0 && gsp->gs_devid == NULL &&
+ else if (gsp->gs_vdev_guid != 0 &&
nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID, &vdev_guid) == 0 &&
gsp->gs_vdev_guid == vdev_guid) {
- (void) nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID,
- &gsp->gs_devid);
+ if (gsp->gs_devid == NULL) {
+ (void) nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID,
+ &gsp->gs_devid);
+ }
(void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_EXPANSION_TIME,
&gsp->gs_vdev_expandtime);
return (B_TRUE);
@@ -156,22 +158,28 @@ zfs_agent_iter_pool(zpool_handle_t *zhp, void *arg)
/*
* For each vdev in this pool, look for a match by devid
*/
- if ((config = zpool_get_config(zhp, NULL)) != NULL) {
- if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
- &nvl) == 0) {
- (void) zfs_agent_iter_vdev(zhp, nvl, gsp);
- }
- }
- /*
- * if a match was found then grab the pool guid
- */
- if (gsp->gs_vdev_guid && gsp->gs_devid) {
- (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
- &gsp->gs_pool_guid);
- }
+ boolean_t found = B_FALSE;
+ uint64_t pool_guid;
+ /* Get pool configuration and extract pool GUID */
+ if ((config = zpool_get_config(zhp, NULL)) == NULL ||
+ nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
+ &pool_guid) != 0)
+ goto out;
+
+ /* Skip this pool if we're looking for a specific pool */
+ if (gsp->gs_pool_guid != 0 && pool_guid != gsp->gs_pool_guid)
+ goto out;
+
+ if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvl) == 0)
+ found = zfs_agent_iter_vdev(zhp, nvl, gsp);
+
+ if (found && gsp->gs_pool_guid == 0)
+ gsp->gs_pool_guid = pool_guid;
+
+out:
zpool_close(zhp);
- return (gsp->gs_devid != NULL && gsp->gs_vdev_guid != 0);
+ return (found);
}
void
@@ -233,20 +241,17 @@ zfs_agent_post_event(const char *class, const char *subclass, nvlist_t *nvl)
* For multipath, spare and l2arc devices ZFS_EV_VDEV_GUID or
* ZFS_EV_POOL_GUID may be missing so find them.
*/
- if (devid == NULL || pool_guid == 0 || vdev_guid == 0) {
- if (devid == NULL)
- search.gs_vdev_guid = vdev_guid;
- else
- search.gs_devid = devid;
- zpool_iter(g_zfs_hdl, zfs_agent_iter_pool, &search);
- if (devid == NULL)
- devid = search.gs_devid;
- if (pool_guid == 0)
- pool_guid = search.gs_pool_guid;
- if (vdev_guid == 0)
- vdev_guid = search.gs_vdev_guid;
- devtype = search.gs_vdev_type;
- }
+ search.gs_devid = devid;
+ search.gs_vdev_guid = vdev_guid;
+ search.gs_pool_guid = pool_guid;
+ zpool_iter(g_zfs_hdl, zfs_agent_iter_pool, &search);
+ if (devid == NULL)
+ devid = search.gs_devid;
+ if (pool_guid == 0)
+ pool_guid = search.gs_pool_guid;
+ if (vdev_guid == 0)
+ vdev_guid = search.gs_vdev_guid;
+ devtype = search.gs_vdev_type;
/*
* We want to avoid reporting "remove" events coming from
diff --git a/sys/contrib/openzfs/cmd/zed/zed_event.c b/sys/contrib/openzfs/cmd/zed/zed_event.c
index 296c222ca382..ba7cba304b1d 100644
--- a/sys/contrib/openzfs/cmd/zed/zed_event.c
+++ b/sys/contrib/openzfs/cmd/zed/zed_event.c
@@ -110,7 +110,7 @@ zed_event_fini(struct zed_conf *zcp)
static void
_bump_event_queue_length(void)
{
- int zzlm = -1, wr;
+ int zzlm, wr;
char qlen_buf[12] = {0}; /* parameter is int => max "-2147483647\n" */
long int qlen, orig_qlen;
diff --git a/sys/contrib/openzfs/cmd/zfs/zfs_main.c b/sys/contrib/openzfs/cmd/zfs/zfs_main.c
index 841c356508a5..363bb6da74ec 100644
--- a/sys/contrib/openzfs/cmd/zfs/zfs_main.c
+++ b/sys/contrib/openzfs/cmd/zfs/zfs_main.c
@@ -440,7 +440,7 @@ get_usage(zfs_help_t idx)
return (gettext("\tredact <snapshot> <bookmark> "
"<redaction_snapshot> ...\n"));
case HELP_REWRITE:
- return (gettext("\trewrite [-rvx] [-o <offset>] [-l <length>] "
+ return (gettext("\trewrite [-Prvx] [-o <offset>] [-l <length>] "
"<directory|file ...>\n"));
case HELP_JAIL:
return (gettext("\tjail <jailid|jailname> <filesystem>\n"));
@@ -1974,9 +1974,8 @@ fill_dataset_info(nvlist_t *list, zfs_handle_t *zhp, boolean_t as_int)
}
if (type == ZFS_TYPE_SNAPSHOT) {
- char *ds, *snap;
- ds = snap = strdup(zfs_get_name(zhp));
- ds = strsep(&snap, "@");
+ char *snap = strdup(zfs_get_name(zhp));
+ char *ds = strsep(&snap, "@");
fnvlist_add_string(list, "dataset", ds);
fnvlist_add_string(list, "snapshot_name", snap);
free(ds);
@@ -2019,8 +2018,7 @@ get_callback(zfs_handle_t *zhp, void *data)
nvlist_t *user_props = zfs_get_user_props(zhp);
zprop_list_t *pl = cbp->cb_proplist;
nvlist_t *propval;
- nvlist_t *item, *d, *props;
- item = d = props = NULL;
+ nvlist_t *item, *d = NULL, *props = NULL;
const char *strval;
const char *sourceval;
boolean_t received = is_recvd_column(cbp);
@@ -5879,7 +5877,7 @@ parse_fs_perm_set(fs_perm_set_t *fspset, nvlist_t *nvl)
static inline const char *
deleg_perm_comment(zfs_deleg_note_t note)
{
- const char *str = "";
+ const char *str;
/* subcommands */
switch (note) {
@@ -7729,6 +7727,7 @@ unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual)
struct extmnttab entry;
const char *cmdname = (op == OP_SHARE) ? "unshare" : "unmount";
ino_t path_inode;
+ char *zfs_mntpnt, *entry_mntpnt;
/*
* Search for the given (major,minor) pair in the mount table.
@@ -7770,6 +7769,24 @@ unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual)
goto out;
}
+ /*
+ * If the filesystem is mounted, check that the mountpoint matches
+ * the one in the mnttab entry w.r.t. provided path. If it doesn't,
+ * then we should not proceed further.
+ */
+ entry_mntpnt = strdup(entry.mnt_mountp);
+ if (zfs_is_mounted(zhp, &zfs_mntpnt)) {
+ if (strcmp(zfs_mntpnt, entry_mntpnt) != 0) {
+ (void) fprintf(stderr, gettext("cannot %s '%s': "
+ "not an original mountpoint\n"), cmdname, path);
+ free(zfs_mntpnt);
+ free(entry_mntpnt);
+ goto out;
+ }
+ free(zfs_mntpnt);
+ }
+ free(entry_mntpnt);
+
if (op == OP_SHARE) {
char nfs_mnt_prop[ZFS_MAXPROPLEN];
char smbshare_prop[ZFS_MAXPROPLEN];
@@ -9160,8 +9177,11 @@ zfs_do_rewrite(int argc, char **argv)
zfs_rewrite_args_t args;
memset(&args, 0, sizeof (args));
- while ((c = getopt(argc, argv, "l:o:rvx")) != -1) {
+ while ((c = getopt(argc, argv, "Pl:o:rvx")) != -1) {
switch (c) {
+ case 'P':
+ args.flags |= ZFS_REWRITE_PHYSICAL;
+ break;
case 'l':
args.len = strtoll(optarg, NULL, 0);
break;
diff --git a/sys/contrib/openzfs/cmd/zpool/zpool_iter.c b/sys/contrib/openzfs/cmd/zpool/zpool_iter.c
index 2ec189b98653..2eec9a95e24c 100644
--- a/sys/contrib/openzfs/cmd/zpool/zpool_iter.c
+++ b/sys/contrib/openzfs/cmd/zpool/zpool_iter.c
@@ -379,8 +379,8 @@ process_unique_cmd_columns(vdev_cmd_data_list_t *vcdl)
static int
vdev_process_cmd_output(vdev_cmd_data_t *data, char *line)
{
- char *col = NULL;
- char *val = line;
+ char *col;
+ char *val;
char *equals;
char **tmp;
@@ -397,6 +397,7 @@ vdev_process_cmd_output(vdev_cmd_data_t *data, char *line)
col = line;
val = equals + 1;
} else {
+ col = NULL;
val = line;
}
diff --git a/sys/contrib/openzfs/cmd/zpool/zpool_main.c b/sys/contrib/openzfs/cmd/zpool/zpool_main.c
index e62441894cd7..d401e087916b 100644
--- a/sys/contrib/openzfs/cmd/zpool/zpool_main.c
+++ b/sys/contrib/openzfs/cmd/zpool/zpool_main.c
@@ -34,7 +34,7 @@
* Copyright (c) 2019, loli10K <ezomori.nozomu@gmail.com>
* Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
* Copyright (c) 2021, 2023, Klara Inc.
- * Copyright [2021] Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2021, 2025 Hewlett Packard Enterprise Development LP.
*/
#include <assert.h>
@@ -510,16 +510,16 @@ get_usage(zpool_help_t idx)
case HELP_REOPEN:
return (gettext("\treopen [-n] <pool>\n"));
case HELP_INITIALIZE:
- return (gettext("\tinitialize [-c | -s | -u] [-w] <pool> "
- "[<device> ...]\n"));
+ return (gettext("\tinitialize [-c | -s | -u] [-w] <-a | <pool> "
+ "[<device> ...]>\n"));
case HELP_SCRUB:
- return (gettext("\tscrub [-e | -s | -p | -C] [-w] "
- "<pool> ...\n"));
+ return (gettext("\tscrub [-e | -s | -p | -C | -E | -S] [-w] "
+ "<-a | <pool> [<pool> ...]>\n"));
case HELP_RESILVER:
return (gettext("\tresilver <pool> ...\n"));
case HELP_TRIM:
- return (gettext("\ttrim [-dw] [-r <rate>] [-c | -s] <pool> "
- "[<device> ...]\n"));
+ return (gettext("\ttrim [-dw] [-r <rate>] [-c | -s] "
+ "<-a | <pool> [<device> ...]>\n"));
case HELP_STATUS:
return (gettext("\tstatus [-DdegiLPpstvx] "
"[-c script1[,script2,...]] ...\n"
@@ -560,33 +560,6 @@ get_usage(zpool_help_t idx)
}
}
-static void
-zpool_collect_leaves(zpool_handle_t *zhp, nvlist_t *nvroot, nvlist_t *res)
-{
- uint_t children = 0;
- nvlist_t **child;
- uint_t i;
-
- (void) nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN,
- &child, &children);
-
- if (children == 0) {
- char *path = zpool_vdev_name(g_zfs, zhp, nvroot,
- VDEV_NAME_PATH);
-
- if (strcmp(path, VDEV_TYPE_INDIRECT) != 0 &&
- strcmp(path, VDEV_TYPE_HOLE) != 0)
- fnvlist_add_boolean(res, path);
-
- free(path);
- return;
- }
-
- for (i = 0; i < children; i++) {
- zpool_collect_leaves(zhp, child[i], res);
- }
-}
-
/*
* Callback routine that will print out a pool property value.
*/
@@ -794,22 +767,26 @@ zpool_do_initialize(int argc, char **argv)
int c;
char *poolname;
zpool_handle_t *zhp;
- nvlist_t *vdevs;
int err = 0;
boolean_t wait = B_FALSE;
+ boolean_t initialize_all = B_FALSE;
struct option long_options[] = {
{"cancel", no_argument, NULL, 'c'},
{"suspend", no_argument, NULL, 's'},
{"uninit", no_argument, NULL, 'u'},
{"wait", no_argument, NULL, 'w'},
+ {"all", no_argument, NULL, 'a'},
{0, 0, 0, 0}
};
pool_initialize_func_t cmd_type = POOL_INITIALIZE_START;
- while ((c = getopt_long(argc, argv, "csuw", long_options,
+ while ((c = getopt_long(argc, argv, "acsuw", long_options,
NULL)) != -1) {
switch (c) {
+ case 'a':
+ initialize_all = B_TRUE;
+ break;
case 'c':
if (cmd_type != POOL_INITIALIZE_START &&
cmd_type != POOL_INITIALIZE_CANCEL) {
@@ -856,7 +833,18 @@ zpool_do_initialize(int argc, char **argv)
argc -= optind;
argv += optind;
- if (argc < 1) {
+ initialize_cbdata_t cbdata = {
+ .wait = wait,
+ .cmd_type = cmd_type
+ };
+
+ if (initialize_all && argc > 0) {
+ (void) fprintf(stderr, gettext("-a cannot be combined with "
+ "individual pools or vdevs\n"));
+ usage(B_FALSE);
+ }
+
+ if (argc < 1 && !initialize_all) {
(void) fprintf(stderr, gettext("missing pool name argument\n"));
usage(B_FALSE);
return (-1);
@@ -868,30 +856,35 @@ zpool_do_initialize(int argc, char **argv)
usage(B_FALSE);
}
- poolname = argv[0];
- zhp = zpool_open(g_zfs, poolname);
- if (zhp == NULL)
- return (-1);
-
- vdevs = fnvlist_alloc();
- if (argc == 1) {
- /* no individual leaf vdevs specified, so add them all */
- nvlist_t *config = zpool_get_config(zhp, NULL);
- nvlist_t *nvroot = fnvlist_lookup_nvlist(config,
- ZPOOL_CONFIG_VDEV_TREE);
- zpool_collect_leaves(zhp, nvroot, vdevs);
+ if (argc == 0 && initialize_all) {
+ /* Initilize each pool recursively */
+ err = for_each_pool(argc, argv, B_TRUE, NULL, ZFS_TYPE_POOL,
+ B_FALSE, zpool_initialize_one, &cbdata);
+ return (err);
+ } else if (argc == 1) {
+ /* no individual leaf vdevs specified, initialize the pool */
+ poolname = argv[0];
+ zhp = zpool_open(g_zfs, poolname);
+ if (zhp == NULL)
+ return (-1);
+ err = zpool_initialize_one(zhp, &cbdata);
} else {
+ /* individual leaf vdevs specified, initialize them */
+ poolname = argv[0];
+ zhp = zpool_open(g_zfs, poolname);
+ if (zhp == NULL)
+ return (-1);
+ nvlist_t *vdevs = fnvlist_alloc();
for (int i = 1; i < argc; i++) {
fnvlist_add_boolean(vdevs, argv[i]);
}
+ if (wait)
+ err = zpool_initialize_wait(zhp, cmd_type, vdevs);
+ else
+ err = zpool_initialize(zhp, cmd_type, vdevs);
+ fnvlist_free(vdevs);
}
- if (wait)
- err = zpool_initialize_wait(zhp, cmd_type, vdevs);
- else
- err = zpool_initialize(zhp, cmd_type, vdevs);
-
- fnvlist_free(vdevs);
zpool_close(zhp);
return (err);
@@ -1788,7 +1781,7 @@ zpool_do_labelclear(int argc, char **argv)
{
char vdev[MAXPATHLEN];
char *name = NULL;
- int c, fd = -1, ret = 0;
+ int c, fd, ret = 0;
nvlist_t *config;
pool_state_t state;
boolean_t inuse = B_FALSE;
@@ -6157,7 +6150,6 @@ static void
get_interval_count_filter_guids(int *argc, char **argv, float *interval,
unsigned long *count, iostat_cbdata_t *cb)
{
- char **tmpargv = argv;
int argc_for_interval = 0;
/* Is the last arg an interval value? Or a guid? */
@@ -6181,7 +6173,7 @@ get_interval_count_filter_guids(int *argc, char **argv, float *interval,
}
/* Point to our list of possible intervals */
- tmpargv = &argv[*argc - argc_for_interval];
+ char **tmpargv = &argv[*argc - argc_for_interval];
*argc = *argc - argc_for_interval;
get_interval_count(&argc_for_interval, tmpargv,
@@ -6377,7 +6369,6 @@ zpool_do_iostat(int argc, char **argv)
int npools;
float interval = 0;
unsigned long count = 0;
- int winheight = 24;
zpool_list_t *list;
boolean_t verbose = B_FALSE;
boolean_t latency = B_FALSE, l_histo = B_FALSE, rq_histo = B_FALSE;
@@ -6673,7 +6664,7 @@ zpool_do_iostat(int argc, char **argv)
* even when terminal window has its height
* changed.
*/
- winheight = terminal_height();
+ int winheight = terminal_height();
/*
* Are we connected to TTY? If not, headers_once
* should be true, to avoid breaking scripts.
@@ -8368,6 +8359,8 @@ zpool_do_reopen(int argc, char **argv)
typedef struct scrub_cbdata {
int cb_type;
pool_scrub_cmd_t cb_scrub_cmd;
+ time_t cb_date_start;
+ time_t cb_date_end;
} scrub_cbdata_t;
static boolean_t
@@ -8411,8 +8404,8 @@ scrub_callback(zpool_handle_t *zhp, void *data)
return (1);
}
- err = zpool_scan(zhp, cb->cb_type, cb->cb_scrub_cmd);
-
+ err = zpool_scan_range(zhp, cb->cb_type, cb->cb_scrub_cmd,
+ cb->cb_date_start, cb->cb_date_end);
if (err == 0 && zpool_has_checkpoint(zhp) &&
cb->cb_type == POOL_SCAN_SCRUB) {
(void) printf(gettext("warning: will not scrub state that "
@@ -8430,10 +8423,34 @@ wait_callback(zpool_handle_t *zhp, void *data)
return (zpool_wait(zhp, *act));
}
+static time_t
+date_string_to_sec(const char *timestr, boolean_t rounding)
+{
+ struct tm tm = {0};
+ int adjustment = rounding ? 1 : 0;
+
+ /* Allow mktime to determine timezone. */
+ tm.tm_isdst = -1;
+
+ if (strptime(timestr, "%Y-%m-%d %H:%M", &tm) == NULL) {
+ if (strptime(timestr, "%Y-%m-%d", &tm) == NULL) {
+ fprintf(stderr, gettext("Failed to parse the date.\n"));
+ usage(B_FALSE);
+ }
+ adjustment *= 24 * 60 * 60;
+ } else {
+ adjustment *= 60;
+ }
+
+ return (mktime(&tm) + adjustment);
+}
+
/*
- * zpool scrub [-e | -s | -p | -C] [-w] <pool> ...
+ * zpool scrub [-e | -s | -p | -C | -E | -S] [-w] <pool> ...
*
* -e Only scrub blocks in the error log.
+ * -E End date of scrub.
+ * -S Start date of scrub.
* -s Stop. Stops any in-progress scrub.
* -p Pause. Pause in-progress scrub.
* -w Wait. Blocks until scrub has completed.
@@ -8449,21 +8466,36 @@ zpool_do_scrub(int argc, char **argv)
cb.cb_type = POOL_SCAN_SCRUB;
cb.cb_scrub_cmd = POOL_SCRUB_NORMAL;
+ cb.cb_date_start = cb.cb_date_end = 0;
boolean_t is_error_scrub = B_FALSE;
boolean_t is_pause = B_FALSE;
boolean_t is_stop = B_FALSE;
boolean_t is_txg_continue = B_FALSE;
+ boolean_t scrub_all = B_FALSE;
/* check options */
- while ((c = getopt(argc, argv, "spweC")) != -1) {
+ while ((c = getopt(argc, argv, "aspweCE:S:")) != -1) {
switch (c) {
+ case 'a':
+ scrub_all = B_TRUE;
+ break;
case 'e':
is_error_scrub = B_TRUE;
break;
+ case 'E':
+ /*
+ * Round the date. It's better to scrub more data than
+ * less. This also makes the date inclusive.
+ */
+ cb.cb_date_end = date_string_to_sec(optarg, B_TRUE);
+ break;
case 's':
is_stop = B_TRUE;
break;
+ case 'S':
+ cb.cb_date_start = date_string_to_sec(optarg, B_FALSE);
+ break;
case 'p':
is_pause = B_TRUE;
break;
@@ -8511,6 +8543,19 @@ zpool_do_scrub(int argc, char **argv)
}
}
+ if ((cb.cb_date_start != 0 || cb.cb_date_end != 0) &&
+ cb.cb_scrub_cmd != POOL_SCRUB_NORMAL) {
+ (void) fprintf(stderr, gettext("invalid option combination: "
+ "start/end date is available only with normal scrub\n"));
+ usage(B_FALSE);
+ }
+ if (cb.cb_date_start != 0 && cb.cb_date_end != 0 &&
+ cb.cb_date_start > cb.cb_date_end) {
+ (void) fprintf(stderr, gettext("invalid arguments: "
+ "end date has to be later than start date\n"));
+ usage(B_FALSE);
+ }
+
if (wait && (cb.cb_type == POOL_SCAN_NONE ||
cb.cb_scrub_cmd == POOL_SCRUB_PAUSE)) {
(void) fprintf(stderr, gettext("invalid option combination: "
@@ -8521,7 +8566,7 @@ zpool_do_scrub(int argc, char **argv)
argc -= optind;
argv += optind;
- if (argc < 1) {
+ if (argc < 1 && !scrub_all) {
(void) fprintf(stderr, gettext("missing pool name argument\n"));
usage(B_FALSE);
}
@@ -8551,6 +8596,7 @@ zpool_do_resilver(int argc, char **argv)
cb.cb_type = POOL_SCAN_RESILVER;
cb.cb_scrub_cmd = POOL_SCRUB_NORMAL;
+ cb.cb_date_start = cb.cb_date_end = 0;
/* check options */
while ((c = getopt(argc, argv, "")) != -1) {
@@ -8593,6 +8639,7 @@ zpool_do_trim(int argc, char **argv)
{"rate", required_argument, NULL, 'r'},
{"suspend", no_argument, NULL, 's'},
{"wait", no_argument, NULL, 'w'},
+ {"all", no_argument, NULL, 'a'},
{0, 0, 0, 0}
};
@@ -8600,11 +8647,16 @@ zpool_do_trim(int argc, char **argv)
uint64_t rate = 0;
boolean_t secure = B_FALSE;
boolean_t wait = B_FALSE;
+ boolean_t trimall = B_FALSE;
+ int error;
int c;
- while ((c = getopt_long(argc, argv, "cdr:sw", long_options, NULL))
+ while ((c = getopt_long(argc, argv, "acdr:sw", long_options, NULL))
!= -1) {
switch (c) {
+ case 'a':
+ trimall = B_TRUE;
+ break;
case 'c':
if (cmd_type != POOL_TRIM_START &&
cmd_type != POOL_TRIM_CANCEL) {
@@ -8663,7 +8715,18 @@ zpool_do_trim(int argc, char **argv)
argc -= optind;
argv += optind;
- if (argc < 1) {
+ trimflags_t trim_flags = {
+ .secure = secure,
+ .rate = rate,
+ .wait = wait,
+ };
+
+ trim_cbdata_t cbdata = {
+ .trim_flags = trim_flags,
+ .cmd_type = cmd_type
+ };
+
+ if (argc < 1 && !trimall) {
(void) fprintf(stderr, gettext("missing pool name argument\n"));
usage(B_FALSE);
return (-1);
@@ -8671,41 +8734,46 @@ zpool_do_trim(int argc, char **argv)
if (wait && (cmd_type != POOL_TRIM_START)) {
(void) fprintf(stderr, gettext("-w cannot be used with -c or "
- "-s\n"));
+ "-s options\n"));
usage(B_FALSE);
}
- char *poolname = argv[0];
- zpool_handle_t *zhp = zpool_open(g_zfs, poolname);
- if (zhp == NULL)
- return (-1);
-
- trimflags_t trim_flags = {
- .secure = secure,
- .rate = rate,
- .wait = wait,
- };
+ if (trimall && argc > 0) {
+ (void) fprintf(stderr, gettext("-a cannot be combined with "
+ "individual zpools or vdevs\n"));
+ usage(B_FALSE);
+ }
- nvlist_t *vdevs = fnvlist_alloc();
- if (argc == 1) {
+ if (argc == 0 && trimall) {
+ cbdata.trim_flags.fullpool = B_TRUE;
+ /* Trim each pool recursively */
+ error = for_each_pool(argc, argv, B_TRUE, NULL, ZFS_TYPE_POOL,
+ B_FALSE, zpool_trim_one, &cbdata);
+ } else if (argc == 1) {
+ char *poolname = argv[0];
+ zpool_handle_t *zhp = zpool_open(g_zfs, poolname);
+ if (zhp == NULL)
+ return (-1);
/* no individual leaf vdevs specified, so add them all */
- nvlist_t *config = zpool_get_config(zhp, NULL);
- nvlist_t *nvroot = fnvlist_lookup_nvlist(config,
- ZPOOL_CONFIG_VDEV_TREE);
- zpool_collect_leaves(zhp, nvroot, vdevs);
- trim_flags.fullpool = B_TRUE;
+ error = zpool_trim_one(zhp, &cbdata);
+ zpool_close(zhp);
} else {
- trim_flags.fullpool = B_FALSE;
+ char *poolname = argv[0];
+ zpool_handle_t *zhp = zpool_open(g_zfs, poolname);
+ if (zhp == NULL)
+ return (-1);
+ /* leaf vdevs specified, trim only those */
+ cbdata.trim_flags.fullpool = B_FALSE;
+ nvlist_t *vdevs = fnvlist_alloc();
for (int i = 1; i < argc; i++) {
fnvlist_add_boolean(vdevs, argv[i]);
}
+ error = zpool_trim(zhp, cbdata.cmd_type, vdevs,
+ &cbdata.trim_flags);
+ fnvlist_free(vdevs);
+ zpool_close(zhp);
}
- int error = zpool_trim(zhp, cmd_type, vdevs, &trim_flags);
-
- fnvlist_free(vdevs);
- zpool_close(zhp);
-
return (error);
}
@@ -10706,7 +10774,6 @@ status_callback_json(zpool_handle_t *zhp, void *data)
uint_t c;
vdev_stat_t *vs;
nvlist_t *item, *d, *load_info, *vds;
- item = d = NULL;
/* If dedup stats were requested, also fetch dedupcached. */
if (cbp->cb_dedup_stats > 1)
@@ -11330,7 +11397,8 @@ upgrade_enable_all(zpool_handle_t *zhp, int *countp)
const char *fname = spa_feature_table[i].fi_uname;
const char *fguid = spa_feature_table[i].fi_guid;
- if (!spa_feature_table[i].fi_zfs_mod_supported)
+ if (!spa_feature_table[i].fi_zfs_mod_supported ||
+ (spa_feature_table[i].fi_flags & ZFEATURE_FLAG_NO_UPGRADE))
continue;
if (!nvlist_exists(enabled, fguid) && requested_features[i]) {
@@ -11485,7 +11553,11 @@ upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg)
"Note that the pool "
"'compatibility' feature can be "
"used to inhibit\nfeature "
- "upgrades.\n\n"));
+ "upgrades.\n\n"
+ "Features marked with (*) are not "
+ "applied automatically on upgrade, "
+ "and\nmust be applied explicitly "
+ "with zpool-set(7).\n\n"));
(void) printf(gettext("POOL "
"FEATURE\n"));
(void) printf(gettext("------"
@@ -11499,7 +11571,9 @@ upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg)
poolfirst = B_FALSE;
}
- (void) printf(gettext(" %s\n"), fname);
+ (void) printf(gettext(" %s%s\n"), fname,
+ spa_feature_table[i].fi_flags &
+ ZFEATURE_FLAG_NO_UPGRADE ? "(*)" : "");
}
/*
* If they did "zpool upgrade -a", then we could
diff --git a/sys/contrib/openzfs/cmd/zpool/zpool_vdev.c b/sys/contrib/openzfs/cmd/zpool/zpool_vdev.c
index 07868a30d7e7..684b46a2d673 100644
--- a/sys/contrib/openzfs/cmd/zpool/zpool_vdev.c
+++ b/sys/contrib/openzfs/cmd/zpool/zpool_vdev.c
@@ -574,7 +574,6 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
nvlist_t *cnv = child[c];
const char *path;
struct stat64 statbuf;
- int64_t size = -1LL;
const char *childtype;
int fd, err;
@@ -656,7 +655,7 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
statbuf.st_size == MAXOFFSET_T)
continue;
- size = statbuf.st_size;
+ int64_t size = statbuf.st_size;
/*
* Also make sure that devices and
@@ -876,6 +875,18 @@ check_replication(nvlist_t *config, nvlist_t *newroot)
(u_longlong_t)mirror->zprl_children);
ret = -1;
}
+ } else if (is_raidz_draid(current, new)) {
+ if (current->zprl_parity != new->zprl_parity) {
+ vdev_error(gettext(
+ "mismatched replication level: pool and "
+ "new vdev with different redundancy, %s "
+ "and %s vdevs, %llu vs. %llu\n"),
+ current->zprl_type,
+ new->zprl_type,
+ (u_longlong_t)current->zprl_parity,
+ (u_longlong_t)new->zprl_parity);
+ ret = -1;
+ }
} else if (strcmp(current->zprl_type, new->zprl_type) != 0) {
vdev_error(gettext(
"mismatched replication level: pool uses %s "
@@ -1353,7 +1364,7 @@ is_grouping(const char *type, int *mindev, int *maxdev)
static int
draid_config_by_type(nvlist_t *nv, const char *type, uint64_t children)
{
- uint64_t nparity = 1;
+ uint64_t nparity;
uint64_t nspares = 0;
uint64_t ndata = UINT64_MAX;
uint64_t ngroups = 1;
@@ -1581,13 +1592,12 @@ construct_spec(nvlist_t *props, int argc, char **argv)
is_dedup = is_spare = B_FALSE;
}
- if (is_log || is_special || is_dedup) {
+ if (is_log) {
if (strcmp(type, VDEV_TYPE_MIRROR) != 0) {
(void) fprintf(stderr,
gettext("invalid vdev "
- "specification: unsupported '%s' "
- "device: %s\n"), is_log ? "log" :
- "special", type);
+ "specification: unsupported 'log' "
+ "device: %s\n"), type);
goto spec_out;
}
nlogs++;
diff --git a/sys/contrib/openzfs/cmd/ztest.c b/sys/contrib/openzfs/cmd/ztest.c
index 89264c97ff10..2e88ae3e7994 100644
--- a/sys/contrib/openzfs/cmd/ztest.c
+++ b/sys/contrib/openzfs/cmd/ztest.c
@@ -809,8 +809,8 @@ static ztest_option_t option_table[] = {
{ 'X', "raidz-expansion", NULL,
"Perform a dedicated raidz expansion test",
NO_DEFAULT, NULL},
- { 'o', "option", "\"OPTION=INTEGER\"",
- "Set global variable to an unsigned 32-bit integer value",
+ { 'o', "option", "\"NAME=VALUE\"",
+ "Set the named tunable to the given value",
NO_DEFAULT, NULL},
{ 'G', "dump-debug-msg", NULL,
"Dump zfs_dbgmsg buffer before exiting due to an error",
@@ -919,7 +919,7 @@ ztest_parse_name_value(const char *input, ztest_shared_opts_t *zo)
{
char name[32];
char *value;
- int state = ZTEST_VDEV_CLASS_RND;
+ int state;
(void) strlcpy(name, input, sizeof (name));
@@ -3882,7 +3882,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id)
* If newvd is too small, it should fail with EOVERFLOW.
*
* If newvd is a distributed spare and it's being attached to a
- * dRAID which is not its parent it should fail with EINVAL.
+ * dRAID which is not its parent it should fail with ENOTSUP.
*/
if (pvd->vdev_ops != &vdev_mirror_ops &&
pvd->vdev_ops != &vdev_root_ops && (!replacing ||
@@ -3901,7 +3901,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id)
else if (ashift > oldvd->vdev_top->vdev_ashift)
expected_error = EDOM;
else if (newvd_is_dspare && pvd != vdev_draid_spare_get_parent(newvd))
- expected_error = EINVAL;
+ expected_error = ENOTSUP;
else
expected_error = 0;
@@ -7069,7 +7069,7 @@ ztest_set_global_vars(void)
char *kv = ztest_opts.zo_gvars[i];
VERIFY3U(strlen(kv), <=, ZO_GVARS_MAX_ARGLEN);
VERIFY3U(strlen(kv), >, 0);
- int err = set_global_var(kv);
+ int err = handle_tunable_option(kv, B_TRUE);
if (ztest_opts.zo_verbose > 0) {
(void) printf("setting global var %s ... %s\n", kv,
err ? "failed" : "ok");
@@ -7813,6 +7813,9 @@ ztest_dataset_open(int d)
ztest_dataset_name(name, ztest_opts.zo_pool, d);
+ if (ztest_opts.zo_verbose >= 6)
+ (void) printf("Opening %s\n", name);
+
(void) pthread_rwlock_rdlock(&ztest_name_lock);
error = ztest_dataset_create(name);
@@ -8308,41 +8311,44 @@ static void
ztest_generic_run(ztest_shared_t *zs, spa_t *spa)
{
kthread_t **run_threads;
- int t;
+ int i, ndatasets;
run_threads = umem_zalloc(ztest_opts.zo_threads * sizeof (kthread_t *),
UMEM_NOFAIL);
/*
- * Kick off all the tests that run in parallel.
+ * Actual number of datasets to be used.
*/
- for (t = 0; t < ztest_opts.zo_threads; t++) {
- if (t < ztest_opts.zo_datasets && ztest_dataset_open(t) != 0) {
- umem_free(run_threads, ztest_opts.zo_threads *
- sizeof (kthread_t *));
- return;
- }
+ ndatasets = MIN(ztest_opts.zo_datasets, ztest_opts.zo_threads);
- run_threads[t] = thread_create(NULL, 0, ztest_thread,
- (void *)(uintptr_t)t, 0, NULL, TS_RUN | TS_JOINABLE,
+ /*
+ * Prepare the datasets first.
+ */
+ for (i = 0; i < ndatasets; i++)
+ VERIFY0(ztest_dataset_open(i));
+
+ /*
+ * Kick off all the tests that run in parallel.
+ */
+ for (i = 0; i < ztest_opts.zo_threads; i++) {
+ run_threads[i] = thread_create(NULL, 0, ztest_thread,
+ (void *)(uintptr_t)i, 0, NULL, TS_RUN | TS_JOINABLE,
defclsyspri);
}
/*
* Wait for all of the tests to complete.
*/
- for (t = 0; t < ztest_opts.zo_threads; t++)
- VERIFY0(thread_join(run_threads[t]));
+ for (i = 0; i < ztest_opts.zo_threads; i++)
+ VERIFY0(thread_join(run_threads[i]));
/*
* Close all datasets. This must be done after all the threads
* are joined so we can be sure none of the datasets are in-use
* by any of the threads.
*/
- for (t = 0; t < ztest_opts.zo_threads; t++) {
- if (t < ztest_opts.zo_datasets)
- ztest_dataset_close(t);
- }
+ for (i = 0; i < ndatasets; i++)
+ ztest_dataset_close(i);
txg_wait_synced(spa_get_dsl(spa), 0);
@@ -8465,6 +8471,7 @@ ztest_run(ztest_shared_t *zs)
int d = ztest_random(ztest_opts.zo_datasets);
ztest_dataset_destroy(d);
+ txg_wait_synced(spa_get_dsl(spa), 0);
}
zs->zs_enospc_count = 0;
diff --git a/sys/contrib/openzfs/config/ax_python_devel.m4 b/sys/contrib/openzfs/config/ax_python_devel.m4
index 1f480db6d233..935056cc4c0a 100644
--- a/sys/contrib/openzfs/config/ax_python_devel.m4
+++ b/sys/contrib/openzfs/config/ax_python_devel.m4
@@ -72,7 +72,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 36
+#serial 37
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
AC_DEFUN([AX_PYTHON_DEVEL],[
@@ -316,7 +316,7 @@ EOD`
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
fi
- if test -z "PYTHON_LIBS"; then
+ if test -z "$PYTHON_LIBS"; then
AC_MSG_WARN([
Cannot determine location of your Python DSO. Please check it was installed with
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
diff --git a/sys/contrib/openzfs/config/kernel-free-inode.m4 b/sys/contrib/openzfs/config/kernel-free-inode.m4
new file mode 100644
index 000000000000..baa1c34845bb
--- /dev/null
+++ b/sys/contrib/openzfs/config/kernel-free-inode.m4
@@ -0,0 +1,24 @@
+dnl #
+dnl # Linux 5.2 API change
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE], [
+ ZFS_LINUX_TEST_SRC([super_operations_free_inode], [
+ #include <linux/fs.h>
+
+ static void free_inode(struct inode *) { }
+
+ static struct super_operations sops __attribute__ ((unused)) = {
+ .free_inode = free_inode,
+ };
+ ],[])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_SOPS_FREE_INODE], [
+ AC_MSG_CHECKING([whether sops->free_inode() exists])
+ ZFS_LINUX_TEST_RESULT([super_operations_free_inode], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SOPS_FREE_INODE, 1, [sops->free_inode() exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
diff --git a/sys/contrib/openzfs/config/kernel.m4 b/sys/contrib/openzfs/config/kernel.m4
index 7e6af62dede5..e3e7625db7d8 100644
--- a/sys/contrib/openzfs/config/kernel.m4
+++ b/sys/contrib/openzfs/config/kernel.m4
@@ -134,6 +134,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
ZFS_AC_KERNEL_SRC_PIN_USER_PAGES
ZFS_AC_KERNEL_SRC_TIMER
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR
+ ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE
case "$host_cpu" in
powerpc*)
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
@@ -252,6 +253,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
ZFS_AC_KERNEL_PIN_USER_PAGES
ZFS_AC_KERNEL_TIMER
ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR
+ ZFS_AC_KERNEL_SOPS_FREE_INODE
case "$host_cpu" in
powerpc*)
ZFS_AC_KERNEL_CPU_HAS_FEATURE
diff --git a/sys/contrib/openzfs/config/user-statx.m4 b/sys/contrib/openzfs/config/user-statx.m4
new file mode 100644
index 000000000000..0315f93e0c20
--- /dev/null
+++ b/sys/contrib/openzfs/config/user-statx.m4
@@ -0,0 +1,34 @@
+dnl #
+dnl # Check for statx() function and STATX_MNT_ID availability
+dnl #
+AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
+ AC_CHECK_HEADERS([linux/stat.h],
+ [have_stat_headers=yes],
+ [have_stat_headers=no])
+
+ AS_IF([test "x$have_stat_headers" = "xyes"], [
+ AC_CHECK_FUNC([statx], [
+ AC_DEFINE([HAVE_STATX], [1], [statx() is available])
+
+ dnl Check for STATX_MNT_ID availability
+ AC_MSG_CHECKING([for STATX_MNT_ID])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ #include <linux/stat.h>
+ ]], [[
+ struct statx stx;
+ int mask = STATX_MNT_ID;
+ (void)mask;
+ (void)stx.stx_mnt_id;
+ ]])
+ ], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_STATX_MNT_ID], [1], [STATX_MNT_ID is available])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+ ])
+ ], [
+ AC_MSG_WARN([linux/stat.h not found; skipping statx support])
+ ])
+]) dnl end AC_DEFUN
diff --git a/sys/contrib/openzfs/config/user.m4 b/sys/contrib/openzfs/config/user.m4
index badd920d2b8a..62e59ed94437 100644
--- a/sys/contrib/openzfs/config/user.m4
+++ b/sys/contrib/openzfs/config/user.m4
@@ -17,6 +17,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [
ZFS_AC_CONFIG_USER_LIBUDEV
ZFS_AC_CONFIG_USER_LIBUUID
ZFS_AC_CONFIG_USER_LIBBLKID
+ ZFS_AC_CONFIG_USER_STATX
])
ZFS_AC_CONFIG_USER_LIBTIRPC
ZFS_AC_CONFIG_USER_LIBCRYPTO
diff --git a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.install b/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.install
index 4573cc77ea74..37284a78ad18 100644
--- a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.install
+++ b/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.install
@@ -8,6 +8,7 @@ lib/systemd/system/zfs-import-scan.service
lib/systemd/system/zfs-import.target
lib/systemd/system/zfs-load-key.service
lib/systemd/system/zfs-mount.service
+lib/systemd/system/zfs-mount@.service
lib/systemd/system/zfs-scrub-monthly@.timer
lib/systemd/system/zfs-scrub-weekly@.timer
lib/systemd/system/zfs-scrub@.service
diff --git a/sys/contrib/openzfs/etc/Makefile.am b/sys/contrib/openzfs/etc/Makefile.am
index 7187762d3802..808c729cd968 100644
--- a/sys/contrib/openzfs/etc/Makefile.am
+++ b/sys/contrib/openzfs/etc/Makefile.am
@@ -56,6 +56,7 @@ systemdunit_DATA = \
%D%/systemd/system/zfs-import-scan.service \
%D%/systemd/system/zfs-import.target \
%D%/systemd/system/zfs-mount.service \
+ %D%/systemd/system/zfs-mount@.service \
%D%/systemd/system/zfs-scrub-monthly@.timer \
%D%/systemd/system/zfs-scrub-weekly@.timer \
%D%/systemd/system/zfs-scrub@.service \
diff --git a/sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in b/sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in
new file mode 100644
index 000000000000..0698fad12074
--- /dev/null
+++ b/sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in
@@ -0,0 +1,26 @@
+[Unit]
+Description=Mount ZFS filesystem %I
+Documentation=man:zfs(8)
+DefaultDependencies=no
+After=systemd-udev-settle.service
+After=zfs-import.target
+After=zfs-mount.service
+After=systemd-remount-fs.service
+Before=local-fs.target
+ConditionPathIsDirectory=/sys/module/zfs
+
+# This merely tells the service manager
+# that unmounting everything undoes the
+# effect of this service. No extra logic
+# is ran as a result of these settings.
+Conflicts=umount.target
+Before=umount.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=-@initconfdir@/zfs
+ExecStart=@sbindir@/zfs mount -R %I
+
+[Install]
+WantedBy=zfs.target
diff --git a/sys/contrib/openzfs/include/Makefile.am b/sys/contrib/openzfs/include/Makefile.am
index a9258deabfd7..7588cd0aedc9 100644
--- a/sys/contrib/openzfs/include/Makefile.am
+++ b/sys/contrib/openzfs/include/Makefile.am
@@ -10,6 +10,7 @@ COMMON_H = \
cityhash.h \
zfeature_common.h \
zfs_comutil.h \
+ zfs_crrd.h \
zfs_deleg.h \
zfs_fletcher.h \
zfs_namecheck.h \
@@ -69,7 +70,6 @@ COMMON_H = \
sys/metaslab_impl.h \
sys/mmp.h \
sys/mntent.h \
- sys/mod.h \
sys/multilist.h \
sys/nvpair.h \
sys/nvpair_impl.h \
diff --git a/sys/contrib/openzfs/include/libzfs.h b/sys/contrib/openzfs/include/libzfs.h
index 485af793862c..3fcdc176a621 100644
--- a/sys/contrib/openzfs/include/libzfs.h
+++ b/sys/contrib/openzfs/include/libzfs.h
@@ -30,6 +30,7 @@
* Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
* Copyright (c) 2019 Datto Inc.
* Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
+ * Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
*/
#ifndef _LIBZFS_H
@@ -288,10 +289,22 @@ typedef struct trimflags {
uint64_t rate;
} trimflags_t;
+typedef struct trim_cbdata {
+ trimflags_t trim_flags;
+ pool_trim_func_t cmd_type;
+} trim_cbdata_t;
+
+typedef struct initialize_cbdata {
+ boolean_t wait;
+ pool_initialize_func_t cmd_type;
+} initialize_cbdata_t;
/*
* Functions to manipulate pool and vdev state
*/
_LIBZFS_H int zpool_scan(zpool_handle_t *, pool_scan_func_t, pool_scrub_cmd_t);
+_LIBZFS_H int zpool_scan_range(zpool_handle_t *, pool_scan_func_t,
+ pool_scrub_cmd_t, time_t, time_t);
+_LIBZFS_H int zpool_initialize_one(zpool_handle_t *, void *);
_LIBZFS_H int zpool_initialize(zpool_handle_t *, pool_initialize_func_t,
nvlist_t *);
_LIBZFS_H int zpool_initialize_wait(zpool_handle_t *, pool_initialize_func_t,
@@ -304,7 +317,9 @@ _LIBZFS_H int zpool_reguid(zpool_handle_t *);
_LIBZFS_H int zpool_set_guid(zpool_handle_t *, const uint64_t *);
_LIBZFS_H int zpool_reopen_one(zpool_handle_t *, void *);
+_LIBZFS_H void zpool_collect_leaves(zpool_handle_t *, nvlist_t *, nvlist_t *);
_LIBZFS_H int zpool_sync_one(zpool_handle_t *, void *);
+_LIBZFS_H int zpool_trim_one(zpool_handle_t *, void *);
_LIBZFS_H int zpool_ddt_prune(zpool_handle_t *, zpool_ddt_prune_unit_t,
uint64_t);
diff --git a/sys/contrib/openzfs/include/os/freebsd/Makefile.am b/sys/contrib/openzfs/include/os/freebsd/Makefile.am
index d975c4fe69fa..d6b6923d033f 100644
--- a/sys/contrib/openzfs/include/os/freebsd/Makefile.am
+++ b/sys/contrib/openzfs/include/os/freebsd/Makefile.am
@@ -33,7 +33,7 @@ noinst_HEADERS = \
%D%/spl/sys/list_impl.h \
%D%/spl/sys/lock.h \
%D%/spl/sys/misc.h \
- %D%/spl/sys/mod_os.h \
+ %D%/spl/sys/mod.h \
%D%/spl/sys/mode.h \
%D%/spl/sys/mount.h \
%D%/spl/sys/mutex.h \
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h
index 091ebe772810..acce8734b2c5 100644
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h
@@ -56,4 +56,9 @@ struct opensolaris_utsname {
#define task_io_account_read(n)
#define task_io_account_write(n)
+/*
+ * Check if the current thread is a memory reclaim thread.
+ */
+extern int current_is_reclaim_thread(void);
+
#endif /* _OPENSOLARIS_SYS_MISC_H_ */
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/mod_os.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/mod.h
index 4214189c32df..4214189c32df 100644
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/mod_os.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/mod.h
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vm.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vm.h
index 454078f0fe79..d36bee881d0b 100644
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vm.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vm.h
@@ -35,6 +35,7 @@
extern const int zfs_vm_pagerret_bad;
extern const int zfs_vm_pagerret_error;
extern const int zfs_vm_pagerret_ok;
+extern const int zfs_vm_pagerret_pend;
extern const int zfs_vm_pagerput_sync;
extern const int zfs_vm_pagerput_inval;
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode_impl.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode_impl.h
index 0df3378c23e7..b18836aa563e 100644
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode_impl.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/vnode_impl.h
@@ -227,6 +227,7 @@ struct taskq;
#define LOOKUP_XATTR 0x02 /* lookup up extended attr dir */
#define CREATE_XATTR_DIR 0x04 /* Create extended attr dir */
#define LOOKUP_HAVE_SYSATTR_DIR 0x08 /* Already created virtual GFS dir */
+#define LOOKUP_NAMED_ATTR 0x10 /* Lookup a named attribute */
/*
* Public vnode manipulation functions.
diff --git a/sys/contrib/openzfs/include/os/linux/Makefile.am b/sys/contrib/openzfs/include/os/linux/Makefile.am
index 4fe6705defe5..e156ca183dbd 100644
--- a/sys/contrib/openzfs/include/os/linux/Makefile.am
+++ b/sys/contrib/openzfs/include/os/linux/Makefile.am
@@ -75,7 +75,7 @@ kernel_spl_sys_HEADERS = \
%D%/spl/sys/kstat.h \
%D%/spl/sys/list.h \
%D%/spl/sys/misc.h \
- %D%/spl/sys/mod_os.h \
+ %D%/spl/sys/mod.h \
%D%/spl/sys/mutex.h \
%D%/spl/sys/param.h \
%D%/spl/sys/proc.h \
diff --git a/sys/contrib/openzfs/include/os/linux/spl/sys/atomic.h b/sys/contrib/openzfs/include/os/linux/spl/sys/atomic.h
index b2a39d7d6cbf..f4bcd58bd281 100644
--- a/sys/contrib/openzfs/include/os/linux/spl/sys/atomic.h
+++ b/sys/contrib/openzfs/include/os/linux/spl/sys/atomic.h
@@ -71,6 +71,22 @@ atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
return ((void *)atomic_cas_64((volatile uint64_t *)target,
(uint64_t)cmp, (uint64_t)newval));
}
+static __inline__ void *
+atomic_swap_ptr(volatile void *target, void *newval)
+{
+ return ((void *)atomic_swap_64((volatile uint64_t *)target,
+ (uint64_t)newval));
+}
+static __inline__ void *
+atomic_load_ptr(volatile void *target)
+{
+ return ((void *)atomic_load_64((volatile uint64_t *)target));
+}
+static __inline__ void
+atomic_store_ptr(volatile void *target, void *newval)
+{
+ atomic_store_64((volatile uint64_t *)target, (uint64_t)newval);
+}
#else /* _LP64 */
static __inline__ void *
atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
@@ -78,6 +94,22 @@ atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
return ((void *)atomic_cas_32((volatile uint32_t *)target,
(uint32_t)cmp, (uint32_t)newval));
}
+static __inline__ void *
+atomic_swap_ptr(volatile void *target, void *newval)
+{
+ return ((void *)atomic_swap_32((volatile uint32_t *)target,
+ (uint32_t)newval));
+}
+static __inline__ void *
+atomic_load_ptr(volatile void *target)
+{
+ return ((void *)atomic_load_32((volatile uint32_t *)target));
+}
+static __inline__ void
+atomic_store_ptr(volatile void *target, void *newval)
+{
+ atomic_store_32((volatile uint32_t *)target, (uint32_t)newval);
+}
#endif /* _LP64 */
#endif /* _SPL_ATOMIC_H */
diff --git a/sys/contrib/openzfs/include/os/linux/spl/sys/kmem.h b/sys/contrib/openzfs/include/os/linux/spl/sys/kmem.h
index 995236117dd4..fe34de9c179e 100644
--- a/sys/contrib/openzfs/include/os/linux/spl/sys/kmem.h
+++ b/sys/contrib/openzfs/include/os/linux/spl/sys/kmem.h
@@ -61,7 +61,7 @@ void *spl_kvmalloc(size_t size, gfp_t flags);
/*
* Convert a KM_* flags mask to its Linux GFP_* counterpart. The conversion
* function is context aware which means that KM_SLEEP allocations can be
- * safely used in syncing contexts which have set PF_FSTRANS.
+ * safely used in syncing contexts which have set SPL_FSTRANS.
*/
static inline gfp_t
kmem_flags_convert(int flags)
@@ -91,25 +91,11 @@ typedef struct {
} fstrans_cookie_t;
/*
- * Introduced in Linux 3.9, however this cannot be solely relied on before
- * Linux 3.18 as it doesn't turn off __GFP_FS as it should.
+ * SPL_FSTRANS is the set of flags that indicate that the task is in a
+ * filesystem or IO codepath, and so any allocation must not call back into
+ * those codepaths (eg to swap).
*/
-#ifdef PF_MEMALLOC_NOIO
-#define __SPL_PF_MEMALLOC_NOIO (PF_MEMALLOC_NOIO)
-#else
-#define __SPL_PF_MEMALLOC_NOIO (0)
-#endif
-
-/*
- * PF_FSTRANS is removed from Linux 4.12
- */
-#ifdef PF_FSTRANS
-#define __SPL_PF_FSTRANS (PF_FSTRANS)
-#else
-#define __SPL_PF_FSTRANS (0)
-#endif
-
-#define SPL_FSTRANS (__SPL_PF_FSTRANS|__SPL_PF_MEMALLOC_NOIO)
+#define SPL_FSTRANS (PF_MEMALLOC_NOIO)
static inline fstrans_cookie_t
spl_fstrans_mark(void)
@@ -141,43 +127,8 @@ spl_fstrans_check(void)
return (current->flags & SPL_FSTRANS);
}
-/*
- * specifically used to check PF_FSTRANS flag, cannot be relied on for
- * checking spl_fstrans_mark().
- */
-static inline int
-__spl_pf_fstrans_check(void)
-{
- return (current->flags & __SPL_PF_FSTRANS);
-}
-
-/*
- * Kernel compatibility for GFP flags
- */
-/* < 4.13 */
-#ifndef __GFP_RETRY_MAYFAIL
-#define __GFP_RETRY_MAYFAIL __GFP_REPEAT
-#endif
-/* < 4.4 */
-#ifndef __GFP_RECLAIM
-#define __GFP_RECLAIM __GFP_WAIT
-#endif
-
-#ifdef HAVE_ATOMIC64_T
-#define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used)
-#define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used)
-#define kmem_alloc_used_read() atomic64_read(&kmem_alloc_used)
-#define kmem_alloc_used_set(size) atomic64_set(&kmem_alloc_used, size)
extern atomic64_t kmem_alloc_used;
-extern unsigned long long kmem_alloc_max;
-#else /* HAVE_ATOMIC64_T */
-#define kmem_alloc_used_add(size) atomic_add(size, &kmem_alloc_used)
-#define kmem_alloc_used_sub(size) atomic_sub(size, &kmem_alloc_used)
-#define kmem_alloc_used_read() atomic_read(&kmem_alloc_used)
-#define kmem_alloc_used_set(size) atomic_set(&kmem_alloc_used, size)
-extern atomic_t kmem_alloc_used;
-extern unsigned long long kmem_alloc_max;
-#endif /* HAVE_ATOMIC64_T */
+extern uint64_t kmem_alloc_max;
extern unsigned int spl_kmem_alloc_warn;
extern unsigned int spl_kmem_alloc_max;
diff --git a/sys/contrib/openzfs/include/os/linux/spl/sys/misc.h b/sys/contrib/openzfs/include/os/linux/spl/sys/misc.h
index 0b44786f8a6e..fbaaf229bd1a 100644
--- a/sys/contrib/openzfs/include/os/linux/spl/sys/misc.h
+++ b/sys/contrib/openzfs/include/os/linux/spl/sys/misc.h
@@ -24,7 +24,13 @@
#define _OS_LINUX_SPL_MISC_H
#include <linux/kobject.h>
+#include <linux/swap.h>
extern void spl_signal_kobj_evt(struct block_device *bdev);
+/*
+ * Check if the current thread is a memory reclaim thread.
+ */
+extern int current_is_reclaim_thread(void);
+
#endif
diff --git a/sys/contrib/openzfs/include/os/linux/spl/sys/mod_os.h b/sys/contrib/openzfs/include/os/linux/spl/sys/mod.h
index eaeb9255039e..eaeb9255039e 100644
--- a/sys/contrib/openzfs/include/os/linux/spl/sys/mod_os.h
+++ b/sys/contrib/openzfs/include/os/linux/spl/sys/mod.h
diff --git a/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_acl.h b/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_acl.h
index 8923657daf02..d88b4937ef08 100644
--- a/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_acl.h
+++ b/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_acl.h
@@ -59,8 +59,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
__field(uint64_t, z_size)
__field(uint64_t, z_pflags)
__field(uint32_t, z_sync_cnt)
- __field(uint32_t, z_sync_writes_cnt)
- __field(uint32_t, z_async_writes_cnt)
__field(mode_t, z_mode)
__field(boolean_t, z_is_sa)
__field(boolean_t, z_is_ctldir)
@@ -92,8 +90,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
__entry->z_size = zn->z_size;
__entry->z_pflags = zn->z_pflags;
__entry->z_sync_cnt = zn->z_sync_cnt;
- __entry->z_sync_writes_cnt = zn->z_sync_writes_cnt;
- __entry->z_async_writes_cnt = zn->z_async_writes_cnt;
__entry->z_mode = zn->z_mode;
__entry->z_is_sa = zn->z_is_sa;
__entry->z_is_ctldir = zn->z_is_ctldir;
@@ -117,7 +113,7 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
TP_printk("zn { id %llu unlinked %u atime_dirty %u "
"zn_prefetch %u blksz %u seq %u "
"mapcnt %llu size %llu pflags %llu "
- "sync_cnt %u sync_writes_cnt %u async_writes_cnt %u "
+ "sync_cnt %u "
"mode 0x%x is_sa %d is_ctldir %d "
"inode { uid %u gid %u ino %lu nlink %u size %lli "
"blkbits %u bytes %u mode 0x%x generation %x } } "
@@ -126,7 +122,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
__entry->z_zn_prefetch, __entry->z_blksz,
__entry->z_seq, __entry->z_mapcnt, __entry->z_size,
__entry->z_pflags, __entry->z_sync_cnt,
- __entry->z_sync_writes_cnt, __entry->z_async_writes_cnt,
__entry->z_mode, __entry->z_is_sa, __entry->z_is_ctldir,
__entry->i_uid, __entry->i_gid, __entry->i_ino, __entry->i_nlink,
__entry->i_size, __entry->i_blkbits,
diff --git a/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_common.h b/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_common.h
index 85cf8cc20b09..e1b6d61099b9 100644
--- a/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_common.h
+++ b/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_common.h
@@ -45,7 +45,7 @@
__field(zio_flag_t, zio_orig_flags) \
__field(enum zio_stage, zio_orig_stage) \
__field(enum zio_stage, zio_orig_pipeline) \
- __field(uint8_t, zio_reexecute) \
+ __field(uint8_t, zio_post) \
__field(uint64_t, zio_txg) \
__field(int, zio_error) \
__field(uint64_t, zio_ena) \
@@ -74,7 +74,7 @@
__entry->zio_orig_flags = zio->io_orig_flags; \
__entry->zio_orig_stage = zio->io_orig_stage; \
__entry->zio_orig_pipeline = zio->io_orig_pipeline; \
- __entry->zio_reexecute = zio->io_reexecute; \
+ __entry->zio_post = zio->io_post; \
__entry->zio_txg = zio->io_txg; \
__entry->zio_error = zio->io_error; \
__entry->zio_ena = zio->io_ena; \
@@ -92,7 +92,7 @@
"zio { type %u prio %u size %llu orig_size %llu " \
"offset %llu timestamp %llu delta %llu delay %llu " \
"flags 0x%llx stage 0x%x pipeline 0x%x orig_flags 0x%llx " \
- "orig_stage 0x%x orig_pipeline 0x%x reexecute %u " \
+ "orig_stage 0x%x orig_pipeline 0x%x post %u " \
"txg %llu error %d ena %llu prop { checksum %u compress %u " \
"type %u level %u copies %u dedup %u dedup_verify %u nopwrite %u } }"
@@ -102,7 +102,7 @@
__entry->zio_timestamp, __entry->zio_delta, __entry->zio_delay, \
__entry->zio_flags, __entry->zio_stage, __entry->zio_pipeline, \
__entry->zio_orig_flags, __entry->zio_orig_stage, \
- __entry->zio_orig_pipeline, __entry->zio_reexecute, \
+ __entry->zio_orig_pipeline, __entry->zio_post, \
__entry->zio_txg, __entry->zio_error, __entry->zio_ena, \
__entry->zp_checksum, __entry->zp_compress, __entry->zp_type, \
__entry->zp_level, __entry->zp_copies, __entry->zp_dedup, \
diff --git a/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h b/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
index b38847b20462..6a77e40abe10 100644
--- a/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
+++ b/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
@@ -157,6 +157,7 @@ struct znode;
extern int zfs_sync(struct super_block *, int, cred_t *);
extern int zfs_inode_alloc(struct super_block *, struct inode **ip);
+extern void zfs_inode_free(struct inode *);
extern void zfs_inode_destroy(struct inode *);
extern void zfs_mark_inode_dirty(struct inode *);
extern boolean_t zfs_relatime_need_update(const struct inode *);
diff --git a/sys/contrib/openzfs/include/sys/arc_impl.h b/sys/contrib/openzfs/include/sys/arc_impl.h
index 1b30389107c5..b55d5da3378c 100644
--- a/sys/contrib/openzfs/include/sys/arc_impl.h
+++ b/sys/contrib/openzfs/include/sys/arc_impl.h
@@ -954,7 +954,7 @@ typedef struct arc_sums {
wmsum_t arcstat_data_size;
wmsum_t arcstat_metadata_size;
wmsum_t arcstat_dbuf_size;
- wmsum_t arcstat_dnode_size;
+ aggsum_t arcstat_dnode_size;
wmsum_t arcstat_bonus_size;
wmsum_t arcstat_l2_hits;
wmsum_t arcstat_l2_misses;
diff --git a/sys/contrib/openzfs/include/sys/dbuf.h b/sys/contrib/openzfs/include/sys/dbuf.h
index 756459b2fbb5..baf3b1508335 100644
--- a/sys/contrib/openzfs/include/sys/dbuf.h
+++ b/sys/contrib/openzfs/include/sys/dbuf.h
@@ -164,6 +164,7 @@ typedef struct dbuf_dirty_record {
boolean_t dr_nopwrite;
boolean_t dr_brtwrite;
boolean_t dr_diowrite;
+ boolean_t dr_rewrite;
boolean_t dr_has_raw_params;
/* Override and raw params are mutually exclusive. */
diff --git a/sys/contrib/openzfs/include/sys/dmu.h b/sys/contrib/openzfs/include/sys/dmu.h
index 0b2e443a433a..7c2024a16d8f 100644
--- a/sys/contrib/openzfs/include/sys/dmu.h
+++ b/sys/contrib/openzfs/include/sys/dmu.h
@@ -414,6 +414,9 @@ typedef struct dmu_buf {
#define DMU_POOL_ZPOOL_CHECKPOINT "com.delphix:zpool_checkpoint"
#define DMU_POOL_LOG_SPACEMAP_ZAP "com.delphix:log_spacemap_zap"
#define DMU_POOL_DELETED_CLONES "com.delphix:deleted_clones"
+#define DMU_POOL_TXG_LOG_TIME_MINUTES "com.klaraystems:txg_log_time:minutes"
+#define DMU_POOL_TXG_LOG_TIME_DAYS "com.klaraystems:txg_log_time:days"
+#define DMU_POOL_TXG_LOG_TIME_MONTHS "com.klaraystems:txg_log_time:months"
/*
* Allocate an object from this objset. The range of object numbers
@@ -822,6 +825,7 @@ struct blkptr *dmu_buf_get_blkptr(dmu_buf_t *db);
*/
void dmu_buf_will_dirty(dmu_buf_t *db, dmu_tx_t *tx);
void dmu_buf_will_dirty_flags(dmu_buf_t *db, dmu_tx_t *tx, dmu_flags_t flags);
+void dmu_buf_will_rewrite(dmu_buf_t *db, dmu_tx_t *tx);
boolean_t dmu_buf_is_dirty(dmu_buf_t *db, dmu_tx_t *tx);
void dmu_buf_set_crypt_params(dmu_buf_t *db_fake, boolean_t byteorder,
const uint8_t *salt, const uint8_t *iv, const uint8_t *mac, dmu_tx_t *tx);
diff --git a/sys/contrib/openzfs/include/sys/dmu_objset.h b/sys/contrib/openzfs/include/sys/dmu_objset.h
index 288ad30166df..492be29200e4 100644
--- a/sys/contrib/openzfs/include/sys/dmu_objset.h
+++ b/sys/contrib/openzfs/include/sys/dmu_objset.h
@@ -152,7 +152,7 @@ struct objset {
* The largest zpl file block allowed in special class.
* cached here instead of zfsvfs for easier access.
*/
- int os_zpl_special_smallblock;
+ uint64_t os_zpl_special_smallblock;
/*
* Pointer is constant; the blkptr it points to is protected by
diff --git a/sys/contrib/openzfs/include/sys/dmu_traverse.h b/sys/contrib/openzfs/include/sys/dmu_traverse.h
index 3196b2addeee..70cafa4c74f1 100644
--- a/sys/contrib/openzfs/include/sys/dmu_traverse.h
+++ b/sys/contrib/openzfs/include/sys/dmu_traverse.h
@@ -59,6 +59,13 @@ typedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
*/
#define TRAVERSE_NO_DECRYPT (1<<5)
+/*
+ * Always use logical birth time for birth time comparisons. This is useful
+ * for operations that care about user data changes rather than physical
+ * block rewrites (e.g., incremental replication).
+ */
+#define TRAVERSE_LOGICAL (1<<6)
+
/* Special traverse error return value to indicate skipping of children */
#define TRAVERSE_VISIT_NO_CHILDREN -1
diff --git a/sys/contrib/openzfs/include/sys/fs/zfs.h b/sys/contrib/openzfs/include/sys/fs/zfs.h
index c8deb5be419e..fc359c10365a 100644
--- a/sys/contrib/openzfs/include/sys/fs/zfs.h
+++ b/sys/contrib/openzfs/include/sys/fs/zfs.h
@@ -1627,6 +1627,9 @@ typedef struct zfs_rewrite_args {
uint64_t arg;
} zfs_rewrite_args_t;
+/* zfs_rewrite_args flags */
+#define ZFS_REWRITE_PHYSICAL 0x1 /* Preserve logical birth time. */
+
#define ZFS_IOC_REWRITE _IOW(0x83, 3, zfs_rewrite_args_t)
/*
diff --git a/sys/contrib/openzfs/include/sys/metaslab.h b/sys/contrib/openzfs/include/sys/metaslab.h
index 4d57e52e8468..36cbe06bacce 100644
--- a/sys/contrib/openzfs/include/sys/metaslab.h
+++ b/sys/contrib/openzfs/include/sys/metaslab.h
@@ -110,9 +110,10 @@ void metaslab_class_balance(metaslab_class_t *mc, boolean_t onsync);
void metaslab_class_histogram_verify(metaslab_class_t *);
uint64_t metaslab_class_fragmentation(metaslab_class_t *);
uint64_t metaslab_class_expandable_space(metaslab_class_t *);
-boolean_t metaslab_class_throttle_reserve(metaslab_class_t *, int, zio_t *,
- boolean_t, boolean_t *);
-boolean_t metaslab_class_throttle_unreserve(metaslab_class_t *, int, zio_t *);
+boolean_t metaslab_class_throttle_reserve(metaslab_class_t *, int, int,
+ uint64_t, boolean_t, boolean_t *);
+boolean_t metaslab_class_throttle_unreserve(metaslab_class_t *, int, int,
+ uint64_t);
void metaslab_class_evict_old(metaslab_class_t *, uint64_t);
const char *metaslab_class_get_name(metaslab_class_t *);
uint64_t metaslab_class_get_alloc(metaslab_class_t *);
diff --git a/sys/contrib/openzfs/include/sys/metaslab_impl.h b/sys/contrib/openzfs/include/sys/metaslab_impl.h
index 83fbe620fe37..6ce995d0a086 100644
--- a/sys/contrib/openzfs/include/sys/metaslab_impl.h
+++ b/sys/contrib/openzfs/include/sys/metaslab_impl.h
@@ -539,6 +539,8 @@ typedef struct metaslab_unflushed_phys {
uint64_t msp_unflushed_txg;
} metaslab_unflushed_phys_t;
+char *metaslab_rt_name(metaslab_group_t *, metaslab_t *, const char *);
+
#ifdef __cplusplus
}
#endif
diff --git a/sys/contrib/openzfs/include/sys/mod.h b/sys/contrib/openzfs/include/sys/mod.h
deleted file mode 100644
index 4122889ab758..000000000000
--- a/sys/contrib/openzfs/include/sys/mod.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
- * Copyright (C) 2007 The Regents of the University of California.
- * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
- * Written by Brian Behlendorf <behlendorf1@llnl.gov>.
- * UCRL-CODE-235197
- *
- * This file is part of the SPL, Solaris Porting Layer.
- *
- * The SPL is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * The SPL is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with the SPL. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef _SYS_MOD_H
-#define _SYS_MOD_H
-
-#ifdef _KERNEL
-#include <sys/mod_os.h>
-#else
-/*
- * Exported symbols
- */
-#define EXPORT_SYMBOL(x)
-#endif
-
-#endif /* SYS_MOD_H */
diff --git a/sys/contrib/openzfs/include/sys/range_tree.h b/sys/contrib/openzfs/include/sys/range_tree.h
index 23e80f64284b..0f6884682459 100644
--- a/sys/contrib/openzfs/include/sys/range_tree.h
+++ b/sys/contrib/openzfs/include/sys/range_tree.h
@@ -49,6 +49,9 @@ typedef enum zfs_range_seg_type {
ZFS_RANGE_SEG_NUM_TYPES,
} zfs_range_seg_type_t;
+#define ZFS_RT_NAME(rt) (((rt)->rt_name != NULL) ? (rt)->rt_name : "")
+#define ZFS_RT_F_DYN_NAME (1ULL << 0) /* if rt_name must be freed */
+
/*
* Note: the range_tree may not be accessed concurrently; consumers
* must provide external locking if required.
@@ -68,6 +71,9 @@ typedef struct zfs_range_tree {
void *rt_arg;
uint64_t rt_gap; /* allowable inter-segment gap */
+ uint64_t rt_flags;
+ const char *rt_name; /* details for debugging */
+
/*
* The rt_histogram maintains a histogram of ranges. Each bucket,
* rt_histogram[i], contains the number of ranges whose size is:
@@ -281,6 +287,9 @@ zfs_range_tree_t *zfs_range_tree_create_gap(const zfs_range_tree_ops_t *ops,
uint64_t gap);
zfs_range_tree_t *zfs_range_tree_create(const zfs_range_tree_ops_t *ops,
zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift);
+zfs_range_tree_t *zfs_range_tree_create_flags(const zfs_range_tree_ops_t *ops,
+ zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift,
+ uint64_t flags, const char *name);
void zfs_range_tree_destroy(zfs_range_tree_t *rt);
boolean_t zfs_range_tree_contains(zfs_range_tree_t *rt, uint64_t start,
uint64_t size);
diff --git a/sys/contrib/openzfs/include/sys/spa.h b/sys/contrib/openzfs/include/sys/spa.h
index a3e36c1f59ae..db6de332ae67 100644
--- a/sys/contrib/openzfs/include/sys/spa.h
+++ b/sys/contrib/openzfs/include/sys/spa.h
@@ -140,7 +140,7 @@ typedef struct zio_cksum_salt {
* +-------+-------+-------+-------+-------+-------+-------+-------+
* 6 |BDX|lvl| type | cksum |E| comp| PSIZE | LSIZE |
* +-------+-------+-------+-------+-------+-------+-------+-------+
- * 7 | padding |
+ * 7 |R| padding |
* +-------+-------+-------+-------+-------+-------+-------+-------+
* 8 | padding |
* +-------+-------+-------+-------+-------+-------+-------+-------+
@@ -175,6 +175,7 @@ typedef struct zio_cksum_salt {
* E blkptr_t contains embedded data (see below)
* lvl level of indirection
* type DMU object type
+ * R rewrite (reallocated/rewritten at phys birth TXG)
* phys birth txg when dva[0] was written; zero if same as logical birth txg
* note that typically all the dva's would be written in this
* txg, but they could be different if they were moved by
@@ -190,11 +191,11 @@ typedef struct zio_cksum_salt {
*
* 64 56 48 40 32 24 16 8 0
* +-------+-------+-------+-------+-------+-------+-------+-------+
- * 0 | vdev1 | pad | ASIZE |
+ * 0 | pad | vdev1 | pad | ASIZE |
* +-------+-------+-------+-------+-------+-------+-------+-------+
* 1 |G| offset1 |
* +-------+-------+-------+-------+-------+-------+-------+-------+
- * 2 | vdev2 | pad | ASIZE |
+ * 2 | pad | vdev2 | pad | ASIZE |
* +-------+-------+-------+-------+-------+-------+-------+-------+
* 3 |G| offset2 |
* +-------+-------+-------+-------+-------+-------+-------+-------+
@@ -204,7 +205,7 @@ typedef struct zio_cksum_salt {
* +-------+-------+-------+-------+-------+-------+-------+-------+
* 6 |BDX|lvl| type | cksum |E| comp| PSIZE | LSIZE |
* +-------+-------+-------+-------+-------+-------+-------+-------+
- * 7 | padding |
+ * 7 |R| padding |
* +-------+-------+-------+-------+-------+-------+-------+-------+
* 8 | padding |
* +-------+-------+-------+-------+-------+-------+-------+-------+
@@ -373,7 +374,8 @@ typedef enum bp_embedded_type {
typedef struct blkptr {
dva_t blk_dva[SPA_DVAS_PER_BP]; /* Data Virtual Addresses */
uint64_t blk_prop; /* size, compression, type, etc */
- uint64_t blk_pad[2]; /* Extra space for the future */
+ uint64_t blk_prop2; /* additional properties */
+ uint64_t blk_pad; /* Extra space for the future */
uint64_t blk_birth_word[2];
uint64_t blk_fill; /* fill count */
zio_cksum_t blk_cksum; /* 256-bit checksum */
@@ -476,32 +478,51 @@ typedef struct blkptr {
#define BP_GET_FREE(bp) BF64_GET((bp)->blk_fill, 0, 1)
#define BP_SET_FREE(bp, x) BF64_SET((bp)->blk_fill, 0, 1, x)
+/*
+ * Block birth time macros for different use cases:
+ * - BP_GET_LOGICAL_BIRTH(): When the block was logically modified by user.
+ * To be used with a focus on user data, like incremental replication.
+ * - BP_GET_PHYSICAL_BIRTH(): When the block was physically written to disks.
+ * For regular writes is equal to logical birth. For dedup and block cloning
+ * can be smaller than logical birth. For remapped and rewritten blocks can
+ * be bigger. To be used with focus on physical disk content: ARC, DDT, scrub.
+ * - BP_GET_RAW_PHYSICAL_BIRTH(): Raw physical birth value. Zero if equal
+ * to logical birth. Should only be used for BP copying and debugging.
+ * - BP_GET_BIRTH(): When the block was allocated, which is a physical birth
+ * for rewritten blocks (rewrite flag set) or logical birth otherwise.
+ */
#define BP_GET_LOGICAL_BIRTH(bp) (bp)->blk_birth_word[1]
#define BP_SET_LOGICAL_BIRTH(bp, x) ((bp)->blk_birth_word[1] = (x))
-#define BP_GET_PHYSICAL_BIRTH(bp) (bp)->blk_birth_word[0]
+#define BP_GET_RAW_PHYSICAL_BIRTH(bp) (bp)->blk_birth_word[0]
#define BP_SET_PHYSICAL_BIRTH(bp, x) ((bp)->blk_birth_word[0] = (x))
-#define BP_GET_BIRTH(bp) \
- (BP_IS_EMBEDDED(bp) ? 0 : \
- BP_GET_PHYSICAL_BIRTH(bp) ? BP_GET_PHYSICAL_BIRTH(bp) : \
+#define BP_GET_PHYSICAL_BIRTH(bp) \
+ (BP_IS_EMBEDDED(bp) ? 0 : \
+ BP_GET_RAW_PHYSICAL_BIRTH(bp) ? BP_GET_RAW_PHYSICAL_BIRTH(bp) : \
BP_GET_LOGICAL_BIRTH(bp))
-#define BP_SET_BIRTH(bp, logical, physical) \
-{ \
- ASSERT(!BP_IS_EMBEDDED(bp)); \
- BP_SET_LOGICAL_BIRTH(bp, logical); \
- BP_SET_PHYSICAL_BIRTH(bp, \
- ((logical) == (physical) ? 0 : (physical))); \
+#define BP_GET_BIRTH(bp) \
+ ((BP_IS_EMBEDDED(bp) || !BP_GET_REWRITE(bp)) ? \
+ BP_GET_LOGICAL_BIRTH(bp) : BP_GET_PHYSICAL_BIRTH(bp))
+
+#define BP_SET_BIRTH(bp, logical, physical) \
+{ \
+ ASSERT(!BP_IS_EMBEDDED(bp)); \
+ BP_SET_LOGICAL_BIRTH(bp, logical); \
+ BP_SET_PHYSICAL_BIRTH(bp, \
+ ((logical) == (physical) ? 0 : (physical))); \
}
#define BP_GET_FILL(bp) \
- ((BP_IS_ENCRYPTED(bp)) ? BF64_GET((bp)->blk_fill, 0, 32) : \
- ((BP_IS_EMBEDDED(bp)) ? 1 : (bp)->blk_fill))
+ (BP_IS_EMBEDDED(bp) ? 1 : \
+ BP_IS_ENCRYPTED(bp) ? BF64_GET((bp)->blk_fill, 0, 32) : \
+ (bp)->blk_fill)
#define BP_SET_FILL(bp, fill) \
{ \
- if (BP_IS_ENCRYPTED(bp)) \
+ ASSERT(!BP_IS_EMBEDDED(bp)); \
+ if (BP_IS_ENCRYPTED(bp)) \
BF64_SET((bp)->blk_fill, 0, 32, fill); \
else \
(bp)->blk_fill = fill; \
@@ -516,6 +537,15 @@ typedef struct blkptr {
BF64_SET((bp)->blk_fill, 32, 32, iv2); \
}
+#define BP_GET_REWRITE(bp) \
+ (BP_IS_EMBEDDED(bp) ? 0 : BF64_GET((bp)->blk_prop2, 63, 1))
+
+#define BP_SET_REWRITE(bp, x) \
+{ \
+ ASSERT(!BP_IS_EMBEDDED(bp)); \
+ BF64_SET((bp)->blk_prop2, 63, 1, x); \
+}
+
#define BP_IS_METADATA(bp) \
(BP_GET_LEVEL(bp) > 0 || DMU_OT_IS_METADATA(BP_GET_TYPE(bp)))
@@ -545,7 +575,7 @@ typedef struct blkptr {
(dva1)->dva_word[0] == (dva2)->dva_word[0])
#define BP_EQUAL(bp1, bp2) \
- (BP_GET_BIRTH(bp1) == BP_GET_BIRTH(bp2) && \
+ (BP_GET_PHYSICAL_BIRTH(bp1) == BP_GET_PHYSICAL_BIRTH(bp2) && \
BP_GET_LOGICAL_BIRTH(bp1) == BP_GET_LOGICAL_BIRTH(bp2) && \
DVA_EQUAL(&(bp1)->blk_dva[0], &(bp2)->blk_dva[0]) && \
DVA_EQUAL(&(bp1)->blk_dva[1], &(bp2)->blk_dva[1]) && \
@@ -588,8 +618,8 @@ typedef struct blkptr {
{ \
BP_ZERO_DVAS(bp); \
(bp)->blk_prop = 0; \
- (bp)->blk_pad[0] = 0; \
- (bp)->blk_pad[1] = 0; \
+ (bp)->blk_prop2 = 0; \
+ (bp)->blk_pad = 0; \
(bp)->blk_birth_word[0] = 0; \
(bp)->blk_birth_word[1] = 0; \
(bp)->blk_fill = 0; \
@@ -696,7 +726,7 @@ typedef struct blkptr {
(u_longlong_t)BP_GET_LSIZE(bp), \
(u_longlong_t)BP_GET_PSIZE(bp), \
(u_longlong_t)BP_GET_LOGICAL_BIRTH(bp), \
- (u_longlong_t)BP_GET_BIRTH(bp), \
+ (u_longlong_t)BP_GET_PHYSICAL_BIRTH(bp), \
(u_longlong_t)BP_GET_FILL(bp), \
ws, \
(u_longlong_t)bp->blk_cksum.zc_word[0], \
@@ -1065,6 +1095,7 @@ extern metaslab_class_t *spa_normal_class(spa_t *spa);
extern metaslab_class_t *spa_log_class(spa_t *spa);
extern metaslab_class_t *spa_embedded_log_class(spa_t *spa);
extern metaslab_class_t *spa_special_class(spa_t *spa);
+extern metaslab_class_t *spa_special_embedded_log_class(spa_t *spa);
extern metaslab_class_t *spa_dedup_class(spa_t *spa);
extern metaslab_class_t *spa_preferred_class(spa_t *spa, const zio_t *zio);
extern boolean_t spa_special_has_ddt(spa_t *spa);
diff --git a/sys/contrib/openzfs/include/sys/spa_impl.h b/sys/contrib/openzfs/include/sys/spa_impl.h
index 8c52f751a819..07a959db3447 100644
--- a/sys/contrib/openzfs/include/sys/spa_impl.h
+++ b/sys/contrib/openzfs/include/sys/spa_impl.h
@@ -55,6 +55,8 @@
#include <sys/dsl_deadlist.h>
#include <zfeature_common.h>
+#include "zfs_crrd.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -246,6 +248,7 @@ struct spa {
metaslab_class_t *spa_log_class; /* intent log data class */
metaslab_class_t *spa_embedded_log_class; /* log on normal vdevs */
metaslab_class_t *spa_special_class; /* special allocation class */
+ metaslab_class_t *spa_special_embedded_log_class; /* log on special */
metaslab_class_t *spa_dedup_class; /* dedup allocation class */
uint64_t spa_first_txg; /* first txg after spa_open() */
uint64_t spa_final_txg; /* txg of export/destroy */
@@ -343,6 +346,12 @@ struct spa {
spa_checkpoint_info_t spa_checkpoint_info; /* checkpoint accounting */
zthr_t *spa_checkpoint_discard_zthr;
+ kmutex_t spa_txg_log_time_lock; /* for spa_txg_log_time */
+ dbrrd_t spa_txg_log_time;
+ uint64_t spa_last_noted_txg;
+ uint64_t spa_last_noted_txg_time;
+ uint64_t spa_last_flush_txg_time;
+
space_map_t *spa_syncing_log_sm; /* current log space map */
avl_tree_t spa_sm_logs_by_txg;
kmutex_t spa_flushed_ms_lock; /* for metaslabs_by_flushed */
diff --git a/sys/contrib/openzfs/include/sys/vdev.h b/sys/contrib/openzfs/include/sys/vdev.h
index 7f457c3a0b76..510474d6c085 100644
--- a/sys/contrib/openzfs/include/sys/vdev.h
+++ b/sys/contrib/openzfs/include/sys/vdev.h
@@ -139,6 +139,7 @@ extern uint64_t vdev_asize_to_psize_txg(vdev_t *vd, uint64_t asize,
extern uint64_t vdev_psize_to_asize_txg(vdev_t *vd, uint64_t psize,
uint64_t txg);
extern uint64_t vdev_psize_to_asize(vdev_t *vd, uint64_t psize);
+extern uint64_t vdev_get_min_alloc(vdev_t *vd);
/*
* Return the amount of space allocated for a gang block header. Note that
@@ -148,7 +149,20 @@ extern uint64_t vdev_psize_to_asize(vdev_t *vd, uint64_t psize);
static inline uint64_t
vdev_gang_header_asize(vdev_t *vd)
{
- return (vdev_psize_to_asize_txg(vd, SPA_GANGBLOCKSIZE, 0));
+ return (vdev_psize_to_asize_txg(vd, SPA_OLD_GANGBLOCKSIZE, 0));
+}
+
+/*
+ * Return the amount of data that can be stored in a gang header. Because we
+ * need to ensure gang headers can always be allocated (as long as there is
+ * space available), this is the minimum allocatable size on the vdev. Note that
+ * since the physical birth txg is not provided, this must be constant for
+ * a given vdev. (e.g. raidz expansion can't change this)
+ */
+static inline uint64_t
+vdev_gang_header_psize(vdev_t *vd)
+{
+ return (vdev_get_min_alloc(vd));
}
extern int vdev_fault(spa_t *spa, uint64_t guid, vdev_aux_t aux);
diff --git a/sys/contrib/openzfs/include/sys/vdev_impl.h b/sys/contrib/openzfs/include/sys/vdev_impl.h
index 385d7224f2c5..4ab472bd6742 100644
--- a/sys/contrib/openzfs/include/sys/vdev_impl.h
+++ b/sys/contrib/openzfs/include/sys/vdev_impl.h
@@ -621,7 +621,6 @@ extern uint64_t vdev_default_asize(vdev_t *vd, uint64_t psize, uint64_t txg);
extern uint64_t vdev_default_min_asize(vdev_t *vd);
extern uint64_t vdev_get_min_asize(vdev_t *vd);
extern void vdev_set_min_asize(vdev_t *vd);
-extern uint64_t vdev_get_min_alloc(vdev_t *vd);
extern uint64_t vdev_get_nparity(vdev_t *vd);
extern uint64_t vdev_get_ndisks(vdev_t *vd);
@@ -645,10 +644,11 @@ extern int vdev_obsolete_counts_are_precise(vdev_t *vd, boolean_t *are_precise);
int vdev_checkpoint_sm_object(vdev_t *vd, uint64_t *sm_obj);
void vdev_metaslab_group_create(vdev_t *vd);
uint64_t vdev_best_ashift(uint64_t logical, uint64_t a, uint64_t b);
-#if defined(__linux__)
+#if defined(__linux__) && defined(_KERNEL)
int param_get_raidz_impl(char *buf, zfs_kernel_param_t *kp);
#endif
int param_set_raidz_impl(ZFS_MODULE_PARAM_ARGS);
+char *vdev_rt_name(vdev_t *vd, const char *name);
/*
* Vdev ashift optimization tunables
diff --git a/sys/contrib/openzfs/include/sys/xvattr.h b/sys/contrib/openzfs/include/sys/xvattr.h
index 447842d269b3..5dadbdb4c619 100644
--- a/sys/contrib/openzfs/include/sys/xvattr.h
+++ b/sys/contrib/openzfs/include/sys/xvattr.h
@@ -311,6 +311,7 @@ xva_getxoptattr(xvattr_t *xvap)
*/
#define V_ACE_MASK 0x1 /* mask represents NFSv4 ACE permissions */
#define V_APPEND 0x2 /* want to do append only check */
+#define V_NAMEDATTR 0x4 /* is a named attribute check */
/*
* Structure used on VOP_GETSECATTR and VOP_SETSECATTR operations
diff --git a/sys/contrib/openzfs/include/sys/zfs_context.h b/sys/contrib/openzfs/include/sys/zfs_context.h
index 256c9c2cc2d3..7112d3ef5c99 100644
--- a/sys/contrib/openzfs/include/sys/zfs_context.h
+++ b/sys/contrib/openzfs/include/sys/zfs_context.h
@@ -205,18 +205,6 @@ extern void vpanic(const char *, va_list)
#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i)
/*
- * Tunables.
- */
-typedef struct zfs_kernel_param {
- const char *name; /* unused stub */
-} zfs_kernel_param_t;
-
-#define ZFS_MODULE_PARAM(scope_prefix, name_prefix, name, type, perm, desc)
-#define ZFS_MODULE_PARAM_ARGS void
-#define ZFS_MODULE_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, \
- getfunc, perm, desc)
-
-/*
* Threads.
*/
typedef pthread_t kthread_t;
@@ -236,6 +224,11 @@ typedef pthread_t kthread_t;
#define thread_join(t) pthread_join((pthread_t)(t), NULL)
#define newproc(f, a, cid, pri, ctp, pid) (ENOSYS)
+/*
+ * Check if the current thread is a memory reclaim thread.
+ * Always returns false in userspace (no memory reclaim thread).
+ */
+#define current_is_reclaim_thread() (0)
/* in libzpool, p0 exists only to have its address taken */
typedef struct proc {
@@ -673,7 +666,7 @@ extern void random_fini(void);
struct spa;
extern void show_pool_stats(struct spa *);
-extern int set_global_var(char const *arg);
+extern int handle_tunable_option(const char *, boolean_t);
typedef struct callb_cpr {
kmutex_t *cc_lockp;
@@ -778,7 +771,6 @@ typedef int fstrans_cookie_t;
extern fstrans_cookie_t spl_fstrans_mark(void);
extern void spl_fstrans_unmark(fstrans_cookie_t);
-extern int __spl_pf_fstrans_check(void);
extern int kmem_cache_reap_active(void);
diff --git a/sys/contrib/openzfs/include/sys/zfs_znode.h b/sys/contrib/openzfs/include/sys/zfs_znode.h
index 2fedaff78534..ba577b80c98f 100644
--- a/sys/contrib/openzfs/include/sys/zfs_znode.h
+++ b/sys/contrib/openzfs/include/sys/zfs_znode.h
@@ -202,8 +202,6 @@ typedef struct znode {
uint64_t z_size; /* file size (cached) */
uint64_t z_pflags; /* pflags (cached) */
uint32_t z_sync_cnt; /* synchronous open count */
- uint32_t z_sync_writes_cnt; /* synchronous write count */
- uint32_t z_async_writes_cnt; /* asynchronous write count */
mode_t z_mode; /* mode (cached) */
kmutex_t z_acl_lock; /* acl data lock */
zfs_acl_t *z_acl_cached; /* cached acl */
diff --git a/sys/contrib/openzfs/include/sys/zil.h b/sys/contrib/openzfs/include/sys/zil.h
index fa7945d8ab8b..9d1fb47e2dfc 100644
--- a/sys/contrib/openzfs/include/sys/zil.h
+++ b/sys/contrib/openzfs/include/sys/zil.h
@@ -635,6 +635,8 @@ extern void zil_set_logbias(zilog_t *zilog, uint64_t slogval);
extern uint64_t zil_max_copied_data(zilog_t *zilog);
extern uint64_t zil_max_log_data(zilog_t *zilog, size_t hdrsize);
+extern itx_wr_state_t zil_write_state(zilog_t *zilog, uint64_t size,
+ uint32_t blocksize, boolean_t o_direct, boolean_t commit);
extern void zil_sums_init(zil_sums_t *zs);
extern void zil_sums_fini(zil_sums_t *zs);
@@ -642,6 +644,8 @@ extern void zil_kstat_values_update(zil_kstat_values_t *zs,
zil_sums_t *zil_sums);
extern int zil_replay_disable;
+extern uint_t zfs_immediate_write_sz;
+extern int zil_special_is_slog;
#ifdef __cplusplus
}
diff --git a/sys/contrib/openzfs/include/sys/zio.h b/sys/contrib/openzfs/include/sys/zio.h
index d91a4eb1e998..a3368034695b 100644
--- a/sys/contrib/openzfs/include/sys/zio.h
+++ b/sys/contrib/openzfs/include/sys/zio.h
@@ -59,21 +59,36 @@ typedef struct zio_eck {
/*
* Gang block headers are self-checksumming and contain an array
- * of block pointers.
+ * of block pointers. The old gang block size has enough room for 3 blkptrs,
+ * while new gang blocks can store more.
+ *
+ * Layout:
+ * +--------+--------+--------+-----+---------+-----------+
+ * | | | | | | |
+ * | blkptr | blkptr | blkptr | ... | padding | zio_eck_t |
+ * | 1 | 2 | 3 | | | |
+ * +--------+--------+--------+-----+---------+-----------+
+ * 128B 128B 128B 88B 40B
*/
-#define SPA_GANGBLOCKSIZE SPA_MINBLOCKSIZE
-#define SPA_GBH_NBLKPTRS ((SPA_GANGBLOCKSIZE - \
- sizeof (zio_eck_t)) / sizeof (blkptr_t))
-#define SPA_GBH_FILLER ((SPA_GANGBLOCKSIZE - \
- sizeof (zio_eck_t) - \
- (SPA_GBH_NBLKPTRS * sizeof (blkptr_t))) /\
- sizeof (uint64_t))
-
-typedef struct zio_gbh {
- blkptr_t zg_blkptr[SPA_GBH_NBLKPTRS];
- uint64_t zg_filler[SPA_GBH_FILLER];
- zio_eck_t zg_tail;
-} zio_gbh_phys_t;
+#define SPA_OLD_GANGBLOCKSIZE SPA_MINBLOCKSIZE
+typedef void zio_gbh_phys_t;
+
+static inline uint64_t
+gbh_nblkptrs(uint64_t size) {
+ ASSERT(IS_P2ALIGNED(size, sizeof (blkptr_t)));
+ return ((size - sizeof (zio_eck_t)) / sizeof (blkptr_t));
+}
+
+static inline zio_eck_t *
+gbh_eck(zio_gbh_phys_t *gbh, uint64_t size) {
+ ASSERT(IS_P2ALIGNED(size, sizeof (blkptr_t)));
+ return ((zio_eck_t *)((uintptr_t)gbh + size - sizeof (zio_eck_t)));
+}
+
+static inline blkptr_t *
+gbh_bp(zio_gbh_phys_t *gbh, int bp) {
+ return (&((blkptr_t *)gbh)[bp]);
+}
enum zio_checksum {
ZIO_CHECKSUM_INHERIT = 0,
@@ -196,7 +211,7 @@ typedef uint64_t zio_flag_t;
#define ZIO_FLAG_DONT_RETRY (1ULL << 10)
#define ZIO_FLAG_NODATA (1ULL << 12)
#define ZIO_FLAG_INDUCE_DAMAGE (1ULL << 13)
-#define ZIO_FLAG_IO_ALLOCATING (1ULL << 14)
+#define ZIO_FLAG_ALLOC_THROTTLED (1ULL << 14)
#define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1)
#define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1)
@@ -226,8 +241,7 @@ typedef uint64_t zio_flag_t;
#define ZIO_FLAG_NOPWRITE (1ULL << 29)
#define ZIO_FLAG_REEXECUTED (1ULL << 30)
#define ZIO_FLAG_DELEGATED (1ULL << 31)
-#define ZIO_FLAG_DIO_CHKSUM_ERR (1ULL << 32)
-#define ZIO_FLAG_PREALLOCATED (1ULL << 33)
+#define ZIO_FLAG_PREALLOCATED (1ULL << 32)
#define ZIO_ALLOCATOR_NONE (-1)
#define ZIO_HAS_ALLOCATOR(zio) ((zio)->io_allocator != ZIO_ALLOCATOR_NONE)
@@ -360,6 +374,7 @@ typedef struct zio_prop {
boolean_t zp_encrypt;
boolean_t zp_byteorder;
boolean_t zp_direct_write;
+ boolean_t zp_rewrite;
uint8_t zp_salt[ZIO_DATA_SALT_LEN];
uint8_t zp_iv[ZIO_DATA_IV_LEN];
uint8_t zp_mac[ZIO_DATA_MAC_LEN];
@@ -399,7 +414,9 @@ typedef struct zio_vsd_ops {
typedef struct zio_gang_node {
zio_gbh_phys_t *gn_gbh;
- struct zio_gang_node *gn_child[SPA_GBH_NBLKPTRS];
+ uint64_t gn_gangblocksize;
+ uint64_t gn_allocsize;
+ struct zio_gang_node *gn_child[];
} zio_gang_node_t;
typedef zio_t *zio_gang_issue_func_t(zio_t *zio, blkptr_t *bp,
@@ -418,14 +435,16 @@ typedef struct zio_transform {
typedef zio_t *zio_pipe_stage_t(zio_t *zio);
/*
- * The io_reexecute flags are distinct from io_flags because the child must
- * be able to propagate them to the parent. The normal io_flags are local
- * to the zio, not protected by any lock, and not modifiable by children;
- * the reexecute flags are protected by io_lock, modifiable by children,
- * and always propagated -- even when ZIO_FLAG_DONT_PROPAGATE is set.
+ * The io_post flags describe additional actions that a parent IO should
+ * consider or perform on behalf of a child. They are distinct from io_flags
+ * because the child must be able to propagate them to the parent. The normal
+ * io_flags are local to the zio, not protected by any lock, and not modifiable
+ * by children; the reexecute flags are protected by io_lock, modifiable by
+ * children, and always propagated -- even when ZIO_FLAG_DONT_PROPAGATE is set.
*/
-#define ZIO_REEXECUTE_NOW 0x01
-#define ZIO_REEXECUTE_SUSPEND 0x02
+#define ZIO_POST_REEXECUTE (1 << 0)
+#define ZIO_POST_SUSPEND (1 << 1)
+#define ZIO_POST_DIO_CHKSUM_ERR (1 << 2)
/*
* The io_trim flags are used to specify the type of TRIM to perform. They
@@ -461,7 +480,7 @@ struct zio {
enum zio_child io_child_type;
enum trim_flag io_trim_flags;
zio_priority_t io_priority;
- uint8_t io_reexecute;
+ uint8_t io_post;
uint8_t io_state[ZIO_WAIT_TYPES];
uint64_t io_txg;
spa_t *io_spa;
diff --git a/sys/contrib/openzfs/include/sys/zvol.h b/sys/contrib/openzfs/include/sys/zvol.h
index 32e703650935..cdc9dba2a28d 100644
--- a/sys/contrib/openzfs/include/sys/zvol.h
+++ b/sys/contrib/openzfs/include/sys/zvol.h
@@ -36,8 +36,7 @@
#define SPEC_MAXOFFSET_T ((1LL << ((NBBY * sizeof (daddr32_t)) + \
DEV_BSHIFT - 1)) - 1)
-extern void zvol_create_minor(const char *);
-extern void zvol_create_minors_recursive(const char *);
+extern void zvol_create_minors(const char *);
extern void zvol_remove_minors(spa_t *, const char *, boolean_t);
extern void zvol_rename_minors(spa_t *, const char *, const char *, boolean_t);
diff --git a/sys/contrib/openzfs/include/sys/zvol_impl.h b/sys/contrib/openzfs/include/sys/zvol_impl.h
index 038d4cb48f97..f3dd9f26f23c 100644
--- a/sys/contrib/openzfs/include/sys/zvol_impl.h
+++ b/sys/contrib/openzfs/include/sys/zvol_impl.h
@@ -108,7 +108,6 @@ zvol_state_t *zvol_find_by_name_hash(const char *name,
uint64_t hash, int mode);
int zvol_first_open(zvol_state_t *zv, boolean_t readonly);
uint64_t zvol_name_hash(const char *name);
-void zvol_remove_minors_impl(const char *name);
void zvol_last_close(zvol_state_t *zv);
void zvol_insert(zvol_state_t *zv);
void zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off,
@@ -132,7 +131,7 @@ void zv_request_task_free(zv_request_task_t *task);
* platform dependent functions exported to platform independent code
*/
void zvol_os_free(zvol_state_t *zv);
-void zvol_os_rename_minor(zvol_state_t *zv, const char *newname);
+int zvol_os_rename_minor(zvol_state_t *zv, const char *newname);
int zvol_os_create_minor(const char *name);
int zvol_os_update_volsize(zvol_state_t *zv, uint64_t volsize);
boolean_t zvol_os_is_zvol(const char *path);
diff --git a/sys/contrib/openzfs/include/zfeature_common.h b/sys/contrib/openzfs/include/zfeature_common.h
index 85537c1ae96e..56382ca85b55 100644
--- a/sys/contrib/openzfs/include/zfeature_common.h
+++ b/sys/contrib/openzfs/include/zfeature_common.h
@@ -87,6 +87,9 @@ typedef enum spa_feature {
SPA_FEATURE_FAST_DEDUP,
SPA_FEATURE_LONGNAME,
SPA_FEATURE_LARGE_MICROZAP,
+ SPA_FEATURE_DYNAMIC_GANG_HEADER,
+ SPA_FEATURE_BLOCK_CLONING_ENDIAN,
+ SPA_FEATURE_PHYSICAL_REWRITE,
SPA_FEATURES
} spa_feature_t;
@@ -103,7 +106,15 @@ typedef enum zfeature_flags {
/* Activate this feature at the same time it is enabled. */
ZFEATURE_FLAG_ACTIVATE_ON_ENABLE = (1 << 2),
/* Each dataset has a field set if it has ever used this feature. */
- ZFEATURE_FLAG_PER_DATASET = (1 << 3)
+ ZFEATURE_FLAG_PER_DATASET = (1 << 3),
+ /*
+ * This feature isn't enabled by zpool upgrade; it must be explicitly
+ * listed to be enabled. It will also be applied if listed in an
+ * explicitly provided compatibility list. This flag can be removed
+ * from a given feature once support is sufficiently widespread, or
+ * worries about backwards compatibility are no longer relevant.
+ */
+ ZFEATURE_FLAG_NO_UPGRADE = (1 << 4)
} zfeature_flags_t;
typedef enum zfeature_type {
diff --git a/sys/contrib/openzfs/include/zfs_crrd.h b/sys/contrib/openzfs/include/zfs_crrd.h
new file mode 100644
index 000000000000..ba192a2062ea
--- /dev/null
+++ b/sys/contrib/openzfs/include/zfs_crrd.h
@@ -0,0 +1,75 @@
+// SPDX-License-Identifier: CDDL-1.0
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or https://opensource.org/licenses/CDDL-1.0.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 2024 Klara Inc.
+ *
+ * This software was developed by
+ * Mariusz Zaborski <mariusz.zaborski@klarasystems.com>
+ * Fred Weigel <fred.weigel@klarasystems.com>
+ * under sponsorship from Wasabi Technology, Inc. and Klara Inc.
+ */
+
+#ifndef _CRRD_H_
+#define _CRRD_H_
+
+#define RRD_MAX_ENTRIES 256
+
+#define RRD_ENTRY_SIZE sizeof (uint64_t)
+#define RRD_STRUCT_ELEM (sizeof (rrd_t) / RRD_ENTRY_SIZE)
+
+typedef enum {
+ DBRRD_FLOOR,
+ DBRRD_CEILING
+} dbrrd_rounding_t;
+
+typedef struct {
+ uint64_t rrdd_time;
+ uint64_t rrdd_txg;
+} rrd_data_t;
+
+typedef struct {
+ uint64_t rrd_head; /* head (beginning) */
+ uint64_t rrd_tail; /* tail (end) */
+ uint64_t rrd_length;
+
+ rrd_data_t rrd_entries[RRD_MAX_ENTRIES];
+} rrd_t;
+
+typedef struct {
+ rrd_t dbr_minutes;
+ rrd_t dbr_days;
+ rrd_t dbr_months;
+} dbrrd_t;
+
+size_t rrd_len(rrd_t *rrd);
+
+const rrd_data_t *rrd_entry(rrd_t *r, size_t i);
+rrd_data_t *rrd_tail_entry(rrd_t *rrd);
+uint64_t rrd_tail(rrd_t *rrd);
+uint64_t rrd_get(rrd_t *rrd, size_t i);
+
+void rrd_add(rrd_t *rrd, hrtime_t time, uint64_t txg);
+
+void dbrrd_add(dbrrd_t *db, hrtime_t time, uint64_t txg);
+uint64_t dbrrd_query(dbrrd_t *r, hrtime_t tv, dbrrd_rounding_t rouding);
+
+#endif
diff --git a/sys/contrib/openzfs/lib/libspl/Makefile.am b/sys/contrib/openzfs/lib/libspl/Makefile.am
index f8943572bf29..6640ecd582a7 100644
--- a/sys/contrib/openzfs/lib/libspl/Makefile.am
+++ b/sys/contrib/openzfs/lib/libspl/Makefile.am
@@ -20,6 +20,7 @@ libspl_la_SOURCES = \
%D%/strlcat.c \
%D%/strlcpy.c \
%D%/timestamp.c \
+ %D%/tunables.c \
%D%/include/sys/list.h \
%D%/include/sys/list_impl.h
diff --git a/sys/contrib/openzfs/lib/libspl/include/Makefile.am b/sys/contrib/openzfs/lib/libspl/include/Makefile.am
index 8c286142f298..21f0c70db9e7 100644
--- a/sys/contrib/openzfs/lib/libspl/include/Makefile.am
+++ b/sys/contrib/openzfs/lib/libspl/include/Makefile.am
@@ -45,6 +45,7 @@ libspl_sys_HEADERS = \
%D%/sys/list_impl.h \
%D%/sys/mhd.h \
%D%/sys/mkdev.h \
+ %D%/sys/mod.h \
%D%/sys/policy.h \
%D%/sys/poll.h \
%D%/sys/priv.h \
@@ -58,6 +59,7 @@ libspl_sys_HEADERS = \
%D%/sys/time.h \
%D%/sys/trace_spl.h \
%D%/sys/trace_zfs.h \
+ %D%/sys/tunables.h \
%D%/sys/types.h \
%D%/sys/types32.h \
%D%/sys/uio.h \
diff --git a/sys/contrib/openzfs/lib/libspl/include/os/linux/sys/stat.h b/sys/contrib/openzfs/lib/libspl/include/os/linux/sys/stat.h
index 488554f4e844..a605af962a6d 100644
--- a/sys/contrib/openzfs/lib/libspl/include/os/linux/sys/stat.h
+++ b/sys/contrib/openzfs/lib/libspl/include/os/linux/sys/stat.h
@@ -31,6 +31,11 @@
#include <sys/mount.h> /* for BLKGETSIZE64 */
+#ifdef HAVE_STATX
+#include <fcntl.h>
+#include <linux/stat.h>
+#endif
+
/*
* Emulate Solaris' behavior of returning the block device size in fstat64().
*/
diff --git a/sys/contrib/openzfs/lib/libspl/include/sys/mod.h b/sys/contrib/openzfs/lib/libspl/include/sys/mod.h
new file mode 100644
index 000000000000..ad19b6607a42
--- /dev/null
+++ b/sys/contrib/openzfs/lib/libspl/include/sys/mod.h
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: CDDL-1.0
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or https://opensource.org/licenses/CDDL-1.0.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2012, 2018 by Delphix. All rights reserved.
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2025, Rob Norris <robn@despairlabs.com>
+ */
+
+#ifndef _SYS_MOD_H
+#define _SYS_MOD_H
+
+#include <sys/tunables.h>
+
+#define ZFS_MODULE_PARAM(scope, prefix, name, type, perm, desc) \
+ static const zfs_tunable_t _zfs_tunable_##prefix##name = { \
+ .zt_name = #prefix#name, \
+ .zt_varp = &prefix##name, \
+ .zt_varsz = sizeof (prefix##name), \
+ .zt_type = ZFS_TUNABLE_TYPE_##type, \
+ .zt_perm = ZFS_TUNABLE_PERM_##perm, \
+ .zt_desc = desc \
+ }; \
+ static const zfs_tunable_t * \
+ __zfs_tunable_##prefix##name \
+ __attribute__((__section__("zfs_tunables"))) \
+ __attribute__((__used__)) \
+ = &_zfs_tunable_##prefix##name;
+
+#define ZFS_MODULE_PARAM_ARGS void
+#define ZFS_MODULE_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, \
+ getfunc, perm, desc)
+
+#define EXPORT_SYMBOL(x)
+
+#endif
diff --git a/sys/contrib/openzfs/lib/libspl/include/sys/tunables.h b/sys/contrib/openzfs/lib/libspl/include/sys/tunables.h
new file mode 100644
index 000000000000..5d9bb3d71a4a
--- /dev/null
+++ b/sys/contrib/openzfs/lib/libspl/include/sys/tunables.h
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: CDDL-1.0
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or https://opensource.org/licenses/CDDL-1.0.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2025, Rob Norris <robn@despairlabs.com>
+ */
+
+#ifndef _SYS_TUNABLES_H
+#define _SYS_TUNABLES_H
+
+typedef enum {
+ ZFS_TUNABLE_TYPE_INT,
+ ZFS_TUNABLE_TYPE_UINT,
+ ZFS_TUNABLE_TYPE_ULONG,
+ ZFS_TUNABLE_TYPE_U64,
+ ZFS_TUNABLE_TYPE_STRING,
+} zfs_tunable_type_t;
+
+typedef enum {
+ ZFS_TUNABLE_PERM_ZMOD_RW,
+ ZFS_TUNABLE_PERM_ZMOD_RD,
+} zfs_tunable_perm_t;
+
+typedef struct zfs_tunable {
+ const char *zt_name;
+ void *zt_varp;
+ size_t zt_varsz;
+ zfs_tunable_type_t zt_type;
+ zfs_tunable_perm_t zt_perm;
+ const char *zt_desc;
+} zfs_tunable_t;
+
+int zfs_tunable_set(const zfs_tunable_t *tunable, const char *val);
+int zfs_tunable_get(const zfs_tunable_t *tunable, char *val, size_t valsz);
+
+const zfs_tunable_t *zfs_tunable_lookup(const char *name);
+
+typedef int (*zfs_tunable_iter_t)(const zfs_tunable_t *tunable, void *arg);
+void zfs_tunable_iter(zfs_tunable_iter_t cb, void *arg);
+
+#endif
diff --git a/sys/contrib/openzfs/lib/libspl/include/umem.h b/sys/contrib/openzfs/lib/libspl/include/umem.h
index 6945aae9f3ce..3e44610e4e21 100644
--- a/sys/contrib/openzfs/lib/libspl/include/umem.h
+++ b/sys/contrib/openzfs/lib/libspl/include/umem.h
@@ -102,7 +102,7 @@ static inline void *
umem_alloc_aligned(size_t size, size_t align, int flags)
{
void *ptr = NULL;
- int rc = EINVAL;
+ int rc;
do {
rc = posix_memalign(&ptr, align, size);
diff --git a/sys/contrib/openzfs/lib/libspl/os/linux/getmntany.c b/sys/contrib/openzfs/lib/libspl/os/linux/getmntany.c
index dcdf7b3d6fc9..ee1cdf59b9e5 100644
--- a/sys/contrib/openzfs/lib/libspl/os/linux/getmntany.c
+++ b/sys/contrib/openzfs/lib/libspl/os/linux/getmntany.c
@@ -85,13 +85,21 @@ _sol_getmntent(FILE *fp, struct mnttab *mgetp)
}
static int
-getextmntent_impl(FILE *fp, struct extmnttab *mp)
+getextmntent_impl(FILE *fp, struct extmnttab *mp, uint64_t *mnt_id)
{
int ret;
struct stat64 st;
+ *mnt_id = 0;
ret = _sol_getmntent(fp, (struct mnttab *)mp);
if (ret == 0) {
+#ifdef HAVE_STATX_MNT_ID
+ struct statx stx;
+ if (statx(AT_FDCWD, mp->mnt_mountp,
+ AT_STATX_SYNC_AS_STAT | AT_SYMLINK_NOFOLLOW,
+ STATX_MNT_ID, &stx) == 0 && (stx.stx_mask & STATX_MNT_ID))
+ *mnt_id = stx.stx_mnt_id;
+#endif
if (stat64(mp->mnt_mountp, &st) != 0) {
mp->mnt_major = 0;
mp->mnt_minor = 0;
@@ -110,6 +118,12 @@ getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf)
struct stat64 st;
FILE *fp;
int match;
+ boolean_t have_mnt_id = B_FALSE;
+ uint64_t target_mnt_id = 0;
+ uint64_t entry_mnt_id;
+#ifdef HAVE_STATX_MNT_ID
+ struct statx stx;
+#endif
if (strlen(path) >= MAXPATHLEN) {
(void) fprintf(stderr, "invalid object; pathname too long\n");
@@ -128,6 +142,13 @@ getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf)
return (-1);
}
+#ifdef HAVE_STATX_MNT_ID
+ if (statx(AT_FDCWD, path, AT_STATX_SYNC_AS_STAT | AT_SYMLINK_NOFOLLOW,
+ STATX_MNT_ID, &stx) == 0 && (stx.stx_mask & STATX_MNT_ID)) {
+ have_mnt_id = B_TRUE;
+ target_mnt_id = stx.stx_mnt_id;
+ }
+#endif
if ((fp = fopen(MNTTAB, "re")) == NULL) {
(void) fprintf(stderr, "cannot open %s\n", MNTTAB);
@@ -139,12 +160,15 @@ getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf)
*/
match = 0;
- while (getextmntent_impl(fp, entry) == 0) {
- if (makedev(entry->mnt_major, entry->mnt_minor) ==
- statbuf->st_dev) {
- match = 1;
- break;
+ while (getextmntent_impl(fp, entry, &entry_mnt_id) == 0) {
+ if (have_mnt_id) {
+ match = (entry_mnt_id == target_mnt_id);
+ } else {
+ match = makedev(entry->mnt_major, entry->mnt_minor) ==
+ statbuf->st_dev;
}
+ if (match)
+ break;
}
(void) fclose(fp);
diff --git a/sys/contrib/openzfs/lib/libspl/tunables.c b/sys/contrib/openzfs/lib/libspl/tunables.c
new file mode 100644
index 000000000000..67dc9710dee8
--- /dev/null
+++ b/sys/contrib/openzfs/lib/libspl/tunables.c
@@ -0,0 +1,319 @@
+// SPDX-License-Identifier: CDDL-1.0
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or https://opensource.org/licenses/CDDL-1.0.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2025, Rob Norris <robn@despairlabs.com>
+ */
+
+#include <stddef.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <limits.h>
+#include <inttypes.h>
+#include <sys/tunables.h>
+
+/*
+ * Userspace tunables.
+ *
+ * Tunables are external pointers to global variables that are wired up to the
+ * host environment in some way that allows the operator to directly change
+ * their values "under the hood".
+ *
+ * In userspace, the "host environment" is the program using libzpool.so. So
+ * that it can manipulate tunables if it wants, we provide an API to access
+ * them.
+ *
+ * Tunables are declared through the ZFS_MODULE_PARAM* macros, which associate
+ * a global variable with some metadata we can use to describe and access the
+ * tunable. This is done by creating a uniquely-named zfs_tunable_t.
+ *
+ * At runtime, we need a way to discover these zfs_tunable_t items. Since they
+ * are declared globally, all over the codebase, there's no central place to
+ * record or list them. So, we take advantage of the compiler's "linker set"
+ * feature.
+ *
+ * In the ZFS_MODULE_PARAM macro, after we create the zfs_tunable_t, we also
+ * create a zfs_tunable_t* pointing to it. That pointer is forced into the
+ * "zfs_tunables" ELF section in compiled object. At link time, the linker will
+ * collect all these pointers into one single big "zfs_tunable" section, and
+ * will generate two new symbols in the final object: __start_zfs_tunable and
+ * __stop_zfs_tunable. These point to the first and last item in that section,
+ * which allows us to access the pointers in that section like an array, and
+ * through those pointers access the tunable metadata, and from there the
+ * actual C variable that the tunable describes.
+ */
+
+extern const zfs_tunable_t *__start_zfs_tunables;
+extern const zfs_tunable_t *__stop_zfs_tunables;
+
+/*
+ * Because there are no tunables in libspl itself, the above symbols will not
+ * be generated, which will stop libspl being linked at all. To work around
+ * that, we force a symbol into that section, and then when iterating, skip
+ * any NULL pointers.
+ */
+static void *__zfs_tunable__placeholder
+ __attribute__((__section__("zfs_tunables")))
+ __attribute__((__used__)) = NULL;
+
+/*
+ * Find the name tunable by walking through the linker set and comparing names,
+ * as described above. This is not particularly efficient but it's a fairly
+ * rare task, so it shouldn't be a big deal.
+ */
+const zfs_tunable_t *
+zfs_tunable_lookup(const char *name)
+{
+ for (const zfs_tunable_t **ztp = &__start_zfs_tunables;
+ ztp != &__stop_zfs_tunables; ztp++) {
+ const zfs_tunable_t *zt = *ztp;
+ if (zt == NULL)
+ continue;
+ if (strcmp(name, zt->zt_name) == 0)
+ return (zt);
+ }
+
+ return (NULL);
+}
+
+/*
+ * Like zfs_tunable_lookup, but call the provided callback for each tunable.
+ */
+void
+zfs_tunable_iter(zfs_tunable_iter_t cb, void *arg)
+{
+ for (const zfs_tunable_t **ztp = &__start_zfs_tunables;
+ ztp != &__stop_zfs_tunables; ztp++) {
+ const zfs_tunable_t *zt = *ztp;
+ if (zt == NULL)
+ continue;
+ if (cb(zt, arg))
+ return;
+ }
+}
+
+/*
+ * Parse a string into an int or uint. It's easier to have a pair of "generic"
+ * functions that clamp to a given min and max rather than have multiple
+ * functions for each width of type.
+ */
+static int
+zfs_tunable_parse_int(const char *val, intmax_t *np,
+ intmax_t min, intmax_t max)
+{
+ intmax_t n;
+ char *end;
+ errno = 0;
+ n = strtoimax(val, &end, 0);
+ if (errno != 0)
+ return (errno);
+ if (*end != '\0')
+ return (EINVAL);
+ if (n < min || n > max)
+ return (ERANGE);
+ *np = n;
+ return (0);
+}
+
+static int
+zfs_tunable_parse_uint(const char *val, uintmax_t *np,
+ uintmax_t min, uintmax_t max)
+{
+ uintmax_t n;
+ char *end;
+ errno = 0;
+ n = strtoumax(val, &end, 0);
+ if (errno != 0)
+ return (errno);
+ if (*end != '\0')
+ return (EINVAL);
+ if (strchr(val, '-'))
+ return (ERANGE);
+ if (n < min || n > max)
+ return (ERANGE);
+ *np = n;
+ return (0);
+}
+
+/*
+ * Set helpers for each tunable type. Parses the string, and if produces a
+ * valid value for the tunable, sets it. No effort is made to make sure the
+ * tunable is of the right type; that's done in zfs_tunable_set() below.
+ */
+static int
+zfs_tunable_set_int(const zfs_tunable_t *zt, const char *val)
+{
+ intmax_t n;
+ int err = zfs_tunable_parse_int(val, &n, INT_MIN, INT_MAX);
+ if (err != 0)
+ return (err);
+ *(int *)zt->zt_varp = n;
+ return (0);
+}
+
+static int
+zfs_tunable_set_uint(const zfs_tunable_t *zt, const char *val)
+{
+ uintmax_t n;
+ int err = zfs_tunable_parse_uint(val, &n, 0, UINT_MAX);
+ if (err != 0)
+ return (err);
+ *(unsigned int *)zt->zt_varp = n;
+ return (0);
+}
+
+static int
+zfs_tunable_set_ulong(const zfs_tunable_t *zt, const char *val)
+{
+ uintmax_t n;
+ int err = zfs_tunable_parse_uint(val, &n, 0, ULONG_MAX);
+ if (err != 0)
+ return (err);
+ *(unsigned long *)zt->zt_varp = n;
+ return (0);
+}
+
+static int
+zfs_tunable_set_u64(const zfs_tunable_t *zt, const char *val)
+{
+ uintmax_t n;
+ int err = zfs_tunable_parse_uint(val, &n, 0, UINT64_MAX);
+ if (err != 0)
+ return (err);
+ *(uint64_t *)zt->zt_varp = n;
+ return (0);
+}
+
+static int
+zfs_tunable_set_string(const zfs_tunable_t *zt, const char *val)
+{
+ (void) zt, (void) val;
+ /*
+ * We can't currently handle strings. String tunables are pointers
+ * into read-only memory, so we can update the pointer, but not the
+ * contents. That would mean taking an allocation, but we don't have
+ * an obvious place to free it.
+ *
+ * For now, it's no big deal as there's only a couple of string
+ * tunables anyway.
+ */
+ return (ENOTSUP);
+}
+
+/*
+ * Get helpers for each tunable type. Converts the value to a string if
+ * necessary and writes it into the provided buffer. The type is assumed to
+ * be correct; zfs_tunable_get() below will call the correct function for the
+ * type.
+ */
+static int
+zfs_tunable_get_int(const zfs_tunable_t *zt, char *val, size_t valsz)
+{
+ snprintf(val, valsz, "%d", *(int *)zt->zt_varp);
+ return (0);
+}
+
+static int
+zfs_tunable_get_uint(const zfs_tunable_t *zt, char *val, size_t valsz)
+{
+ snprintf(val, valsz, "%u", *(unsigned int *)zt->zt_varp);
+ return (0);
+}
+
+static int
+zfs_tunable_get_ulong(const zfs_tunable_t *zt, char *val, size_t valsz)
+{
+ snprintf(val, valsz, "%lu", *(unsigned long *)zt->zt_varp);
+ return (0);
+}
+
+static int
+zfs_tunable_get_u64(const zfs_tunable_t *zt, char *val, size_t valsz)
+{
+ snprintf(val, valsz, "%"PRIu64, *(uint64_t *)zt->zt_varp);
+ return (0);
+}
+
+static int
+zfs_tunable_get_string(const zfs_tunable_t *zt, char *val, size_t valsz)
+{
+ strlcpy(val, *(char **)zt->zt_varp, valsz);
+ return (0);
+}
+
+/* The public set function. Delegates to the type-specific version. */
+int
+zfs_tunable_set(const zfs_tunable_t *zt, const char *val)
+{
+ int err;
+ switch (zt->zt_type) {
+ case ZFS_TUNABLE_TYPE_INT:
+ err = zfs_tunable_set_int(zt, val);
+ break;
+ case ZFS_TUNABLE_TYPE_UINT:
+ err = zfs_tunable_set_uint(zt, val);
+ break;
+ case ZFS_TUNABLE_TYPE_ULONG:
+ err = zfs_tunable_set_ulong(zt, val);
+ break;
+ case ZFS_TUNABLE_TYPE_U64:
+ err = zfs_tunable_set_u64(zt, val);
+ break;
+ case ZFS_TUNABLE_TYPE_STRING:
+ err = zfs_tunable_set_string(zt, val);
+ break;
+ default:
+ err = EOPNOTSUPP;
+ break;
+ }
+ return (err);
+}
+
+/* The public get function. Delegates to the type-specific version. */
+int
+zfs_tunable_get(const zfs_tunable_t *zt, char *val, size_t valsz)
+{
+ int err;
+ switch (zt->zt_type) {
+ case ZFS_TUNABLE_TYPE_INT:
+ err = zfs_tunable_get_int(zt, val, valsz);
+ break;
+ case ZFS_TUNABLE_TYPE_UINT:
+ err = zfs_tunable_get_uint(zt, val, valsz);
+ break;
+ case ZFS_TUNABLE_TYPE_ULONG:
+ err = zfs_tunable_get_ulong(zt, val, valsz);
+ break;
+ case ZFS_TUNABLE_TYPE_U64:
+ err = zfs_tunable_get_u64(zt, val, valsz);
+ break;
+ case ZFS_TUNABLE_TYPE_STRING:
+ err = zfs_tunable_get_string(zt, val, valsz);
+ break;
+ default:
+ err = EOPNOTSUPP;
+ break;
+ }
+ return (err);
+}
diff --git a/sys/contrib/openzfs/lib/libuutil/libuutil.abi b/sys/contrib/openzfs/lib/libuutil/libuutil.abi
index 0052f0d47a7f..6c736c61e4a5 100644
--- a/sys/contrib/openzfs/lib/libuutil/libuutil.abi
+++ b/sys/contrib/openzfs/lib/libuutil/libuutil.abi
@@ -244,6 +244,10 @@
<elf-symbol name='uu_strerror' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='uu_strndup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='uu_zalloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_iter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_lookup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_set' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
</elf-function-symbols>
<abi-instr address-size='64' path='lib/libspl/assert.c' language='LANG_C99'>
<typedef-decl name='__pid_t' type-id='95e97e5e' id='3629bad8'/>
@@ -612,7 +616,6 @@
<array-type-def dimensions='1' type-id='de572c22' size-in-bits='1472' id='6d3c2f42'>
<subrange length='23' type-id='7359adad' id='fdd0f594'/>
</array-type-def>
- <type-decl name='long long int' size-in-bits='64' id='1eb56b1e'/>
<array-type-def dimensions='1' type-id='3a47d82b' size-in-bits='256' id='a133ec23'>
<subrange length='4' type-id='7359adad' id='16fe7105'/>
</array-type-def>
@@ -978,8 +981,6 @@
</abi-instr>
<abi-instr address-size='64' path='lib/libspl/os/linux/gethostid.c' language='LANG_C99'>
<type-decl name='long long unsigned int' size-in-bits='64' id='3a47d82b'/>
- <pointer-type-def type-id='26a90f95' size-in-bits='64' id='9b23c9ad'/>
- <qualified-type-def type-id='9b23c9ad' restrict='yes' id='8c85230f'/>
<function-decl name='fclose' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='822cd80b'/>
<return type-id='95e97e5e'/>
@@ -1019,6 +1020,13 @@
<array-type-def dimensions='1' type-id='03085adc' size-in-bits='192' id='083f8d58'>
<subrange length='3' type-id='7359adad' id='56f209d2'/>
</array-type-def>
+ <array-type-def dimensions='1' type-id='d315442e' size-in-bits='16' id='811205dc'>
+ <subrange length='1' type-id='7359adad' id='52f813b4'/>
+ </array-type-def>
+ <array-type-def dimensions='1' type-id='d3130597' size-in-bits='768' id='f63f23b9'>
+ <subrange length='12' type-id='7359adad' id='84827bdc'/>
+ </array-type-def>
+ <type-decl name='long long int' size-in-bits='64' id='1eb56b1e'/>
<class-decl name='mnttab' size-in-bits='256' is-struct='yes' visibility='default' id='1b055409'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='mnt_special' type-id='26a90f95' visibility='default'/>
@@ -1053,6 +1061,93 @@
<var-decl name='mnt_minor' type-id='3502e3ff' visibility='default'/>
</data-member>
</class-decl>
+ <typedef-decl name='__u16' type-id='8efea9e5' id='d315442e'/>
+ <typedef-decl name='__s32' type-id='95e97e5e' id='3158a266'/>
+ <typedef-decl name='__u32' type-id='f0981eeb' id='3f1a6b60'/>
+ <typedef-decl name='__s64' type-id='1eb56b1e' id='49659421'/>
+ <typedef-decl name='__u64' type-id='3a47d82b' id='d3130597'/>
+ <class-decl name='statx_timestamp' size-in-bits='128' is-struct='yes' visibility='default' id='94101016'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='tv_sec' type-id='49659421' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='tv_nsec' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='96'>
+ <var-decl name='__reserved' type-id='3158a266' visibility='default'/>
+ </data-member>
+ </class-decl>
+ <class-decl name='statx' size-in-bits='2048' is-struct='yes' visibility='default' id='720b04c5'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='stx_mask' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='32'>
+ <var-decl name='stx_blksize' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='stx_attributes' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='128'>
+ <var-decl name='stx_nlink' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='160'>
+ <var-decl name='stx_uid' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='192'>
+ <var-decl name='stx_gid' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='224'>
+ <var-decl name='stx_mode' type-id='d315442e' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='240'>
+ <var-decl name='__spare0' type-id='811205dc' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='256'>
+ <var-decl name='stx_ino' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='320'>
+ <var-decl name='stx_size' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='384'>
+ <var-decl name='stx_blocks' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='448'>
+ <var-decl name='stx_attributes_mask' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='512'>
+ <var-decl name='stx_atime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='640'>
+ <var-decl name='stx_btime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='768'>
+ <var-decl name='stx_ctime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='896'>
+ <var-decl name='stx_mtime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1024'>
+ <var-decl name='stx_rdev_major' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1056'>
+ <var-decl name='stx_rdev_minor' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1088'>
+ <var-decl name='stx_dev_major' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1120'>
+ <var-decl name='stx_dev_minor' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1152'>
+ <var-decl name='stx_mnt_id' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1216'>
+ <var-decl name='__spare2' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1280'>
+ <var-decl name='__spare3' type-id='f63f23b9' visibility='default'/>
+ </data-member>
+ </class-decl>
<class-decl name='mntent' size-in-bits='320' is-struct='yes' visibility='default' id='56fe4a37'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='mnt_fsname' type-id='26a90f95' visibility='default'/>
@@ -1142,6 +1237,8 @@
<pointer-type-def type-id='1b055409' size-in-bits='64' id='9d424d31'/>
<pointer-type-def type-id='0bbec9cd' size-in-bits='64' id='62f7a03d'/>
<qualified-type-def type-id='62f7a03d' restrict='yes' id='f1cadedf'/>
+ <pointer-type-def type-id='720b04c5' size-in-bits='64' id='936b8e35'/>
+ <qualified-type-def type-id='936b8e35' restrict='yes' id='31d265b7'/>
<function-decl name='getmntent_r' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='e75a27e9'/>
<parameter type-id='3cad23cd'/>
@@ -1157,6 +1254,14 @@
<parameter type-id='95e97e5e'/>
<return type-id='26a90f95'/>
</function-decl>
+ <function-decl name='statx' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='95e97e5e'/>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='95e97e5e'/>
+ <parameter type-id='f0981eeb'/>
+ <parameter type-id='31d265b7'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
<function-decl name='__fprintf_chk' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='e75a27e9'/>
<parameter type-id='95e97e5e'/>
@@ -1307,6 +1412,91 @@
<return type-id='48b5725f'/>
</function-decl>
</abi-instr>
+ <abi-instr address-size='64' path='lib/libspl/tunables.c' language='LANG_C99'>
+ <enum-decl name='zfs_tunable_type_t' naming-typedef-id='f50b1525' id='56905369'>
+ <underlying-type type-id='9cac1fee'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_INT' value='0'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_UINT' value='1'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_ULONG' value='2'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_U64' value='3'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_STRING' value='4'/>
+ </enum-decl>
+ <typedef-decl name='zfs_tunable_type_t' type-id='56905369' id='f50b1525'/>
+ <enum-decl name='zfs_tunable_perm_t' naming-typedef-id='ada7336b' id='e80e6ebf'>
+ <underlying-type type-id='9cac1fee'/>
+ <enumerator name='ZFS_TUNABLE_PERM_ZMOD_RW' value='0'/>
+ <enumerator name='ZFS_TUNABLE_PERM_ZMOD_RD' value='1'/>
+ </enum-decl>
+ <typedef-decl name='zfs_tunable_perm_t' type-id='e80e6ebf' id='ada7336b'/>
+ <class-decl name='zfs_tunable' size-in-bits='320' is-struct='yes' visibility='default' id='1a97ee0e'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='zt_name' type-id='80f4b756' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='zt_varp' type-id='eaa32e2f' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='128'>
+ <var-decl name='zt_varsz' type-id='b59d7dce' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='192'>
+ <var-decl name='zt_type' type-id='f50b1525' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='224'>
+ <var-decl name='zt_perm' type-id='ada7336b' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='256'>
+ <var-decl name='zt_desc' type-id='80f4b756' visibility='default'/>
+ </data-member>
+ </class-decl>
+ <typedef-decl name='zfs_tunable_t' type-id='1a97ee0e' id='12bf5c5e'/>
+ <typedef-decl name='zfs_tunable_iter_t' type-id='7ef33f92' id='d8d5f4ab'/>
+ <typedef-decl name='intmax_t' type-id='5b475db0' id='e104d842'/>
+ <typedef-decl name='uintmax_t' type-id='04d82f4b' id='f8b828c9'/>
+ <typedef-decl name='__intmax_t' type-id='bd54fe1a' id='5b475db0'/>
+ <typedef-decl name='__uintmax_t' type-id='7359adad' id='04d82f4b'/>
+ <pointer-type-def type-id='26a90f95' size-in-bits='64' id='9b23c9ad'/>
+ <qualified-type-def type-id='9b23c9ad' restrict='yes' id='8c85230f'/>
+ <qualified-type-def type-id='12bf5c5e' const='yes' id='180e47ee'/>
+ <pointer-type-def type-id='180e47ee' size-in-bits='64' id='a27af98c'/>
+ <pointer-type-def type-id='92f86508' size-in-bits='64' id='7ef33f92'/>
+ <function-decl name='strtoimax' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='8c85230f'/>
+ <parameter type-id='95e97e5e'/>
+ <return type-id='e104d842'/>
+ </function-decl>
+ <function-decl name='strtoumax' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='8c85230f'/>
+ <parameter type-id='95e97e5e'/>
+ <return type-id='f8b828c9'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_lookup' mangled-name='zfs_tunable_lookup' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_lookup'>
+ <parameter type-id='80f4b756' name='name'/>
+ <return type-id='a27af98c'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_iter' mangled-name='zfs_tunable_iter' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_iter'>
+ <parameter type-id='d8d5f4ab' name='cb'/>
+ <parameter type-id='eaa32e2f' name='arg'/>
+ <return type-id='48b5725f'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_set' mangled-name='zfs_tunable_set' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_set'>
+ <parameter type-id='a27af98c' name='zt'/>
+ <parameter type-id='80f4b756' name='val'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_get' mangled-name='zfs_tunable_get' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_get'>
+ <parameter type-id='a27af98c' name='zt'/>
+ <parameter type-id='26a90f95' name='val'/>
+ <parameter type-id='b59d7dce' name='valsz'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
+ <function-type size-in-bits='64' id='92f86508'>
+ <parameter type-id='a27af98c'/>
+ <parameter type-id='eaa32e2f'/>
+ <return type-id='95e97e5e'/>
+ </function-type>
+ </abi-instr>
<abi-instr address-size='64' path='lib/libuutil/uu_alloc.c' language='LANG_C99'>
<type-decl name='char' size-in-bits='8' id='a84c031d'/>
<type-decl name='unsigned int' size-in-bits='32' id='f0981eeb'/>
diff --git a/sys/contrib/openzfs/lib/libzdb/libzdb.c b/sys/contrib/openzfs/lib/libzdb/libzdb.c
index 12144dc65e75..cca1327b1b03 100644
--- a/sys/contrib/openzfs/lib/libzdb/libzdb.c
+++ b/sys/contrib/openzfs/lib/libzdb/libzdb.c
@@ -93,9 +93,9 @@ livelist_compare(const void *larg, const void *rarg)
* Since we're storing blkptrs without cancelling FREE/ALLOC pairs,
* it's possible the offsets are equal. In that case, sort by txg
*/
- if (BP_GET_LOGICAL_BIRTH(l) < BP_GET_LOGICAL_BIRTH(r)) {
+ if (BP_GET_BIRTH(l) < BP_GET_BIRTH(r)) {
return (-1);
- } else if (BP_GET_LOGICAL_BIRTH(l) > BP_GET_LOGICAL_BIRTH(r)) {
+ } else if (BP_GET_BIRTH(l) > BP_GET_BIRTH(r)) {
return (+1);
}
return (0);
diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs.abi b/sys/contrib/openzfs/lib/libzfs/libzfs.abi
index 35ecdca767db..ba161d1ef10f 100644
--- a/sys/contrib/openzfs/lib/libzfs/libzfs.abi
+++ b/sys/contrib/openzfs/lib/libzfs/libzfs.abi
@@ -451,6 +451,10 @@
<elf-symbol name='zfs_strip_partition' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zfs_strip_path' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zfs_truncate_shares' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_iter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_lookup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_set' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zfs_type_to_name' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zfs_unmount' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zfs_unmountall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
@@ -479,6 +483,7 @@
<elf-symbol name='zpool_clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_clear_label' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_close' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zpool_collect_leaves' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_collect_unsup_feat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_create' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_ddt_prune' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
@@ -528,6 +533,7 @@
<elf-symbol name='zpool_import_status' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_in_use' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_initialize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zpool_initialize_one' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_initialize_wait' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_is_draid_spare' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_iter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
@@ -568,6 +574,7 @@
<elf-symbol name='zpool_reguid' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_reopen_one' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_scan' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zpool_scan_range' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_search_import' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_set_bootenv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_set_guid' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
@@ -577,6 +584,7 @@
<elf-symbol name='zpool_state_to_name' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_sync_one' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_trim' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zpool_trim_one' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_upgrade' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_vdev_attach' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zpool_vdev_clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
@@ -631,7 +639,7 @@
<elf-symbol name='fletcher_4_superscalar_ops' size='128' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='libzfs_config_ops' size='16' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='sa_protocol_names' size='16' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
- <elf-symbol name='spa_feature_table' size='2464' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='spa_feature_table' size='2632' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zfeature_checks_disable' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zfs_deleg_perm_tab' size='528' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='zfs_history_event_names' size='328' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
@@ -1450,8 +1458,103 @@
</function-decl>
</abi-instr>
<abi-instr address-size='64' path='lib/libspl/os/linux/getmntany.c' language='LANG_C99'>
+ <array-type-def dimensions='1' type-id='d315442e' size-in-bits='16' id='811205dc'>
+ <subrange length='1' type-id='7359adad' id='52f813b4'/>
+ </array-type-def>
+ <array-type-def dimensions='1' type-id='d3130597' size-in-bits='768' id='f63f23b9'>
+ <subrange length='12' type-id='7359adad' id='84827bdc'/>
+ </array-type-def>
+ <typedef-decl name='__u16' type-id='8efea9e5' id='d315442e'/>
+ <typedef-decl name='__s32' type-id='95e97e5e' id='3158a266'/>
+ <typedef-decl name='__u32' type-id='f0981eeb' id='3f1a6b60'/>
+ <typedef-decl name='__s64' type-id='1eb56b1e' id='49659421'/>
+ <typedef-decl name='__u64' type-id='3a47d82b' id='d3130597'/>
+ <class-decl name='statx_timestamp' size-in-bits='128' is-struct='yes' visibility='default' id='94101016'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='tv_sec' type-id='49659421' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='tv_nsec' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='96'>
+ <var-decl name='__reserved' type-id='3158a266' visibility='default'/>
+ </data-member>
+ </class-decl>
+ <class-decl name='statx' size-in-bits='2048' is-struct='yes' visibility='default' id='720b04c5'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='stx_mask' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='32'>
+ <var-decl name='stx_blksize' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='stx_attributes' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='128'>
+ <var-decl name='stx_nlink' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='160'>
+ <var-decl name='stx_uid' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='192'>
+ <var-decl name='stx_gid' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='224'>
+ <var-decl name='stx_mode' type-id='d315442e' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='240'>
+ <var-decl name='__spare0' type-id='811205dc' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='256'>
+ <var-decl name='stx_ino' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='320'>
+ <var-decl name='stx_size' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='384'>
+ <var-decl name='stx_blocks' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='448'>
+ <var-decl name='stx_attributes_mask' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='512'>
+ <var-decl name='stx_atime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='640'>
+ <var-decl name='stx_btime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='768'>
+ <var-decl name='stx_ctime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='896'>
+ <var-decl name='stx_mtime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1024'>
+ <var-decl name='stx_rdev_major' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1056'>
+ <var-decl name='stx_rdev_minor' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1088'>
+ <var-decl name='stx_dev_major' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1120'>
+ <var-decl name='stx_dev_minor' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1152'>
+ <var-decl name='stx_mnt_id' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1216'>
+ <var-decl name='__spare2' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1280'>
+ <var-decl name='__spare3' type-id='f63f23b9' visibility='default'/>
+ </data-member>
+ </class-decl>
<pointer-type-def type-id='56fe4a37' size-in-bits='64' id='b6b61d2f'/>
<qualified-type-def type-id='b6b61d2f' restrict='yes' id='3cad23cd'/>
+ <pointer-type-def type-id='720b04c5' size-in-bits='64' id='936b8e35'/>
+ <qualified-type-def type-id='936b8e35' restrict='yes' id='31d265b7'/>
<function-decl name='getmntent_r' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='e75a27e9'/>
<parameter type-id='3cad23cd'/>
@@ -1463,6 +1566,14 @@
<parameter type-id='822cd80b'/>
<return type-id='95e97e5e'/>
</function-decl>
+ <function-decl name='statx' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='95e97e5e'/>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='95e97e5e'/>
+ <parameter type-id='f0981eeb'/>
+ <parameter type-id='31d265b7'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
</abi-instr>
<abi-instr address-size='64' path='lib/libspl/timestamp.c' language='LANG_C99'>
<typedef-decl name='nl_item' type-id='95e97e5e' id='03b79a94'/>
@@ -1487,6 +1598,89 @@
<return type-id='48b5725f'/>
</function-decl>
</abi-instr>
+ <abi-instr address-size='64' path='lib/libspl/tunables.c' language='LANG_C99'>
+ <enum-decl name='zfs_tunable_type_t' naming-typedef-id='f50b1525' id='56905369'>
+ <underlying-type type-id='9cac1fee'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_INT' value='0'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_UINT' value='1'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_ULONG' value='2'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_U64' value='3'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_STRING' value='4'/>
+ </enum-decl>
+ <typedef-decl name='zfs_tunable_type_t' type-id='56905369' id='f50b1525'/>
+ <enum-decl name='zfs_tunable_perm_t' naming-typedef-id='ada7336b' id='e80e6ebf'>
+ <underlying-type type-id='9cac1fee'/>
+ <enumerator name='ZFS_TUNABLE_PERM_ZMOD_RW' value='0'/>
+ <enumerator name='ZFS_TUNABLE_PERM_ZMOD_RD' value='1'/>
+ </enum-decl>
+ <typedef-decl name='zfs_tunable_perm_t' type-id='e80e6ebf' id='ada7336b'/>
+ <class-decl name='zfs_tunable' size-in-bits='320' is-struct='yes' visibility='default' id='1a97ee0e'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='zt_name' type-id='80f4b756' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='zt_varp' type-id='eaa32e2f' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='128'>
+ <var-decl name='zt_varsz' type-id='b59d7dce' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='192'>
+ <var-decl name='zt_type' type-id='f50b1525' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='224'>
+ <var-decl name='zt_perm' type-id='ada7336b' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='256'>
+ <var-decl name='zt_desc' type-id='80f4b756' visibility='default'/>
+ </data-member>
+ </class-decl>
+ <typedef-decl name='zfs_tunable_t' type-id='1a97ee0e' id='12bf5c5e'/>
+ <typedef-decl name='zfs_tunable_iter_t' type-id='7ef33f92' id='d8d5f4ab'/>
+ <typedef-decl name='intmax_t' type-id='5b475db0' id='e104d842'/>
+ <typedef-decl name='uintmax_t' type-id='04d82f4b' id='f8b828c9'/>
+ <typedef-decl name='__intmax_t' type-id='bd54fe1a' id='5b475db0'/>
+ <typedef-decl name='__uintmax_t' type-id='7359adad' id='04d82f4b'/>
+ <qualified-type-def type-id='12bf5c5e' const='yes' id='180e47ee'/>
+ <pointer-type-def type-id='180e47ee' size-in-bits='64' id='a27af98c'/>
+ <pointer-type-def type-id='92f86508' size-in-bits='64' id='7ef33f92'/>
+ <function-decl name='strtoimax' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='8c85230f'/>
+ <parameter type-id='95e97e5e'/>
+ <return type-id='e104d842'/>
+ </function-decl>
+ <function-decl name='strtoumax' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='8c85230f'/>
+ <parameter type-id='95e97e5e'/>
+ <return type-id='f8b828c9'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_lookup' mangled-name='zfs_tunable_lookup' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_lookup'>
+ <parameter type-id='80f4b756' name='name'/>
+ <return type-id='a27af98c'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_iter' mangled-name='zfs_tunable_iter' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_iter'>
+ <parameter type-id='d8d5f4ab' name='cb'/>
+ <parameter type-id='eaa32e2f' name='arg'/>
+ <return type-id='48b5725f'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_set' mangled-name='zfs_tunable_set' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_set'>
+ <parameter type-id='a27af98c' name='zt'/>
+ <parameter type-id='80f4b756' name='val'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_get' mangled-name='zfs_tunable_get' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_get'>
+ <parameter type-id='a27af98c' name='zt'/>
+ <parameter type-id='26a90f95' name='val'/>
+ <parameter type-id='b59d7dce' name='valsz'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
+ <function-type size-in-bits='64' id='92f86508'>
+ <parameter type-id='a27af98c'/>
+ <parameter type-id='eaa32e2f'/>
+ <return type-id='95e97e5e'/>
+ </function-type>
+ </abi-instr>
<abi-instr address-size='64' path='lib/libtpool/thread_pool.c' language='LANG_C99'>
<array-type-def dimensions='1' type-id='49ef3ffd' size-in-bits='1024' id='a14403f5'>
<subrange length='16' type-id='7359adad' id='848d0938'/>
@@ -4135,13 +4329,6 @@
<parameter type-id='58603c44'/>
<return type-id='9c313c2d'/>
</function-decl>
- <function-decl name='zpool_prop_get_feature' mangled-name='zpool_prop_get_feature' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_prop_get_feature'>
- <parameter type-id='4c81de99'/>
- <parameter type-id='80f4b756'/>
- <parameter type-id='26a90f95'/>
- <parameter type-id='b59d7dce'/>
- <return type-id='95e97e5e'/>
- </function-decl>
<function-decl name='zfs_iter_snapshots_v2' mangled-name='zfs_iter_snapshots_v2' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_iter_snapshots_v2'>
<parameter type-id='9200a744'/>
<parameter type-id='95e97e5e'/>
@@ -6210,7 +6397,10 @@
<enumerator name='SPA_FEATURE_FAST_DEDUP' value='41'/>
<enumerator name='SPA_FEATURE_LONGNAME' value='42'/>
<enumerator name='SPA_FEATURE_LARGE_MICROZAP' value='43'/>
- <enumerator name='SPA_FEATURES' value='44'/>
+ <enumerator name='SPA_FEATURE_DYNAMIC_GANG_HEADER' value='44'/>
+ <enumerator name='SPA_FEATURE_BLOCK_CLONING_ENDIAN' value='45'/>
+ <enumerator name='SPA_FEATURE_PHYSICAL_REWRITE' value='46'/>
+ <enumerator name='SPA_FEATURES' value='47'/>
</enum-decl>
<typedef-decl name='spa_feature_t' type-id='33ecb627' id='d6618c78'/>
<qualified-type-def type-id='80f4b756' const='yes' id='b99c00c9'/>
@@ -6629,6 +6819,13 @@
<parameter type-id='e4378506' name='plp'/>
<return type-id='95e97e5e'/>
</function-decl>
+ <function-decl name='zpool_prop_get_feature' mangled-name='zpool_prop_get_feature' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_prop_get_feature'>
+ <parameter type-id='4c81de99' name='zhp'/>
+ <parameter type-id='80f4b756' name='propname'/>
+ <parameter type-id='26a90f95' name='buf'/>
+ <parameter type-id='b59d7dce' name='len'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
<function-decl name='zpool_get_state' mangled-name='zpool_get_state' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_get_state'>
<parameter type-id='4c81de99' name='zhp'/>
<return type-id='95e97e5e'/>
@@ -6710,6 +6907,11 @@
<parameter type-id='95e97e5e' name='flags'/>
<return type-id='95e97e5e'/>
</function-decl>
+ <function-decl name='zpool_initialize_one' mangled-name='zpool_initialize_one' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_initialize_one'>
+ <parameter type-id='4c81de99' name='zhp'/>
+ <parameter type-id='eaa32e2f' name='data'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
<function-decl name='zpool_initialize' mangled-name='zpool_initialize' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_initialize'>
<parameter type-id='4c81de99' name='zhp'/>
<parameter type-id='7063e1ab' name='cmd_type'/>
@@ -6722,6 +6924,17 @@
<parameter type-id='5ce45b60' name='vds'/>
<return type-id='95e97e5e'/>
</function-decl>
+ <function-decl name='zpool_collect_leaves' mangled-name='zpool_collect_leaves' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_collect_leaves'>
+ <parameter type-id='4c81de99' name='zhp'/>
+ <parameter type-id='5ce45b60' name='nvroot'/>
+ <parameter type-id='5ce45b60' name='res'/>
+ <return type-id='48b5725f'/>
+ </function-decl>
+ <function-decl name='zpool_trim_one' mangled-name='zpool_trim_one' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_trim_one'>
+ <parameter type-id='4c81de99' name='zhp'/>
+ <parameter type-id='eaa32e2f' name='data'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
<function-decl name='zpool_trim' mangled-name='zpool_trim' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_trim'>
<parameter type-id='4c81de99' name='zhp'/>
<parameter type-id='b1146b8d' name='cmd_type'/>
@@ -6735,6 +6948,14 @@
<parameter type-id='b51cf3c2' name='cmd'/>
<return type-id='95e97e5e'/>
</function-decl>
+ <function-decl name='zpool_scan_range' mangled-name='zpool_scan_range' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_scan_range'>
+ <parameter type-id='4c81de99' name='zhp'/>
+ <parameter type-id='7313fbe2' name='func'/>
+ <parameter type-id='b51cf3c2' name='cmd'/>
+ <parameter type-id='c9d12d66' name='date_start'/>
+ <parameter type-id='c9d12d66' name='date_end'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
<function-decl name='zpool_find_vdev_by_physpath' mangled-name='zpool_find_vdev_by_physpath' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_find_vdev_by_physpath'>
<parameter type-id='4c81de99' name='zhp'/>
<parameter type-id='80f4b756' name='ppath'/>
@@ -9394,8 +9615,8 @@
</function-decl>
</abi-instr>
<abi-instr address-size='64' path='module/zcommon/zfeature_common.c' language='LANG_C99'>
- <array-type-def dimensions='1' type-id='83f29ca2' size-in-bits='19712' id='fd4573e5'>
- <subrange length='44' type-id='7359adad' id='cf8ba455'/>
+ <array-type-def dimensions='1' type-id='83f29ca2' size-in-bits='21056' id='fd43354e'>
+ <subrange length='47' type-id='7359adad' id='8f8900fe'/>
</array-type-def>
<enum-decl name='zfeature_flags' id='6db816a4'>
<underlying-type type-id='9cac1fee'/>
@@ -9403,6 +9624,7 @@
<enumerator name='ZFEATURE_FLAG_MOS' value='2'/>
<enumerator name='ZFEATURE_FLAG_ACTIVATE_ON_ENABLE' value='4'/>
<enumerator name='ZFEATURE_FLAG_PER_DATASET' value='8'/>
+ <enumerator name='ZFEATURE_FLAG_NO_UPGRADE' value='16'/>
</enum-decl>
<typedef-decl name='zfeature_flags_t' type-id='6db816a4' id='fc329033'/>
<enum-decl name='zfeature_type' id='c4fa2355'>
@@ -9472,7 +9694,7 @@
<pointer-type-def type-id='611586a1' size-in-bits='64' id='2e243169'/>
<qualified-type-def type-id='eaa32e2f' const='yes' id='83be723c'/>
<pointer-type-def type-id='83be723c' size-in-bits='64' id='7acd98a2'/>
- <var-decl name='spa_feature_table' type-id='fd4573e5' mangled-name='spa_feature_table' visibility='default' elf-symbol-id='spa_feature_table'/>
+ <var-decl name='spa_feature_table' type-id='fd43354e' mangled-name='spa_feature_table' visibility='default' elf-symbol-id='spa_feature_table'/>
<var-decl name='zfeature_checks_disable' type-id='c19b74c3' mangled-name='zfeature_checks_disable' visibility='default' elf-symbol-id='zfeature_checks_disable'/>
<function-decl name='opendir' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='80f4b756'/>
diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c b/sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c
index 8907802ec259..b34a44c30eb4 100644
--- a/sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c
+++ b/sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c
@@ -584,7 +584,7 @@ get_key_material_https(libzfs_handle_t *hdl, const char *uri,
goto end;
}
- int kfd = -1;
+ int kfd;
#ifdef O_TMPFILE
kfd = open(getenv("TMPDIR") ?: "/tmp",
O_RDWR | O_TMPFILE | O_EXCL | O_CLOEXEC, 0600);
diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c b/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
index 91560b40b022..e1b91fc47291 100644
--- a/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
+++ b/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
@@ -1039,7 +1039,6 @@ zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl,
nvlist_t *ret;
int chosen_normal = -1;
int chosen_utf = -1;
- int set_maxbs = 0;
if (nvlist_alloc(&ret, NV_UNIQUE_NAME, 0) != 0) {
(void) no_memory(hdl);
@@ -1258,46 +1257,20 @@ zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl,
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
goto error;
}
- /* save the ZFS_PROP_RECORDSIZE during create op */
- if (zpool_hdl == NULL && prop == ZFS_PROP_RECORDSIZE) {
- set_maxbs = intval;
- }
break;
}
case ZFS_PROP_SPECIAL_SMALL_BLOCKS:
{
- int maxbs =
- set_maxbs == 0 ? SPA_OLD_MAXBLOCKSIZE : set_maxbs;
+ int maxbs = SPA_MAXBLOCKSIZE;
char buf[64];
- if (zpool_hdl != NULL) {
- char state[64] = "";
-
- maxbs = zpool_get_prop_int(zpool_hdl,
- ZPOOL_PROP_MAXBLOCKSIZE, NULL);
-
- /*
- * Issue a warning but do not fail so that
- * tests for settable properties succeed.
- */
- if (zpool_prop_get_feature(zpool_hdl,
- "feature@allocation_classes", state,
- sizeof (state)) != 0 ||
- strcmp(state, ZFS_FEATURE_ACTIVE) != 0) {
- (void) fprintf(stderr, gettext(
- "%s: property requires a special "
- "device in the pool\n"), propname);
- }
- }
- if (intval != 0 &&
- (intval < SPA_MINBLOCKSIZE ||
- intval > maxbs || !ISP2(intval))) {
+ if (intval > SPA_MAXBLOCKSIZE) {
zfs_nicebytes(maxbs, buf, sizeof (buf));
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "invalid '%s=%llu' property: must be zero "
- "or a power of 2 from 512B to %s"),
- propname, (unsigned long long)intval, buf);
+ "invalid '%s' property: must be between "
+ "zero and %s"),
+ propname, buf);
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
goto error;
}
diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs_pool.c b/sys/contrib/openzfs/lib/libzfs/libzfs_pool.c
index 6f8fb994f814..10b42720e963 100644
--- a/sys/contrib/openzfs/lib/libzfs/libzfs_pool.c
+++ b/sys/contrib/openzfs/lib/libzfs/libzfs_pool.c
@@ -31,6 +31,7 @@
* Copyright (c) 2018, loli10K <ezomori.nozomu@gmail.com>
* Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
* Copyright (c) 2021, 2023, Klara Inc.
+ * Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
*/
#include <errno.h>
@@ -896,7 +897,7 @@ int
zpool_set_prop(zpool_handle_t *zhp, const char *propname, const char *propval)
{
zfs_cmd_t zc = {"\0"};
- int ret = -1;
+ int ret;
char errbuf[ERRBUFLEN];
nvlist_t *nvl = NULL;
nvlist_t *realprops;
@@ -1422,30 +1423,6 @@ zpool_get_state(zpool_handle_t *zhp)
}
/*
- * Check if vdev list contains a special vdev
- */
-static boolean_t
-zpool_has_special_vdev(nvlist_t *nvroot)
-{
- nvlist_t **child;
- uint_t children;
-
- if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, &child,
- &children) == 0) {
- for (uint_t c = 0; c < children; c++) {
- const char *bias;
-
- if (nvlist_lookup_string(child[c],
- ZPOOL_CONFIG_ALLOCATION_BIAS, &bias) == 0 &&
- strcmp(bias, VDEV_ALLOC_BIAS_SPECIAL) == 0) {
- return (B_TRUE);
- }
- }
- }
- return (B_FALSE);
-}
-
-/*
* Check if vdev list contains a dRAID vdev
*/
static boolean_t
@@ -1548,16 +1525,6 @@ zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot,
goto create_failed;
}
- if (nvlist_exists(zc_fsprops,
- zfs_prop_to_name(ZFS_PROP_SPECIAL_SMALL_BLOCKS)) &&
- !zpool_has_special_vdev(nvroot)) {
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "%s property requires a special vdev"),
- zfs_prop_to_name(ZFS_PROP_SPECIAL_SMALL_BLOCKS));
- (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
- goto create_failed;
- }
-
if (!zc_props &&
(nvlist_alloc(&zc_props, NV_UNIQUE_NAME, 0) != 0)) {
goto create_failed;
@@ -2470,6 +2437,30 @@ xlate_init_err(int err)
return (err);
}
+int
+zpool_initialize_one(zpool_handle_t *zhp, void *data)
+{
+ int error;
+ libzfs_handle_t *hdl = zpool_get_handle(zhp);
+ const char *pool_name = zpool_get_name(zhp);
+ if (zpool_open_silent(hdl, pool_name, &zhp) != 0)
+ return (-1);
+ initialize_cbdata_t *cb = data;
+ nvlist_t *vdevs = fnvlist_alloc();
+
+ nvlist_t *config = zpool_get_config(zhp, NULL);
+ nvlist_t *nvroot = fnvlist_lookup_nvlist(config,
+ ZPOOL_CONFIG_VDEV_TREE);
+ zpool_collect_leaves(zhp, nvroot, vdevs);
+ if (cb->wait)
+ error = zpool_initialize_wait(zhp, cb->cmd_type, vdevs);
+ else
+ error = zpool_initialize(zhp, cb->cmd_type, vdevs);
+ fnvlist_free(vdevs);
+
+ return (error);
+}
+
/*
* Begin, suspend, cancel, or uninit (clear) the initialization (initializing
* of all free blocks) for the given vdevs in the given pool.
@@ -2590,6 +2581,58 @@ xlate_trim_err(int err)
return (err);
}
+void
+zpool_collect_leaves(zpool_handle_t *zhp, nvlist_t *nvroot, nvlist_t *res)
+{
+ libzfs_handle_t *hdl = zhp->zpool_hdl;
+ uint_t children = 0;
+ nvlist_t **child;
+ uint_t i;
+
+ (void) nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN,
+ &child, &children);
+
+ if (children == 0) {
+ char *path = zpool_vdev_name(hdl, zhp, nvroot,
+ VDEV_NAME_PATH);
+
+ if (strcmp(path, VDEV_TYPE_INDIRECT) != 0 &&
+ strcmp(path, VDEV_TYPE_HOLE) != 0)
+ fnvlist_add_boolean(res, path);
+
+ free(path);
+ return;
+ }
+
+ for (i = 0; i < children; i++) {
+ zpool_collect_leaves(zhp, child[i], res);
+ }
+}
+
+int
+zpool_trim_one(zpool_handle_t *zhp, void *data)
+{
+ int error;
+ libzfs_handle_t *hdl = zpool_get_handle(zhp);
+ const char *pool_name = zpool_get_name(zhp);
+ if (zpool_open_silent(hdl, pool_name, &zhp) != 0)
+ return (-1);
+
+ trim_cbdata_t *cb = data;
+ nvlist_t *vdevs = fnvlist_alloc();
+
+ /* no individual leaf vdevs specified, so add them all */
+ nvlist_t *config = zpool_get_config(zhp, NULL);
+ nvlist_t *nvroot = fnvlist_lookup_nvlist(config,
+ ZPOOL_CONFIG_VDEV_TREE);
+
+ zpool_collect_leaves(zhp, nvroot, vdevs);
+ error = zpool_trim(zhp, cb->cmd_type, vdevs, &cb->trim_flags);
+ fnvlist_free(vdevs);
+
+ return (error);
+}
+
static int
zpool_trim_wait(zpool_handle_t *zhp, nvlist_t *vdev_guids)
{
@@ -2730,7 +2773,13 @@ out:
* Scan the pool.
*/
int
-zpool_scan(zpool_handle_t *zhp, pool_scan_func_t func, pool_scrub_cmd_t cmd)
+zpool_scan(zpool_handle_t *zhp, pool_scan_func_t func, pool_scrub_cmd_t cmd) {
+ return (zpool_scan_range(zhp, func, cmd, 0, 0));
+}
+
+int
+zpool_scan_range(zpool_handle_t *zhp, pool_scan_func_t func,
+ pool_scrub_cmd_t cmd, time_t date_start, time_t date_end)
{
char errbuf[ERRBUFLEN];
int err;
@@ -2739,6 +2788,8 @@ zpool_scan(zpool_handle_t *zhp, pool_scan_func_t func, pool_scrub_cmd_t cmd)
nvlist_t *args = fnvlist_alloc();
fnvlist_add_uint64(args, "scan_type", (uint64_t)func);
fnvlist_add_uint64(args, "scan_command", (uint64_t)cmd);
+ fnvlist_add_uint64(args, "scan_date_start", (uint64_t)date_start);
+ fnvlist_add_uint64(args, "scan_date_end", (uint64_t)date_end);
err = lzc_scrub(ZFS_IOC_POOL_SCRUB, zhp->zpool_name, args, NULL);
fnvlist_free(args);
@@ -4344,7 +4395,7 @@ zpool_set_guid(zpool_handle_t *zhp, const uint64_t *guid)
libzfs_handle_t *hdl = zhp->zpool_hdl;
nvlist_t *nvl = NULL;
zfs_cmd_t zc = {"\0"};
- int error = -1;
+ int error;
if (guid != NULL) {
if (nvlist_alloc(&nvl, NV_UNIQUE_NAME, 0) != 0)
@@ -5127,9 +5178,10 @@ zpool_load_compat(const char *compat, boolean_t *features, char *report,
/* special cases (unset), "" and "off" => enable all features */
if (compat == NULL || compat[0] == '\0' ||
strcmp(compat, ZPOOL_COMPAT_OFF) == 0) {
- if (features != NULL)
+ if (features != NULL) {
for (uint_t i = 0; i < SPA_FEATURES; i++)
features[i] = B_TRUE;
+ }
if (report != NULL)
strlcpy(report, gettext("all features enabled"), rlen);
return (ZPOOL_COMPATIBILITY_OK);
diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs_status.c b/sys/contrib/openzfs/lib/libzfs/libzfs_status.c
index 1ee703968237..bdddefb92165 100644
--- a/sys/contrib/openzfs/lib/libzfs/libzfs_status.c
+++ b/sys/contrib/openzfs/lib/libzfs/libzfs_status.c
@@ -484,7 +484,8 @@ check_status(nvlist_t *config, boolean_t isimport,
}
for (i = 0; i < SPA_FEATURES; i++) {
zfeature_info_t *fi = &spa_feature_table[i];
- if (!fi->fi_zfs_mod_supported)
+ if (!fi->fi_zfs_mod_supported ||
+ (fi->fi_flags & ZFEATURE_FLAG_NO_UPGRADE))
continue;
if (c_features[i] && !nvlist_exists(feat, fi->fi_guid))
return (ZPOOL_STATUS_FEAT_DISABLED);
diff --git a/sys/contrib/openzfs/lib/libzfs_core/libzfs_core.abi b/sys/contrib/openzfs/lib/libzfs_core/libzfs_core.abi
index 63904f447e85..7464b3adb254 100644
--- a/sys/contrib/openzfs/lib/libzfs_core/libzfs_core.abi
+++ b/sys/contrib/openzfs/lib/libzfs_core/libzfs_core.abi
@@ -222,6 +222,10 @@
<elf-symbol name='spl_pagesize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='strlcat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='strlcpy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_iter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_lookup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ <elf-symbol name='zfs_tunable_set' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
</elf-function-symbols>
<abi-instr address-size='64' path='lib/libspl/assert.c' language='LANG_C99'>
<class-decl name='__va_list_tag' size-in-bits='192' is-struct='yes' visibility='default' id='d5027220'>
@@ -613,7 +617,6 @@
<array-type-def dimensions='1' type-id='de572c22' size-in-bits='1472' id='6d3c2f42'>
<subrange length='23' type-id='7359adad' id='fdd0f594'/>
</array-type-def>
- <type-decl name='long long int' size-in-bits='64' id='1eb56b1e'/>
<array-type-def dimensions='1' type-id='3a47d82b' size-in-bits='256' id='a133ec23'>
<subrange length='4' type-id='7359adad' id='16fe7105'/>
</array-type-def>
@@ -974,8 +977,6 @@
</abi-instr>
<abi-instr address-size='64' path='lib/libspl/os/linux/gethostid.c' language='LANG_C99'>
<type-decl name='long long unsigned int' size-in-bits='64' id='3a47d82b'/>
- <pointer-type-def type-id='26a90f95' size-in-bits='64' id='9b23c9ad'/>
- <qualified-type-def type-id='9b23c9ad' restrict='yes' id='8c85230f'/>
<function-decl name='strtoull' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='9d26089a'/>
<parameter type-id='8c85230f'/>
@@ -987,6 +988,13 @@
</function-decl>
</abi-instr>
<abi-instr address-size='64' path='lib/libspl/os/linux/getmntany.c' language='LANG_C99'>
+ <array-type-def dimensions='1' type-id='d315442e' size-in-bits='16' id='811205dc'>
+ <subrange length='1' type-id='7359adad' id='52f813b4'/>
+ </array-type-def>
+ <array-type-def dimensions='1' type-id='d3130597' size-in-bits='768' id='f63f23b9'>
+ <subrange length='12' type-id='7359adad' id='84827bdc'/>
+ </array-type-def>
+ <type-decl name='long long int' size-in-bits='64' id='1eb56b1e'/>
<class-decl name='mnttab' size-in-bits='256' is-struct='yes' visibility='default' id='1b055409'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='mnt_special' type-id='26a90f95' visibility='default'/>
@@ -1021,6 +1029,93 @@
<var-decl name='mnt_minor' type-id='3502e3ff' visibility='default'/>
</data-member>
</class-decl>
+ <typedef-decl name='__u16' type-id='8efea9e5' id='d315442e'/>
+ <typedef-decl name='__s32' type-id='95e97e5e' id='3158a266'/>
+ <typedef-decl name='__u32' type-id='f0981eeb' id='3f1a6b60'/>
+ <typedef-decl name='__s64' type-id='1eb56b1e' id='49659421'/>
+ <typedef-decl name='__u64' type-id='3a47d82b' id='d3130597'/>
+ <class-decl name='statx_timestamp' size-in-bits='128' is-struct='yes' visibility='default' id='94101016'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='tv_sec' type-id='49659421' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='tv_nsec' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='96'>
+ <var-decl name='__reserved' type-id='3158a266' visibility='default'/>
+ </data-member>
+ </class-decl>
+ <class-decl name='statx' size-in-bits='2048' is-struct='yes' visibility='default' id='720b04c5'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='stx_mask' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='32'>
+ <var-decl name='stx_blksize' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='stx_attributes' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='128'>
+ <var-decl name='stx_nlink' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='160'>
+ <var-decl name='stx_uid' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='192'>
+ <var-decl name='stx_gid' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='224'>
+ <var-decl name='stx_mode' type-id='d315442e' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='240'>
+ <var-decl name='__spare0' type-id='811205dc' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='256'>
+ <var-decl name='stx_ino' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='320'>
+ <var-decl name='stx_size' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='384'>
+ <var-decl name='stx_blocks' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='448'>
+ <var-decl name='stx_attributes_mask' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='512'>
+ <var-decl name='stx_atime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='640'>
+ <var-decl name='stx_btime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='768'>
+ <var-decl name='stx_ctime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='896'>
+ <var-decl name='stx_mtime' type-id='94101016' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1024'>
+ <var-decl name='stx_rdev_major' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1056'>
+ <var-decl name='stx_rdev_minor' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1088'>
+ <var-decl name='stx_dev_major' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1120'>
+ <var-decl name='stx_dev_minor' type-id='3f1a6b60' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1152'>
+ <var-decl name='stx_mnt_id' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1216'>
+ <var-decl name='__spare2' type-id='d3130597' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='1280'>
+ <var-decl name='__spare3' type-id='f63f23b9' visibility='default'/>
+ </data-member>
+ </class-decl>
<class-decl name='mntent' size-in-bits='320' is-struct='yes' visibility='default' id='56fe4a37'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='mnt_fsname' type-id='26a90f95' visibility='default'/>
@@ -1096,6 +1191,8 @@
<pointer-type-def type-id='1b055409' size-in-bits='64' id='9d424d31'/>
<pointer-type-def type-id='0bbec9cd' size-in-bits='64' id='62f7a03d'/>
<qualified-type-def type-id='62f7a03d' restrict='yes' id='f1cadedf'/>
+ <pointer-type-def type-id='720b04c5' size-in-bits='64' id='936b8e35'/>
+ <qualified-type-def type-id='936b8e35' restrict='yes' id='31d265b7'/>
<function-decl name='getmntent_r' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='e75a27e9'/>
<parameter type-id='3cad23cd'/>
@@ -1107,15 +1204,18 @@
<parameter type-id='822cd80b'/>
<return type-id='95e97e5e'/>
</function-decl>
- <function-decl name='strcmp' visibility='default' binding='global' size-in-bits='64'>
- <parameter type-id='80f4b756'/>
- <parameter type-id='80f4b756'/>
- <return type-id='95e97e5e'/>
- </function-decl>
<function-decl name='strerror' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='95e97e5e'/>
<return type-id='26a90f95'/>
</function-decl>
+ <function-decl name='statx' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='95e97e5e'/>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='95e97e5e'/>
+ <parameter type-id='f0981eeb'/>
+ <parameter type-id='31d265b7'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
<function-decl name='stat64' visibility='default' binding='global' size-in-bits='64'>
<parameter type-id='9d26089a'/>
<parameter type-id='f1cadedf'/>
@@ -1258,6 +1358,96 @@
<return type-id='48b5725f'/>
</function-decl>
</abi-instr>
+ <abi-instr address-size='64' path='lib/libspl/tunables.c' language='LANG_C99'>
+ <enum-decl name='zfs_tunable_type_t' naming-typedef-id='f50b1525' id='56905369'>
+ <underlying-type type-id='9cac1fee'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_INT' value='0'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_UINT' value='1'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_ULONG' value='2'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_U64' value='3'/>
+ <enumerator name='ZFS_TUNABLE_TYPE_STRING' value='4'/>
+ </enum-decl>
+ <typedef-decl name='zfs_tunable_type_t' type-id='56905369' id='f50b1525'/>
+ <enum-decl name='zfs_tunable_perm_t' naming-typedef-id='ada7336b' id='e80e6ebf'>
+ <underlying-type type-id='9cac1fee'/>
+ <enumerator name='ZFS_TUNABLE_PERM_ZMOD_RW' value='0'/>
+ <enumerator name='ZFS_TUNABLE_PERM_ZMOD_RD' value='1'/>
+ </enum-decl>
+ <typedef-decl name='zfs_tunable_perm_t' type-id='e80e6ebf' id='ada7336b'/>
+ <class-decl name='zfs_tunable' size-in-bits='320' is-struct='yes' visibility='default' id='1a97ee0e'>
+ <data-member access='public' layout-offset-in-bits='0'>
+ <var-decl name='zt_name' type-id='80f4b756' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='64'>
+ <var-decl name='zt_varp' type-id='eaa32e2f' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='128'>
+ <var-decl name='zt_varsz' type-id='b59d7dce' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='192'>
+ <var-decl name='zt_type' type-id='f50b1525' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='224'>
+ <var-decl name='zt_perm' type-id='ada7336b' visibility='default'/>
+ </data-member>
+ <data-member access='public' layout-offset-in-bits='256'>
+ <var-decl name='zt_desc' type-id='80f4b756' visibility='default'/>
+ </data-member>
+ </class-decl>
+ <typedef-decl name='zfs_tunable_t' type-id='1a97ee0e' id='12bf5c5e'/>
+ <typedef-decl name='zfs_tunable_iter_t' type-id='7ef33f92' id='d8d5f4ab'/>
+ <typedef-decl name='intmax_t' type-id='5b475db0' id='e104d842'/>
+ <typedef-decl name='uintmax_t' type-id='04d82f4b' id='f8b828c9'/>
+ <typedef-decl name='__intmax_t' type-id='bd54fe1a' id='5b475db0'/>
+ <typedef-decl name='__uintmax_t' type-id='7359adad' id='04d82f4b'/>
+ <pointer-type-def type-id='26a90f95' size-in-bits='64' id='9b23c9ad'/>
+ <qualified-type-def type-id='9b23c9ad' restrict='yes' id='8c85230f'/>
+ <qualified-type-def type-id='12bf5c5e' const='yes' id='180e47ee'/>
+ <pointer-type-def type-id='180e47ee' size-in-bits='64' id='a27af98c'/>
+ <pointer-type-def type-id='92f86508' size-in-bits='64' id='7ef33f92'/>
+ <function-decl name='strtoimax' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='8c85230f'/>
+ <parameter type-id='95e97e5e'/>
+ <return type-id='e104d842'/>
+ </function-decl>
+ <function-decl name='strtoumax' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='9d26089a'/>
+ <parameter type-id='8c85230f'/>
+ <parameter type-id='95e97e5e'/>
+ <return type-id='f8b828c9'/>
+ </function-decl>
+ <function-decl name='strcmp' visibility='default' binding='global' size-in-bits='64'>
+ <parameter type-id='80f4b756'/>
+ <parameter type-id='80f4b756'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_lookup' mangled-name='zfs_tunable_lookup' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_lookup'>
+ <parameter type-id='80f4b756' name='name'/>
+ <return type-id='a27af98c'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_iter' mangled-name='zfs_tunable_iter' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_iter'>
+ <parameter type-id='d8d5f4ab' name='cb'/>
+ <parameter type-id='eaa32e2f' name='arg'/>
+ <return type-id='48b5725f'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_set' mangled-name='zfs_tunable_set' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_set'>
+ <parameter type-id='a27af98c' name='zt'/>
+ <parameter type-id='80f4b756' name='val'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
+ <function-decl name='zfs_tunable_get' mangled-name='zfs_tunable_get' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_tunable_get'>
+ <parameter type-id='a27af98c' name='zt'/>
+ <parameter type-id='26a90f95' name='val'/>
+ <parameter type-id='b59d7dce' name='valsz'/>
+ <return type-id='95e97e5e'/>
+ </function-decl>
+ <function-type size-in-bits='64' id='92f86508'>
+ <parameter type-id='a27af98c'/>
+ <parameter type-id='eaa32e2f'/>
+ <return type-id='95e97e5e'/>
+ </function-type>
+ </abi-instr>
<abi-instr address-size='64' path='lib/libzfs_core/libzfs_core.c' language='LANG_C99'>
<array-type-def dimensions='1' type-id='03085adc' size-in-bits='192' id='083f8d58'>
<subrange length='3' type-id='7359adad' id='56f209d2'/>
diff --git a/sys/contrib/openzfs/lib/libzpool/Makefile.am b/sys/contrib/openzfs/lib/libzpool/Makefile.am
index 8553b377a760..aeacc595b363 100644
--- a/sys/contrib/openzfs/lib/libzpool/Makefile.am
+++ b/sys/contrib/openzfs/lib/libzpool/Makefile.am
@@ -177,6 +177,7 @@ nodist_libzpool_la_SOURCES = \
module/zfs/zfs_byteswap.c \
module/zfs/zfs_chksum.c \
module/zfs/zfs_debug_common.c \
+ module/zfs/zfs_crrd.c \
module/zfs/zfs_fm.c \
module/zfs/zfs_fuid.c \
module/zfs/zfs_ratelimit.c \
@@ -199,7 +200,7 @@ libzpool_la_LIBADD = \
libzstd.la \
libzutil.la
-libzpool_la_LIBADD += $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -ldl -lm
+libzpool_la_LIBADD += $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -lm
libzpool_la_LDFLAGS = -pthread
diff --git a/sys/contrib/openzfs/lib/libzpool/kernel.c b/sys/contrib/openzfs/lib/libzpool/kernel.c
index e397fc851cc1..2e8bf160465a 100644
--- a/sys/contrib/openzfs/lib/libzpool/kernel.c
+++ b/sys/contrib/openzfs/lib/libzpool/kernel.c
@@ -1025,25 +1025,13 @@ spl_fstrans_unmark(fstrans_cookie_t cookie)
}
int
-__spl_pf_fstrans_check(void)
-{
- return (0);
-}
-
-int
kmem_cache_reap_active(void)
{
return (0);
}
void
-zvol_create_minor(const char *name)
-{
- (void) name;
-}
-
-void
-zvol_create_minors_recursive(const char *name)
+zvol_create_minors(const char *name)
{
(void) name;
}
@@ -1073,8 +1061,8 @@ zvol_rename_minors(spa_t *spa, const char *oldname, const char *newname,
int
zfs_file_open(const char *path, int flags, int mode, zfs_file_t **fpp)
{
- int fd = -1;
- int dump_fd = -1;
+ int fd;
+ int dump_fd;
int err;
int old_umask = 0;
zfs_file_t *fp;
diff --git a/sys/contrib/openzfs/lib/libzpool/util.c b/sys/contrib/openzfs/lib/libzpool/util.c
index a297daedbd4d..1d0d1a1e56d9 100644
--- a/sys/contrib/openzfs/lib/libzpool/util.c
+++ b/sys/contrib/openzfs/lib/libzpool/util.c
@@ -36,7 +36,7 @@
#include <sys/fs/zfs.h>
#include <sys/zfs_refcount.h>
#include <sys/zfs_ioctl.h>
-#include <dlfcn.h>
+#include <sys/tunables.h>
#include <libzutil.h>
/*
@@ -151,97 +151,119 @@ show_pool_stats(spa_t *spa)
nvlist_free(config);
}
-/* *k_out must be freed by the caller */
+/*
+ * Common helper for working with libzpool tunables from the command line.
+ *
+ * Valid inputs:
+ *
+ * <name> show named tunable and value
+ * <name>=<value> set tunable value
+ *
+ * show show all tunables and values
+ * show=<name> show named tunable and value
+ * info show info about all tunables
+ * info=<name> show info about named tunable
+ */
+
+typedef enum { SHOW, INFO, SET } tunable_mode_t;
+
static int
-set_global_var_parse_kv(const char *arg, char **k_out, u_longlong_t *v_out)
+list_tunables_cb(const zfs_tunable_t *tunable, void *arg)
{
- int err;
- VERIFY(arg);
- char *d = strdup(arg);
-
- char *save = NULL;
- char *k = strtok_r(d, "=", &save);
- char *v_str = strtok_r(NULL, "=", &save);
- char *follow = strtok_r(NULL, "=", &save);
- if (k == NULL || v_str == NULL || follow != NULL) {
- err = EINVAL;
- goto err_free;
- }
-
- u_longlong_t val = strtoull(v_str, NULL, 0);
- if (val > UINT32_MAX) {
- fprintf(stderr, "Value for global variable '%s' must "
- "be a 32-bit unsigned integer, got '%s'\n", k, v_str);
- err = EOVERFLOW;
- goto err_free;
+ const tunable_mode_t *mode = arg;
+
+ static const char *type[] = {
+ "int", "uint", "ulong", "u64", "str",
+ };
+ static const char *perm[] = {
+ "rw", "rd",
+ };
+
+ if (*mode == SHOW) {
+ char val[64];
+ int err = zfs_tunable_get(tunable, val, sizeof (val));
+ if (err == 0)
+ printf("%s: %s\n", tunable->zt_name, val);
+ else
+ printf("%s: [error getting tunable value: %s]\n",
+ tunable->zt_name, strerror(err));
+ } else {
+ printf("%s [%s %s]: %s\n", tunable->zt_name,
+ type[tunable->zt_type], perm[tunable->zt_perm],
+ tunable->zt_desc);
}
- *k_out = strdup(k);
- *v_out = val;
- free(d);
return (0);
-
-err_free:
- free(d);
-
- return (err);
}
-
-/*
- * Sets given global variable in libzpool to given unsigned 32-bit value.
- * arg: "<variable>=<value>"
- */
int
-set_global_var(char const *arg)
+handle_tunable_option(const char *_arg, boolean_t quiet)
{
- void *zpoolhdl;
- char *varname;
- u_longlong_t val;
- int ret;
-
-#ifndef _ZFS_LITTLE_ENDIAN
- /*
- * On big endian systems changing a 64-bit variable would set the high
- * 32 bits instead of the low 32 bits, which could cause unexpected
- * results.
- */
- fprintf(stderr, "Setting global variables is only supported on "
- "little-endian systems\n");
- ret = ENOTSUP;
- goto out_ret;
-#endif
+ int err = 0;
+ char *arg = strdup(_arg);
+ char *k, *v;
+
+ v = arg;
+ k = strsep(&v, "=");
+
+ tunable_mode_t mode;
+
+ if (strcmp(k, "show") == 0) {
+ mode = SHOW;
+ k = v;
+ } else if (strcmp(k, "info") == 0) {
+ mode = INFO;
+ k = v;
+ } else if (v == NULL) {
+ mode = SHOW;
+ } else {
+ mode = SET;
+ }
- if ((ret = set_global_var_parse_kv(arg, &varname, &val)) != 0) {
- goto out_ret;
+ if (quiet && mode != SET) {
+ err = EINVAL;
+ goto out;
}
- zpoolhdl = dlopen("libzpool.so", RTLD_LAZY);
- if (zpoolhdl != NULL) {
- uint32_t *var;
- var = dlsym(zpoolhdl, varname);
- if (var == NULL) {
- fprintf(stderr, "Global variable '%s' does not exist "
- "in libzpool.so\n", varname);
- ret = EINVAL;
- goto out_dlclose;
+ if (mode == SET) {
+ const zfs_tunable_t *tunable = zfs_tunable_lookup(k);
+ if (tunable == NULL) {
+ err = ENOENT;
+ goto out;
}
- *var = (uint32_t)val;
+ char vold[256], vnew[256];
+ if (zfs_tunable_get(tunable, vold, sizeof (vold)) != 0)
+ strcpy(vold, "???");
+ err = zfs_tunable_set(tunable, v);
+ if (err != 0)
+ goto out;
+ if (zfs_tunable_get(tunable, vnew, sizeof (vnew)) != 0)
+ strcpy(vnew, "???");
+
+ if (!quiet)
+ printf("%s: %s -> %s\n", k, vold, vnew);
+ } else if (k != NULL) {
+ const zfs_tunable_t *tunable = zfs_tunable_lookup(k);
+ if (tunable == NULL) {
+ err = ENOENT;
+ goto out;
+ }
+ list_tunables_cb(tunable, &mode);
} else {
- fprintf(stderr, "Failed to open libzpool.so to set global "
- "variable\n");
- ret = EIO;
- goto out_free;
+ zfs_tunable_iter(list_tunables_cb, &mode);
}
- ret = 0;
+out:
+ if (!quiet) {
+ if (err == ENOENT)
+ fprintf(stderr, "no such tunable: %s\n", k);
+ else if (err != 0)
+ fprintf(stderr, "couldn't set tunable '%s': %s\n",
+ k, strerror(err));
+ }
-out_dlclose:
- dlclose(zpoolhdl);
-out_free:
- free(varname);
-out_ret:
- return (ret);
+ free(arg);
+ return (err);
}
static nvlist_t *
diff --git a/sys/contrib/openzfs/man/man1/ztest.1 b/sys/contrib/openzfs/man/man1/ztest.1
index 0cbb58e40dd8..febbb62b1664 100644
--- a/sys/contrib/openzfs/man/man1/ztest.1
+++ b/sys/contrib/openzfs/man/man1/ztest.1
@@ -188,12 +188,8 @@ i.e. given
will be loaded.
.It Fl C , -vdev-class-state Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy random No (default : Sy random )
The vdev allocation class state.
-.It Fl o , -option Ns = Ns Ar variable Ns = Ns Ar value
-Set global
-.Ar variable
-to an unsigned 32-bit integer
-.Ar value
-(little-endian only).
+.It Fl o , -option Ns = Ns Ar var Ns = Ns Ar value Ns …
+Set the given tunable to the provided value.
.It Fl G , -dump-debug
Dump zfs_dbgmsg buffer before exiting due to an error.
.It Fl V , -verbose
diff --git a/sys/contrib/openzfs/man/man4/zfs.4 b/sys/contrib/openzfs/man/man4/zfs.4
index 67b2cef46e80..4a5f9fd93f4f 100644
--- a/sys/contrib/openzfs/man/man4/zfs.4
+++ b/sys/contrib/openzfs/man/man4/zfs.4
@@ -1399,14 +1399,15 @@ If this setting is 0, then even if feature@block_cloning is enabled,
using functions and system calls that attempt to clone blocks will act as
though the feature is disabled.
.
-.It Sy zfs_bclone_wait_dirty Ns = Ns Sy 0 Ns | Ns 1 Pq int
-When set to 1 the FICLONE and FICLONERANGE ioctls wait for dirty data to be
-written to disk.
-This allows the clone operation to reliably succeed when a file is
+.It Sy zfs_bclone_wait_dirty Ns = Ns Sy 1 Ns | Ns 0 Pq int
+When set to 1 the FICLONE and FICLONERANGE ioctls will wait for any dirty
+data to be written to disk before proceeding.
+This ensures that the clone operation reliably succeeds, even if a file is
modified and then immediately cloned.
-For small files this may be slower than making a copy of the file.
-Therefore, this setting defaults to 0 which causes a clone operation to
-immediately fail when encountering a dirty block.
+Note that for small files this may be slower than simply copying the file.
+When set to 0 the clone operation will immediately fail if it encounters
+any dirty blocks.
+By default waiting is enabled.
.
.It Sy zfs_blake3_impl Ns = Ns Sy fastest Pq string
Select a BLAKE3 implementation.
@@ -1713,10 +1714,19 @@ Similar to
but for cleanup of old indirection records for removed vdevs.
.
.It Sy zfs_immediate_write_sz Ns = Ns Sy 32768 Ns B Po 32 KiB Pc Pq s64
-Largest data block to write to the ZIL.
-Larger blocks will be treated as if the dataset being written to had the
-.Sy logbias Ns = Ns Sy throughput
-property set.
+Largest write size to store the data directly into the ZIL if
+.Sy logbias Ns = Ns Sy latency .
+Larger writes may be written indirectly similar to
+.Sy logbias Ns = Ns Sy throughput .
+In presence of SLOG this parameter is ignored, as if it was set to infinity,
+storing all written data into ZIL to not depend on regular vdev latency.
+.
+.It Sy zil_special_is_slog Ns = Ns Sy 1 Ns | Ns 0 Pq int
+When enabled, and written blocks go to normal vdevs, treat present special
+vdevs as SLOGs.
+Blocks that go to the special vdevs are still written indirectly, as with
+.Sy logbias Ns = Ns Sy throughput .
+This parameter is ignored if an SLOG is present.
.
.It Sy zfs_initialize_value Ns = Ns Sy 16045690984833335022 Po 0xDEADBEEFDEADBEEE Pc Pq u64
Pattern written to vdev free space by
@@ -2237,6 +2247,21 @@ Defer frees starting in this pass.
Maximum memory used for prefetching a checkpoint's space map on each
vdev while discarding the checkpoint.
.
+.It Sy zfs_spa_note_txg_time Ns = Ns Sy 600 Pq uint
+This parameter defines, in seconds, how often the TXG time database will record
+a new TXG if it has changed.
+After the specified time interval has passed, and if the TXG number has changed,
+the new value is recorded in the database.
+These timestamps can later be used for more granular operations, such as
+scrubbing.
+.
+.It Sy zfs_spa_flush_txg_time Ns = Ns Sy 600 Pq uint
+This parameter defines, in seconds, how often the ZFS will flush
+the TXG time database to disk.
+It ensures that the data is actually written to persistent storage, which helps
+preserve the database in case of unexpected shutdown.
+The database is also automatically flushed during the export sequence.
+.
.It Sy zfs_special_class_metadata_reserve_pct Ns = Ns Sy 25 Ns % Pq uint
Only allow small data blocks to be allocated on the special and dedup vdev
types when the available free space percentage on these vdevs exceeds this
@@ -2462,8 +2487,8 @@ code for this record type.
The tunable has no effect if the feature is disabled.
.
.It Sy zfs_embedded_slog_min_ms Ns = Ns Sy 64 Pq uint
-Usually, one metaslab from each normal-class vdev is dedicated for use by
-the ZIL to log synchronous writes.
+Usually, one metaslab from each normal and special class vdev is dedicated
+for use by the ZIL to log synchronous writes.
However, if there are fewer than
.Sy zfs_embedded_slog_min_ms
metaslabs in the vdev, this functionality is disabled.
diff --git a/sys/contrib/openzfs/man/man7/zfsprops.7 b/sys/contrib/openzfs/man/man7/zfsprops.7
index ac58203f00a1..ac3152cb5d51 100644
--- a/sys/contrib/openzfs/man/man7/zfsprops.7
+++ b/sys/contrib/openzfs/man/man7/zfsprops.7
@@ -541,10 +541,16 @@ The
.Sy blocksize
cannot be changed once the volume has been written, so it should be set at
volume creation time.
-The default
-.Sy blocksize
-for volumes is 16 KiB.
-Any power of 2 from 512 bytes to 128 KiB is valid.
+The size specified must be a power of two greater than or equal to
+.Ar 512 B
+and less than or equal to
+.Ar 128 KiB .
+If the
+.Sy large_blocks
+feature is enabled on the pool, the size may be up to
+.Ar 16 MiB .
+The default size is
+.Ar 16 KiB .
.Pp
This property can also be referred to by its shortened column name,
.Sy volblock .
@@ -1282,10 +1288,12 @@ This feature must be enabled to be used
.It Sy special_small_blocks Ns = Ns Ar size
This value represents the threshold block size for including small file
or zvol blocks into the special allocation class.
-Blocks smaller than or equal to this
-value will be assigned to the special allocation class while greater blocks
-will be assigned to the regular class.
-Valid values are zero or a power of two from 512 up to 1048576 (1 MiB).
+Blocks smaller than or equal to this value after compression and encryption
+will be assigned to the special allocation class, while greater blocks will
+be assigned to the regular class.
+Valid values are from 0 to maximum block size (
+.Ar 16 MiB
+).
The default size is 0 which means no small file or zvol blocks
will be allocated in the special class.
.Pp
@@ -1569,11 +1577,6 @@ See
.Xr zpool-features 7
for details on ZFS feature flags.
.Pp
-However, blocks larger than
-.Ar 1 MiB
-can have an impact on i/o latency (e.g. tying up a spinning disk for
-~300ms), and also potentially on the memory allocator.
-.Pp
Note that maximum size is still limited by default to
.Ar 1 MiB
on x86_32, see
@@ -1864,7 +1867,8 @@ property is updated with
, the property is set to desired value, but the operation to share, reshare
or unshare the the dataset is not performed.
.It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
-Provide a hint to ZFS about handling of synchronous requests in this dataset.
+Provide a hint to ZFS about handling of synchronous write requests in this
+dataset.
If
.Sy logbias
is set to
@@ -1872,12 +1876,12 @@ is set to
.Pq the default ,
ZFS will use pool log devices
.Pq if configured
-to handle the requests at low latency.
+to handle the write requests at low latency.
If
.Sy logbias
is set to
.Sy throughput ,
-ZFS will not use configured pool log devices.
+ZFS will not use configured pool log devices to store written data.
ZFS will instead optimize synchronous operations for global pool throughput and
efficient use of resources.
.It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
diff --git a/sys/contrib/openzfs/man/man7/zpool-features.7 b/sys/contrib/openzfs/man/man7/zpool-features.7
index 8ae1b2b3b923..10dfd1f92936 100644
--- a/sys/contrib/openzfs/man/man7/zpool-features.7
+++ b/sys/contrib/openzfs/man/man7/zpool-features.7
@@ -401,6 +401,17 @@ This feature becomes
.Sy active
when first block is cloned.
When the last cloned block is freed, it goes back to the enabled state.
+.feature com.truenas block_cloning_endian yes
+This feature corrects ZAP entry endianness issues in the Block Reference
+Table (BRT) used by block cloning.
+During the original block cloning implementation, BRT ZAP entries were
+mistakenly stored as arrays of 8 single-byte entries instead of single
+8-byte entries, making pools non-endian-safe.
+.Pp
+This feature is activated when the first BRT ZAP is created (that way
+ensuring compatibility with existing pools).
+When active, new BRT entries are stored in the correct endian-safe format.
+The feature becomes inactive when all BRT ZAPs are destroyed.
.feature com.delphix bookmarks yes extensible_dataset
This feature enables use of the
.Nm zfs Cm bookmark
@@ -493,6 +504,19 @@ vdev type, or when adding a new
.Sy draid
vdev to an existing pool.
.
+.feature com.klarasystems dynamic_gang_header no
+This feature enables larger gang headers based on the sector size of the pool.
+When enabled, gang headers will use the entire space allocated for them, instead
+of always restricting themselves to 512 bytes.
+This can reduce the need for nested gang trees in extreme fragmentation
+scenarios.
+.Pp
+This feature becomes active when a gang header is written that is larger than
+512 bytes.
+This feature is not enabled by
+.Xr zpool-upgrade 8 .
+Instead, it must be manually enabled, or be part of a compatibility file.
+.
.feature org.illumos edonr no extensible_dataset
This feature enables the use of the Edon-R hash algorithm for checksum,
including for nopwrite
@@ -829,6 +853,23 @@ when the
command is used on a top-level vdev, and will never return to being
.Sy enabled .
.
+.feature com.truenas physical_rewrite yes extensible_dataset
+This feature enables physical block rewriting that preserves logical birth
+times, avoiding unnecessary inclusion of rewritten blocks in incremental
+.Nm zfs Cm send
+streams.
+When enabled, the
+.Nm zfs Cm rewrite Fl P
+command can be used.
+.Pp
+This feature becomes
+.Sy active
+the first time
+.Nm zfs Cm rewrite Fl P
+is used on any dataset, and will return to being
+.Sy enabled
+once all datasets that have ever used physical rewrite are destroyed.
+.
.feature org.zfsonlinux project_quota yes extensible_dataset
This feature allows administrators to account the spaces and objects usage
information against the project identifier
diff --git a/sys/contrib/openzfs/man/man7/zpoolconcepts.7 b/sys/contrib/openzfs/man/man7/zpoolconcepts.7
index 60f16269a0ac..dafe3bffc453 100644
--- a/sys/contrib/openzfs/man/man7/zpoolconcepts.7
+++ b/sys/contrib/openzfs/man/man7/zpoolconcepts.7
@@ -390,11 +390,6 @@ Multiple log devices can also be specified, and they can be mirrored.
See the
.Sx EXAMPLES
section for an example of mirroring multiple log devices.
-.Pp
-Log devices can be added, replaced, attached, detached, and removed.
-In addition, log devices are imported and exported as part of the pool
-that contains them.
-Mirrored devices can be removed by specifying the top-level mirror vdev.
.
.Ss Cache Devices
Devices can be added to a storage pool as
@@ -486,8 +481,8 @@ current state of the pool won't be scanned during a scrub.
.
.Ss Special Allocation Class
Allocations in the special class are dedicated to specific block types.
-By default, this includes all metadata, the indirect blocks of user data, and
-any deduplication tables.
+By default, this includes all metadata, the indirect blocks of user data,
+intent log (in absence of separate log device), and deduplication tables.
The class can also be provisioned to accept small file blocks or zvol blocks
on a per dataset granularity.
.Pp
diff --git a/sys/contrib/openzfs/man/man8/zdb.8 b/sys/contrib/openzfs/man/man8/zdb.8
index 8bfd0dcdc381..3984aaac5866 100644
--- a/sys/contrib/openzfs/man/man8/zdb.8
+++ b/sys/contrib/openzfs/man/man8/zdb.8
@@ -474,10 +474,15 @@ as it runs.
Exercise extreme caution when using this option in shared or uncontrolled
environments.
.It Fl o , -option Ns = Ns Ar var Ns = Ns Ar value Ns …
-Set the given global libzpool variable to the provided value.
-The value must be an unsigned 32-bit integer.
-Currently only little-endian systems are supported to avoid accidentally setting
-the high 32 bits of 64-bit variables.
+Set the given tunable to the provided value.
+.It Fl o , -option Ns = Ns Ar var Ns …
+Show the value of the given tunable.
+.It Fl o , -option Ns = Ns show
+Show all tunables and their values.
+.It Fl o , -option Ns = Ns info Ns = Ns Ar value Ns …
+Show info about a tunable, including their name, type and description.
+.It Fl o , -option Ns = Ns info
+Show info about all tunables.
.It Fl P , -parseable
Print numbers in an unscaled form more amenable to parsing, e.g.\&
.Sy 1000000
diff --git a/sys/contrib/openzfs/man/man8/zfs-rewrite.8 b/sys/contrib/openzfs/man/man8/zfs-rewrite.8
index 423d6d439e28..a3a037f3794a 100644
--- a/sys/contrib/openzfs/man/man8/zfs-rewrite.8
+++ b/sys/contrib/openzfs/man/man8/zfs-rewrite.8
@@ -31,7 +31,7 @@
.Sh SYNOPSIS
.Nm zfs
.Cm rewrite
-.Oo Fl rvx Ns Oc
+.Oo Fl Prvx Ns Oc
.Op Fl l Ar length
.Op Fl o Ar offset
.Ar file Ns | Ns Ar directory Ns …
@@ -43,6 +43,15 @@ as is without modification at a new location and possibly with new
properties, such as checksum, compression, dedup, copies, etc,
as if they were atomically read and written back.
.Bl -tag -width "-r"
+.It Fl P
+Perform physical rewrite, preserving logical birth time of blocks.
+By default, rewrite updates logical birth times, making blocks appear
+as modified in snapshots and incremental send streams.
+Physical rewrite preserves logical birth times, avoiding unnecessary
+inclusion in incremental streams.
+Physical rewrite requires the
+.Sy physical_rewrite
+feature to be enabled on the pool.
.It Fl l Ar length
Rewrite at most this number of bytes.
.It Fl o Ar offset
@@ -60,17 +69,22 @@ same as some property changes may increase pool space usage.
Holes that were never written or were previously zero-compressed are
not rewritten and will remain holes even if compression is disabled.
.Pp
-Rewritten blocks will be seen as modified in next snapshot and as such
-included into the incremental
-.Nm zfs Cm send
-stream.
-.Pp
If a
.Fl l
or
.Fl o
value request a rewrite to regions past the end of the file, then those
regions are silently ignored, and no error is reported.
+.Pp
+By default, rewritten blocks update their logical birth time,
+meaning they will be included in incremental
+.Nm zfs Cm send
+streams as modified data.
+When the
+.Fl P
+flag is used, rewritten blocks preserve their logical birth time, since
+there are no user data changes.
.
.Sh SEE ALSO
-.Xr zfsprops 7
+.Xr zfsprops 7 ,
+.Xr zpool-features 7
diff --git a/sys/contrib/openzfs/man/man8/zpool-events.8 b/sys/contrib/openzfs/man/man8/zpool-events.8
index 7af1917da6d9..2d32dce2bb65 100644
--- a/sys/contrib/openzfs/man/man8/zpool-events.8
+++ b/sys/contrib/openzfs/man/man8/zpool-events.8
@@ -28,7 +28,7 @@
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" Copyright (c) 2024, 2025, Klara, Inc.
.\"
-.Dd May 27, 2025
+.Dd July 3, 2025
.Dt ZPOOL-EVENTS 8
.Os
.
@@ -465,7 +465,7 @@ ZIO_FLAG_DONT_RETRY:0x00000400
ZIO_FLAG_NODATA:0x00001000
ZIO_FLAG_INDUCE_DAMAGE:0x00002000
-ZIO_FLAG_IO_ALLOCATING:0x00004000
+ZIO_FLAG_ALLOC_THROTTLED:0x00004000
ZIO_FLAG_IO_RETRY:0x00008000
ZIO_FLAG_PROBE:0x00010000
ZIO_FLAG_TRYHARD:0x00020000
diff --git a/sys/contrib/openzfs/man/man8/zpool-initialize.8 b/sys/contrib/openzfs/man/man8/zpool-initialize.8
index d7c9d22aba97..39579a58010e 100644
--- a/sys/contrib/openzfs/man/man8/zpool-initialize.8
+++ b/sys/contrib/openzfs/man/man8/zpool-initialize.8
@@ -26,6 +26,7 @@
.\" Copyright (c) 2018 George Melikov. All Rights Reserved.
.\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
+.\" Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
.\"
.Dd May 27, 2021
.Dt ZPOOL-INITIALIZE 8
@@ -39,7 +40,7 @@
.Cm initialize
.Op Fl c Ns | Ns Fl s | Ns Fl u
.Op Fl w
-.Ar pool
+.Fl a Ns | Ns Ar pool
.Oo Ar device Oc Ns …
.
.Sh DESCRIPTION
@@ -48,6 +49,10 @@ devices, or all eligible devices in the pool if no individual devices are
specified.
Only leaf data or log devices may be initialized.
.Bl -tag -width Ds
+.It Fl a , -all
+Begin, cancel, suspend initializing on
+all
+pools.
.It Fl c , -cancel
Cancel initializing on the specified devices, or all eligible devices if none
are specified.
diff --git a/sys/contrib/openzfs/man/man8/zpool-scrub.8 b/sys/contrib/openzfs/man/man8/zpool-scrub.8
index 21bd6735ede4..0ecf8bd3851f 100644
--- a/sys/contrib/openzfs/man/man8/zpool-scrub.8
+++ b/sys/contrib/openzfs/man/man8/zpool-scrub.8
@@ -26,8 +26,9 @@
.\" Copyright (c) 2018, 2021 George Melikov. All Rights Reserved.
.\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
+.\" Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
.\"
-.Dd November 18, 2024
+.Dd December 11, 2024
.Dt ZPOOL-SCRUB 8
.Os
.
@@ -39,7 +40,9 @@
.Cm scrub
.Op Ns Fl e | Ns Fl p | Fl s Ns | Fl C Ns
.Op Fl w
-.Ar pool Ns …
+.Op Fl S Ar date
+.Op Fl E Ar date
+.Fl a Ns | Ns Ar pool Ns …
.
.Sh DESCRIPTION
Begins a scrub or resumes a paused scrub.
@@ -89,6 +92,12 @@ During this period, no completion time estimate will be provided.
.
.Sh OPTIONS
.Bl -tag -width "-s"
+.It Fl a , -all
+Begin, pause, stop scrub on
+all
+pools.
+Initiating scrubs on multiple pools can put considerable load and memory
+pressure on the system, so this operation should be performed with caution.
.It Fl s
Stop scrubbing.
.It Fl p
@@ -118,6 +127,44 @@ resilvering, nor can it be run when a regular scrub is paused.
Continue scrub from last saved txg (see zpool
.Sy last_scrubbed_txg
property).
+.It Fl S Ar date , Fl E Ar date
+Allows specifying the date range for blocks created between these dates.
+.Bl -bullet -compact -offset indent
+.It
+.Fl S
+Defines a start date.
+If not specified, scrubbing begins from the start of the pool's
+existence.
+.It
+.Fl E
+Defines an end date.
+If not specified, scrubbing continues up to the most recent data.
+.El
+The provided date should be in the format:
+.Dq YYYY-MM-DD HH:MM .
+Where:
+.Bl -bullet -compact -offset indent
+.It
+.Dq YYYY
+is the year.
+.It
+.Dq MM
+is the numeric representation of the month.
+.It
+.Dq DD
+is the day of the month.
+.It
+.Dq HH
+is the hour.
+.It
+.Dq MM
+is the minutes.
+.El
+The hour and minutes parameters can be omitted.
+The time should be provided in machine local time zone.
+Specifying dates prior to enabling this feature will result in scrubbing
+starting from the date the pool was created.
+If the time was moved backward manually the data range may become inaccurate.
.El
.Sh EXAMPLES
.Ss Example 1
diff --git a/sys/contrib/openzfs/man/man8/zpool-trim.8 b/sys/contrib/openzfs/man/man8/zpool-trim.8
index 06cbd5abf7eb..18723e1be0d2 100644
--- a/sys/contrib/openzfs/man/man8/zpool-trim.8
+++ b/sys/contrib/openzfs/man/man8/zpool-trim.8
@@ -26,6 +26,7 @@
.\" Copyright (c) 2018 George Melikov. All Rights Reserved.
.\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
+.\" Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
.\"
.Dd May 27, 2021
.Dt ZPOOL-TRIM 8
@@ -40,7 +41,7 @@
.Op Fl dw
.Op Fl r Ar rate
.Op Fl c Ns | Ns Fl s
-.Ar pool
+.Fl a Ns | Ns Ar pool
.Oo Ar device Ns Oc Ns …
.
.Sh DESCRIPTION
@@ -57,6 +58,10 @@ See the documentation for the
.Sy autotrim
property above for the types of vdev devices which can be trimmed.
.Bl -tag -width Ds
+.It Fl a , -all
+Perform TRIM operation on
+all
+pools.
.It Fl d , -secure
Causes a secure TRIM to be initiated.
When performing a secure TRIM, the
diff --git a/sys/contrib/openzfs/module/Kbuild.in b/sys/contrib/openzfs/module/Kbuild.in
index 667f061c6e16..3d6f288fa5da 100644
--- a/sys/contrib/openzfs/module/Kbuild.in
+++ b/sys/contrib/openzfs/module/Kbuild.in
@@ -406,6 +406,7 @@ ZFS_OBJS := \
zfs_byteswap.o \
zfs_chksum.o \
zfs_debug_common.o \
+ zfs_crrd.o \
zfs_fm.o \
zfs_fuid.o \
zfs_impl.o \
@@ -494,3 +495,34 @@ UBSAN_SANITIZE_zfs/sa.o := n
ifeq ($(CONFIG_ALTIVEC),y)
$(obj)/zfs/vdev_raidz_math_powerpc_altivec.o : c_flags += -maltivec
endif
+
+# The following recipes attempt to fix out of src-tree builds, where $(src) != $(obj), so that the
+# subdir %.c/%.S -> %.o targets will work as expected. The in-kernel pattern targets do not seem to
+# be working on subdirs since about ~6.10
+zobjdirs = $(dir $(zfs-objs)) $(dir $(spl-objs)) \
+ $(dir $(zfs-$(CONFIG_X86))) $(dir $(zfs-$(CONFIG_UML_X86))) $(dir $(zfs-$(CONFIG_ARM64))) \
+ $(dir $(zfs-$(CONFIG_PPC64))) $(dir $(zfs-$(CONFIG_PPC)))
+
+z_cdirs = $(sort $(filter-out lua/setjmp/ $(addprefix icp/asm-aarch64/, aes/ blake3/ modes/ sha2/) \
+ $(addprefix icp/asm-x86_64/, aes/ blake3/ modes/ sha2/) \
+ $(addprefix icp/asm-ppc/, aes/ blake3/ modes/ sha2/) \
+ $(addprefix icp/asm-ppc64/, aes/ blake3/ modes/ sha2/), $(zobjdirs)))
+z_sdirs = $(sort $(filter lua/setjmp/ $(addprefix icp/asm-aarch64/, aes/ blake3/ modes/ sha2/) \
+ $(addprefix icp/asm-x86_64/, aes/ blake3/ modes/ sha2/) \
+ $(addprefix icp/asm-ppc/, aes/ blake3/ modes/ sha2/) \
+ $(addprefix icp/asm-ppc64/, aes/ blake3/ modes/ sha2/), $(zobjdirs)))
+
+define ZKMOD_C_O_MAKE_TARGET
+$1%.o: $(src)/$1%.c FORCE
+ $$(call if_changed_rule,cc_o_c)
+ $$(call cmd,force_checksrc)
+endef
+
+define ZKMOD_S_O_MAKE_TARGET
+$1%.o: $(src)/$1%.S FORCE
+ $$(call if_changed_rule,as_o_S)
+ $$(call cmd,force_checksrc)
+endef
+
+$(foreach target,$(z_cdirs), $(eval $(call ZKMOD_C_O_MAKE_TARGET,$(target))))
+$(foreach target,$(z_sdirs), $(eval $(call ZKMOD_S_O_MAKE_TARGET,$(target))))
diff --git a/sys/contrib/openzfs/module/Makefile.bsd b/sys/contrib/openzfs/module/Makefile.bsd
index 7e7c3db73a43..3ba38c43f25b 100644
--- a/sys/contrib/openzfs/module/Makefile.bsd
+++ b/sys/contrib/openzfs/module/Makefile.bsd
@@ -217,6 +217,7 @@ SRCS+= abd_os.c \
vdev_label_os.c \
zfs_acl.c \
zfs_ctldir.c \
+ zfs_crrd.c \
zfs_debug.c \
zfs_dir.c \
zfs_file_os.c \
diff --git a/sys/contrib/openzfs/module/Makefile.in b/sys/contrib/openzfs/module/Makefile.in
index e9a268121762..859ba8649dd7 100644
--- a/sys/contrib/openzfs/module/Makefile.in
+++ b/sys/contrib/openzfs/module/Makefile.in
@@ -57,7 +57,7 @@ modules-Linux:
$(if @KERNEL_LD@,LD=@KERNEL_LD@) $(if @KERNEL_LLVM@,LLVM=@KERNEL_LLVM@) \
$(if @KERNEL_CROSS_COMPILE@,CROSS_COMPILE=@KERNEL_CROSS_COMPILE@) \
$(if @KERNEL_ARCH@,ARCH=@KERNEL_ARCH@) \
- $(if @OBJTOOL_DISABLE_WERROR@,objtool=@top_builddir@/scripts/objtool-wrapper) \
+ $(if @OBJTOOL_DISABLE_WERROR@,objtool=@abs_top_builddir@/scripts/objtool-wrapper) \
M="$$PWD" @KERNEL_MAKE@ CONFIG_ZFS=m modules
modules-FreeBSD:
diff --git a/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c b/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c
index f9125a067cd1..3f360d167b17 100644
--- a/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c
+++ b/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c
@@ -101,6 +101,15 @@ spl_panic(const char *file, const char *func, int line, const char *fmt, ...)
va_end(ap);
}
+/*
+ * Check if the current thread is a memory reclaim thread.
+ * Returns true if curproc is pageproc (FreeBSD's page daemon).
+ */
+int
+current_is_reclaim_thread(void)
+{
+ return (curproc == pageproc);
+}
SYSINIT(opensolaris_utsname_init, SI_SUB_TUNABLES, SI_ORDER_ANY,
opensolaris_utsname_init, NULL);
diff --git a/sys/contrib/openzfs/module/os/freebsd/spl/spl_vm.c b/sys/contrib/openzfs/module/os/freebsd/spl/spl_vm.c
index 733c2bd07ebb..9d5f025423a1 100644
--- a/sys/contrib/openzfs/module/os/freebsd/spl/spl_vm.c
+++ b/sys/contrib/openzfs/module/os/freebsd/spl/spl_vm.c
@@ -43,6 +43,7 @@
const int zfs_vm_pagerret_bad = VM_PAGER_BAD;
const int zfs_vm_pagerret_error = VM_PAGER_ERROR;
const int zfs_vm_pagerret_ok = VM_PAGER_OK;
+const int zfs_vm_pagerret_pend = VM_PAGER_PEND;
const int zfs_vm_pagerput_sync = VM_PAGER_PUT_SYNC;
const int zfs_vm_pagerput_inval = VM_PAGER_PUT_INVAL;
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c
index 334264f6da2f..5c5adc6cc12b 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c
@@ -2357,10 +2357,42 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr,
* In FreeBSD, we don't care about permissions of individual ADS.
* Note that not checking them is not just an optimization - without
* this shortcut, EA operations may bogusly fail with EACCES.
+ *
+ * If this is a named attribute lookup, do the checks.
*/
+#if __FreeBSD_version >= 1500040
+ if ((zp->z_pflags & ZFS_XATTR) && (flags & V_NAMEDATTR) == 0)
+#else
if (zp->z_pflags & ZFS_XATTR)
+#endif
return (0);
+ /*
+ * If a named attribute directory then validate against base file
+ */
+ if (is_attr) {
+ if ((error = zfs_zget(ZTOZSB(zp),
+ zp->z_xattr_parent, &xzp)) != 0) {
+ return (error);
+ }
+
+ check_zp = xzp;
+
+ /*
+ * fixup mode to map to xattr perms
+ */
+
+ if (mode & (ACE_WRITE_DATA|ACE_APPEND_DATA)) {
+ mode &= ~(ACE_WRITE_DATA|ACE_APPEND_DATA);
+ mode |= ACE_WRITE_NAMED_ATTRS;
+ }
+
+ if (mode & (ACE_READ_DATA|ACE_EXECUTE)) {
+ mode &= ~(ACE_READ_DATA|ACE_EXECUTE);
+ mode |= ACE_READ_NAMED_ATTRS;
+ }
+ }
+
owner = zfs_fuid_map_id(zp->z_zfsvfs, zp->z_uid, cr, ZFS_OWNER);
/*
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c
index 493ac9f69ad4..0456552ed07e 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c
@@ -1209,6 +1209,8 @@ zfs_set_fuid_feature(zfsvfs_t *zfsvfs)
zfsvfs->z_use_sa = USE_SA(zfsvfs->z_version, zfsvfs->z_os);
}
+extern int zfs_xattr_compat;
+
static int
zfs_domount(vfs_t *vfsp, char *osname)
{
@@ -1289,6 +1291,16 @@ zfs_domount(vfs_t *vfsp, char *osname)
goto out;
}
+#if __FreeBSD_version >= 1500040
+ /*
+ * Named attributes can only work if the xattr property is set to
+ * on/dir and not sa. Also, zfs_xattr_compat must be set.
+ */
+ if ((zfsvfs->z_flags & ZSB_XATTR) != 0 && !zfsvfs->z_xattr_sa &&
+ zfs_xattr_compat)
+ vfsp->mnt_flag |= MNT_NAMEDATTR;
+#endif
+
vfs_mountedfrom(vfsp, osname);
if (!zfsvfs->z_issnap)
@@ -1812,6 +1824,14 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t **vpp)
err = vn_lock(*vpp, flags);
if (err != 0)
vrele(*vpp);
+#if __FreeBSD_version >= 1500040
+ else if ((zp->z_pflags & ZFS_XATTR) != 0) {
+ if ((*vpp)->v_type == VDIR)
+ vn_irflag_set_cond(*vpp, VIRF_NAMEDDIR);
+ else
+ vn_irflag_set_cond(*vpp, VIRF_NAMEDATTR);
+ }
+#endif
}
if (err != 0)
*vpp = NULL;
@@ -1964,9 +1984,17 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp)
*vpp = ZTOV(zp);
zfs_exit(zfsvfs, FTAG);
err = vn_lock(*vpp, flags);
- if (err == 0)
+ if (err == 0) {
vnode_create_vobject(*vpp, zp->z_size, curthread);
- else
+#if __FreeBSD_version >= 1500040
+ if ((zp->z_pflags & ZFS_XATTR) != 0) {
+ if ((*vpp)->v_type == VDIR)
+ vn_irflag_set_cond(*vpp, VIRF_NAMEDDIR);
+ else
+ vn_irflag_set_cond(*vpp, VIRF_NAMEDATTR);
+ }
+#endif
+ } else
*vpp = NULL;
return (err);
}
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
index 8a5006c488f3..c4270d8b5d5c 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -25,6 +25,7 @@
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
* Copyright 2017 Nexenta Systems, Inc.
+ * Copyright (c) 2025, Klara, Inc.
*/
/* Portions Copyright 2007 Jeremy Teo */
@@ -114,6 +115,8 @@ typedef uint64_t cookie_t;
typedef ulong_t cookie_t;
#endif
+static int zfs_check_attrname(const char *name);
+
/*
* Programming rules.
*
@@ -813,7 +816,12 @@ zfs_lookup(vnode_t *dvp, const char *nm, vnode_t **vpp,
/*
* Do we have permission to get into attribute directory?
*/
- error = zfs_zaccess(zp, ACE_EXECUTE, 0, B_FALSE, cr, NULL);
+ if (flags & LOOKUP_NAMED_ATTR)
+ error = zfs_zaccess(zp, ACE_EXECUTE, V_NAMEDATTR,
+ B_FALSE, cr, NULL);
+ else
+ error = zfs_zaccess(zp, ACE_EXECUTE, 0, B_FALSE, cr,
+ NULL);
if (error) {
vrele(ZTOV(zp));
}
@@ -4299,6 +4307,33 @@ zfs_freebsd_getpages(struct vop_getpages_args *ap)
ap->a_rahead));
}
+typedef struct {
+ uint_t pca_npages;
+ vm_page_t pca_pages[];
+} putpage_commit_arg_t;
+
+static void
+zfs_putpage_commit_cb(void *arg)
+{
+ putpage_commit_arg_t *pca = arg;
+ vm_object_t object = pca->pca_pages[0]->object;
+
+ zfs_vmobject_wlock(object);
+
+ for (uint_t i = 0; i < pca->pca_npages; i++) {
+ vm_page_t pp = pca->pca_pages[i];
+ vm_page_undirty(pp);
+ vm_page_sunbusy(pp);
+ }
+
+ vm_object_pip_wakeupn(object, pca->pca_npages);
+
+ zfs_vmobject_wunlock(object);
+
+ kmem_free(pca,
+ offsetof(putpage_commit_arg_t, pca_pages[pca->pca_npages]));
+}
+
static int
zfs_putpages(struct vnode *vp, vm_page_t *ma, size_t len, int flags,
int *rtvals)
@@ -4400,10 +4435,12 @@ zfs_putpages(struct vnode *vp, vm_page_t *ma, size_t len, int flags,
}
if (zp->z_blksz < PAGE_SIZE) {
- for (i = 0; len > 0; off += tocopy, len -= tocopy, i++) {
- tocopy = len > PAGE_SIZE ? PAGE_SIZE : len;
+ vm_ooffset_t woff = off;
+ size_t wlen = len;
+ for (i = 0; wlen > 0; woff += tocopy, wlen -= tocopy, i++) {
+ tocopy = MIN(PAGE_SIZE, wlen);
va = zfs_map_page(ma[i], &sf);
- dmu_write(zfsvfs->z_os, zp->z_id, off, tocopy, va, tx);
+ dmu_write(zfsvfs->z_os, zp->z_id, woff, tocopy, va, tx);
zfs_unmap_page(sf);
}
} else {
@@ -4424,19 +4461,48 @@ zfs_putpages(struct vnode *vp, vm_page_t *ma, size_t len, int flags,
zfs_tstamp_update_setup(zp, CONTENT_MODIFIED, mtime, ctime);
err = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
ASSERT0(err);
- /*
- * XXX we should be passing a callback to undirty
- * but that would make the locking messier
- */
- zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off,
- len, commit, B_FALSE, NULL, NULL);
- zfs_vmobject_wlock(object);
- for (i = 0; i < ncount; i++) {
- rtvals[i] = zfs_vm_pagerret_ok;
- vm_page_undirty(ma[i]);
+ if (commit) {
+ /*
+ * Caller requested that we commit immediately. We set
+ * a callback on the log entry, to be called once its
+ * on disk after the call to zil_commit() below. The
+ * pages will be undirtied and unbusied there.
+ */
+ putpage_commit_arg_t *pca = kmem_alloc(
+ offsetof(putpage_commit_arg_t, pca_pages[ncount]),
+ KM_SLEEP);
+ pca->pca_npages = ncount;
+ memcpy(pca->pca_pages, ma, sizeof (vm_page_t) * ncount);
+
+ zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len,
+ B_TRUE, B_FALSE, zfs_putpage_commit_cb, pca);
+
+ for (i = 0; i < ncount; i++)
+ rtvals[i] = zfs_vm_pagerret_pend;
+ } else {
+ /*
+ * Caller just wants the page written back somewhere,
+ * but doesn't need it committed yet. We've already
+ * written it back to the DMU, so we just need to put
+ * it on the async log, then undirty the page and
+ * return.
+ *
+ * We cannot use a callback here, because it would keep
+ * the page busy (locked) until it is eventually
+ * written down at txg sync.
+ */
+ zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len,
+ B_FALSE, B_FALSE, NULL, NULL);
+
+ zfs_vmobject_wlock(object);
+ for (i = 0; i < ncount; i++) {
+ rtvals[i] = zfs_vm_pagerret_ok;
+ vm_page_undirty(ma[i]);
+ }
+ zfs_vmobject_wunlock(object);
}
- zfs_vmobject_wunlock(object);
+
VM_CNT_INC(v_vnodeout);
VM_CNT_ADD(v_vnodepgsout, ncount);
}
@@ -4707,8 +4773,16 @@ zfs_freebsd_access(struct vop_access_args *ap)
* ZFS itself only knowns about VREAD, VWRITE, VEXEC and VAPPEND,
*/
accmode = ap->a_accmode & (VREAD|VWRITE|VEXEC|VAPPEND);
- if (accmode != 0)
- error = zfs_access(zp, accmode, 0, ap->a_cred);
+ if (accmode != 0) {
+#if __FreeBSD_version >= 1500040
+ /* For named attributes, do the checks. */
+ if ((vn_irflag_read(vp) & VIRF_NAMEDATTR) != 0)
+ error = zfs_access(zp, accmode, V_NAMEDATTR,
+ ap->a_cred);
+ else
+#endif
+ error = zfs_access(zp, accmode, 0, ap->a_cred);
+ }
/*
* VADMIN has to be handled by vaccess().
@@ -4741,6 +4815,190 @@ struct vop_lookup_args {
};
#endif
+#if __FreeBSD_version >= 1500040
+static int
+zfs_lookup_nameddir(struct vnode *dvp, struct componentname *cnp,
+ struct vnode **vpp)
+{
+ struct vnode *xvp;
+ int error, flags;
+
+ *vpp = NULL;
+ flags = LOOKUP_XATTR | LOOKUP_NAMED_ATTR;
+ if ((cnp->cn_flags & CREATENAMED) != 0)
+ flags |= CREATE_XATTR_DIR;
+ error = zfs_lookup(dvp, NULL, &xvp, NULL, 0, cnp->cn_cred, flags,
+ B_FALSE);
+ if (error == 0) {
+ if ((cnp->cn_flags & LOCKLEAF) != 0)
+ error = vn_lock(xvp, cnp->cn_lkflags);
+ if (error == 0) {
+ vn_irflag_set_cond(xvp, VIRF_NAMEDDIR);
+ *vpp = xvp;
+ } else {
+ vrele(xvp);
+ }
+ }
+ return (error);
+}
+
+static ssize_t
+zfs_readdir_named(struct vnode *vp, char *buf, ssize_t blen, off_t *offp,
+ int *eofflagp, struct ucred *cred, struct thread *td)
+{
+ struct uio io;
+ struct iovec iv;
+ zfs_uio_t uio;
+ int error;
+
+ io.uio_offset = *offp;
+ io.uio_segflg = UIO_SYSSPACE;
+ io.uio_rw = UIO_READ;
+ io.uio_td = td;
+ iv.iov_base = buf;
+ iv.iov_len = blen;
+ io.uio_iov = &iv;
+ io.uio_iovcnt = 1;
+ io.uio_resid = blen;
+ zfs_uio_init(&uio, &io);
+ error = zfs_readdir(vp, &uio, cred, eofflagp, NULL, NULL);
+ if (error != 0)
+ return (-1);
+ *offp = io.uio_offset;
+ return (blen - io.uio_resid);
+}
+
+static bool
+zfs_has_namedattr(struct vnode *vp, struct ucred *cred)
+{
+ struct componentname cn;
+ struct vnode *xvp;
+ struct dirent *dp;
+ off_t offs;
+ ssize_t rsize;
+ char *buf, *cp, *endcp;
+ int eofflag, error;
+ bool ret;
+
+ MNT_ILOCK(vp->v_mount);
+ if ((vp->v_mount->mnt_flag & MNT_NAMEDATTR) == 0) {
+ MNT_IUNLOCK(vp->v_mount);
+ return (false);
+ }
+ MNT_IUNLOCK(vp->v_mount);
+
+ /* Now see if a named attribute directory exists. */
+ cn.cn_flags = LOCKLEAF;
+ cn.cn_lkflags = LK_SHARED;
+ cn.cn_cred = cred;
+ error = zfs_lookup_nameddir(vp, &cn, &xvp);
+ if (error != 0)
+ return (false);
+
+ /* It exists, so see if there is any entry other than "." and "..". */
+ buf = malloc(DEV_BSIZE, M_TEMP, M_WAITOK);
+ ret = false;
+ offs = 0;
+ do {
+ rsize = zfs_readdir_named(xvp, buf, DEV_BSIZE, &offs, &eofflag,
+ cred, curthread);
+ if (rsize <= 0)
+ break;
+ cp = buf;
+ endcp = &buf[rsize];
+ while (cp < endcp) {
+ dp = (struct dirent *)cp;
+ if (dp->d_fileno != 0 && (dp->d_type == DT_REG ||
+ dp->d_type == DT_UNKNOWN) &&
+ !ZFS_XA_NS_PREFIX_FORBIDDEN(dp->d_name) &&
+ ((dp->d_namlen == 1 && dp->d_name[0] != '.') ||
+ (dp->d_namlen == 2 && (dp->d_name[0] != '.' ||
+ dp->d_name[1] != '.')) || dp->d_namlen > 2)) {
+ ret = true;
+ break;
+ }
+ cp += dp->d_reclen;
+ }
+ } while (!ret && rsize > 0 && eofflag == 0);
+ vput(xvp);
+ free(buf, M_TEMP);
+ return (ret);
+}
+
+static int
+zfs_freebsd_lookup(struct vop_lookup_args *ap, boolean_t cached)
+{
+ struct componentname *cnp = ap->a_cnp;
+ char nm[NAME_MAX + 1];
+ int error;
+ struct vnode **vpp = ap->a_vpp, *dvp = ap->a_dvp, *xvp;
+ bool is_nameddir, needs_nameddir, opennamed = false;
+
+ /*
+ * These variables are used to handle the named attribute cases:
+ * opennamed - Is true when this is a call from open with O_NAMEDATTR
+ * specified and it is the last component.
+ * is_nameddir - Is true when the directory is a named attribute dir.
+ * needs_nameddir - Is set when the lookup needs to look for/create
+ * a named attribute directory. It is only set when is_nameddir
+ * is_nameddir is false and opennamed is true.
+ * xvp - Is the directory that the lookup needs to be done in.
+ * Usually dvp, unless needs_nameddir is true where it is the
+ * result of the first non-named directory lookup.
+ * Note that name caching must be disabled for named attribute
+ * handling.
+ */
+ needs_nameddir = false;
+ xvp = dvp;
+ opennamed = (cnp->cn_flags & (OPENNAMED | ISLASTCN)) ==
+ (OPENNAMED | ISLASTCN);
+ is_nameddir = (vn_irflag_read(dvp) & VIRF_NAMEDDIR) != 0;
+ if (is_nameddir && (cnp->cn_flags & ISLASTCN) == 0)
+ return (ENOATTR);
+ if (opennamed && !is_nameddir && (cnp->cn_flags & ISDOTDOT) != 0)
+ return (ENOATTR);
+ if (opennamed || is_nameddir)
+ cnp->cn_flags &= ~MAKEENTRY;
+ if (opennamed && !is_nameddir)
+ needs_nameddir = true;
+ ASSERT3U(cnp->cn_namelen, <, sizeof (nm));
+ error = 0;
+ *vpp = NULL;
+ if (needs_nameddir) {
+ if (VOP_ISLOCKED(dvp) != LK_EXCLUSIVE)
+ vn_lock(dvp, LK_UPGRADE | LK_RETRY);
+ error = zfs_lookup_nameddir(dvp, cnp, &xvp);
+ if (error == 0)
+ is_nameddir = true;
+ }
+ if (error == 0) {
+ if (!needs_nameddir || cnp->cn_namelen != 1 ||
+ *cnp->cn_nameptr != '.') {
+ strlcpy(nm, cnp->cn_nameptr, MIN(cnp->cn_namelen + 1,
+ sizeof (nm)));
+ error = zfs_lookup(xvp, nm, vpp, cnp, cnp->cn_nameiop,
+ cnp->cn_cred, 0, cached);
+ if (is_nameddir && error == 0 &&
+ (cnp->cn_namelen != 1 || *cnp->cn_nameptr != '.') &&
+ (cnp->cn_flags & ISDOTDOT) == 0) {
+ if ((*vpp)->v_type == VDIR)
+ vn_irflag_set_cond(*vpp, VIRF_NAMEDDIR);
+ else
+ vn_irflag_set_cond(*vpp,
+ VIRF_NAMEDATTR);
+ }
+ if (needs_nameddir && xvp != *vpp)
+ vput(xvp);
+ } else {
+ /*
+ * Lookup of "." when a named attribute dir is needed.
+ */
+ *vpp = xvp;
+ }
+ }
+ return (error);
+}
+#else
static int
zfs_freebsd_lookup(struct vop_lookup_args *ap, boolean_t cached)
{
@@ -4753,6 +5011,7 @@ zfs_freebsd_lookup(struct vop_lookup_args *ap, boolean_t cached)
return (zfs_lookup(ap->a_dvp, nm, ap->a_vpp, cnp, cnp->cn_nameiop,
cnp->cn_cred, 0, cached));
}
+#endif
static int
zfs_freebsd_cachedlookup(struct vop_cachedlookup_args *ap)
@@ -4775,7 +5034,11 @@ zfs_cache_lookup(struct vop_lookup_args *ap)
zfsvfs_t *zfsvfs;
zfsvfs = ap->a_dvp->v_mount->mnt_data;
+#if __FreeBSD_version >= 1500040
+ if (zfsvfs->z_use_namecache && (ap->a_cnp->cn_flags & OPENNAMED) == 0)
+#else
if (zfsvfs->z_use_namecache)
+#endif
return (vfs_cache_lookup(ap));
else
return (zfs_freebsd_lookup(ap, B_FALSE));
@@ -4798,6 +5061,11 @@ zfs_freebsd_create(struct vop_create_args *ap)
vattr_t *vap = ap->a_vap;
znode_t *zp = NULL;
int rc, mode;
+ struct vnode *dvp = ap->a_dvp;
+#if __FreeBSD_version >= 1500040
+ struct vnode *xvp;
+ bool is_nameddir;
+#endif
#if __FreeBSD_version < 1400068
ASSERT(cnp->cn_flags & SAVENAME);
@@ -4808,10 +5076,36 @@ zfs_freebsd_create(struct vop_create_args *ap)
zfsvfs = ap->a_dvp->v_mount->mnt_data;
*ap->a_vpp = NULL;
- rc = zfs_create(VTOZ(ap->a_dvp), cnp->cn_nameptr, vap, 0, mode,
- &zp, cnp->cn_cred, 0 /* flag */, NULL /* vsecattr */, NULL);
+ rc = 0;
+#if __FreeBSD_version >= 1500040
+ xvp = NULL;
+ is_nameddir = (vn_irflag_read(dvp) & VIRF_NAMEDDIR) != 0;
+ if (!is_nameddir && (cnp->cn_flags & OPENNAMED) != 0) {
+ /* Needs a named attribute directory. */
+ rc = zfs_lookup_nameddir(dvp, cnp, &xvp);
+ if (rc == 0) {
+ dvp = xvp;
+ is_nameddir = true;
+ }
+ }
+ if (is_nameddir && rc == 0)
+ rc = zfs_check_attrname(cnp->cn_nameptr);
+#endif
+
if (rc == 0)
+ rc = zfs_create(VTOZ(dvp), cnp->cn_nameptr, vap, 0, mode,
+ &zp, cnp->cn_cred, 0 /* flag */, NULL /* vsecattr */, NULL);
+#if __FreeBSD_version >= 1500040
+ if (xvp != NULL)
+ vput(xvp);
+#endif
+ if (rc == 0) {
*ap->a_vpp = ZTOV(zp);
+#if __FreeBSD_version >= 1500040
+ if (is_nameddir)
+ vn_irflag_set_cond(*ap->a_vpp, VIRF_NAMEDATTR);
+#endif
+ }
if (zfsvfs->z_use_namecache &&
rc == 0 && (cnp->cn_flags & MAKEENTRY) != 0)
cache_enter(ap->a_dvp, *ap->a_vpp, cnp);
@@ -4830,13 +5124,21 @@ struct vop_remove_args {
static int
zfs_freebsd_remove(struct vop_remove_args *ap)
{
+ int error = 0;
#if __FreeBSD_version < 1400068
ASSERT(ap->a_cnp->cn_flags & SAVENAME);
#endif
- return (zfs_remove_(ap->a_dvp, ap->a_vp, ap->a_cnp->cn_nameptr,
- ap->a_cnp->cn_cred));
+#if __FreeBSD_version >= 1500040
+ if ((vn_irflag_read(ap->a_dvp) & VIRF_NAMEDDIR) != 0)
+ error = zfs_check_attrname(ap->a_cnp->cn_nameptr);
+#endif
+
+ if (error == 0)
+ error = zfs_remove_(ap->a_dvp, ap->a_vp, ap->a_cnp->cn_nameptr,
+ ap->a_cnp->cn_cred);
+ return (error);
}
#ifndef _SYS_SYSPROTO_H_
@@ -4994,6 +5296,11 @@ zfs_freebsd_getattr(struct vop_getattr_args *ap)
#undef FLAG_CHECK
*vap = xvap.xva_vattr;
vap->va_flags = fflags;
+
+#if __FreeBSD_version >= 1500040
+ if ((vn_irflag_read(ap->a_vp) & (VIRF_NAMEDDIR | VIRF_NAMEDATTR)) != 0)
+ vap->va_bsdflags |= SFBSD_NAMEDATTR;
+#endif
return (0);
}
@@ -5136,15 +5443,24 @@ zfs_freebsd_rename(struct vop_rename_args *ap)
vnode_t *fvp = ap->a_fvp;
vnode_t *tdvp = ap->a_tdvp;
vnode_t *tvp = ap->a_tvp;
- int error;
+ int error = 0;
#if __FreeBSD_version < 1400068
ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART));
ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART));
#endif
- error = zfs_do_rename(fdvp, &fvp, ap->a_fcnp, tdvp, &tvp,
- ap->a_tcnp, ap->a_fcnp->cn_cred);
+#if __FreeBSD_version >= 1500040
+ if ((vn_irflag_read(fdvp) & VIRF_NAMEDDIR) != 0) {
+ error = zfs_check_attrname(ap->a_fcnp->cn_nameptr);
+ if (error == 0)
+ error = zfs_check_attrname(ap->a_tcnp->cn_nameptr);
+ }
+#endif
+
+ if (error == 0)
+ error = zfs_do_rename(fdvp, &fvp, ap->a_fcnp, tdvp, &tvp,
+ ap->a_tcnp, ap->a_fcnp->cn_cred);
vrele(fdvp);
vrele(fvp);
@@ -5398,12 +5714,33 @@ zfs_freebsd_pathconf(struct vop_pathconf_args *ap)
return (0);
}
return (EINVAL);
+#if __FreeBSD_version >= 1500040
+ case _PC_NAMEDATTR_ENABLED:
+ MNT_ILOCK(ap->a_vp->v_mount);
+ if ((ap->a_vp->v_mount->mnt_flag & MNT_NAMEDATTR) != 0)
+ *ap->a_retval = 1;
+ else
+ *ap->a_retval = 0;
+ MNT_IUNLOCK(ap->a_vp->v_mount);
+ return (0);
+ case _PC_HAS_NAMEDATTR:
+ if (zfs_has_namedattr(ap->a_vp, curthread->td_ucred))
+ *ap->a_retval = 1;
+ else
+ *ap->a_retval = 0;
+ return (0);
+#endif
+#ifdef _PC_HAS_HIDDENSYSTEM
+ case _PC_HAS_HIDDENSYSTEM:
+ *ap->a_retval = 1;
+ return (0);
+#endif
default:
return (vop_stdpathconf(ap));
}
}
-static int zfs_xattr_compat = 1;
+int zfs_xattr_compat = 1;
static int
zfs_check_attrname(const char *name)
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c
index 9bad1e13d7cc..775f54a65f7d 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c
@@ -150,8 +150,6 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
zp->z_xattr_cached = NULL;
zp->z_xattr_parent = 0;
zp->z_vnode = NULL;
- zp->z_sync_writes_cnt = 0;
- zp->z_async_writes_cnt = 0;
return (0);
}
@@ -172,9 +170,6 @@ zfs_znode_cache_destructor(void *buf, void *arg)
ASSERT3P(zp->z_acl_cached, ==, NULL);
ASSERT3P(zp->z_xattr_cached, ==, NULL);
-
- ASSERT0(atomic_load_32(&zp->z_sync_writes_cnt));
- ASSERT0(atomic_load_32(&zp->z_async_writes_cnt));
}
@@ -456,8 +451,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz,
zp->z_blksz = blksz;
zp->z_seq = 0x7A4653;
zp->z_sync_cnt = 0;
- zp->z_sync_writes_cnt = 0;
- zp->z_async_writes_cnt = 0;
atomic_store_ptr(&zp->z_cached_symlink, NULL);
zfs_znode_sa_init(zfsvfs, zp, db, obj_type, hdl);
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
index 212ef560db07..72a7c4ea082a 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
@@ -1248,9 +1248,11 @@ zvol_os_is_zvol(const char *device)
return (device && strncmp(device, ZVOL_DIR, strlen(ZVOL_DIR)) == 0);
}
-void
+int
zvol_os_rename_minor(zvol_state_t *zv, const char *newname)
{
+ int error = 0;
+
ASSERT(RW_LOCK_HELD(&zvol_state_lock));
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -1304,14 +1306,94 @@ zvol_os_rename_minor(zvol_state_t *zv, const char *newname)
args.mda_gid = GID_OPERATOR;
args.mda_mode = 0640;
args.mda_si_drv2 = zv;
- if (make_dev_s(&args, &dev, "%s/%s", ZVOL_DRIVER, newname)
- == 0) {
+ error = make_dev_s(&args, &dev, "%s/%s", ZVOL_DRIVER, newname);
+ if (error == 0) {
dev->si_iosize_max = maxphys;
zsd->zsd_cdev = dev;
}
}
strlcpy(zv->zv_name, newname, sizeof (zv->zv_name));
dataset_kstats_rename(&zv->zv_kstat, newname);
+
+ return (error);
+}
+
+/*
+ * Allocate memory for a new zvol_state_t and setup the required
+ * request queue and generic disk structures for the block device.
+ */
+static int
+zvol_alloc(const char *name, uint64_t volsize, uint64_t volblocksize,
+ zvol_state_t **zvp)
+{
+ zvol_state_t *zv;
+ uint64_t volmode;
+ int error;
+
+ error = dsl_prop_get_integer(name, zfs_prop_to_name(ZFS_PROP_VOLMODE),
+ &volmode, NULL);
+ if (error)
+ return (error);
+
+ if (volmode == ZFS_VOLMODE_DEFAULT)
+ volmode = zvol_volmode;
+
+ if (volmode == ZFS_VOLMODE_NONE)
+ return (0);
+
+ zv = kmem_zalloc(sizeof (*zv), KM_SLEEP);
+ mutex_init(&zv->zv_state_lock, NULL, MUTEX_DEFAULT, NULL);
+ cv_init(&zv->zv_removing_cv, NULL, CV_DEFAULT, NULL);
+ zv->zv_zso = kmem_zalloc(sizeof (struct zvol_state_os), KM_SLEEP);
+ zv->zv_volmode = volmode;
+ zv->zv_volsize = volsize;
+ zv->zv_volblocksize = volblocksize;
+ if (zv->zv_volmode == ZFS_VOLMODE_GEOM) {
+ struct zvol_state_geom *zsg = &zv->zv_zso->zso_geom;
+ struct g_provider *pp;
+ struct g_geom *gp;
+
+ g_topology_lock();
+ gp = g_new_geomf(&zfs_zvol_class, "zfs::zvol::%s", name);
+ gp->start = zvol_geom_bio_start;
+ gp->access = zvol_geom_access;
+ pp = g_new_providerf(gp, "%s/%s", ZVOL_DRIVER, name);
+ pp->flags |= G_PF_DIRECT_RECEIVE | G_PF_DIRECT_SEND;
+ pp->sectorsize = DEV_BSIZE;
+ pp->mediasize = 0;
+ pp->private = zv;
+
+ zsg->zsg_provider = pp;
+ } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) {
+ struct zvol_state_dev *zsd = &zv->zv_zso->zso_dev;
+ struct cdev *dev;
+ struct make_dev_args args;
+
+ make_dev_args_init(&args);
+ args.mda_flags = MAKEDEV_CHECKNAME | MAKEDEV_WAITOK;
+ args.mda_devsw = &zvol_cdevsw;
+ args.mda_cr = NULL;
+ args.mda_uid = UID_ROOT;
+ args.mda_gid = GID_OPERATOR;
+ args.mda_mode = 0640;
+ args.mda_si_drv2 = zv;
+ error = make_dev_s(&args, &dev, "%s/%s", ZVOL_DRIVER, name);
+ if (error) {
+ kmem_free(zv->zv_zso, sizeof (struct zvol_state_os));
+ kmem_free(zv, sizeof (zvol_state_t));
+ return (error);
+ }
+
+ dev->si_iosize_max = maxphys;
+ zsd->zsd_cdev = dev;
+ knlist_init_sx(&zsd->zsd_selinfo.si_note, &zv->zv_state_lock);
+ }
+ (void) strlcpy(zv->zv_name, name, MAXPATHLEN);
+ rw_init(&zv->zv_suspend_lock, NULL, RW_DEFAULT, NULL);
+ zfs_rangelock_init(&zv->zv_rangelock, NULL, NULL);
+
+ *zvp = zv;
+ return (error);
}
/*
@@ -1364,11 +1446,11 @@ zvol_os_free(zvol_state_t *zv)
int
zvol_os_create_minor(const char *name)
{
- zvol_state_t *zv;
+ zvol_state_t *zv = NULL;
objset_t *os;
dmu_object_info_t *doi;
uint64_t volsize;
- uint64_t volmode, hash, len;
+ uint64_t hash, len;
int error;
bool replayed_zil = B_FALSE;
@@ -1400,67 +1482,15 @@ zvol_os_create_minor(const char *name)
if (error)
goto out_dmu_objset_disown;
- error = dsl_prop_get_integer(name,
- zfs_prop_to_name(ZFS_PROP_VOLMODE), &volmode, NULL);
- if (error || volmode == ZFS_VOLMODE_DEFAULT)
- volmode = zvol_volmode;
- error = 0;
+ error = zvol_alloc(name, volsize, doi->doi_data_block_size, &zv);
+ if (error || zv == NULL)
+ goto out_dmu_objset_disown;
- /*
- * zvol_alloc equivalent ...
- */
- zv = kmem_zalloc(sizeof (*zv), KM_SLEEP);
zv->zv_hash = hash;
- mutex_init(&zv->zv_state_lock, NULL, MUTEX_DEFAULT, NULL);
- cv_init(&zv->zv_removing_cv, NULL, CV_DEFAULT, NULL);
- zv->zv_zso = kmem_zalloc(sizeof (struct zvol_state_os), KM_SLEEP);
- zv->zv_volmode = volmode;
- if (zv->zv_volmode == ZFS_VOLMODE_GEOM) {
- struct zvol_state_geom *zsg = &zv->zv_zso->zso_geom;
- struct g_provider *pp;
- struct g_geom *gp;
-
- g_topology_lock();
- gp = g_new_geomf(&zfs_zvol_class, "zfs::zvol::%s", name);
- gp->start = zvol_geom_bio_start;
- gp->access = zvol_geom_access;
- pp = g_new_providerf(gp, "%s/%s", ZVOL_DRIVER, name);
- pp->flags |= G_PF_DIRECT_RECEIVE | G_PF_DIRECT_SEND;
- pp->sectorsize = DEV_BSIZE;
- pp->mediasize = 0;
- pp->private = zv;
-
- zsg->zsg_provider = pp;
- } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) {
- struct zvol_state_dev *zsd = &zv->zv_zso->zso_dev;
- struct cdev *dev;
- struct make_dev_args args;
-
- make_dev_args_init(&args);
- args.mda_flags = MAKEDEV_CHECKNAME | MAKEDEV_WAITOK;
- args.mda_devsw = &zvol_cdevsw;
- args.mda_cr = NULL;
- args.mda_uid = UID_ROOT;
- args.mda_gid = GID_OPERATOR;
- args.mda_mode = 0640;
- args.mda_si_drv2 = zv;
- if (make_dev_s(&args, &dev, "%s/%s", ZVOL_DRIVER, name)
- == 0) {
- dev->si_iosize_max = maxphys;
- zsd->zsd_cdev = dev;
- knlist_init_sx(&zsd->zsd_selinfo.si_note,
- &zv->zv_state_lock);
- }
- }
- (void) strlcpy(zv->zv_name, name, MAXPATHLEN);
- rw_init(&zv->zv_suspend_lock, NULL, RW_DEFAULT, NULL);
- zfs_rangelock_init(&zv->zv_rangelock, NULL, NULL);
if (dmu_objset_is_snapshot(os) || !spa_writeable(dmu_objset_spa(os)))
zv->zv_flags |= ZVOL_RDONLY;
- zv->zv_volblocksize = doi->doi_data_block_size;
- zv->zv_volsize = volsize;
zv->zv_objset = os;
ASSERT3P(zv->zv_kstat.dk_kstats, ==, NULL);
@@ -1490,13 +1520,14 @@ zvol_os_create_minor(const char *name)
out_dmu_objset_disown:
dmu_objset_disown(os, B_TRUE, FTAG);
- if (error == 0 && volmode == ZFS_VOLMODE_GEOM) {
+ if (error == 0 && zv && zv->zv_volmode == ZFS_VOLMODE_GEOM) {
g_error_provider(zv->zv_zso->zso_geom.zsg_provider, 0);
+ /* geom was locked inside zvol_alloc() function */
g_topology_unlock();
}
out_doi:
kmem_free(doi, sizeof (dmu_object_info_t));
- if (error == 0) {
+ if (error == 0 && zv) {
rw_enter(&zvol_state_lock, RW_WRITER);
zvol_insert(zv);
zvol_minors++;
diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c b/sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c
index 337a4bcf76a0..9fe008cef868 100644
--- a/sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c
+++ b/sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c
@@ -302,13 +302,8 @@ spl_kmem_free_impl(const void *buf, size_t size)
#ifdef DEBUG_KMEM
/* Shim layer memory accounting */
-#ifdef HAVE_ATOMIC64_T
atomic64_t kmem_alloc_used = ATOMIC64_INIT(0);
-unsigned long long kmem_alloc_max = 0;
-#else /* HAVE_ATOMIC64_T */
-atomic_t kmem_alloc_used = ATOMIC_INIT(0);
-unsigned long long kmem_alloc_max = 0;
-#endif /* HAVE_ATOMIC64_T */
+uint64_t kmem_alloc_max = 0;
EXPORT_SYMBOL(kmem_alloc_used);
EXPORT_SYMBOL(kmem_alloc_max);
@@ -320,9 +315,9 @@ spl_kmem_alloc_debug(size_t size, int flags, int node)
ptr = spl_kmem_alloc_impl(size, flags, node);
if (ptr) {
- kmem_alloc_used_add(size);
- if (unlikely(kmem_alloc_used_read() > kmem_alloc_max))
- kmem_alloc_max = kmem_alloc_used_read();
+ atomic64_add(size, &kmem_alloc_used);
+ if (unlikely(atomic64_read(&kmem_alloc_used) > kmem_alloc_max))
+ kmem_alloc_max = atomic64_read(&kmem_alloc_used);
}
return (ptr);
@@ -331,7 +326,7 @@ spl_kmem_alloc_debug(size_t size, int flags, int node)
inline void
spl_kmem_free_debug(const void *ptr, size_t size)
{
- kmem_alloc_used_sub(size);
+ atomic64_sub(size, &kmem_alloc_used);
spl_kmem_free_impl(ptr, size);
}
@@ -595,7 +590,7 @@ spl_kmem_init(void)
{
#ifdef DEBUG_KMEM
- kmem_alloc_used_set(0);
+ atomic64_set(&kmem_alloc_used, 0);
@@ -617,9 +612,10 @@ spl_kmem_fini(void)
* at that address to aid in debugging. Performance is not
* a serious concern here since it is module unload time.
*/
- if (kmem_alloc_used_read() != 0)
+ if (atomic64_read(&kmem_alloc_used) != 0)
printk(KERN_WARNING "kmem leaked %ld/%llu bytes\n",
- (unsigned long)kmem_alloc_used_read(), kmem_alloc_max);
+ (unsigned long)atomic64_read(&kmem_alloc_used),
+ kmem_alloc_max);
#ifdef DEBUG_KMEM_TRACKING
spl_kmem_fini_tracking(&kmem_list, &kmem_lock);
diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c b/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c
index 4ed0deedd5b9..8cdd5fc5cfe5 100644
--- a/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c
+++ b/sys/contrib/openzfs/module/os/linux/spl/spl-proc.c
@@ -82,11 +82,7 @@ proc_domemused(CONST_CTL_TABLE *table, int write,
if (write) {
*ppos += *lenp;
} else {
-#ifdef HAVE_ATOMIC64_T
val = atomic64_read((atomic64_t *)table->data);
-#else
- val = atomic_read((atomic_t *)table->data);
-#endif /* HAVE_ATOMIC64_T */
rc = proc_doulongvec_minmax(&dummy, write, buffer, lenp, ppos);
}
@@ -315,18 +311,14 @@ static struct ctl_table spl_kmem_table[] = {
{
.procname = "kmem_used",
.data = &kmem_alloc_used,
-#ifdef HAVE_ATOMIC64_T
.maxlen = sizeof (atomic64_t),
-#else
- .maxlen = sizeof (atomic_t),
-#endif /* HAVE_ATOMIC64_T */
.mode = 0444,
.proc_handler = &proc_domemused,
},
{
.procname = "kmem_max",
.data = &kmem_alloc_max,
- .maxlen = sizeof (unsigned long),
+ .maxlen = sizeof (uint64_t),
.extra1 = &table_min,
.extra2 = &table_max,
.mode = 0444,
diff --git a/sys/contrib/openzfs/module/os/linux/spl/spl-thread.c b/sys/contrib/openzfs/module/os/linux/spl/spl-thread.c
index 1398483a3ac8..f42f455222de 100644
--- a/sys/contrib/openzfs/module/os/linux/spl/spl-thread.c
+++ b/sys/contrib/openzfs/module/os/linux/spl/spl-thread.c
@@ -28,6 +28,7 @@
#include <sys/kmem.h>
#include <sys/tsd.h>
#include <sys/string.h>
+#include <sys/misc.h>
/*
* Thread interfaces
@@ -197,3 +198,14 @@ issig(void)
}
EXPORT_SYMBOL(issig);
+
+/*
+ * Check if the current thread is a memory reclaim thread.
+ * Returns true if current thread is kswapd.
+ */
+int
+current_is_reclaim_thread(void)
+{
+ return (current_is_kswapd());
+}
+EXPORT_SYMBOL(current_is_reclaim_thread);
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/abd_os.c b/sys/contrib/openzfs/module/os/linux/zfs/abd_os.c
index e1140b31a97a..248c9b7a6d3b 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/abd_os.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/abd_os.c
@@ -256,10 +256,6 @@ abd_unmark_zfs_page(struct page *page)
#ifndef CONFIG_HIGHMEM
-#ifndef __GFP_RECLAIM
-#define __GFP_RECLAIM __GFP_WAIT
-#endif
-
/*
* The goal is to minimize fragmentation by preferentially populating ABDs
* with higher order compound pages from a single zone. Allocation size is
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c
index 84b25cb2c5ac..6552a933ce0a 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c
@@ -511,8 +511,6 @@ zfsctl_inode_alloc(zfsvfs_t *zfsvfs, uint64_t id,
zp->z_pflags = 0;
zp->z_mode = 0;
zp->z_sync_cnt = 0;
- zp->z_sync_writes_cnt = 0;
- zp->z_async_writes_cnt = 0;
ip->i_generation = 0;
ip->i_ino = id;
ip->i_mode = (S_IFDIR | S_IRWXUGO);
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_file_os.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_file_os.c
index d193eb80dca2..c729947369c2 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_file_os.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_file_os.c
@@ -260,24 +260,12 @@ zfs_file_fsync(zfs_file_t *filp, int flags)
{
int datasync = 0;
int error;
- int fstrans;
if (flags & O_DSYNC)
datasync = 1;
- /*
- * May enter XFS which generates a warning when PF_FSTRANS is set.
- * To avoid this the flag is cleared over vfs_sync() and then reset.
- */
- fstrans = __spl_pf_fstrans_check();
- if (fstrans)
- current->flags &= ~(__SPL_PF_FSTRANS);
-
error = -vfs_fsync(filp, datasync);
- if (fstrans)
- current->flags |= __SPL_PF_FSTRANS;
-
return (error);
}
@@ -292,14 +280,6 @@ int
zfs_file_deallocate(zfs_file_t *fp, loff_t offset, loff_t len)
{
/*
- * May enter XFS which generates a warning when PF_FSTRANS is set.
- * To avoid this the flag is cleared over vfs_sync() and then reset.
- */
- int fstrans = __spl_pf_fstrans_check();
- if (fstrans)
- current->flags &= ~(__SPL_PF_FSTRANS);
-
- /*
* When supported by the underlying file system preferentially
* use the fallocate() callback to preallocate the space.
*/
@@ -308,9 +288,6 @@ zfs_file_deallocate(zfs_file_t *fp, loff_t offset, loff_t len)
error = -fp->f_op->fallocate(fp,
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, offset, len);
- if (fstrans)
- current->flags |= __SPL_PF_FSTRANS;
-
if (error)
return (SET_ERROR(error));
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c
index a3837f784668..396faef8f646 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vfsops.c
@@ -1217,6 +1217,63 @@ zfs_root(zfsvfs_t *zfsvfs, struct inode **ipp)
}
/*
+ * Dentry and inode caches referenced by a task in non-root memcg are
+ * not going to be scanned by the kernel-provided shrinker. So, if
+ * kernel prunes nothing, fall back to this manual walk to free dnodes.
+ * To avoid scanning the same znodes multiple times they are always rotated
+ * to the end of the z_all_znodes list. New znodes are inserted at the
+ * end of the list so we're always scanning the oldest znodes first.
+ */
+static int
+zfs_prune_aliases(zfsvfs_t *zfsvfs, unsigned long nr_to_scan)
+{
+ znode_t **zp_array, *zp;
+ int max_array = MIN(nr_to_scan, PAGE_SIZE * 8 / sizeof (znode_t *));
+ int objects = 0;
+ int i = 0, j = 0;
+
+ zp_array = vmem_zalloc(max_array * sizeof (znode_t *), KM_SLEEP);
+
+ mutex_enter(&zfsvfs->z_znodes_lock);
+ while ((zp = list_head(&zfsvfs->z_all_znodes)) != NULL) {
+
+ if ((i++ > nr_to_scan) || (j >= max_array))
+ break;
+
+ ASSERT(list_link_active(&zp->z_link_node));
+ list_remove(&zfsvfs->z_all_znodes, zp);
+ list_insert_tail(&zfsvfs->z_all_znodes, zp);
+
+ /* Skip active znodes and .zfs entries */
+ if (MUTEX_HELD(&zp->z_lock) || zp->z_is_ctldir)
+ continue;
+
+ if (igrab(ZTOI(zp)) == NULL)
+ continue;
+
+ zp_array[j] = zp;
+ j++;
+ }
+ mutex_exit(&zfsvfs->z_znodes_lock);
+
+ for (i = 0; i < j; i++) {
+ zp = zp_array[i];
+
+ ASSERT3P(zp, !=, NULL);
+ d_prune_aliases(ZTOI(zp));
+
+ if (atomic_read(&ZTOI(zp)->i_count) == 1)
+ objects++;
+
+ zrele(zp);
+ }
+
+ vmem_free(zp_array, max_array * sizeof (znode_t *));
+
+ return (objects);
+}
+
+/*
* The ARC has requested that the filesystem drop entries from the dentry
* and inode caches. This can occur when the ARC needs to free meta data
* blocks but can't because they are all pinned by entries in these caches.
@@ -1267,6 +1324,14 @@ zfs_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
*objects = (*shrinker->scan_objects)(shrinker, &sc);
#endif
+ /*
+ * Fall back to zfs_prune_aliases if kernel's shrinker did nothing
+ * due to dentry and inode caches being referenced by a task running
+ * in non-root memcg.
+ */
+ if (*objects == 0)
+ *objects = zfs_prune_aliases(zfsvfs, nr_to_scan);
+
zfs_exit(zfsvfs, FTAG);
dprintf_ds(zfsvfs->z_os->os_dsl_dataset,
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c
index ed9721dade76..6a2fc5ad7935 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_vnops_os.c
@@ -25,6 +25,7 @@
* Copyright (c) 2012, 2018 by Delphix. All rights reserved.
* Copyright (c) 2015 by Chunwei Chen. All rights reserved.
* Copyright 2017 Nexenta Systems, Inc.
+ * Copyright (c) 2025, Klara, Inc.
*/
/* Portions Copyright 2007 Jeremy Teo */
@@ -3691,7 +3692,7 @@ top:
}
static void
-zfs_putpage_sync_commit_cb(void *arg)
+zfs_putpage_commit_cb(void *arg)
{
struct page *pp = arg;
@@ -3699,17 +3700,6 @@ zfs_putpage_sync_commit_cb(void *arg)
end_page_writeback(pp);
}
-static void
-zfs_putpage_async_commit_cb(void *arg)
-{
- struct page *pp = arg;
- znode_t *zp = ITOZ(pp->mapping->host);
-
- ClearPageError(pp);
- end_page_writeback(pp);
- atomic_dec_32(&zp->z_async_writes_cnt);
-}
-
/*
* Push a page out to disk, once the page is on stable storage the
* registered commit callback will be run as notification of completion.
@@ -3827,15 +3817,6 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc,
zfs_rangelock_exit(lr);
if (wbc->sync_mode != WB_SYNC_NONE) {
- /*
- * Speed up any non-sync page writebacks since
- * they may take several seconds to complete.
- * Refer to the comment in zpl_fsync() for details.
- */
- if (atomic_load_32(&zp->z_async_writes_cnt) > 0) {
- zil_commit(zfsvfs->z_log, zp->z_id);
- }
-
if (PageWriteback(pp))
#ifdef HAVE_PAGEMAP_FOLIO_WAIT_BIT
folio_wait_bit(page_folio(pp), PG_writeback);
@@ -3861,8 +3842,6 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc,
* was in fact not skipped and should not be counted as if it were.
*/
wbc->pages_skipped--;
- if (!for_sync)
- atomic_inc_32(&zp->z_async_writes_cnt);
set_page_writeback(pp);
unlock_page(pp);
@@ -3881,8 +3860,6 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc,
#endif
ClearPageError(pp);
end_page_writeback(pp);
- if (!for_sync)
- atomic_dec_32(&zp->z_async_writes_cnt);
zfs_rangelock_exit(lr);
zfs_exit(zfsvfs, FTAG);
return (err);
@@ -3908,35 +3885,61 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc,
err = sa_bulk_update(zp->z_sa_hdl, bulk, cnt, tx);
- boolean_t commit = B_FALSE;
- if (wbc->sync_mode != WB_SYNC_NONE) {
- /*
- * Note that this is rarely called under writepages(), because
- * writepages() normally handles the entire commit for
- * performance reasons.
- */
- commit = B_TRUE;
- } else if (!for_sync && atomic_load_32(&zp->z_sync_writes_cnt) > 0) {
- /*
- * If the caller does not intend to wait synchronously
- * for this page writeback to complete and there are active
- * synchronous calls on this file, do a commit so that
- * the latter don't accidentally end up waiting for
- * our writeback to complete. Refer to the comment in
- * zpl_fsync() (when HAVE_FSYNC_RANGE is defined) for details.
- */
- commit = B_TRUE;
- }
+ /*
+ * A note about for_sync vs wbc->sync_mode.
+ *
+ * for_sync indicates that this is a syncing writeback, that is, kernel
+ * caller expects the data to be durably stored before being notified.
+ * Often, but not always, the call was triggered by a userspace syncing
+ * op (eg fsync(), msync(MS_SYNC)). For our purposes, for_sync==TRUE
+ * means that that page should remain "locked" (in the writeback state)
+ * until it is definitely on disk (ie zil_commit() or spa_sync()).
+ * Otherwise, we can unlock and return as soon as it is on the
+ * in-memory ZIL.
+ *
+ * wbc->sync_mode has similar meaning. wbc is passed from the kernel to
+ * zpl_writepages()/zpl_writepage(); wbc->sync_mode==WB_SYNC_NONE
+ * indicates this a regular async writeback (eg a cache eviction) and
+ * so does not need a durability guarantee, while WB_SYNC_ALL indicates
+ * a syncing op that must be waited on (by convention, we test for
+ * !WB_SYNC_NONE rather than WB_SYNC_ALL, to prefer durability over
+ * performance should there ever be a new mode that we have not yet
+ * added support for).
+ *
+ * So, why a separate for_sync field? This is because zpl_writepages()
+ * calls zfs_putpage() multiple times for a single "logical" operation.
+ * It wants all the individual pages to be for_sync==TRUE ie only
+ * unlocked once durably stored, but it only wants one call to
+ * zil_commit() at the very end, once all the pages are synced. So,
+ * it repurposes sync_mode slightly to indicate who issue and wait for
+ * the IO: for NONE, the caller to zfs_putpage() will do it, while for
+ * ALL, zfs_putpage should do it.
+ *
+ * Summary:
+ * for_sync: 0=unlock immediately; 1 unlock once on disk
+ * sync_mode: NONE=caller will commit; ALL=we will commit
+ */
+ boolean_t need_commit = (wbc->sync_mode != WB_SYNC_NONE);
+
+ /*
+ * We use for_sync as the "commit" arg to zfs_log_write() (arg 7)
+ * because it is a policy flag that indicates "someone will call
+ * zil_commit() soon". for_sync=TRUE means exactly that; the only
+ * question is whether it will be us, or zpl_writepages().
+ */
+ zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, pgoff, pglen, for_sync,
+ B_FALSE, for_sync ? zfs_putpage_commit_cb : NULL, pp);
- zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, pgoff, pglen, commit,
- B_FALSE, for_sync ? zfs_putpage_sync_commit_cb :
- zfs_putpage_async_commit_cb, pp);
+ if (!for_sync) {
+ ClearPageError(pp);
+ end_page_writeback(pp);
+ }
dmu_tx_commit(tx);
zfs_rangelock_exit(lr);
- if (commit)
+ if (need_commit)
zil_commit(zfsvfs->z_log, zp->z_id);
dataset_kstats_update_write_kstats(&zfsvfs->z_kstat, pglen);
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zfs_znode_os.c b/sys/contrib/openzfs/module/os/linux/zfs/zfs_znode_os.c
index 54e60b4820f6..7683eeb3cf9f 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zfs_znode_os.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zfs_znode_os.c
@@ -126,8 +126,6 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
zp->z_acl_cached = NULL;
zp->z_xattr_cached = NULL;
zp->z_xattr_parent = 0;
- zp->z_sync_writes_cnt = 0;
- zp->z_async_writes_cnt = 0;
return (0);
}
@@ -149,9 +147,6 @@ zfs_znode_cache_destructor(void *buf, void *arg)
ASSERT3P(zp->z_dirlocks, ==, NULL);
ASSERT3P(zp->z_acl_cached, ==, NULL);
ASSERT3P(zp->z_xattr_cached, ==, NULL);
-
- ASSERT0(atomic_load_32(&zp->z_sync_writes_cnt));
- ASSERT0(atomic_load_32(&zp->z_async_writes_cnt));
}
static int
@@ -371,6 +366,12 @@ zfs_inode_alloc(struct super_block *sb, struct inode **ip)
return (0);
}
+void
+zfs_inode_free(struct inode *ip)
+{
+ kmem_cache_free(znode_cache, ITOZ(ip));
+}
+
/*
* Called in multiple places when an inode should be destroyed.
*/
@@ -395,8 +396,15 @@ zfs_inode_destroy(struct inode *ip)
nvlist_free(zp->z_xattr_cached);
zp->z_xattr_cached = NULL;
}
-
- kmem_cache_free(znode_cache, zp);
+#ifndef HAVE_SOPS_FREE_INODE
+ /*
+ * inode needs to be freed in RCU callback. If we have
+ * super_operations->free_inode, Linux kernel will do call_rcu
+ * for us. But if we don't have it, since call_rcu is GPL-only
+ * symbol, we can only free synchronously and accept the risk.
+ */
+ zfs_inode_free(ip);
+#endif
}
static void
@@ -535,8 +543,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz,
zp->z_blksz = blksz;
zp->z_seq = 0x7A4653;
zp->z_sync_cnt = 0;
- zp->z_sync_writes_cnt = 0;
- zp->z_async_writes_cnt = 0;
zfs_znode_sa_init(zfsvfs, zp, db, obj_type, hdl);
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c b/sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c
index 1a82c13e1523..ef7bd7352084 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c
@@ -111,52 +111,11 @@ zpl_fsync(struct file *filp, loff_t start, loff_t end, int datasync)
{
struct inode *inode = filp->f_mapping->host;
znode_t *zp = ITOZ(inode);
- zfsvfs_t *zfsvfs = ITOZSB(inode);
cred_t *cr = CRED();
int error;
fstrans_cookie_t cookie;
- /*
- * The variables z_sync_writes_cnt and z_async_writes_cnt work in
- * tandem so that sync writes can detect if there are any non-sync
- * writes going on and vice-versa. The "vice-versa" part to this logic
- * is located in zfs_putpage() where non-sync writes check if there are
- * any ongoing sync writes. If any sync and non-sync writes overlap,
- * we do a commit to complete the non-sync writes since the latter can
- * potentially take several seconds to complete and thus block sync
- * writes in the upcoming call to filemap_write_and_wait_range().
- */
- atomic_inc_32(&zp->z_sync_writes_cnt);
- /*
- * If the following check does not detect an overlapping non-sync write
- * (say because it's just about to start), then it is guaranteed that
- * the non-sync write will detect this sync write. This is because we
- * always increment z_sync_writes_cnt / z_async_writes_cnt before doing
- * the check on z_async_writes_cnt / z_sync_writes_cnt here and in
- * zfs_putpage() respectively.
- */
- if (atomic_load_32(&zp->z_async_writes_cnt) > 0) {
- if ((error = zpl_enter(zfsvfs, FTAG)) != 0) {
- atomic_dec_32(&zp->z_sync_writes_cnt);
- return (error);
- }
- zil_commit(zfsvfs->z_log, zp->z_id);
- zpl_exit(zfsvfs, FTAG);
- }
-
error = filemap_write_and_wait_range(inode->i_mapping, start, end);
-
- /*
- * The sync write is not complete yet but we decrement
- * z_sync_writes_cnt since zfs_fsync() increments and decrements
- * it internally. If a non-sync write starts just after the decrement
- * operation but before we call zfs_fsync(), it may not detect this
- * overlapping sync write but it does not matter since we have already
- * gone past filemap_write_and_wait_range() and we won't block due to
- * the non-sync write.
- */
- atomic_dec_32(&zp->z_sync_writes_cnt);
-
if (error)
return (error);
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zpl_super.c b/sys/contrib/openzfs/module/os/linux/zfs/zpl_super.c
index a682bfd33c38..94dcdd0b887d 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zpl_super.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zpl_super.c
@@ -45,6 +45,15 @@ zpl_inode_alloc(struct super_block *sb)
return (ip);
}
+#ifdef HAVE_SOPS_FREE_INODE
+static void
+zpl_inode_free(struct inode *ip)
+{
+ ASSERT(atomic_read(&ip->i_count) == 0);
+ zfs_inode_free(ip);
+}
+#endif
+
static void
zpl_inode_destroy(struct inode *ip)
{
@@ -455,6 +464,9 @@ zpl_prune_sb(uint64_t nr_to_scan, void *arg)
const struct super_operations zpl_super_operations = {
.alloc_inode = zpl_inode_alloc,
+#ifdef HAVE_SOPS_FREE_INODE
+ .free_inode = zpl_inode_free,
+#endif
.destroy_inode = zpl_inode_destroy,
.dirty_inode = zpl_dirty_inode,
.write_inode = NULL,
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c b/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
index 57a9711e9027..a7431cc4da9d 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
@@ -1302,27 +1302,30 @@ zvol_alloc_blk_mq(zvol_state_t *zv, zvol_queue_limits_t *limits)
* Allocate memory for a new zvol_state_t and setup the required
* request queue and generic disk structures for the block device.
*/
-static zvol_state_t *
-zvol_alloc(dev_t dev, const char *name, uint64_t volblocksize)
+static int
+zvol_alloc(dev_t dev, const char *name, uint64_t volsize, uint64_t volblocksize,
+ zvol_state_t **zvp)
{
zvol_state_t *zv;
struct zvol_state_os *zso;
uint64_t volmode;
int ret;
- if (dsl_prop_get_integer(name, "volmode", &volmode, NULL) != 0)
- return (NULL);
+ ret = dsl_prop_get_integer(name, "volmode", &volmode, NULL);
+ if (ret)
+ return (ret);
if (volmode == ZFS_VOLMODE_DEFAULT)
volmode = zvol_volmode;
if (volmode == ZFS_VOLMODE_NONE)
- return (NULL);
+ return (0);
zv = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP);
zso = kmem_zalloc(sizeof (struct zvol_state_os), KM_SLEEP);
zv->zv_zso = zso;
zv->zv_volmode = volmode;
+ zv->zv_volsize = volsize;
zv->zv_volblocksize = volblocksize;
list_link_init(&zv->zv_next);
@@ -1396,12 +1399,13 @@ zvol_alloc(dev_t dev, const char *name, uint64_t volblocksize)
snprintf(zso->zvo_disk->disk_name, DISK_NAME_LEN, "%s%d",
ZVOL_DEV_NAME, (dev & MINORMASK));
- return (zv);
+ *zvp = zv;
+ return (ret);
out_kmem:
kmem_free(zso, sizeof (struct zvol_state_os));
kmem_free(zv, sizeof (zvol_state_t));
- return (NULL);
+ return (ret);
}
/*
@@ -1562,7 +1566,7 @@ zvol_os_add_disk(struct gendisk *disk)
int
zvol_os_create_minor(const char *name)
{
- zvol_state_t *zv;
+ zvol_state_t *zv = NULL;
objset_t *os;
dmu_object_info_t *doi;
uint64_t volsize;
@@ -1611,18 +1615,16 @@ zvol_os_create_minor(const char *name)
if (error)
goto out_dmu_objset_disown;
- zv = zvol_alloc(MKDEV(zvol_major, minor), name,
- doi->doi_data_block_size);
- if (zv == NULL) {
- error = SET_ERROR(EAGAIN);
+ error = zvol_alloc(MKDEV(zvol_major, minor), name,
+ volsize, doi->doi_data_block_size, &zv);
+ if (error || zv == NULL)
goto out_dmu_objset_disown;
- }
+
zv->zv_hash = hash;
if (dmu_objset_is_snapshot(os))
zv->zv_flags |= ZVOL_RDONLY;
- zv->zv_volsize = volsize;
zv->zv_objset = os;
/* Default */
@@ -1689,7 +1691,7 @@ out_doi:
* zvol_open()->zvol_first_open() and zvol_release()->zvol_last_close()
* directly as well.
*/
- if (error == 0) {
+ if (error == 0 && zv) {
rw_enter(&zvol_state_lock, RW_WRITER);
zvol_insert(zv);
rw_exit(&zvol_state_lock);
@@ -1701,7 +1703,7 @@ out_doi:
return (error);
}
-void
+int
zvol_os_rename_minor(zvol_state_t *zv, const char *newname)
{
int readonly = get_disk_ro(zv->zv_zso->zvo_disk);
@@ -1728,6 +1730,8 @@ zvol_os_rename_minor(zvol_state_t *zv, const char *newname)
set_disk_ro(zv->zv_zso->zvo_disk, readonly);
dataset_kstats_rename(&zv->zv_kstat, newname);
+
+ return (0);
}
void
diff --git a/sys/contrib/openzfs/module/zcommon/zfeature_common.c b/sys/contrib/openzfs/module/zcommon/zfeature_common.c
index 0362d82efbc1..6ba9892eeb64 100644
--- a/sys/contrib/openzfs/module/zcommon/zfeature_common.c
+++ b/sys/contrib/openzfs/module/zcommon/zfeature_common.c
@@ -732,6 +732,12 @@ zpool_feature_init(void)
ZFEATURE_FLAG_READONLY_COMPAT, ZFEATURE_TYPE_BOOLEAN, NULL,
sfeatures);
+ zfeature_register(SPA_FEATURE_BLOCK_CLONING_ENDIAN,
+ "com.truenas:block_cloning_endian", "block_cloning_endian",
+ "Fixes BRT ZAP endianness on new pools.",
+ ZFEATURE_FLAG_READONLY_COMPAT, ZFEATURE_TYPE_BOOLEAN, NULL,
+ sfeatures);
+
zfeature_register(SPA_FEATURE_AVZ_V2,
"com.klarasystems:vdev_zaps_v2", "vdev_zaps_v2",
"Support for root vdev ZAP.",
@@ -786,6 +792,24 @@ zpool_feature_init(void)
ZFEATURE_TYPE_BOOLEAN, large_microzap_deps, sfeatures);
}
+ zfeature_register(SPA_FEATURE_DYNAMIC_GANG_HEADER,
+ "com.klarasystems:dynamic_gang_header", "dynamic_gang_header",
+ "Support for dynamically sized gang headers",
+ ZFEATURE_FLAG_MOS | ZFEATURE_FLAG_NO_UPGRADE,
+ ZFEATURE_TYPE_BOOLEAN, NULL, sfeatures);
+
+ {
+ static const spa_feature_t physical_rewrite_deps[] = {
+ SPA_FEATURE_EXTENSIBLE_DATASET,
+ SPA_FEATURE_NONE
+ };
+ zfeature_register(SPA_FEATURE_PHYSICAL_REWRITE,
+ "com.truenas:physical_rewrite", "physical_rewrite",
+ "Support for preserving logical birth time during rewrite.",
+ ZFEATURE_FLAG_READONLY_COMPAT | ZFEATURE_FLAG_PER_DATASET,
+ ZFEATURE_TYPE_BOOLEAN, physical_rewrite_deps, sfeatures);
+ }
+
zfs_mod_list_supported_free(sfeatures);
}
diff --git a/sys/contrib/openzfs/module/zcommon/zfs_prop.c b/sys/contrib/openzfs/module/zcommon/zfs_prop.c
index 8b4c4251703d..864e3898b365 100644
--- a/sys/contrib/openzfs/module/zcommon/zfs_prop.c
+++ b/sys/contrib/openzfs/module/zcommon/zfs_prop.c
@@ -640,7 +640,7 @@ zfs_prop_init(void)
"<1.00x or higher if compressed>", "REFRATIO", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_VOLBLOCKSIZE, "volblocksize",
ZVOL_DEFAULT_BLOCKSIZE, PROP_ONETIME,
- ZFS_TYPE_VOLUME, "512 to 128k, power of 2", "VOLBLOCK", B_FALSE,
+ ZFS_TYPE_VOLUME, "512 to 16M, power of 2", "VOLBLOCK", B_FALSE,
sfeatures);
zprop_register_index(ZFS_PROP_VOLTHREADING, "volthreading",
1, PROP_DEFAULT, ZFS_TYPE_VOLUME, "on | off", "zvol threading",
@@ -734,13 +734,12 @@ zfs_prop_init(void)
/* inherit number properties */
zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize",
SPA_OLD_MAXBLOCKSIZE, PROP_INHERIT,
- ZFS_TYPE_FILESYSTEM, "512 to 1M, power of 2", "RECSIZE", B_FALSE,
- sfeatures);
+ ZFS_TYPE_FILESYSTEM, "512 to 16M, power of 2",
+ "RECSIZE", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_SPECIAL_SMALL_BLOCKS,
"special_small_blocks", 0, PROP_INHERIT,
- ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
- "zero or 512 to 1M, power of 2", "SPECIAL_SMALL_BLOCKS", B_FALSE,
- sfeatures);
+ ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "0 to 16M",
+ "SPECIAL_SMALL_BLOCKS", B_FALSE, sfeatures);
/* hidden properties */
zprop_register_hidden(ZFS_PROP_NUMCLONES, "numclones", PROP_TYPE_NUMBER,
diff --git a/sys/contrib/openzfs/module/zcommon/zfs_valstr.c b/sys/contrib/openzfs/module/zcommon/zfs_valstr.c
index c39ac62f654f..0cb9f584acc6 100644
--- a/sys/contrib/openzfs/module/zcommon/zfs_valstr.c
+++ b/sys/contrib/openzfs/module/zcommon/zfs_valstr.c
@@ -203,7 +203,7 @@ _VALSTR_BITFIELD_IMPL(zio_flag,
{ '?', "??", "[UNUSED 11]" },
{ '.', "ND", "NODATA" },
{ '.', "ID", "INDUCE_DAMAGE" },
- { '.', "AL", "IO_ALLOCATING" },
+ { '.', "AT", "ALLOC_THROTTLED" },
{ '.', "RE", "IO_RETRY" },
{ '.', "PR", "PROBE" },
{ '.', "TH", "TRYHARD" },
@@ -221,7 +221,6 @@ _VALSTR_BITFIELD_IMPL(zio_flag,
{ '.', "NP", "NOPWRITE" },
{ '.', "EX", "REEXECUTED" },
{ '.', "DG", "DELEGATED" },
- { '.', "DC", "DIO_CHKSUM_ERR" },
{ '.', "PA", "PREALLOCATED" },
)
diff --git a/sys/contrib/openzfs/module/zfs/arc.c b/sys/contrib/openzfs/module/zfs/arc.c
index 04ca32356a6d..3483be64ec57 100644
--- a/sys/contrib/openzfs/module/zfs/arc.c
+++ b/sys/contrib/openzfs/module/zfs/arc.c
@@ -1052,7 +1052,7 @@ static arc_buf_hdr_t *
buf_hash_find(uint64_t spa, const blkptr_t *bp, kmutex_t **lockp)
{
const dva_t *dva = BP_IDENTITY(bp);
- uint64_t birth = BP_GET_BIRTH(bp);
+ uint64_t birth = BP_GET_PHYSICAL_BIRTH(bp);
uint64_t idx = BUF_HASH_INDEX(spa, dva, birth);
kmutex_t *hash_lock = BUF_HASH_LOCK(idx);
arc_buf_hdr_t *hdr;
@@ -2631,7 +2631,7 @@ arc_space_consume(uint64_t space, arc_space_type_t type)
ARCSTAT_INCR(arcstat_bonus_size, space);
break;
case ARC_SPACE_DNODE:
- ARCSTAT_INCR(arcstat_dnode_size, space);
+ aggsum_add(&arc_sums.arcstat_dnode_size, space);
break;
case ARC_SPACE_DBUF:
ARCSTAT_INCR(arcstat_dbuf_size, space);
@@ -2677,7 +2677,7 @@ arc_space_return(uint64_t space, arc_space_type_t type)
ARCSTAT_INCR(arcstat_bonus_size, -space);
break;
case ARC_SPACE_DNODE:
- ARCSTAT_INCR(arcstat_dnode_size, -space);
+ aggsum_add(&arc_sums.arcstat_dnode_size, -space);
break;
case ARC_SPACE_DBUF:
ARCSTAT_INCR(arcstat_dbuf_size, -space);
@@ -4490,7 +4490,7 @@ arc_evict(void)
* target is not evictable or if they go over arc_dnode_limit.
*/
int64_t prune = 0;
- int64_t dn = wmsum_value(&arc_sums.arcstat_dnode_size);
+ int64_t dn = aggsum_value(&arc_sums.arcstat_dnode_size);
int64_t nem = zfs_refcount_count(&arc_mru->arcs_size[ARC_BUFC_METADATA])
+ zfs_refcount_count(&arc_mfu->arcs_size[ARC_BUFC_METADATA])
- zfs_refcount_count(&arc_mru->arcs_esize[ARC_BUFC_METADATA])
@@ -5082,11 +5082,13 @@ arc_is_overflowing(boolean_t lax, boolean_t use_reserve)
* in the ARC. In practice, that's in the tens of MB, which is low
* enough to be safe.
*/
- int64_t over = aggsum_lower_bound(&arc_sums.arcstat_size) - arc_c -
+ int64_t arc_over = aggsum_lower_bound(&arc_sums.arcstat_size) - arc_c -
zfs_max_recordsize;
+ int64_t dn_over = aggsum_lower_bound(&arc_sums.arcstat_dnode_size) -
+ arc_dnode_limit;
/* Always allow at least one block of overflow. */
- if (over < 0)
+ if (arc_over < 0 && dn_over <= 0)
return (ARC_OVF_NONE);
/* If we are under memory pressure, report severe overflow. */
@@ -5097,7 +5099,7 @@ arc_is_overflowing(boolean_t lax, boolean_t use_reserve)
int64_t overflow = (arc_c >> zfs_arc_overflow_shift) / 2;
if (use_reserve)
overflow *= 3;
- return (over < overflow ? ARC_OVF_SOME : ARC_OVF_SEVERE);
+ return (arc_over < overflow ? ARC_OVF_SOME : ARC_OVF_SEVERE);
}
static abd_t *
@@ -5585,7 +5587,7 @@ arc_read_done(zio_t *zio)
if (HDR_IN_HASH_TABLE(hdr)) {
arc_buf_hdr_t *found;
- ASSERT3U(hdr->b_birth, ==, BP_GET_BIRTH(zio->io_bp));
+ ASSERT3U(hdr->b_birth, ==, BP_GET_PHYSICAL_BIRTH(zio->io_bp));
ASSERT3U(hdr->b_dva.dva_word[0], ==,
BP_IDENTITY(zio->io_bp)->dva_word[0]);
ASSERT3U(hdr->b_dva.dva_word[1], ==,
@@ -5688,7 +5690,7 @@ arc_read_done(zio_t *zio)
error = SET_ERROR(EIO);
if ((zio->io_flags & ZIO_FLAG_SPECULATIVE) == 0) {
spa_log_error(zio->io_spa, &acb->acb_zb,
- BP_GET_LOGICAL_BIRTH(zio->io_bp));
+ BP_GET_PHYSICAL_BIRTH(zio->io_bp));
(void) zfs_ereport_post(
FM_EREPORT_ZFS_AUTHENTICATION,
zio->io_spa, NULL, &acb->acb_zb, zio, 0);
@@ -6107,7 +6109,7 @@ top:
if (!embedded_bp) {
hdr->b_dva = *BP_IDENTITY(bp);
- hdr->b_birth = BP_GET_BIRTH(bp);
+ hdr->b_birth = BP_GET_PHYSICAL_BIRTH(bp);
exists = buf_hash_insert(hdr, &hash_lock);
}
if (exists != NULL) {
@@ -6955,7 +6957,7 @@ arc_write_done(zio_t *zio)
buf_discard_identity(hdr);
} else {
hdr->b_dva = *BP_IDENTITY(zio->io_bp);
- hdr->b_birth = BP_GET_BIRTH(zio->io_bp);
+ hdr->b_birth = BP_GET_PHYSICAL_BIRTH(zio->io_bp);
}
} else {
ASSERT(HDR_EMPTY(hdr));
@@ -7326,7 +7328,7 @@ arc_kstat_update(kstat_t *ksp, int rw)
#if defined(COMPAT_FREEBSD11)
as->arcstat_other_size.value.ui64 =
wmsum_value(&arc_sums.arcstat_bonus_size) +
- wmsum_value(&arc_sums.arcstat_dnode_size) +
+ aggsum_value(&arc_sums.arcstat_dnode_size) +
wmsum_value(&arc_sums.arcstat_dbuf_size);
#endif
@@ -7368,7 +7370,7 @@ arc_kstat_update(kstat_t *ksp, int rw)
&as->arcstat_uncached_evictable_metadata);
as->arcstat_dnode_size.value.ui64 =
- wmsum_value(&arc_sums.arcstat_dnode_size);
+ aggsum_value(&arc_sums.arcstat_dnode_size);
as->arcstat_bonus_size.value.ui64 =
wmsum_value(&arc_sums.arcstat_bonus_size);
as->arcstat_l2_hits.value.ui64 =
@@ -7738,7 +7740,7 @@ arc_state_init(void)
wmsum_init(&arc_sums.arcstat_data_size, 0);
wmsum_init(&arc_sums.arcstat_metadata_size, 0);
wmsum_init(&arc_sums.arcstat_dbuf_size, 0);
- wmsum_init(&arc_sums.arcstat_dnode_size, 0);
+ aggsum_init(&arc_sums.arcstat_dnode_size, 0);
wmsum_init(&arc_sums.arcstat_bonus_size, 0);
wmsum_init(&arc_sums.arcstat_l2_hits, 0);
wmsum_init(&arc_sums.arcstat_l2_misses, 0);
@@ -7897,7 +7899,7 @@ arc_state_fini(void)
wmsum_fini(&arc_sums.arcstat_data_size);
wmsum_fini(&arc_sums.arcstat_metadata_size);
wmsum_fini(&arc_sums.arcstat_dbuf_size);
- wmsum_fini(&arc_sums.arcstat_dnode_size);
+ aggsum_fini(&arc_sums.arcstat_dnode_size);
wmsum_fini(&arc_sums.arcstat_bonus_size);
wmsum_fini(&arc_sums.arcstat_l2_hits);
wmsum_fini(&arc_sums.arcstat_l2_misses);
diff --git a/sys/contrib/openzfs/module/zfs/bpobj.c b/sys/contrib/openzfs/module/zfs/bpobj.c
index 8c19de93f12f..0a8a077edf63 100644
--- a/sys/contrib/openzfs/module/zfs/bpobj.c
+++ b/sys/contrib/openzfs/module/zfs/bpobj.c
@@ -954,8 +954,8 @@ space_range_cb(void *arg, const blkptr_t *bp, boolean_t bp_freed, dmu_tx_t *tx)
(void) bp_freed, (void) tx;
struct space_range_arg *sra = arg;
- if (BP_GET_LOGICAL_BIRTH(bp) > sra->mintxg &&
- BP_GET_LOGICAL_BIRTH(bp) <= sra->maxtxg) {
+ if (BP_GET_BIRTH(bp) > sra->mintxg &&
+ BP_GET_BIRTH(bp) <= sra->maxtxg) {
if (dsl_pool_sync_context(spa_get_dsl(sra->spa)))
sra->used += bp_get_dsize_sync(sra->spa, bp);
else
diff --git a/sys/contrib/openzfs/module/zfs/brt.c b/sys/contrib/openzfs/module/zfs/brt.c
index 27d9ed7ea2b0..40664354aa73 100644
--- a/sys/contrib/openzfs/module/zfs/brt.c
+++ b/sys/contrib/openzfs/module/zfs/brt.c
@@ -478,6 +478,18 @@ brt_vdev_create(spa_t *spa, brt_vdev_t *brtvd, dmu_tx_t *tx)
sizeof (uint64_t), 1, &brtvd->bv_mos_brtvdev, tx));
BRT_DEBUG("Pool directory object created, object=%s", name);
+ /*
+ * Activate the endian-fixed feature if this is the first BRT ZAP
+ * (i.e., BLOCK_CLONING is not yet active) and the feature is enabled.
+ */
+ if (spa_feature_is_enabled(spa, SPA_FEATURE_BLOCK_CLONING_ENDIAN) &&
+ !spa_feature_is_active(spa, SPA_FEATURE_BLOCK_CLONING)) {
+ spa_feature_incr(spa, SPA_FEATURE_BLOCK_CLONING_ENDIAN, tx);
+ } else if (spa_feature_is_active(spa,
+ SPA_FEATURE_BLOCK_CLONING_ENDIAN)) {
+ spa_feature_incr(spa, SPA_FEATURE_BLOCK_CLONING_ENDIAN, tx);
+ }
+
spa_feature_incr(spa, SPA_FEATURE_BLOCK_CLONING, tx);
}
@@ -658,6 +670,8 @@ brt_vdev_destroy(spa_t *spa, brt_vdev_t *brtvd, dmu_tx_t *tx)
rw_exit(&brtvd->bv_lock);
spa_feature_decr(spa, SPA_FEATURE_BLOCK_CLONING, tx);
+ if (spa_feature_is_active(spa, SPA_FEATURE_BLOCK_CLONING_ENDIAN))
+ spa_feature_decr(spa, SPA_FEATURE_BLOCK_CLONING_ENDIAN, tx);
}
static void
@@ -855,16 +869,29 @@ brt_entry_fill(const blkptr_t *bp, brt_entry_t *bre, uint64_t *vdevidp)
*vdevidp = DVA_GET_VDEV(&bp->blk_dva[0]);
}
+static boolean_t
+brt_has_endian_fixed(spa_t *spa)
+{
+ return (spa_feature_is_active(spa, SPA_FEATURE_BLOCK_CLONING_ENDIAN));
+}
+
static int
-brt_entry_lookup(brt_vdev_t *brtvd, brt_entry_t *bre)
+brt_entry_lookup(spa_t *spa, brt_vdev_t *brtvd, brt_entry_t *bre)
{
uint64_t off = BRE_OFFSET(bre);
if (brtvd->bv_mos_entries == 0)
return (SET_ERROR(ENOENT));
- return (zap_lookup_uint64_by_dnode(brtvd->bv_mos_entries_dnode,
- &off, BRT_KEY_WORDS, 1, sizeof (bre->bre_count), &bre->bre_count));
+ if (brt_has_endian_fixed(spa)) {
+ return (zap_lookup_uint64_by_dnode(brtvd->bv_mos_entries_dnode,
+ &off, BRT_KEY_WORDS, sizeof (bre->bre_count), 1,
+ &bre->bre_count));
+ } else {
+ return (zap_lookup_uint64_by_dnode(brtvd->bv_mos_entries_dnode,
+ &off, BRT_KEY_WORDS, 1, sizeof (bre->bre_count),
+ &bre->bre_count));
+ }
}
/*
@@ -1056,7 +1083,7 @@ brt_entry_decref(spa_t *spa, const blkptr_t *bp)
}
rw_exit(&brtvd->bv_lock);
- error = brt_entry_lookup(brtvd, &bre_search);
+ error = brt_entry_lookup(spa, brtvd, &bre_search);
/* bre_search now contains correct bre_count */
if (error == ENOENT) {
BRTSTAT_BUMP(brt_decref_no_entry);
@@ -1118,7 +1145,7 @@ brt_entry_get_refcount(spa_t *spa, const blkptr_t *bp)
bre = avl_find(&brtvd->bv_tree, &bre_search, NULL);
if (bre == NULL) {
rw_exit(&brtvd->bv_lock);
- error = brt_entry_lookup(brtvd, &bre_search);
+ error = brt_entry_lookup(spa, brtvd, &bre_search);
if (error == ENOENT) {
refcnt = 0;
} else {
@@ -1270,10 +1297,18 @@ brt_pending_apply_vdev(spa_t *spa, brt_vdev_t *brtvd, uint64_t txg)
uint64_t off = BRE_OFFSET(bre);
if (brtvd->bv_mos_entries != 0 &&
brt_vdev_lookup(spa, brtvd, off)) {
- int error = zap_lookup_uint64_by_dnode(
- brtvd->bv_mos_entries_dnode, &off,
- BRT_KEY_WORDS, 1, sizeof (bre->bre_count),
- &bre->bre_count);
+ int error;
+ if (brt_has_endian_fixed(spa)) {
+ error = zap_lookup_uint64_by_dnode(
+ brtvd->bv_mos_entries_dnode, &off,
+ BRT_KEY_WORDS, sizeof (bre->bre_count), 1,
+ &bre->bre_count);
+ } else {
+ error = zap_lookup_uint64_by_dnode(
+ brtvd->bv_mos_entries_dnode, &off,
+ BRT_KEY_WORDS, 1, sizeof (bre->bre_count),
+ &bre->bre_count);
+ }
if (error == 0) {
BRTSTAT_BUMP(brt_addref_entry_on_disk);
} else {
@@ -1326,7 +1361,7 @@ brt_pending_apply(spa_t *spa, uint64_t txg)
}
static void
-brt_sync_entry(dnode_t *dn, brt_entry_t *bre, dmu_tx_t *tx)
+brt_sync_entry(spa_t *spa, dnode_t *dn, brt_entry_t *bre, dmu_tx_t *tx)
{
uint64_t off = BRE_OFFSET(bre);
@@ -1337,9 +1372,15 @@ brt_sync_entry(dnode_t *dn, brt_entry_t *bre, dmu_tx_t *tx)
BRT_KEY_WORDS, tx);
VERIFY(error == 0 || error == ENOENT);
} else {
- VERIFY0(zap_update_uint64_by_dnode(dn, &off,
- BRT_KEY_WORDS, 1, sizeof (bre->bre_count),
- &bre->bre_count, tx));
+ if (brt_has_endian_fixed(spa)) {
+ VERIFY0(zap_update_uint64_by_dnode(dn, &off,
+ BRT_KEY_WORDS, sizeof (bre->bre_count), 1,
+ &bre->bre_count, tx));
+ } else {
+ VERIFY0(zap_update_uint64_by_dnode(dn, &off,
+ BRT_KEY_WORDS, 1, sizeof (bre->bre_count),
+ &bre->bre_count, tx));
+ }
}
}
@@ -1368,7 +1409,8 @@ brt_sync_table(spa_t *spa, dmu_tx_t *tx)
void *c = NULL;
while ((bre = avl_destroy_nodes(&brtvd->bv_tree, &c)) != NULL) {
- brt_sync_entry(brtvd->bv_mos_entries_dnode, bre, tx);
+ brt_sync_entry(spa, brtvd->bv_mos_entries_dnode, bre,
+ tx);
kmem_cache_free(brt_entry_cache, bre);
}
diff --git a/sys/contrib/openzfs/module/zfs/dbuf.c b/sys/contrib/openzfs/module/zfs/dbuf.c
index f1b5a17f337e..432c99cec960 100644
--- a/sys/contrib/openzfs/module/zfs/dbuf.c
+++ b/sys/contrib/openzfs/module/zfs/dbuf.c
@@ -866,8 +866,16 @@ dbuf_evict_notify(uint64_t size)
* and grabbing the lock results in massive lock contention.
*/
if (size > dbuf_cache_target_bytes()) {
- if (size > dbuf_cache_hiwater_bytes())
+ /*
+ * Avoid calling dbuf_evict_one() from memory reclaim context
+ * (e.g. Linux kswapd, FreeBSD pagedaemon) to prevent deadlocks.
+ * Memory reclaim threads can get stuck waiting for the dbuf
+ * hash lock.
+ */
+ if (size > dbuf_cache_hiwater_bytes() &&
+ !current_is_reclaim_thread()) {
dbuf_evict_one();
+ }
cv_signal(&dbuf_evict_cv);
}
}
@@ -1235,11 +1243,9 @@ dbuf_verify(dmu_buf_impl_t *db)
DVA_IS_EMPTY(&bp->blk_dva[1]) &&
DVA_IS_EMPTY(&bp->blk_dva[2]));
ASSERT0(bp->blk_fill);
- ASSERT0(bp->blk_pad[0]);
- ASSERT0(bp->blk_pad[1]);
ASSERT(!BP_IS_EMBEDDED(bp));
ASSERT(BP_IS_HOLE(bp));
- ASSERT0(BP_GET_PHYSICAL_BIRTH(bp));
+ ASSERT0(BP_GET_RAW_PHYSICAL_BIRTH(bp));
}
}
}
@@ -1615,7 +1621,7 @@ dbuf_read_impl(dmu_buf_impl_t *db, dnode_t *dn, zio_t *zio, dmu_flags_t flags,
*/
if (db->db_objset->os_encrypted && !BP_USES_CRYPT(bp)) {
spa_log_error(db->db_objset->os_spa, &zb,
- BP_GET_LOGICAL_BIRTH(bp));
+ BP_GET_PHYSICAL_BIRTH(bp));
err = SET_ERROR(EIO);
goto early_unlock;
}
@@ -2154,6 +2160,12 @@ dbuf_redirty(dbuf_dirty_record_t *dr)
ASSERT(arc_released(db->db_buf));
arc_buf_thaw(db->db_buf);
}
+
+ /*
+ * Clear the rewrite flag since this is now a logical
+ * modification.
+ */
+ dr->dt.dl.dr_rewrite = B_FALSE;
}
}
@@ -2701,6 +2713,38 @@ dmu_buf_will_dirty(dmu_buf_t *db_fake, dmu_tx_t *tx)
dmu_buf_will_dirty_flags(db_fake, tx, DMU_READ_NO_PREFETCH);
}
+void
+dmu_buf_will_rewrite(dmu_buf_t *db_fake, dmu_tx_t *tx)
+{
+ dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake;
+
+ ASSERT(tx->tx_txg != 0);
+ ASSERT(!zfs_refcount_is_zero(&db->db_holds));
+
+ /*
+ * If the dbuf is already dirty in this txg, it will be written
+ * anyway, so there's nothing to do.
+ */
+ mutex_enter(&db->db_mtx);
+ if (dbuf_find_dirty_eq(db, tx->tx_txg) != NULL) {
+ mutex_exit(&db->db_mtx);
+ return;
+ }
+ mutex_exit(&db->db_mtx);
+
+ /*
+ * The dbuf is not dirty, so we need to make it dirty and
+ * mark it for rewrite (preserve logical birth time).
+ */
+ dmu_buf_will_dirty_flags(db_fake, tx, DMU_READ_NO_PREFETCH);
+
+ mutex_enter(&db->db_mtx);
+ dbuf_dirty_record_t *dr = dbuf_find_dirty_eq(db, tx->tx_txg);
+ if (dr != NULL && db->db_level == 0)
+ dr->dt.dl.dr_rewrite = B_TRUE;
+ mutex_exit(&db->db_mtx);
+}
+
boolean_t
dmu_buf_is_dirty(dmu_buf_t *db_fake, dmu_tx_t *tx)
{
@@ -4899,7 +4943,7 @@ dbuf_write_ready(zio_t *zio, arc_buf_t *buf, void *vdb)
dnode_diduse_space(dn, delta - zio->io_prev_space_delta);
zio->io_prev_space_delta = delta;
- if (BP_GET_LOGICAL_BIRTH(bp) != 0) {
+ if (BP_GET_BIRTH(bp) != 0) {
ASSERT((db->db_blkid != DMU_SPILL_BLKID &&
BP_GET_TYPE(bp) == dn->dn_type) ||
(db->db_blkid == DMU_SPILL_BLKID &&
@@ -5186,7 +5230,7 @@ dbuf_remap_impl(dnode_t *dn, blkptr_t *bp, krwlock_t *rw, dmu_tx_t *tx)
ASSERT(dsl_pool_sync_context(spa_get_dsl(spa)));
drica.drica_os = dn->dn_objset;
- drica.drica_blk_birth = BP_GET_LOGICAL_BIRTH(bp);
+ drica.drica_blk_birth = BP_GET_BIRTH(bp);
drica.drica_tx = tx;
if (spa_remap_blkptr(spa, &bp_copy, dbuf_remap_impl_callback,
&drica)) {
@@ -5201,8 +5245,7 @@ dbuf_remap_impl(dnode_t *dn, blkptr_t *bp, krwlock_t *rw, dmu_tx_t *tx)
if (dn->dn_objset != spa_meta_objset(spa)) {
dsl_dataset_t *ds = dmu_objset_ds(dn->dn_objset);
if (dsl_deadlist_is_open(&ds->ds_dir->dd_livelist) &&
- BP_GET_LOGICAL_BIRTH(bp) >
- ds->ds_dir->dd_origin_txg) {
+ BP_GET_BIRTH(bp) > ds->ds_dir->dd_origin_txg) {
ASSERT(!BP_IS_EMBEDDED(bp));
ASSERT(dsl_dir_is_clone(ds->ds_dir));
ASSERT(spa_feature_is_enabled(spa,
@@ -5320,7 +5363,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx)
}
ASSERT(db->db_level == 0 || data == db->db_buf);
- ASSERT3U(BP_GET_LOGICAL_BIRTH(db->db_blkptr), <=, txg);
+ ASSERT3U(BP_GET_BIRTH(db->db_blkptr), <=, txg);
ASSERT(pio);
SET_BOOKMARK(&zb, os->os_dsl_dataset ?
@@ -5334,6 +5377,24 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx)
dmu_write_policy(os, dn, db->db_level, wp_flag, &zp);
/*
+ * Set rewrite properties for zfs_rewrite() operations.
+ */
+ if (db->db_level == 0 && dr->dt.dl.dr_rewrite) {
+ zp.zp_rewrite = B_TRUE;
+
+ /*
+ * Mark physical rewrite feature for activation.
+ * This will be activated automatically during dataset sync.
+ */
+ dsl_dataset_t *ds = os->os_dsl_dataset;
+ if (!dsl_dataset_feature_is_active(ds,
+ SPA_FEATURE_PHYSICAL_REWRITE)) {
+ ds->ds_feature_activation[
+ SPA_FEATURE_PHYSICAL_REWRITE] = (void *)B_TRUE;
+ }
+ }
+
+ /*
* We copy the blkptr now (rather than when we instantiate the dirty
* record), because its value can change between open context and
* syncing context. We do not need to hold dn_struct_rwlock to read
@@ -5403,6 +5464,7 @@ EXPORT_SYMBOL(dbuf_release_bp);
EXPORT_SYMBOL(dbuf_dirty);
EXPORT_SYMBOL(dmu_buf_set_crypt_params);
EXPORT_SYMBOL(dmu_buf_will_dirty);
+EXPORT_SYMBOL(dmu_buf_will_rewrite);
EXPORT_SYMBOL(dmu_buf_is_dirty);
EXPORT_SYMBOL(dmu_buf_will_clone_or_dio);
EXPORT_SYMBOL(dmu_buf_will_not_fill);
diff --git a/sys/contrib/openzfs/module/zfs/ddt.c b/sys/contrib/openzfs/module/zfs/ddt.c
index 60cbb7755a7e..e0b9fc3951ff 100644
--- a/sys/contrib/openzfs/module/zfs/ddt.c
+++ b/sys/contrib/openzfs/module/zfs/ddt.c
@@ -724,10 +724,13 @@ ddt_phys_extend(ddt_univ_phys_t *ddp, ddt_phys_variant_t v, const blkptr_t *bp)
dvas[2] = bp->blk_dva[2];
if (ddt_phys_birth(ddp, v) == 0) {
- if (v == DDT_PHYS_FLAT)
- ddp->ddp_flat.ddp_phys_birth = BP_GET_BIRTH(bp);
- else
- ddp->ddp_trad[v].ddp_phys_birth = BP_GET_BIRTH(bp);
+ if (v == DDT_PHYS_FLAT) {
+ ddp->ddp_flat.ddp_phys_birth =
+ BP_GET_PHYSICAL_BIRTH(bp);
+ } else {
+ ddp->ddp_trad[v].ddp_phys_birth =
+ BP_GET_PHYSICAL_BIRTH(bp);
+ }
}
}
@@ -891,14 +894,14 @@ ddt_phys_select(const ddt_t *ddt, const ddt_entry_t *dde, const blkptr_t *bp)
if (ddt->ddt_flags & DDT_FLAG_FLAT) {
if (DVA_EQUAL(BP_IDENTITY(bp), &ddp->ddp_flat.ddp_dva[0]) &&
- BP_GET_BIRTH(bp) == ddp->ddp_flat.ddp_phys_birth) {
+ BP_GET_PHYSICAL_BIRTH(bp) == ddp->ddp_flat.ddp_phys_birth) {
return (DDT_PHYS_FLAT);
}
} else /* traditional phys */ {
for (int p = 0; p < DDT_PHYS_MAX; p++) {
if (DVA_EQUAL(BP_IDENTITY(bp),
&ddp->ddp_trad[p].ddp_dva[0]) &&
- BP_GET_BIRTH(bp) ==
+ BP_GET_PHYSICAL_BIRTH(bp) ==
ddp->ddp_trad[p].ddp_phys_birth) {
return (p);
}
diff --git a/sys/contrib/openzfs/module/zfs/dmu.c b/sys/contrib/openzfs/module/zfs/dmu.c
index 21c465328134..296e58ef9cd8 100644
--- a/sys/contrib/openzfs/module/zfs/dmu.c
+++ b/sys/contrib/openzfs/module/zfs/dmu.c
@@ -1966,7 +1966,7 @@ dmu_sync_late_arrival_done(zio_t *zio)
blkptr_t *bp_orig __maybe_unused = &zio->io_bp_orig;
ASSERT(!(zio->io_flags & ZIO_FLAG_NOPWRITE));
ASSERT(BP_IS_HOLE(bp_orig) || !BP_EQUAL(bp, bp_orig));
- ASSERT(BP_GET_LOGICAL_BIRTH(zio->io_bp) == zio->io_txg);
+ ASSERT(BP_GET_BIRTH(zio->io_bp) == zio->io_txg);
ASSERT(zio->io_txg > spa_syncing_txg(zio->io_spa));
zio_free(zio->io_spa, zio->io_txg, zio->io_bp);
}
@@ -2508,6 +2508,7 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp)
zp->zp_encrypt = encrypt;
zp->zp_byteorder = ZFS_HOST_BYTEORDER;
zp->zp_direct_write = (wp & WP_DIRECT_WR) ? B_TRUE : B_FALSE;
+ zp->zp_rewrite = B_FALSE;
memset(zp->zp_salt, 0, ZIO_DATA_SALT_LEN);
memset(zp->zp_iv, 0, ZIO_DATA_IV_LEN);
memset(zp->zp_mac, 0, ZIO_DATA_MAC_LEN);
@@ -2655,11 +2656,12 @@ dmu_read_l0_bps(objset_t *os, uint64_t object, uint64_t offset, uint64_t length,
* operation into ZIL, or it may be impossible to replay, since
* the block may appear not yet allocated at that point.
*/
- if (BP_GET_BIRTH(bp) > spa_freeze_txg(os->os_spa)) {
+ if (BP_GET_PHYSICAL_BIRTH(bp) > spa_freeze_txg(os->os_spa)) {
error = SET_ERROR(EINVAL);
goto out;
}
- if (BP_GET_BIRTH(bp) > spa_last_synced_txg(os->os_spa)) {
+ if (BP_GET_PHYSICAL_BIRTH(bp) >
+ spa_last_synced_txg(os->os_spa)) {
error = SET_ERROR(EAGAIN);
goto out;
}
@@ -2731,7 +2733,8 @@ dmu_brt_clone(objset_t *os, uint64_t object, uint64_t offset, uint64_t length,
if (!BP_IS_HOLE(bp) || BP_GET_LOGICAL_BIRTH(bp) != 0) {
if (!BP_IS_EMBEDDED(bp)) {
BP_SET_BIRTH(&dl->dr_overridden_by, dr->dr_txg,
- BP_GET_BIRTH(bp));
+ BP_GET_PHYSICAL_BIRTH(bp));
+ BP_SET_REWRITE(&dl->dr_overridden_by, 0);
} else {
BP_SET_LOGICAL_BIRTH(&dl->dr_overridden_by,
dr->dr_txg);
diff --git a/sys/contrib/openzfs/module/zfs/dmu_diff.c b/sys/contrib/openzfs/module/zfs/dmu_diff.c
index 86f751e886c9..fb13b2f87f57 100644
--- a/sys/contrib/openzfs/module/zfs/dmu_diff.c
+++ b/sys/contrib/openzfs/module/zfs/dmu_diff.c
@@ -224,8 +224,8 @@ dmu_diff(const char *tosnap_name, const char *fromsnap_name,
* call the ZFS_IOC_OBJ_TO_STATS ioctl.
*/
error = traverse_dataset(tosnap, fromtxg,
- TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA | TRAVERSE_NO_DECRYPT,
- diff_cb, &da);
+ TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA | TRAVERSE_NO_DECRYPT |
+ TRAVERSE_LOGICAL, diff_cb, &da);
if (error != 0) {
da.da_err = error;
diff --git a/sys/contrib/openzfs/module/zfs/dmu_direct.c b/sys/contrib/openzfs/module/zfs/dmu_direct.c
index 12b0ffa2c99b..930ff101eca3 100644
--- a/sys/contrib/openzfs/module/zfs/dmu_direct.c
+++ b/sys/contrib/openzfs/module/zfs/dmu_direct.c
@@ -104,7 +104,7 @@ dmu_write_direct_done(zio_t *zio)
dmu_sync_done(zio, NULL, zio->io_private);
if (zio->io_error != 0) {
- if (zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR)
+ if (zio->io_post & ZIO_POST_DIO_CHKSUM_ERR)
ASSERT3U(zio->io_error, ==, EIO);
/*
diff --git a/sys/contrib/openzfs/module/zfs/dmu_objset.c b/sys/contrib/openzfs/module/zfs/dmu_objset.c
index b3f792e4ae6b..c135f620800f 100644
--- a/sys/contrib/openzfs/module/zfs/dmu_objset.c
+++ b/sys/contrib/openzfs/module/zfs/dmu_objset.c
@@ -345,12 +345,6 @@ smallblk_changed_cb(void *arg, uint64_t newval)
{
objset_t *os = arg;
- /*
- * Inheritance and range checking should have been done by now.
- */
- ASSERT(newval <= SPA_MAXBLOCKSIZE);
- ASSERT(ISP2(newval));
-
os->os_zpl_special_smallblock = newval;
}
@@ -1376,7 +1370,7 @@ dmu_objset_create(const char *name, dmu_objset_type_t type, uint64_t flags,
6, ZFS_SPACE_CHECK_NORMAL);
if (rv == 0)
- zvol_create_minor(name);
+ zvol_create_minors(name);
crfree(cr);
diff --git a/sys/contrib/openzfs/module/zfs/dmu_recv.c b/sys/contrib/openzfs/module/zfs/dmu_recv.c
index 3a4bd7a1cea9..73227b58c140 100644
--- a/sys/contrib/openzfs/module/zfs/dmu_recv.c
+++ b/sys/contrib/openzfs/module/zfs/dmu_recv.c
@@ -1403,7 +1403,7 @@ corrective_read_done(zio_t *zio)
/* Corruption corrected; update error log if needed */
if (zio->io_error == 0) {
spa_remove_error(data->spa, &data->zb,
- BP_GET_LOGICAL_BIRTH(zio->io_bp));
+ BP_GET_PHYSICAL_BIRTH(zio->io_bp));
}
kmem_free(data, sizeof (cr_cb_data_t));
abd_free(zio->io_abd);
@@ -1530,7 +1530,7 @@ do_corrective_recv(struct receive_writer_arg *rwa, struct drr_write *drrw,
}
rrd->abd = abd;
- io = zio_rewrite(NULL, rwa->os->os_spa, BP_GET_LOGICAL_BIRTH(bp), bp,
+ io = zio_rewrite(NULL, rwa->os->os_spa, BP_GET_BIRTH(bp), bp,
abd, BP_GET_PSIZE(bp), NULL, NULL, ZIO_PRIORITY_SYNC_WRITE, flags,
&zb);
@@ -3831,11 +3831,11 @@ dmu_recv_end(dmu_recv_cookie_t *drc, void *owner)
nvlist_free(drc->drc_keynvl);
} else if (!drc->drc_heal) {
if (drc->drc_newfs) {
- zvol_create_minor(drc->drc_tofs);
+ zvol_create_minors(drc->drc_tofs);
}
char *snapname = kmem_asprintf("%s@%s",
drc->drc_tofs, drc->drc_tosnap);
- zvol_create_minor(snapname);
+ zvol_create_minors(snapname);
kmem_strfree(snapname);
}
diff --git a/sys/contrib/openzfs/module/zfs/dmu_redact.c b/sys/contrib/openzfs/module/zfs/dmu_redact.c
index 65443d112f27..9226ac9e4b80 100644
--- a/sys/contrib/openzfs/module/zfs/dmu_redact.c
+++ b/sys/contrib/openzfs/module/zfs/dmu_redact.c
@@ -370,8 +370,8 @@ redact_traverse_thread(void *arg)
#endif
err = traverse_dataset_resume(rt_arg->ds, rt_arg->txg,
- &rt_arg->resume, TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA,
- redact_cb, rt_arg);
+ &rt_arg->resume, TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA |
+ TRAVERSE_LOGICAL, redact_cb, rt_arg);
if (err != EINTR)
rt_arg->error_code = err;
diff --git a/sys/contrib/openzfs/module/zfs/dmu_send.c b/sys/contrib/openzfs/module/zfs/dmu_send.c
index 4f27f3df0e55..deeba29e159a 100644
--- a/sys/contrib/openzfs/module/zfs/dmu_send.c
+++ b/sys/contrib/openzfs/module/zfs/dmu_send.c
@@ -1084,7 +1084,7 @@ send_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
*/
if (sta->os->os_encrypted &&
!BP_IS_HOLE(bp) && !BP_USES_CRYPT(bp)) {
- spa_log_error(spa, zb, BP_GET_LOGICAL_BIRTH(bp));
+ spa_log_error(spa, zb, BP_GET_PHYSICAL_BIRTH(bp));
return (SET_ERROR(EIO));
}
@@ -1210,7 +1210,7 @@ send_traverse_thread(void *arg)
err = traverse_dataset_resume(st_arg->os->os_dsl_dataset,
st_arg->fromtxg, &st_arg->resume,
- st_arg->flags, send_cb, st_arg);
+ st_arg->flags | TRAVERSE_LOGICAL, send_cb, st_arg);
if (err != EINTR)
st_arg->error_code = err;
diff --git a/sys/contrib/openzfs/module/zfs/dmu_traverse.c b/sys/contrib/openzfs/module/zfs/dmu_traverse.c
index f534a7dd64e3..dd1df1705040 100644
--- a/sys/contrib/openzfs/module/zfs/dmu_traverse.c
+++ b/sys/contrib/openzfs/module/zfs/dmu_traverse.c
@@ -74,6 +74,15 @@ static int traverse_dnode(traverse_data_t *td, const blkptr_t *bp,
static void prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *,
uint64_t objset, uint64_t object);
+static inline uint64_t
+get_birth_time(traverse_data_t *td, const blkptr_t *bp)
+{
+ if (td->td_flags & TRAVERSE_LOGICAL)
+ return (BP_GET_LOGICAL_BIRTH(bp));
+ else
+ return (BP_GET_BIRTH(bp));
+}
+
static int
traverse_zil_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
uint64_t claim_txg)
@@ -85,7 +94,7 @@ traverse_zil_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
return (0);
if (claim_txg == 0 &&
- BP_GET_LOGICAL_BIRTH(bp) >= spa_min_claim_txg(td->td_spa))
+ get_birth_time(td, bp) >= spa_min_claim_txg(td->td_spa))
return (-1);
SET_BOOKMARK(&zb, td->td_objset, ZB_ZIL_OBJECT, ZB_ZIL_LEVEL,
@@ -110,7 +119,7 @@ traverse_zil_record(zilog_t *zilog, const lr_t *lrc, void *arg,
if (BP_IS_HOLE(bp))
return (0);
- if (claim_txg == 0 || BP_GET_LOGICAL_BIRTH(bp) < claim_txg)
+ if (claim_txg == 0 || get_birth_time(td, bp) < claim_txg)
return (0);
ASSERT3U(BP_GET_LSIZE(bp), !=, 0);
@@ -194,7 +203,7 @@ traverse_prefetch_metadata(traverse_data_t *td, const dnode_phys_t *dnp,
*/
if (resume_skip_check(td, dnp, zb) != RESUME_SKIP_NONE)
return (B_FALSE);
- if (BP_IS_HOLE(bp) || BP_GET_LOGICAL_BIRTH(bp) <= td->td_min_txg)
+ if (BP_IS_HOLE(bp) || get_birth_time(td, bp) <= td->td_min_txg)
return (B_FALSE);
if (BP_GET_LEVEL(bp) == 0 && BP_GET_TYPE(bp) != DMU_OT_DNODE)
return (B_FALSE);
@@ -265,7 +274,7 @@ traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp,
zb->zb_object == DMU_META_DNODE_OBJECT) &&
td->td_hole_birth_enabled_txg <= td->td_min_txg)
return (0);
- } else if (BP_GET_LOGICAL_BIRTH(bp) <= td->td_min_txg) {
+ } else if (get_birth_time(td, bp) <= td->td_min_txg) {
return (0);
}
diff --git a/sys/contrib/openzfs/module/zfs/dnode.c b/sys/contrib/openzfs/module/zfs/dnode.c
index 904a039edf95..451e1533efa0 100644
--- a/sys/contrib/openzfs/module/zfs/dnode.c
+++ b/sys/contrib/openzfs/module/zfs/dnode.c
@@ -86,6 +86,19 @@ int zfs_default_ibs = DN_MAX_INDBLKSHIFT;
static kmem_cbrc_t dnode_move(void *, void *, size_t, void *);
#endif /* _KERNEL */
+static char *
+rt_name(dnode_t *dn, const char *name)
+{
+ struct objset *os = dn->dn_objset;
+
+ return (kmem_asprintf("{spa=%s objset=%llu obj=%llu %s}",
+ spa_name(os->os_spa),
+ (u_longlong_t)(os->os_dsl_dataset ?
+ os->os_dsl_dataset->ds_object : DMU_META_OBJSET),
+ (u_longlong_t)dn->dn_object,
+ name));
+}
+
static int
dbuf_compare(const void *x1, const void *x2)
{
@@ -2436,8 +2449,10 @@ done:
{
int txgoff = tx->tx_txg & TXG_MASK;
if (dn->dn_free_ranges[txgoff] == NULL) {
- dn->dn_free_ranges[txgoff] = zfs_range_tree_create(NULL,
- ZFS_RANGE_SEG64, NULL, 0, 0);
+ dn->dn_free_ranges[txgoff] =
+ zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, rt_name(dn, "dn_free_ranges"));
}
zfs_range_tree_clear(dn->dn_free_ranges[txgoff], blkid, nblks);
zfs_range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks);
diff --git a/sys/contrib/openzfs/module/zfs/dsl_bookmark.c b/sys/contrib/openzfs/module/zfs/dsl_bookmark.c
index e301fe19f645..fdc8b7b198f0 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_bookmark.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_bookmark.c
@@ -1523,7 +1523,7 @@ dsl_bookmark_block_killed(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx)
* If the block was live (referenced) at the time of this
* bookmark, add its space to the bookmark's FBN.
*/
- if (BP_GET_LOGICAL_BIRTH(bp) <=
+ if (BP_GET_BIRTH(bp) <=
dbn->dbn_phys.zbm_creation_txg &&
(dbn->dbn_phys.zbm_flags & ZBM_FLAG_HAS_FBN)) {
mutex_enter(&dbn->dbn_lock);
diff --git a/sys/contrib/openzfs/module/zfs/dsl_crypt.c b/sys/contrib/openzfs/module/zfs/dsl_crypt.c
index db568f42d24e..6b6bb8d45b6b 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_crypt.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_crypt.c
@@ -866,7 +866,7 @@ spa_keystore_load_wkey(const char *dsname, dsl_crypto_params_t *dcp,
dsl_pool_rele(dp, FTAG);
/* create any zvols under this ds */
- zvol_create_minors_recursive(dsname);
+ zvol_create_minors(dsname);
return (0);
diff --git a/sys/contrib/openzfs/module/zfs/dsl_dataset.c b/sys/contrib/openzfs/module/zfs/dsl_dataset.c
index c0a7872c40ad..b767c9641419 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_dataset.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_dataset.c
@@ -159,7 +159,7 @@ dsl_dataset_block_born(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx)
return;
}
- ASSERT3U(BP_GET_LOGICAL_BIRTH(bp), >,
+ ASSERT3U(BP_GET_BIRTH(bp), >,
dsl_dataset_phys(ds)->ds_prev_snap_txg);
dmu_buf_will_dirty(ds->ds_dbuf, tx);
mutex_enter(&ds->ds_lock);
@@ -194,7 +194,7 @@ dsl_dataset_block_born(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx)
* they do not need to be freed.
*/
if (dsl_deadlist_is_open(&ds->ds_dir->dd_livelist) &&
- BP_GET_LOGICAL_BIRTH(bp) > ds->ds_dir->dd_origin_txg &&
+ BP_GET_BIRTH(bp) > ds->ds_dir->dd_origin_txg &&
!(BP_IS_EMBEDDED(bp))) {
ASSERT(dsl_dir_is_clone(ds->ds_dir));
ASSERT(spa_feature_is_enabled(spa,
@@ -263,7 +263,7 @@ dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx,
return (0);
ASSERT(dmu_tx_is_syncing(tx));
- ASSERT(BP_GET_LOGICAL_BIRTH(bp) <= tx->tx_txg);
+ ASSERT(BP_GET_BIRTH(bp) <= tx->tx_txg);
if (ds == NULL) {
dsl_free(tx->tx_pool, tx->tx_txg, bp);
@@ -281,7 +281,7 @@ dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx,
* they do not need to be freed.
*/
if (dsl_deadlist_is_open(&ds->ds_dir->dd_livelist) &&
- BP_GET_LOGICAL_BIRTH(bp) > ds->ds_dir->dd_origin_txg &&
+ BP_GET_BIRTH(bp) > ds->ds_dir->dd_origin_txg &&
!(BP_IS_EMBEDDED(bp))) {
ASSERT(dsl_dir_is_clone(ds->ds_dir));
ASSERT(spa_feature_is_enabled(spa,
@@ -289,7 +289,7 @@ dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx,
bplist_append(&ds->ds_dir->dd_pending_frees, bp);
}
- if (BP_GET_LOGICAL_BIRTH(bp) > dsl_dataset_phys(ds)->ds_prev_snap_txg) {
+ if (BP_GET_BIRTH(bp) > dsl_dataset_phys(ds)->ds_prev_snap_txg) {
int64_t delta;
/*
@@ -346,14 +346,14 @@ dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx,
ASSERT(dsl_dataset_phys(ds->ds_prev)->ds_num_children > 0);
/* if (logical birth > prev prev snap txg) prev unique += bs */
if (dsl_dataset_phys(ds->ds_prev)->ds_next_snap_obj ==
- ds->ds_object && BP_GET_LOGICAL_BIRTH(bp) >
+ ds->ds_object && BP_GET_BIRTH(bp) >
dsl_dataset_phys(ds->ds_prev)->ds_prev_snap_txg) {
dmu_buf_will_dirty(ds->ds_prev->ds_dbuf, tx);
mutex_enter(&ds->ds_prev->ds_lock);
dsl_dataset_phys(ds->ds_prev)->ds_unique_bytes += used;
mutex_exit(&ds->ds_prev->ds_lock);
}
- if (BP_GET_LOGICAL_BIRTH(bp) > ds->ds_dir->dd_origin_txg) {
+ if (BP_GET_BIRTH(bp) > ds->ds_dir->dd_origin_txg) {
dsl_dir_transfer_space(ds->ds_dir, used,
DD_USED_HEAD, DD_USED_SNAP, tx);
}
@@ -2005,7 +2005,7 @@ dsl_dataset_snapshot(nvlist_t *snaps, nvlist_t *props, nvlist_t *errors)
if (error == 0) {
for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL;
pair = nvlist_next_nvpair(snaps, pair)) {
- zvol_create_minor(nvpair_name(pair));
+ zvol_create_minors(nvpair_name(pair));
}
}
@@ -2944,7 +2944,7 @@ dsl_dataset_modified_since_snap(dsl_dataset_t *ds, dsl_dataset_t *snap)
if (snap == NULL)
return (B_FALSE);
rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG);
- birth = BP_GET_LOGICAL_BIRTH(dsl_dataset_get_blkptr(ds));
+ birth = BP_GET_BIRTH(dsl_dataset_get_blkptr(ds));
rrw_exit(&ds->ds_bp_rwlock, FTAG);
if (birth > dsl_dataset_phys(snap)->ds_creation_txg) {
objset_t *os, *os_snap;
@@ -3413,7 +3413,7 @@ dsl_dataset_clone(const char *clone, const char *origin)
6, ZFS_SPACE_CHECK_NORMAL);
if (rv == 0)
- zvol_create_minor(clone);
+ zvol_create_minors(clone);
crfree(cr);
diff --git a/sys/contrib/openzfs/module/zfs/dsl_deadlist.c b/sys/contrib/openzfs/module/zfs/dsl_deadlist.c
index 3113d932fb68..9ffc998ac173 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_deadlist.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_deadlist.c
@@ -484,7 +484,7 @@ dsl_deadlist_insert(dsl_deadlist_t *dl, const blkptr_t *bp, boolean_t bp_freed,
dl->dl_phys->dl_comp += sign * BP_GET_PSIZE(bp);
dl->dl_phys->dl_uncomp += sign * BP_GET_UCSIZE(bp);
- dle_tofind.dle_mintxg = BP_GET_LOGICAL_BIRTH(bp);
+ dle_tofind.dle_mintxg = BP_GET_BIRTH(bp);
dle = avl_find(&dl->dl_tree, &dle_tofind, &where);
if (dle == NULL)
dle = avl_nearest(&dl->dl_tree, where, AVL_BEFORE);
@@ -493,7 +493,7 @@ dsl_deadlist_insert(dsl_deadlist_t *dl, const blkptr_t *bp, boolean_t bp_freed,
if (dle == NULL) {
zfs_panic_recover("blkptr at %p has invalid BLK_BIRTH %llu",
- bp, (longlong_t)BP_GET_LOGICAL_BIRTH(bp));
+ bp, (longlong_t)BP_GET_BIRTH(bp));
dle = avl_first(&dl->dl_tree);
}
diff --git a/sys/contrib/openzfs/module/zfs/dsl_destroy.c b/sys/contrib/openzfs/module/zfs/dsl_destroy.c
index f5ec93b2dc5c..fff49c97f4d2 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_destroy.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_destroy.c
@@ -133,11 +133,11 @@ process_old_cb(void *arg, const blkptr_t *bp, boolean_t bp_freed, dmu_tx_t *tx)
ASSERT(!BP_IS_HOLE(bp));
- if (BP_GET_LOGICAL_BIRTH(bp) <=
+ if (BP_GET_BIRTH(bp) <=
dsl_dataset_phys(poa->ds)->ds_prev_snap_txg) {
dsl_deadlist_insert(&poa->ds->ds_deadlist, bp, bp_freed, tx);
if (poa->ds_prev && !poa->after_branch_point &&
- BP_GET_LOGICAL_BIRTH(bp) >
+ BP_GET_BIRTH(bp) >
dsl_dataset_phys(poa->ds_prev)->ds_prev_snap_txg) {
dsl_dataset_phys(poa->ds_prev)->ds_unique_bytes +=
bp_get_dsize_sync(dp->dp_spa, bp);
@@ -315,8 +315,7 @@ dsl_destroy_snapshot_sync_impl(dsl_dataset_t *ds, boolean_t defer, dmu_tx_t *tx)
ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock));
rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG);
- ASSERT3U(BP_GET_LOGICAL_BIRTH(&dsl_dataset_phys(ds)->ds_bp), <=,
- tx->tx_txg);
+ ASSERT3U(BP_GET_BIRTH(&dsl_dataset_phys(ds)->ds_bp), <=, tx->tx_txg);
rrw_exit(&ds->ds_bp_rwlock, FTAG);
ASSERT(zfs_refcount_is_zero(&ds->ds_longholds));
@@ -730,7 +729,7 @@ kill_blkptr(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
dsl_free(ka->tx->tx_pool, ka->tx->tx_txg, bp);
} else {
ASSERT(zilog == NULL);
- ASSERT3U(BP_GET_LOGICAL_BIRTH(bp), >,
+ ASSERT3U(BP_GET_BIRTH(bp), >,
dsl_dataset_phys(ka->ds)->ds_prev_snap_txg);
(void) dsl_dataset_block_kill(ka->ds, bp, tx, B_FALSE);
}
@@ -1020,8 +1019,7 @@ dsl_destroy_head_sync_impl(dsl_dataset_t *ds, dmu_tx_t *tx)
ASSERT(ds->ds_prev == NULL ||
dsl_dataset_phys(ds->ds_prev)->ds_next_snap_obj != ds->ds_object);
rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG);
- ASSERT3U(BP_GET_LOGICAL_BIRTH(&dsl_dataset_phys(ds)->ds_bp), <=,
- tx->tx_txg);
+ ASSERT3U(BP_GET_BIRTH(&dsl_dataset_phys(ds)->ds_bp), <=, tx->tx_txg);
rrw_exit(&ds->ds_bp_rwlock, FTAG);
ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock));
diff --git a/sys/contrib/openzfs/module/zfs/dsl_pool.c b/sys/contrib/openzfs/module/zfs/dsl_pool.c
index f1088d87208b..4f1f66b835f2 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_pool.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_pool.c
@@ -1056,7 +1056,7 @@ upgrade_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg)
* will be wrong.
*/
rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG);
- ASSERT0(BP_GET_LOGICAL_BIRTH(&dsl_dataset_phys(prev)->ds_bp));
+ ASSERT0(BP_GET_BIRTH(&dsl_dataset_phys(prev)->ds_bp));
rrw_exit(&ds->ds_bp_rwlock, FTAG);
/* The origin doesn't get attached to itself */
diff --git a/sys/contrib/openzfs/module/zfs/dsl_scan.c b/sys/contrib/openzfs/module/zfs/dsl_scan.c
index 1b2cd3e361d1..5052992d775c 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_scan.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_scan.c
@@ -454,7 +454,7 @@ static inline void
bp2sio(const blkptr_t *bp, scan_io_t *sio, int dva_i)
{
sio->sio_blk_prop = bp->blk_prop;
- sio->sio_phys_birth = BP_GET_PHYSICAL_BIRTH(bp);
+ sio->sio_phys_birth = BP_GET_RAW_PHYSICAL_BIRTH(bp);
sio->sio_birth = BP_GET_LOGICAL_BIRTH(bp);
sio->sio_cksum = bp->blk_cksum;
sio->sio_nr_dvas = BP_GET_NDVAS(bp);
@@ -1768,7 +1768,7 @@ dsl_scan_zil_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
ASSERT(!BP_IS_REDACTED(bp));
if (BP_IS_HOLE(bp) ||
- BP_GET_LOGICAL_BIRTH(bp) <= scn->scn_phys.scn_cur_min_txg)
+ BP_GET_BIRTH(bp) <= scn->scn_phys.scn_cur_min_txg)
return (0);
/*
@@ -1778,7 +1778,7 @@ dsl_scan_zil_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
* scrub there's nothing to do to it).
*/
if (claim_txg == 0 &&
- BP_GET_LOGICAL_BIRTH(bp) >= spa_min_claim_txg(dp->dp_spa))
+ BP_GET_BIRTH(bp) >= spa_min_claim_txg(dp->dp_spa))
return (0);
SET_BOOKMARK(&zb, zh->zh_log.blk_cksum.zc_word[ZIL_ZC_OBJSET],
@@ -1804,7 +1804,7 @@ dsl_scan_zil_record(zilog_t *zilog, const lr_t *lrc, void *arg,
ASSERT(!BP_IS_REDACTED(bp));
if (BP_IS_HOLE(bp) ||
- BP_GET_LOGICAL_BIRTH(bp) <= scn->scn_phys.scn_cur_min_txg)
+ BP_GET_BIRTH(bp) <= scn->scn_phys.scn_cur_min_txg)
return (0);
/*
@@ -1812,7 +1812,7 @@ dsl_scan_zil_record(zilog_t *zilog, const lr_t *lrc, void *arg,
* already txg sync'ed (but this log block contains
* other records that are not synced)
*/
- if (claim_txg == 0 || BP_GET_LOGICAL_BIRTH(bp) < claim_txg)
+ if (claim_txg == 0 || BP_GET_BIRTH(bp) < claim_txg)
return (0);
ASSERT3U(BP_GET_LSIZE(bp), !=, 0);
@@ -1952,7 +1952,7 @@ dsl_scan_prefetch(scan_prefetch_ctx_t *spc, blkptr_t *bp, zbookmark_phys_t *zb)
return;
if (BP_IS_HOLE(bp) ||
- BP_GET_LOGICAL_BIRTH(bp) <= scn->scn_phys.scn_cur_min_txg ||
+ BP_GET_BIRTH(bp) <= scn->scn_phys.scn_cur_min_txg ||
(BP_GET_LEVEL(bp) == 0 && BP_GET_TYPE(bp) != DMU_OT_DNODE &&
BP_GET_TYPE(bp) != DMU_OT_OBJSET))
return;
@@ -2223,7 +2223,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
if (dnp != NULL &&
dnp->dn_bonuslen > DN_MAX_BONUS_LEN(dnp)) {
scn->scn_phys.scn_errors++;
- spa_log_error(spa, zb, BP_GET_LOGICAL_BIRTH(bp));
+ spa_log_error(spa, zb, BP_GET_PHYSICAL_BIRTH(bp));
return (SET_ERROR(EINVAL));
}
@@ -2319,7 +2319,7 @@ dsl_scan_recurse(dsl_scan_t *scn, dsl_dataset_t *ds, dmu_objset_type_t ostype,
* by arc_read() for the cases above.
*/
scn->scn_phys.scn_errors++;
- spa_log_error(spa, zb, BP_GET_LOGICAL_BIRTH(bp));
+ spa_log_error(spa, zb, BP_GET_PHYSICAL_BIRTH(bp));
return (SET_ERROR(EINVAL));
}
@@ -2396,7 +2396,12 @@ dsl_scan_visitbp(const blkptr_t *bp, const zbookmark_phys_t *zb,
if (f != SPA_FEATURE_NONE)
ASSERT(dsl_dataset_feature_is_active(ds, f));
- if (BP_GET_LOGICAL_BIRTH(bp) <= scn->scn_phys.scn_cur_min_txg) {
+ /*
+ * Recurse any blocks that were written either logically or physically
+ * at or after cur_min_txg. About logical birth we care for traversal,
+ * looking for any changes, while about physical for the actual scan.
+ */
+ if (BP_GET_BIRTH(bp) <= scn->scn_phys.scn_cur_min_txg) {
scn->scn_lt_min_this_txg++;
return;
}
@@ -2422,7 +2427,7 @@ dsl_scan_visitbp(const blkptr_t *bp, const zbookmark_phys_t *zb,
* Don't scan it now unless we need to because something
* under it was modified.
*/
- if (BP_GET_BIRTH(bp) > scn->scn_phys.scn_cur_max_txg) {
+ if (BP_GET_PHYSICAL_BIRTH(bp) > scn->scn_phys.scn_cur_max_txg) {
scn->scn_gt_max_this_txg++;
return;
}
@@ -4806,7 +4811,7 @@ dsl_scan_scrub_cb(dsl_pool_t *dp,
{
dsl_scan_t *scn = dp->dp_scan;
spa_t *spa = dp->dp_spa;
- uint64_t phys_birth = BP_GET_BIRTH(bp);
+ uint64_t phys_birth = BP_GET_PHYSICAL_BIRTH(bp);
size_t psize = BP_GET_PSIZE(bp);
boolean_t needs_io = B_FALSE;
int zio_flags = ZIO_FLAG_SCAN_THREAD | ZIO_FLAG_RAW | ZIO_FLAG_CANFAIL;
diff --git a/sys/contrib/openzfs/module/zfs/metaslab.c b/sys/contrib/openzfs/module/zfs/metaslab.c
index 43b94eba2d58..0e5f09b2724c 100644
--- a/sys/contrib/openzfs/module/zfs/metaslab.c
+++ b/sys/contrib/openzfs/module/zfs/metaslab.c
@@ -375,6 +375,16 @@ static metaslab_stats_t metaslab_stats = {
#define METASLABSTAT_BUMP(stat) \
atomic_inc_64(&metaslab_stats.stat.value.ui64);
+char *
+metaslab_rt_name(metaslab_group_t *mg, metaslab_t *ms, const char *name)
+{
+ return (kmem_asprintf("{spa=%s vdev_guid=%llu ms_id=%llu %s}",
+ spa_name(mg->mg_vd->vdev_spa),
+ (u_longlong_t)mg->mg_vd->vdev_guid,
+ (u_longlong_t)ms->ms_id,
+ name));
+}
+
static kstat_t *metaslab_ksp;
@@ -750,7 +760,8 @@ metaslab_class_histogram_verify(metaslab_class_t *mc)
}
IMPLY(mg == mg->mg_vd->vdev_log_mg,
- mc == spa_embedded_log_class(mg->mg_vd->vdev_spa));
+ mc == spa_embedded_log_class(mg->mg_vd->vdev_spa) ||
+ mc == spa_special_embedded_log_class(mg->mg_vd->vdev_spa));
for (i = 0; i < ZFS_RANGE_TREE_HISTOGRAM_SIZE; i++)
mc_hist[i] += mg->mg_histogram[i];
@@ -1183,14 +1194,16 @@ metaslab_group_passivate(metaslab_group_t *mg)
if (msp != NULL) {
mutex_enter(&msp->ms_lock);
metaslab_passivate(msp,
- metaslab_weight_from_range_tree(msp));
+ metaslab_weight(msp, B_TRUE) &
+ ~METASLAB_ACTIVE_MASK);
mutex_exit(&msp->ms_lock);
}
msp = mga->mga_secondary;
if (msp != NULL) {
mutex_enter(&msp->ms_lock);
metaslab_passivate(msp,
- metaslab_weight_from_range_tree(msp));
+ metaslab_weight(msp, B_TRUE) &
+ ~METASLAB_ACTIVE_MASK);
mutex_exit(&msp->ms_lock);
}
}
@@ -1288,7 +1301,8 @@ metaslab_group_histogram_add(metaslab_group_t *mg, metaslab_t *msp)
mutex_enter(&mc->mc_lock);
for (int i = 0; i < SPACE_MAP_HISTOGRAM_SIZE; i++) {
IMPLY(mg == mg->mg_vd->vdev_log_mg,
- mc == spa_embedded_log_class(mg->mg_vd->vdev_spa));
+ mc == spa_embedded_log_class(mg->mg_vd->vdev_spa) ||
+ mc == spa_special_embedded_log_class(mg->mg_vd->vdev_spa));
mg->mg_histogram[i + ashift] +=
msp->ms_sm->sm_phys->smp_histogram[i];
mc->mc_histogram[i + ashift] +=
@@ -1316,7 +1330,8 @@ metaslab_group_histogram_remove(metaslab_group_t *mg, metaslab_t *msp)
ASSERT3U(mc->mc_histogram[i + ashift], >=,
msp->ms_sm->sm_phys->smp_histogram[i]);
IMPLY(mg == mg->mg_vd->vdev_log_mg,
- mc == spa_embedded_log_class(mg->mg_vd->vdev_spa));
+ mc == spa_embedded_log_class(mg->mg_vd->vdev_spa) ||
+ mc == spa_special_embedded_log_class(mg->mg_vd->vdev_spa));
mg->mg_histogram[i + ashift] -=
msp->ms_sm->sm_phys->smp_histogram[i];
@@ -2895,30 +2910,43 @@ metaslab_init(metaslab_group_t *mg, uint64_t id, uint64_t object,
zfs_range_seg_type_t type =
metaslab_calculate_range_tree_type(vd, ms, &start, &shift);
- ms->ms_allocatable = zfs_range_tree_create(NULL, type, NULL, start,
- shift);
+ ms->ms_allocatable = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_allocatable"));
for (int t = 0; t < TXG_SIZE; t++) {
- ms->ms_allocating[t] = zfs_range_tree_create(NULL, type,
- NULL, start, shift);
- }
- ms->ms_freeing = zfs_range_tree_create(NULL, type, NULL, start, shift);
- ms->ms_freed = zfs_range_tree_create(NULL, type, NULL, start, shift);
+ ms->ms_allocating[t] = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME,
+ metaslab_rt_name(mg, ms, "ms_allocating"));
+ }
+ ms->ms_freeing = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_freeing"));
+ ms->ms_freed = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_freed"));
for (int t = 0; t < TXG_DEFER_SIZE; t++) {
- ms->ms_defer[t] = zfs_range_tree_create(NULL, type, NULL,
- start, shift);
+ ms->ms_defer[t] = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_defer"));
}
- ms->ms_checkpointing =
- zfs_range_tree_create(NULL, type, NULL, start, shift);
- ms->ms_unflushed_allocs =
- zfs_range_tree_create(NULL, type, NULL, start, shift);
+ ms->ms_checkpointing = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_checkpointing"));
+ ms->ms_unflushed_allocs = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_unflushed_allocs"));
metaslab_rt_arg_t *mrap = kmem_zalloc(sizeof (*mrap), KM_SLEEP);
mrap->mra_bt = &ms->ms_unflushed_frees_by_size;
mrap->mra_floor_shift = metaslab_by_size_min_shift;
- ms->ms_unflushed_frees = zfs_range_tree_create(&metaslab_rt_ops,
- type, mrap, start, shift);
+ ms->ms_unflushed_frees = zfs_range_tree_create_flags(
+ &metaslab_rt_ops, type, mrap, start, shift,
+ ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_unflushed_frees"));
- ms->ms_trim = zfs_range_tree_create(NULL, type, NULL, start, shift);
+ ms->ms_trim = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_trim"));
metaslab_group_add(mg, ms);
metaslab_set_fragmentation(ms, B_FALSE);
@@ -3892,7 +3920,10 @@ metaslab_condense(metaslab_t *msp, dmu_tx_t *tx)
type = metaslab_calculate_range_tree_type(msp->ms_group->mg_vd, msp,
&start, &shift);
- condense_tree = zfs_range_tree_create(NULL, type, NULL, start, shift);
+ condense_tree = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME,
+ metaslab_rt_name(msp->ms_group, msp, "condense_tree"));
for (int t = 0; t < TXG_DEFER_SIZE; t++) {
zfs_range_tree_walk(msp->ms_defer[t],
@@ -3949,8 +3980,10 @@ metaslab_condense(metaslab_t *msp, dmu_tx_t *tx)
* followed by FREES (due to space_map_write() in metaslab_sync()) for
* sync pass 1.
*/
- zfs_range_tree_t *tmp_tree = zfs_range_tree_create(NULL, type, NULL,
- start, shift);
+ zfs_range_tree_t *tmp_tree = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift,
+ ZFS_RT_F_DYN_NAME,
+ metaslab_rt_name(msp->ms_group, msp, "tmp_tree"));
zfs_range_tree_add(tmp_tree, msp->ms_start, msp->ms_size);
space_map_write(sm, tmp_tree, SM_ALLOC, SM_NO_VDEVID, tx);
space_map_write(sm, msp->ms_allocatable, SM_FREE, SM_NO_VDEVID, tx);
@@ -5199,29 +5232,16 @@ next:
/*
* We were unable to allocate from this metaslab so determine
- * a new weight for this metaslab. Now that we have loaded
- * the metaslab we can provide a better hint to the metaslab
- * selector.
- *
- * For space-based metaslabs, we use the maximum block size.
- * This information is only available when the metaslab
- * is loaded and is more accurate than the generic free
- * space weight that was calculated by metaslab_weight().
- * This information allows us to quickly compare the maximum
- * available allocation in the metaslab to the allocation
- * size being requested.
- *
- * For segment-based metaslabs, determine the new weight
- * based on the highest bucket in the range tree. We
- * explicitly use the loaded segment weight (i.e. the range
- * tree histogram) since it contains the space that is
- * currently available for allocation and is accurate
- * even within a sync pass.
+ * a new weight for this metaslab. The weight was last
+ * recalculated either when we loaded it (if this is the first
+ * TXG it's been loaded in), or the last time a txg was synced
+ * out.
*/
uint64_t weight;
if (WEIGHT_IS_SPACEBASED(msp->ms_weight)) {
- weight = metaslab_largest_allocatable(msp);
- WEIGHT_SET_SPACEBASED(weight);
+ metaslab_set_fragmentation(msp, B_TRUE);
+ weight = metaslab_space_weight(msp) &
+ ~METASLAB_ACTIVE_MASK;
} else {
weight = metaslab_weight_from_range_tree(msp);
}
@@ -5233,13 +5253,6 @@ next:
* For the case where we use the metaslab that is
* active for another allocator we want to make
* sure that we retain the activation mask.
- *
- * Note that we could attempt to use something like
- * metaslab_recalculate_weight_and_sort() that
- * retains the activation mask here. That function
- * uses metaslab_weight() to set the weight though
- * which is not as accurate as the calculations
- * above.
*/
weight |= msp->ms_weight & METASLAB_ACTIVE_MASK;
metaslab_group_sort(mg, msp, weight);
@@ -5590,7 +5603,21 @@ remap_blkptr_cb(uint64_t inner_offset, vdev_t *vd, uint64_t offset,
vdev_indirect_births_t *vib = oldvd->vdev_indirect_births;
uint64_t physical_birth = vdev_indirect_births_physbirth(vib,
DVA_GET_OFFSET(&bp->blk_dva[0]), DVA_GET_ASIZE(&bp->blk_dva[0]));
- BP_SET_PHYSICAL_BIRTH(bp, physical_birth);
+
+ /*
+ * For rewritten blocks, use the old physical birth as the new logical
+ * birth (representing when the space was allocated) and the removal
+ * time as the new physical birth (representing when it was actually
+ * written).
+ */
+ if (BP_GET_REWRITE(bp)) {
+ uint64_t old_physical_birth = BP_GET_PHYSICAL_BIRTH(bp);
+ ASSERT3U(old_physical_birth, <, physical_birth);
+ BP_SET_BIRTH(bp, old_physical_birth, physical_birth);
+ BP_SET_REWRITE(bp, 0);
+ } else {
+ BP_SET_PHYSICAL_BIRTH(bp, physical_birth);
+ }
DVA_SET_VDEV(&bp->blk_dva[0], vd->vdev_id);
DVA_SET_OFFSET(&bp->blk_dva[0], offset);
@@ -5757,21 +5784,21 @@ metaslab_free_dva(spa_t *spa, const dva_t *dva, boolean_t checkpoint)
}
/*
- * Reserve some allocation slots. The reservation system must be called
- * before we call into the allocator. If there aren't any available slots
- * then the I/O will be throttled until an I/O completes and its slots are
- * freed up. The function returns true if it was successful in placing
- * the reservation.
+ * Reserve some space for a future allocation. The reservation system must be
+ * called before we call into the allocator. If there aren't enough space
+ * available, the calling I/O will be throttled until another I/O completes and
+ * its reservation is released. The function returns true if it was successful
+ * in placing the reservation.
*/
boolean_t
-metaslab_class_throttle_reserve(metaslab_class_t *mc, int slots, zio_t *zio,
- boolean_t must, boolean_t *more)
+metaslab_class_throttle_reserve(metaslab_class_t *mc, int allocator,
+ int copies, uint64_t io_size, boolean_t must, boolean_t *more)
{
- metaslab_class_allocator_t *mca = &mc->mc_allocator[zio->io_allocator];
+ metaslab_class_allocator_t *mca = &mc->mc_allocator[allocator];
ASSERT(mc->mc_alloc_throttle_enabled);
- if (mc->mc_alloc_io_size < zio->io_size) {
- mc->mc_alloc_io_size = zio->io_size;
+ if (mc->mc_alloc_io_size < io_size) {
+ mc->mc_alloc_io_size = io_size;
metaslab_class_balance(mc, B_FALSE);
}
if (must || mca->mca_reserved <= mc->mc_alloc_max) {
@@ -5782,10 +5809,9 @@ metaslab_class_throttle_reserve(metaslab_class_t *mc, int slots, zio_t *zio,
* worst that can happen is few more I/Os get to allocation
* earlier, that is not a problem.
*/
- int64_t delta = slots * zio->io_size;
+ int64_t delta = copies * io_size;
*more = (atomic_add_64_nv(&mca->mca_reserved, delta) <=
mc->mc_alloc_max);
- zio->io_flags |= ZIO_FLAG_IO_ALLOCATING;
return (B_TRUE);
}
*more = B_FALSE;
@@ -5793,13 +5819,13 @@ metaslab_class_throttle_reserve(metaslab_class_t *mc, int slots, zio_t *zio,
}
boolean_t
-metaslab_class_throttle_unreserve(metaslab_class_t *mc, int slots,
- zio_t *zio)
+metaslab_class_throttle_unreserve(metaslab_class_t *mc, int allocator,
+ int copies, uint64_t io_size)
{
- metaslab_class_allocator_t *mca = &mc->mc_allocator[zio->io_allocator];
+ metaslab_class_allocator_t *mca = &mc->mc_allocator[allocator];
ASSERT(mc->mc_alloc_throttle_enabled);
- int64_t delta = slots * zio->io_size;
+ int64_t delta = copies * io_size;
return (atomic_add_64_nv(&mca->mca_reserved, -delta) <=
mc->mc_alloc_max);
}
@@ -5960,7 +5986,7 @@ metaslab_alloc_range(spa_t *spa, metaslab_class_t *mc, uint64_t psize,
int error = 0;
ASSERT0(BP_GET_LOGICAL_BIRTH(bp));
- ASSERT0(BP_GET_PHYSICAL_BIRTH(bp));
+ ASSERT0(BP_GET_RAW_PHYSICAL_BIRTH(bp));
spa_config_enter(spa, SCL_ALLOC, FTAG, RW_READER);
@@ -5975,12 +6001,12 @@ metaslab_alloc_range(spa_t *spa, metaslab_class_t *mc, uint64_t psize,
ASSERT(hintbp == NULL || ndvas <= BP_GET_NDVAS(hintbp));
ASSERT3P(zal, !=, NULL);
- uint64_t cur_psize = 0;
-
+ uint64_t smallest_psize = UINT64_MAX;
for (int d = 0; d < ndvas; d++) {
- error = metaslab_alloc_dva_range(spa, mc, psize, max_psize,
- dva, d, hintdva, txg, flags, zal, allocator,
- actual_psize ? &cur_psize : NULL);
+ uint64_t cur_psize = 0;
+ error = metaslab_alloc_dva_range(spa, mc, psize,
+ MIN(smallest_psize, max_psize), dva, d, hintdva, txg,
+ flags, zal, allocator, actual_psize ? &cur_psize : NULL);
if (error != 0) {
for (d--; d >= 0; d--) {
metaslab_unalloc_dva(spa, &dva[d], txg);
@@ -6000,13 +6026,13 @@ metaslab_alloc_range(spa_t *spa, metaslab_class_t *mc, uint64_t psize,
DVA_GET_VDEV(&dva[d]), allocator, flags, psize,
tag);
if (actual_psize)
- max_psize = MIN(cur_psize, max_psize);
+ smallest_psize = MIN(cur_psize, smallest_psize);
}
}
ASSERT(error == 0);
ASSERT(BP_GET_NDVAS(bp) == ndvas);
if (actual_psize)
- *actual_psize = max_psize;
+ *actual_psize = smallest_psize;
spa_config_exit(spa, SCL_ALLOC, FTAG);
@@ -6022,7 +6048,7 @@ metaslab_free(spa_t *spa, const blkptr_t *bp, uint64_t txg, boolean_t now)
int ndvas = BP_GET_NDVAS(bp);
ASSERT(!BP_IS_HOLE(bp));
- ASSERT(!now || BP_GET_LOGICAL_BIRTH(bp) >= spa_syncing_txg(spa));
+ ASSERT(!now || BP_GET_BIRTH(bp) >= spa_syncing_txg(spa));
/*
* If we have a checkpoint for the pool we need to make sure that
@@ -6040,7 +6066,7 @@ metaslab_free(spa_t *spa, const blkptr_t *bp, uint64_t txg, boolean_t now)
* normally as they will be referenced by the checkpointed uberblock.
*/
boolean_t checkpoint = B_FALSE;
- if (BP_GET_LOGICAL_BIRTH(bp) <= spa->spa_checkpoint_txg &&
+ if (BP_GET_BIRTH(bp) <= spa->spa_checkpoint_txg &&
spa_syncing_txg(spa) > spa->spa_checkpoint_txg) {
/*
* At this point, if the block is part of the checkpoint
diff --git a/sys/contrib/openzfs/module/zfs/range_tree.c b/sys/contrib/openzfs/module/zfs/range_tree.c
index 373636c69254..fc2b17606bd2 100644
--- a/sys/contrib/openzfs/module/zfs/range_tree.c
+++ b/sys/contrib/openzfs/module/zfs/range_tree.c
@@ -201,10 +201,10 @@ ZFS_BTREE_FIND_IN_BUF_FUNC(zfs_range_tree_seg64_find_in_buf, zfs_range_seg64_t,
ZFS_BTREE_FIND_IN_BUF_FUNC(zfs_range_tree_seg_gap_find_in_buf,
zfs_range_seg_gap_t, zfs_range_tree_seg_gap_compare)
-zfs_range_tree_t *
-zfs_range_tree_create_gap(const zfs_range_tree_ops_t *ops,
+static zfs_range_tree_t *
+zfs_range_tree_create_impl(const zfs_range_tree_ops_t *ops,
zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift,
- uint64_t gap)
+ uint64_t gap, uint64_t flags, const char *name)
{
zfs_range_tree_t *rt = kmem_zalloc(sizeof (zfs_range_tree_t), KM_SLEEP);
@@ -236,6 +236,8 @@ zfs_range_tree_create_gap(const zfs_range_tree_ops_t *ops,
rt->rt_ops = ops;
rt->rt_gap = gap;
+ rt->rt_flags = flags;
+ rt->rt_name = name;
rt->rt_arg = arg;
rt->rt_type = type;
rt->rt_start = start;
@@ -248,10 +250,29 @@ zfs_range_tree_create_gap(const zfs_range_tree_ops_t *ops,
}
zfs_range_tree_t *
+zfs_range_tree_create_gap(const zfs_range_tree_ops_t *ops,
+ zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift,
+ uint64_t gap)
+{
+ return (zfs_range_tree_create_impl(ops, type, arg, start, shift, gap,
+ 0, NULL));
+}
+
+zfs_range_tree_t *
zfs_range_tree_create(const zfs_range_tree_ops_t *ops,
zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift)
{
- return (zfs_range_tree_create_gap(ops, type, arg, start, shift, 0));
+ return (zfs_range_tree_create_impl(ops, type, arg, start, shift, 0,
+ 0, NULL));
+}
+
+zfs_range_tree_t *
+zfs_range_tree_create_flags(const zfs_range_tree_ops_t *ops,
+ zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift,
+ uint64_t flags, const char *name)
+{
+ return (zfs_range_tree_create_impl(ops, type, arg, start, shift, 0,
+ flags, name));
}
void
@@ -262,6 +283,9 @@ zfs_range_tree_destroy(zfs_range_tree_t *rt)
if (rt->rt_ops != NULL && rt->rt_ops->rtop_destroy != NULL)
rt->rt_ops->rtop_destroy(rt, rt->rt_arg);
+ if (rt->rt_name != NULL && (rt->rt_flags & ZFS_RT_F_DYN_NAME))
+ kmem_strfree((char *)(uintptr_t)rt->rt_name);
+
zfs_btree_destroy(&rt->rt_root);
kmem_free(rt, sizeof (*rt));
}
@@ -271,15 +295,17 @@ zfs_range_tree_adjust_fill(zfs_range_tree_t *rt, zfs_range_seg_t *rs,
int64_t delta)
{
if (delta < 0 && delta * -1 >= zfs_rs_get_fill(rs, rt)) {
- zfs_panic_recover("zfs: attempting to decrease fill to or "
- "below 0; probable double remove in segment [%llx:%llx]",
+ zfs_panic_recover("zfs: rt=%s: attempting to decrease fill to "
+ "or below 0; probable double remove in segment [%llx:%llx]",
+ ZFS_RT_NAME(rt),
(longlong_t)zfs_rs_get_start(rs, rt),
(longlong_t)zfs_rs_get_end(rs, rt));
}
if (zfs_rs_get_fill(rs, rt) + delta > zfs_rs_get_end(rs, rt) -
zfs_rs_get_start(rs, rt)) {
- zfs_panic_recover("zfs: attempting to increase fill beyond "
- "max; probable double add in segment [%llx:%llx]",
+ zfs_panic_recover("zfs: rt=%s: attempting to increase fill "
+ "beyond max; probable double add in segment [%llx:%llx]",
+ ZFS_RT_NAME(rt),
(longlong_t)zfs_rs_get_start(rs, rt),
(longlong_t)zfs_rs_get_end(rs, rt));
}
@@ -319,14 +345,17 @@ zfs_range_tree_add_impl(void *arg, uint64_t start, uint64_t size, uint64_t fill)
* the normal code paths.
*/
if (rs != NULL) {
+ uint64_t rstart = zfs_rs_get_start(rs, rt);
+ uint64_t rend = zfs_rs_get_end(rs, rt);
if (gap == 0) {
- zfs_panic_recover("zfs: adding existent segment to "
- "range tree (offset=%llx size=%llx)",
- (longlong_t)start, (longlong_t)size);
+ zfs_panic_recover("zfs: rt=%s: adding segment "
+ "(offset=%llx size=%llx) overlapping with existing "
+ "one (offset=%llx size=%llx)",
+ ZFS_RT_NAME(rt),
+ (longlong_t)start, (longlong_t)size,
+ (longlong_t)rstart, (longlong_t)(rend - rstart));
return;
}
- uint64_t rstart = zfs_rs_get_start(rs, rt);
- uint64_t rend = zfs_rs_get_end(rs, rt);
if (rstart <= start && rend >= end) {
zfs_range_tree_adjust_fill(rt, rs, fill);
return;
@@ -451,6 +480,7 @@ zfs_range_tree_remove_impl(zfs_range_tree_t *rt, uint64_t start, uint64_t size,
zfs_range_seg_t *rs;
zfs_range_seg_max_t rsearch, rs_tmp;
uint64_t end = start + size;
+ uint64_t rstart, rend;
boolean_t left_over, right_over;
VERIFY3U(size, !=, 0);
@@ -464,12 +494,15 @@ zfs_range_tree_remove_impl(zfs_range_tree_t *rt, uint64_t start, uint64_t size,
/* Make sure we completely overlap with someone */
if (rs == NULL) {
- zfs_panic_recover("zfs: removing nonexistent segment from "
- "range tree (offset=%llx size=%llx)",
- (longlong_t)start, (longlong_t)size);
+ zfs_panic_recover("zfs: rt=%s: removing nonexistent segment "
+ "from range tree (offset=%llx size=%llx)",
+ ZFS_RT_NAME(rt), (longlong_t)start, (longlong_t)size);
return;
}
+ rstart = zfs_rs_get_start(rs, rt);
+ rend = zfs_rs_get_end(rs, rt);
+
/*
* Range trees with gap support must only remove complete segments
* from the tree. This allows us to maintain accurate fill accounting
@@ -479,31 +512,36 @@ zfs_range_tree_remove_impl(zfs_range_tree_t *rt, uint64_t start, uint64_t size,
if (rt->rt_gap != 0) {
if (do_fill) {
if (zfs_rs_get_fill(rs, rt) == size) {
- start = zfs_rs_get_start(rs, rt);
- end = zfs_rs_get_end(rs, rt);
+ start = rstart;
+ end = rend;
size = end - start;
} else {
zfs_range_tree_adjust_fill(rt, rs, -size);
return;
}
- } else if (zfs_rs_get_start(rs, rt) != start ||
- zfs_rs_get_end(rs, rt) != end) {
- zfs_panic_recover("zfs: freeing partial segment of "
- "gap tree (offset=%llx size=%llx) of "
+ } else if (rstart != start || rend != end) {
+ zfs_panic_recover("zfs: rt=%s: freeing partial segment "
+ "of gap tree (offset=%llx size=%llx) of "
"(offset=%llx size=%llx)",
+ ZFS_RT_NAME(rt),
(longlong_t)start, (longlong_t)size,
- (longlong_t)zfs_rs_get_start(rs, rt),
- (longlong_t)zfs_rs_get_end(rs, rt) -
- zfs_rs_get_start(rs, rt));
+ (longlong_t)rstart, (longlong_t)(rend - rstart));
return;
}
}
- VERIFY3U(zfs_rs_get_start(rs, rt), <=, start);
- VERIFY3U(zfs_rs_get_end(rs, rt), >=, end);
+ if (!(rstart <= start && rend >= end)) {
+ panic("zfs: rt=%s: removing segment "
+ "(offset=%llx size=%llx) not completely overlapped by "
+ "existing one (offset=%llx size=%llx)",
+ ZFS_RT_NAME(rt),
+ (longlong_t)start, (longlong_t)size,
+ (longlong_t)rstart, (longlong_t)(rend - rstart));
+ return;
+ }
- left_over = (zfs_rs_get_start(rs, rt) != start);
- right_over = (zfs_rs_get_end(rs, rt) != end);
+ left_over = (rstart != start);
+ right_over = (rend != end);
zfs_range_tree_stat_decr(rt, rs);
diff --git a/sys/contrib/openzfs/module/zfs/spa.c b/sys/contrib/openzfs/module/zfs/spa.c
index 6b52c6cb1f9e..5ecb175fbd63 100644
--- a/sys/contrib/openzfs/module/zfs/spa.c
+++ b/sys/contrib/openzfs/module/zfs/spa.c
@@ -100,6 +100,7 @@
#include <sys/vmsystm.h>
#endif /* _KERNEL */
+#include "zfs_crrd.h"
#include "zfs_prop.h"
#include "zfs_comutil.h"
#include <cityhash.h>
@@ -311,6 +312,41 @@ static int zfs_livelist_condense_zthr_cancel = 0;
static int zfs_livelist_condense_new_alloc = 0;
/*
+ * Time variable to decide how often the txg should be added into the
+ * database (in seconds).
+ * The smallest available resolution is in minutes, which means an update occurs
+ * each time we reach `spa_note_txg_time` and the txg has changed. We provide
+ * a 256-slot ring buffer for minute-level resolution. The number is limited by
+ * the size of the structure we use and the maximum amount of bytes we can write
+ * into ZAP. Setting `spa_note_txg_time` to 10 minutes results in approximately
+ * 144 records per day. Given the 256 slots, this provides roughly 1.5 days of
+ * high-resolution data.
+ *
+ * The user can decrease `spa_note_txg_time` to increase resolution within
+ * a day, at the cost of retaining fewer days of data. Alternatively, increasing
+ * the interval allows storing data over a longer period, but with lower
+ * frequency.
+ *
+ * This parameter does not affect the daily or monthly databases, as those only
+ * store one record per day and per month, respectively.
+ */
+static uint_t spa_note_txg_time = 10 * 60;
+
+/*
+ * How often flush txg database to a disk (in seconds).
+ * We flush data every time we write to it, making it the most reliable option.
+ * Since this happens every 10 minutes, it shouldn't introduce any noticeable
+ * overhead for the system. In case of failure, we will always have an
+ * up-to-date version of the database.
+ *
+ * The user can adjust the flush interval to a lower value, but it probably
+ * doesn't make sense to flush more often than the database is updated.
+ * The user can also increase the interval if they're concerned about the
+ * performance of writing the entire database to disk.
+ */
+static uint_t spa_flush_txg_time = 10 * 60;
+
+/*
* ==========================================================================
* SPA properties routines
* ==========================================================================
@@ -417,11 +453,15 @@ spa_prop_get_config(spa_t *spa, nvlist_t *nv)
alloc += metaslab_class_get_alloc(spa_special_class(spa));
alloc += metaslab_class_get_alloc(spa_dedup_class(spa));
alloc += metaslab_class_get_alloc(spa_embedded_log_class(spa));
+ alloc += metaslab_class_get_alloc(
+ spa_special_embedded_log_class(spa));
size = metaslab_class_get_space(mc);
size += metaslab_class_get_space(spa_special_class(spa));
size += metaslab_class_get_space(spa_dedup_class(spa));
size += metaslab_class_get_space(spa_embedded_log_class(spa));
+ size += metaslab_class_get_space(
+ spa_special_embedded_log_class(spa));
spa_prop_add_list(nv, ZPOOL_PROP_NAME, spa_name(spa), 0, src);
spa_prop_add_list(nv, ZPOOL_PROP_SIZE, NULL, size, src);
@@ -1679,6 +1719,8 @@ spa_activate(spa_t *spa, spa_mode_t mode)
"embedded_log", msp, B_TRUE);
spa->spa_special_class = metaslab_class_create(spa, "special",
msp, B_FALSE);
+ spa->spa_special_embedded_log_class = metaslab_class_create(spa,
+ "special_embedded_log", msp, B_TRUE);
spa->spa_dedup_class = metaslab_class_create(spa, "dedup",
msp, B_FALSE);
@@ -1853,6 +1895,9 @@ spa_deactivate(spa_t *spa)
metaslab_class_destroy(spa->spa_special_class);
spa->spa_special_class = NULL;
+ metaslab_class_destroy(spa->spa_special_embedded_log_class);
+ spa->spa_special_embedded_log_class = NULL;
+
metaslab_class_destroy(spa->spa_dedup_class);
spa->spa_dedup_class = NULL;
@@ -2031,6 +2076,111 @@ spa_destroy_aux_threads(spa_t *spa)
}
}
+static void
+spa_sync_time_logger(spa_t *spa, uint64_t txg)
+{
+ uint64_t curtime;
+ dmu_tx_t *tx;
+
+ if (!spa_writeable(spa)) {
+ return;
+ }
+ curtime = gethrestime_sec();
+ if (curtime < spa->spa_last_noted_txg_time + spa_note_txg_time) {
+ return;
+ }
+
+ if (txg > spa->spa_last_noted_txg) {
+ spa->spa_last_noted_txg_time = curtime;
+ spa->spa_last_noted_txg = txg;
+
+ mutex_enter(&spa->spa_txg_log_time_lock);
+ dbrrd_add(&spa->spa_txg_log_time, curtime, txg);
+ mutex_exit(&spa->spa_txg_log_time_lock);
+ }
+
+ if (curtime < spa->spa_last_flush_txg_time + spa_flush_txg_time) {
+ return;
+ }
+ spa->spa_last_flush_txg_time = curtime;
+
+ tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg);
+
+ VERIFY0(zap_update(spa_meta_objset(spa), DMU_POOL_DIRECTORY_OBJECT,
+ DMU_POOL_TXG_LOG_TIME_MINUTES, RRD_ENTRY_SIZE, RRD_STRUCT_ELEM,
+ &spa->spa_txg_log_time.dbr_minutes, tx));
+ VERIFY0(zap_update(spa_meta_objset(spa), DMU_POOL_DIRECTORY_OBJECT,
+ DMU_POOL_TXG_LOG_TIME_DAYS, RRD_ENTRY_SIZE, RRD_STRUCT_ELEM,
+ &spa->spa_txg_log_time.dbr_days, tx));
+ VERIFY0(zap_update(spa_meta_objset(spa), DMU_POOL_DIRECTORY_OBJECT,
+ DMU_POOL_TXG_LOG_TIME_MONTHS, RRD_ENTRY_SIZE, RRD_STRUCT_ELEM,
+ &spa->spa_txg_log_time.dbr_months, tx));
+ dmu_tx_commit(tx);
+}
+
+static void
+spa_unload_sync_time_logger(spa_t *spa)
+{
+ uint64_t txg;
+ dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
+ VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT));
+
+ txg = dmu_tx_get_txg(tx);
+ spa->spa_last_noted_txg_time = 0;
+ spa->spa_last_flush_txg_time = 0;
+ spa_sync_time_logger(spa, txg);
+
+ dmu_tx_commit(tx);
+}
+
+static void
+spa_load_txg_log_time(spa_t *spa)
+{
+ int error;
+
+ error = zap_lookup(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT,
+ DMU_POOL_TXG_LOG_TIME_MINUTES, RRD_ENTRY_SIZE, RRD_STRUCT_ELEM,
+ &spa->spa_txg_log_time.dbr_minutes);
+ if (error != 0 && error != ENOENT) {
+ spa_load_note(spa, "unable to load a txg time database with "
+ "minute resolution [error=%d]", error);
+ }
+ error = zap_lookup(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT,
+ DMU_POOL_TXG_LOG_TIME_DAYS, RRD_ENTRY_SIZE, RRD_STRUCT_ELEM,
+ &spa->spa_txg_log_time.dbr_days);
+ if (error != 0 && error != ENOENT) {
+ spa_load_note(spa, "unable to load a txg time database with "
+ "day resolution [error=%d]", error);
+ }
+ error = zap_lookup(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT,
+ DMU_POOL_TXG_LOG_TIME_MONTHS, RRD_ENTRY_SIZE, RRD_STRUCT_ELEM,
+ &spa->spa_txg_log_time.dbr_months);
+ if (error != 0 && error != ENOENT) {
+ spa_load_note(spa, "unable to load a txg time database with "
+ "month resolution [error=%d]", error);
+ }
+}
+
+static boolean_t
+spa_should_sync_time_logger_on_unload(spa_t *spa)
+{
+
+ if (!spa_writeable(spa))
+ return (B_FALSE);
+
+ if (!spa->spa_sync_on)
+ return (B_FALSE);
+
+ if (spa_state(spa) != POOL_STATE_EXPORTED)
+ return (B_FALSE);
+
+ if (spa->spa_last_noted_txg == 0)
+ return (B_FALSE);
+
+ return (B_TRUE);
+}
+
+
/*
* Opposite of spa_load().
*/
@@ -2052,6 +2202,9 @@ spa_unload(spa_t *spa)
* we delay the final TXGs beyond what spa_final_txg is set at.
*/
if (spa->spa_final_txg == UINT64_MAX) {
+ if (spa_should_sync_time_logger_on_unload(spa))
+ spa_unload_sync_time_logger(spa);
+
/*
* If the log space map feature is enabled and the pool is
* getting exported (but not destroyed), we want to spend some
@@ -2709,8 +2862,8 @@ spa_claim_notify(zio_t *zio)
return;
mutex_enter(&spa->spa_props_lock); /* any mutex will do */
- if (spa->spa_claim_max_txg < BP_GET_LOGICAL_BIRTH(zio->io_bp))
- spa->spa_claim_max_txg = BP_GET_LOGICAL_BIRTH(zio->io_bp);
+ if (spa->spa_claim_max_txg < BP_GET_BIRTH(zio->io_bp))
+ spa->spa_claim_max_txg = BP_GET_BIRTH(zio->io_bp);
mutex_exit(&spa->spa_props_lock);
}
@@ -3768,20 +3921,17 @@ out:
* ZPOOL_CONFIG_MMP_HOSTID - hostid from the active pool
*/
if (error == EREMOTEIO) {
- const char *hostname = "<unknown>";
- uint64_t hostid = 0;
-
if (mmp_label) {
if (nvlist_exists(mmp_label, ZPOOL_CONFIG_HOSTNAME)) {
- hostname = fnvlist_lookup_string(mmp_label,
- ZPOOL_CONFIG_HOSTNAME);
+ const char *hostname = fnvlist_lookup_string(
+ mmp_label, ZPOOL_CONFIG_HOSTNAME);
fnvlist_add_string(spa->spa_load_info,
ZPOOL_CONFIG_MMP_HOSTNAME, hostname);
}
if (nvlist_exists(mmp_label, ZPOOL_CONFIG_HOSTID)) {
- hostid = fnvlist_lookup_uint64(mmp_label,
- ZPOOL_CONFIG_HOSTID);
+ uint64_t hostid = fnvlist_lookup_uint64(
+ mmp_label, ZPOOL_CONFIG_HOSTID);
fnvlist_add_uint64(spa->spa_load_info,
ZPOOL_CONFIG_MMP_HOSTID, hostid);
}
@@ -4711,6 +4861,9 @@ spa_ld_get_props(spa_t *spa)
if (error != 0 && error != ENOENT)
return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO));
+ /* Load time log */
+ spa_load_txg_log_time(spa);
+
/*
* Load the persistent error log. If we have an older pool, this will
* not be present.
@@ -5899,7 +6052,7 @@ spa_open_common(const char *pool, spa_t **spapp, const void *tag,
}
if (firstopen)
- zvol_create_minors_recursive(spa_name(spa));
+ zvol_create_minors(spa_name(spa));
*spapp = spa;
@@ -6877,7 +7030,7 @@ spa_import(char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags)
mutex_exit(&spa_namespace_lock);
- zvol_create_minors_recursive(pool);
+ zvol_create_minors(pool);
spa_import_os(spa);
@@ -7134,6 +7287,9 @@ spa_export_common(const char *pool, int new_state, nvlist_t **oldconfig,
spa_config_exit(spa, SCL_ALL, FTAG);
}
+ if (spa_should_sync_time_logger_on_unload(spa))
+ spa_unload_sync_time_logger(spa);
+
/*
* If the log space map feature is enabled and the pool is
* getting exported (but not destroyed), we want to spend some
@@ -9092,6 +9248,8 @@ spa_async_thread(void *arg)
old_space += metaslab_class_get_space(spa_dedup_class(spa));
old_space += metaslab_class_get_space(
spa_embedded_log_class(spa));
+ old_space += metaslab_class_get_space(
+ spa_special_embedded_log_class(spa));
spa_config_update(spa, SPA_CONFIG_UPDATE_POOL);
@@ -9100,6 +9258,8 @@ spa_async_thread(void *arg)
new_space += metaslab_class_get_space(spa_dedup_class(spa));
new_space += metaslab_class_get_space(
spa_embedded_log_class(spa));
+ new_space += metaslab_class_get_space(
+ spa_special_embedded_log_class(spa));
mutex_exit(&spa_namespace_lock);
/*
@@ -10180,6 +10340,8 @@ spa_sync(spa_t *spa, uint64_t txg)
*/
brt_pending_apply(spa, txg);
+ spa_sync_time_logger(spa, txg);
+
/*
* Lock out configuration changes.
*/
@@ -10222,6 +10384,7 @@ spa_sync(spa_t *spa, uint64_t txg)
dmu_tx_t *tx = dmu_tx_create_assigned(dp, txg);
spa->spa_sync_starttime = gethrtime();
+
taskq_cancel_id(system_delay_taskq, spa->spa_deadman_tqid);
spa->spa_deadman_tqid = taskq_dispatch_delay(system_delay_taskq,
spa_deadman, spa, TQ_SLEEP, ddi_get_lbolt() +
@@ -10309,7 +10472,7 @@ spa_sync(spa_t *spa, uint64_t txg)
metaslab_class_evict_old(spa->spa_normal_class, txg);
metaslab_class_evict_old(spa->spa_log_class, txg);
- /* spa_embedded_log_class has only one metaslab per vdev. */
+ /* Embedded log classes have only one metaslab per vdev. */
metaslab_class_evict_old(spa->spa_special_class, txg);
metaslab_class_evict_old(spa->spa_dedup_class, txg);
@@ -11095,6 +11258,13 @@ ZFS_MODULE_PARAM(zfs_livelist_condense, zfs_livelist_condense_, new_alloc, INT,
"Whether extra ALLOC blkptrs were added to a livelist entry while it "
"was being condensed");
+ZFS_MODULE_PARAM(zfs_spa, spa_, note_txg_time, UINT, ZMOD_RW,
+ "How frequently TXG timestamps are stored internally (in seconds)");
+
+ZFS_MODULE_PARAM(zfs_spa, spa_, flush_txg_time, UINT, ZMOD_RW,
+ "How frequently the TXG timestamps database should be flushed "
+ "to disk (in seconds)");
+
#ifdef _KERNEL
ZFS_MODULE_VIRTUAL_PARAM_CALL(zfs_zio, zio_, taskq_read,
spa_taskq_read_param_set, spa_taskq_read_param_get, ZMOD_RW,
diff --git a/sys/contrib/openzfs/module/zfs/spa_errlog.c b/sys/contrib/openzfs/module/zfs/spa_errlog.c
index 3e08f261fda1..7252fd534bdf 100644
--- a/sys/contrib/openzfs/module/zfs/spa_errlog.c
+++ b/sys/contrib/openzfs/module/zfs/spa_errlog.c
@@ -253,7 +253,7 @@ find_birth_txg(dsl_dataset_t *ds, zbookmark_err_phys_t *zep,
if (error == 0 && BP_IS_HOLE(&bp))
error = SET_ERROR(ENOENT);
- *birth_txg = BP_GET_LOGICAL_BIRTH(&bp);
+ *birth_txg = BP_GET_PHYSICAL_BIRTH(&bp);
rw_exit(&dn->dn_struct_rwlock);
dnode_rele(dn, FTAG);
return (error);
@@ -885,7 +885,7 @@ sync_upgrade_errlog(spa_t *spa, uint64_t spa_err_obj, uint64_t *newobj,
if (error == EACCES)
error = 0;
else if (!error)
- zep.zb_birth = BP_GET_LOGICAL_BIRTH(&bp);
+ zep.zb_birth = BP_GET_PHYSICAL_BIRTH(&bp);
rw_exit(&dn->dn_struct_rwlock);
dnode_rele(dn, FTAG);
diff --git a/sys/contrib/openzfs/module/zfs/spa_misc.c b/sys/contrib/openzfs/module/zfs/spa_misc.c
index f054e4290bbf..2eba8362a166 100644
--- a/sys/contrib/openzfs/module/zfs/spa_misc.c
+++ b/sys/contrib/openzfs/module/zfs/spa_misc.c
@@ -715,6 +715,7 @@ spa_add(const char *name, nvlist_t *config, const char *altroot)
mutex_init(&spa->spa_feat_stats_lock, NULL, MUTEX_DEFAULT, NULL);
mutex_init(&spa->spa_flushed_ms_lock, NULL, MUTEX_DEFAULT, NULL);
mutex_init(&spa->spa_activities_lock, NULL, MUTEX_DEFAULT, NULL);
+ mutex_init(&spa->spa_txg_log_time_lock, NULL, MUTEX_DEFAULT, NULL);
cv_init(&spa->spa_async_cv, NULL, CV_DEFAULT, NULL);
cv_init(&spa->spa_evicting_os_cv, NULL, CV_DEFAULT, NULL);
@@ -903,6 +904,7 @@ spa_remove(spa_t *spa)
mutex_destroy(&spa->spa_vdev_top_lock);
mutex_destroy(&spa->spa_feat_stats_lock);
mutex_destroy(&spa->spa_activities_lock);
+ mutex_destroy(&spa->spa_txg_log_time_lock);
kmem_free(spa, sizeof (spa_t));
}
@@ -1308,6 +1310,7 @@ spa_vdev_config_exit(spa_t *spa, vdev_t *vd, uint64_t txg, int error,
metaslab_class_validate(spa_log_class(spa));
metaslab_class_validate(spa_embedded_log_class(spa));
metaslab_class_validate(spa_special_class(spa));
+ metaslab_class_validate(spa_special_embedded_log_class(spa));
metaslab_class_validate(spa_dedup_class(spa));
spa_config_exit(spa, SCL_ALL, spa);
@@ -1896,6 +1899,8 @@ spa_get_slop_space(spa_t *spa)
*/
uint64_t embedded_log =
metaslab_class_get_dspace(spa_embedded_log_class(spa));
+ embedded_log += metaslab_class_get_dspace(
+ spa_special_embedded_log_class(spa));
slop -= MIN(embedded_log, slop >> 1);
/*
@@ -2001,6 +2006,12 @@ spa_special_class(spa_t *spa)
}
metaslab_class_t *
+spa_special_embedded_log_class(spa_t *spa)
+{
+ return (spa->spa_special_embedded_log_class);
+}
+
+metaslab_class_t *
spa_dedup_class(spa_t *spa)
{
return (spa->spa_dedup_class);
diff --git a/sys/contrib/openzfs/module/zfs/vdev.c b/sys/contrib/openzfs/module/zfs/vdev.c
index 01758b0c54c0..70b14fb9b2c8 100644
--- a/sys/contrib/openzfs/module/zfs/vdev.c
+++ b/sys/contrib/openzfs/module/zfs/vdev.c
@@ -243,6 +243,25 @@ vdev_dbgmsg_print_tree(vdev_t *vd, int indent)
vdev_dbgmsg_print_tree(vd->vdev_child[i], indent + 2);
}
+char *
+vdev_rt_name(vdev_t *vd, const char *name)
+{
+ return (kmem_asprintf("{spa=%s vdev_guid=%llu %s}",
+ spa_name(vd->vdev_spa),
+ (u_longlong_t)vd->vdev_guid,
+ name));
+}
+
+static char *
+vdev_rt_name_dtl(vdev_t *vd, const char *name, vdev_dtl_type_t dtl_type)
+{
+ return (kmem_asprintf("{spa=%s vdev_guid=%llu %s[%d]}",
+ spa_name(vd->vdev_spa),
+ (u_longlong_t)vd->vdev_guid,
+ name,
+ dtl_type));
+}
+
/*
* Virtual device management.
*/
@@ -282,12 +301,15 @@ vdev_getops(const char *type)
* Given a vdev and a metaslab class, find which metaslab group we're
* interested in. All vdevs may belong to two different metaslab classes.
* Dedicated slog devices use only the primary metaslab group, rather than a
- * separate log group. For embedded slogs, the vdev_log_mg will be non-NULL.
+ * separate log group. For embedded slogs, vdev_log_mg will be non-NULL and
+ * will point to a metaslab group of either embedded_log_class (for normal
+ * vdevs) or special_embedded_log_class (for special vdevs).
*/
metaslab_group_t *
vdev_get_mg(vdev_t *vd, metaslab_class_t *mc)
{
- if (mc == spa_embedded_log_class(vd->vdev_spa) &&
+ if ((mc == spa_embedded_log_class(vd->vdev_spa) ||
+ mc == spa_special_embedded_log_class(vd->vdev_spa)) &&
vd->vdev_log_mg != NULL)
return (vd->vdev_log_mg);
else
@@ -692,8 +714,9 @@ vdev_alloc_common(spa_t *spa, uint_t id, uint64_t guid, vdev_ops_t *ops)
rw_init(&vd->vdev_indirect_rwlock, NULL, RW_DEFAULT, NULL);
mutex_init(&vd->vdev_obsolete_lock, NULL, MUTEX_DEFAULT, NULL);
- vd->vdev_obsolete_segments = zfs_range_tree_create(NULL,
- ZFS_RANGE_SEG64, NULL, 0, 0);
+ vd->vdev_obsolete_segments = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vdev_obsolete_segments"));
/*
* Initialize rate limit structs for events. We rate limit ZIO delay
@@ -747,8 +770,9 @@ vdev_alloc_common(spa_t *spa, uint_t id, uint64_t guid, vdev_ops_t *ops)
cv_init(&vd->vdev_rebuild_cv, NULL, CV_DEFAULT, NULL);
for (int t = 0; t < DTL_TYPES; t++) {
- vd->vdev_dtl[t] = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ vd->vdev_dtl[t] = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name_dtl(vd, "vdev_dtl", t));
}
txg_list_create(&vd->vdev_ms_list, spa,
@@ -1508,8 +1532,13 @@ vdev_metaslab_group_create(vdev_t *vd)
vd->vdev_mg = metaslab_group_create(mc, vd);
if (!vd->vdev_islog) {
- vd->vdev_log_mg = metaslab_group_create(
- spa_embedded_log_class(spa), vd);
+ if (mc == spa_special_class(spa)) {
+ vd->vdev_log_mg = metaslab_group_create(
+ spa_special_embedded_log_class(spa), vd);
+ } else {
+ vd->vdev_log_mg = metaslab_group_create(
+ spa_embedded_log_class(spa), vd);
+ }
}
/*
@@ -1624,9 +1653,10 @@ vdev_metaslab_init(vdev_t *vd, uint64_t txg)
/*
* Find the emptiest metaslab on the vdev and mark it for use for
* embedded slog by moving it from the regular to the log metaslab
- * group.
+ * group. This works for normal and special vdevs.
*/
- if (vd->vdev_mg->mg_class == spa_normal_class(spa) &&
+ if ((vd->vdev_mg->mg_class == spa_normal_class(spa) ||
+ vd->vdev_mg->mg_class == spa_special_class(spa)) &&
vd->vdev_ms_count > zfs_embedded_slog_min_ms &&
avl_is_empty(&vd->vdev_log_mg->mg_metaslab_tree)) {
uint64_t slog_msid = 0;
@@ -3449,7 +3479,9 @@ vdev_dtl_load(vdev_t *vd)
return (error);
ASSERT(vd->vdev_dtl_sm != NULL);
- rt = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0);
+ rt = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vdev_dtl_load:rt"));
error = space_map_load(vd->vdev_dtl_sm, rt, SM_ALLOC);
if (error == 0) {
mutex_enter(&vd->vdev_dtl_lock);
@@ -3597,7 +3629,8 @@ vdev_dtl_sync(vdev_t *vd, uint64_t txg)
ASSERT(vd->vdev_dtl_sm != NULL);
}
- rtsync = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0);
+ rtsync = zfs_range_tree_create_flags(NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "rtsync"));
mutex_enter(&vd->vdev_dtl_lock);
zfs_range_tree_walk(rt, zfs_range_tree_add, rtsync);
diff --git a/sys/contrib/openzfs/module/zfs/vdev_indirect.c b/sys/contrib/openzfs/module/zfs/vdev_indirect.c
index fac2c3a5f154..9fc71fa0e03e 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_indirect.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_indirect.c
@@ -1842,7 +1842,7 @@ vdev_indirect_io_done(zio_t *zio)
*/
if (zio->io_flags & ZIO_FLAG_DIO_READ && ret == ECKSUM) {
zio->io_error = ret;
- zio->io_flags |= ZIO_FLAG_DIO_CHKSUM_ERR;
+ zio->io_post |= ZIO_POST_DIO_CHKSUM_ERR;
zio_dio_chksum_verify_error_report(zio);
ret = 0;
}
diff --git a/sys/contrib/openzfs/module/zfs/vdev_initialize.c b/sys/contrib/openzfs/module/zfs/vdev_initialize.c
index 4274728578ad..9243c76e810d 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_initialize.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_initialize.c
@@ -541,8 +541,9 @@ vdev_initialize_thread(void *arg)
abd_t *deadbeef = vdev_initialize_block_alloc();
- vd->vdev_initialize_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ vd->vdev_initialize_tree = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vdev_initialize_tree"));
for (uint64_t i = 0; !vd->vdev_detached &&
i < vd->vdev_top->vdev_ms_count; i++) {
diff --git a/sys/contrib/openzfs/module/zfs/vdev_mirror.c b/sys/contrib/openzfs/module/zfs/vdev_mirror.c
index a6aee9437066..18efdaac006f 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_mirror.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_mirror.c
@@ -532,7 +532,7 @@ vdev_mirror_child_select(zio_t *zio)
uint64_t txg = zio->io_txg;
int c, lowest_load;
- ASSERT(zio->io_bp == NULL || BP_GET_BIRTH(zio->io_bp) == txg);
+ ASSERT(zio->io_bp == NULL || BP_GET_PHYSICAL_BIRTH(zio->io_bp) == txg);
lowest_load = INT_MAX;
mm->mm_preferred_cnt = 0;
@@ -779,7 +779,7 @@ vdev_mirror_io_done(zio_t *zio)
* being written out during self healing.
*/
if ((zio->io_flags & ZIO_FLAG_DIO_READ) &&
- (zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR)) {
+ (zio->io_post & ZIO_POST_DIO_CHKSUM_ERR)) {
zio_dio_chksum_verify_error_report(zio);
zio->io_error = vdev_mirror_worst_error(mm);
ASSERT3U(zio->io_error, ==, ECKSUM);
diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c
index 71c4bfbdaf00..210cdcab1ecc 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c
@@ -2206,11 +2206,7 @@ vdev_raidz_close(vdev_t *vd)
/*
* Return the logical width to use, given the txg in which the allocation
- * happened. Note that BP_GET_BIRTH() is usually the txg in which the
- * BP was allocated. Remapped BP's (that were relocated due to device
- * removal, see remap_blkptr_cb()), will have a more recent physical birth
- * which reflects when the BP was relocated, but we can ignore these because
- * they can't be on RAIDZ (device removal doesn't support RAIDZ).
+ * happened.
*/
static uint64_t
vdev_raidz_get_logical_width(vdev_raidz_t *vdrz, uint64_t txg)
@@ -2249,10 +2245,9 @@ vdev_raidz_asize_to_psize(vdev_t *vd, uint64_t asize, uint64_t txg)
vdev_raidz_t *vdrz = vd->vdev_tsd;
uint64_t psize;
uint64_t ashift = vd->vdev_top->vdev_ashift;
- uint64_t cols = vdrz->vd_original_width;
uint64_t nparity = vdrz->vd_nparity;
- cols = vdev_raidz_get_logical_width(vdrz, txg);
+ uint64_t cols = vdev_raidz_get_logical_width(vdrz, txg);
ASSERT0(asize % (1 << ashift));
@@ -2285,10 +2280,9 @@ vdev_raidz_psize_to_asize(vdev_t *vd, uint64_t psize, uint64_t txg)
vdev_raidz_t *vdrz = vd->vdev_tsd;
uint64_t asize;
uint64_t ashift = vd->vdev_top->vdev_ashift;
- uint64_t cols = vdrz->vd_original_width;
uint64_t nparity = vdrz->vd_nparity;
- cols = vdev_raidz_get_logical_width(vdrz, txg);
+ uint64_t cols = vdev_raidz_get_logical_width(vdrz, txg);
asize = ((psize - 1) >> ashift) + 1;
asize += nparity * ((asize + cols - nparity - 1) / (cols - nparity));
@@ -2345,7 +2339,7 @@ vdev_raidz_io_verify(zio_t *zio, raidz_map_t *rm, raidz_row_t *rr, int col)
logical_rs.rs_start = rr->rr_offset;
logical_rs.rs_end = logical_rs.rs_start +
vdev_raidz_psize_to_asize(zio->io_vd, rr->rr_size,
- BP_GET_BIRTH(zio->io_bp));
+ BP_GET_PHYSICAL_BIRTH(zio->io_bp));
raidz_col_t *rc = &rr->rr_col[col];
vdev_t *cvd = zio->io_vd->vdev_child[rc->rc_devidx];
@@ -2568,7 +2562,7 @@ vdev_raidz_io_start(zio_t *zio)
raidz_map_t *rm;
uint64_t logical_width = vdev_raidz_get_logical_width(vdrz,
- BP_GET_BIRTH(zio->io_bp));
+ BP_GET_PHYSICAL_BIRTH(zio->io_bp));
if (logical_width != vdrz->vd_physical_width) {
zfs_locked_range_t *lr = NULL;
uint64_t synced_offset = UINT64_MAX;
@@ -2691,7 +2685,7 @@ raidz_checksum_verify(zio_t *zio)
*/
if (zio->io_flags & ZIO_FLAG_DIO_READ && ret == ECKSUM) {
zio->io_error = ret;
- zio->io_flags |= ZIO_FLAG_DIO_CHKSUM_ERR;
+ zio->io_post |= ZIO_POST_DIO_CHKSUM_ERR;
zio_dio_chksum_verify_error_report(zio);
zio_checksum_verified(zio);
return (0);
@@ -3048,7 +3042,7 @@ raidz_reconstruct(zio_t *zio, int *ltgts, int ntgts, int nparity)
/* Check for success */
if (raidz_checksum_verify(zio) == 0) {
- if (zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR)
+ if (zio->io_post & ZIO_POST_DIO_CHKSUM_ERR)
return (0);
/* Reconstruction succeeded - report errors */
@@ -3514,7 +3508,7 @@ vdev_raidz_io_done(zio_t *zio)
}
if (raidz_checksum_verify(zio) == 0) {
- if (zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR)
+ if (zio->io_post & ZIO_POST_DIO_CHKSUM_ERR)
goto done;
for (int i = 0; i < rm->rm_nrows; i++) {
@@ -4591,8 +4585,10 @@ spa_raidz_expand_thread(void *arg, zthr_t *zthr)
uint64_t shift, start;
zfs_range_seg_type_t type = metaslab_calculate_range_tree_type(
raidvd, msp, &start, &shift);
- zfs_range_tree_t *rt = zfs_range_tree_create(NULL, type, NULL,
- start, shift);
+ zfs_range_tree_t *rt = zfs_range_tree_create_flags(
+ NULL, type, NULL, start, shift, ZFS_RT_F_DYN_NAME,
+ metaslab_rt_name(msp->ms_group, msp,
+ "spa_raidz_expand_thread:rt"));
zfs_range_tree_add(rt, msp->ms_start, msp->ms_size);
zfs_range_tree_walk(msp->ms_allocatable, zfs_range_tree_remove,
rt);
diff --git a/sys/contrib/openzfs/module/zfs/vdev_rebuild.c b/sys/contrib/openzfs/module/zfs/vdev_rebuild.c
index 0e296606d037..cf259788ccf4 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_rebuild.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_rebuild.c
@@ -787,8 +787,9 @@ vdev_rebuild_thread(void *arg)
vdev_rebuild_phys_t *vrp = &vr->vr_rebuild_phys;
vr->vr_top_vdev = vd;
vr->vr_scan_msp = NULL;
- vr->vr_scan_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL,
- 0, 0);
+ vr->vr_scan_tree = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vr_scan_tree"));
mutex_init(&vr->vr_io_lock, NULL, MUTEX_DEFAULT, NULL);
cv_init(&vr->vr_io_cv, NULL, CV_DEFAULT, NULL);
diff --git a/sys/contrib/openzfs/module/zfs/vdev_removal.c b/sys/contrib/openzfs/module/zfs/vdev_removal.c
index db79ded6dce4..3887be4bd548 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_removal.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_removal.c
@@ -364,13 +364,15 @@ spa_vdev_removal_create(vdev_t *vd)
spa_vdev_removal_t *svr = kmem_zalloc(sizeof (*svr), KM_SLEEP);
mutex_init(&svr->svr_lock, NULL, MUTEX_DEFAULT, NULL);
cv_init(&svr->svr_cv, NULL, CV_DEFAULT, NULL);
- svr->svr_allocd_segs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ svr->svr_allocd_segs = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "svr_allocd_segs"));
svr->svr_vdev_id = vd->vdev_id;
for (int i = 0; i < TXG_SIZE; i++) {
- svr->svr_frees[i] = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ svr->svr_frees[i] = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "svr_frees"));
list_create(&svr->svr_new_segments[i],
sizeof (vdev_indirect_mapping_entry_t),
offsetof(vdev_indirect_mapping_entry_t, vime_node));
@@ -1179,8 +1181,9 @@ spa_vdev_copy_segment(vdev_t *vd, zfs_range_tree_t *segs,
* relative to the start of the range to be copied (i.e. relative to the
* local variable "start").
*/
- zfs_range_tree_t *obsolete_segs = zfs_range_tree_create(NULL,
- ZFS_RANGE_SEG64, NULL, 0, 0);
+ zfs_range_tree_t *obsolete_segs = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "obsolete_segs"));
zfs_btree_index_t where;
zfs_range_seg_t *rs = zfs_btree_first(&segs->rt_root, &where);
@@ -1448,8 +1451,9 @@ spa_vdev_copy_impl(vdev_t *vd, spa_vdev_removal_t *svr, vdev_copy_arg_t *vca,
* allocated segments that we are copying. We may also be copying
* free segments (of up to vdev_removal_max_span bytes).
*/
- zfs_range_tree_t *segs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ zfs_range_tree_t *segs = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "spa_vdev_copy_impl:segs"));
for (;;) {
zfs_range_tree_t *rt = svr->svr_allocd_segs;
zfs_range_seg_t *rs = zfs_range_tree_first(rt);
@@ -1610,8 +1614,9 @@ spa_vdev_remove_thread(void *arg)
vca.vca_read_error_bytes = 0;
vca.vca_write_error_bytes = 0;
- zfs_range_tree_t *segs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ zfs_range_tree_t *segs = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "spa_vdev_remove_thread:segs"));
mutex_enter(&svr->svr_lock);
@@ -1895,8 +1900,9 @@ spa_vdev_remove_cancel_sync(void *arg, dmu_tx_t *tx)
vdev_indirect_mapping_max_offset(vim));
}
- zfs_range_tree_t *segs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ zfs_range_tree_t *segs = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0, ZFS_RT_F_DYN_NAME,
+ vdev_rt_name(vd, "spa_vdev_remove_cancel_sync:segs"));
for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) {
metaslab_t *msp = vd->vdev_ms[msi];
diff --git a/sys/contrib/openzfs/module/zfs/vdev_trim.c b/sys/contrib/openzfs/module/zfs/vdev_trim.c
index 842bb3e690d4..fc8d5b8e9a8a 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_trim.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_trim.c
@@ -902,7 +902,9 @@ vdev_trim_thread(void *arg)
ta.trim_vdev = vd;
ta.trim_extent_bytes_max = zfs_trim_extent_bytes_max;
ta.trim_extent_bytes_min = zfs_trim_extent_bytes_min;
- ta.trim_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0);
+ ta.trim_tree = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "trim_tree"));
ta.trim_type = TRIM_TYPE_MANUAL;
ta.trim_flags = 0;
@@ -1305,8 +1307,10 @@ vdev_autotrim_thread(void *arg)
* Allocate an empty range tree which is swapped in
* for the existing ms_trim tree while it is processed.
*/
- trim_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
- NULL, 0, 0);
+ trim_tree = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME,
+ vdev_rt_name(vd, "autotrim_tree"));
zfs_range_tree_swap(&msp->ms_trim, &trim_tree);
ASSERT(zfs_range_tree_is_empty(msp->ms_trim));
@@ -1360,8 +1364,10 @@ vdev_autotrim_thread(void *arg)
if (!cvd->vdev_ops->vdev_op_leaf)
continue;
- ta->trim_tree = zfs_range_tree_create(NULL,
- ZFS_RANGE_SEG64, NULL, 0, 0);
+ ta->trim_tree = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME,
+ vdev_rt_name(vd, "autotrim_tree"));
zfs_range_tree_walk(trim_tree,
vdev_trim_range_add, ta);
}
@@ -1600,7 +1606,9 @@ vdev_trim_l2arc_thread(void *arg)
vd->vdev_trim_secure = 0;
ta.trim_vdev = vd;
- ta.trim_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0);
+ ta.trim_tree = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "trim_tree"));
ta.trim_type = TRIM_TYPE_MANUAL;
ta.trim_extent_bytes_max = zfs_trim_extent_bytes_max;
ta.trim_extent_bytes_min = SPA_MINBLOCKSIZE;
@@ -1735,7 +1743,9 @@ vdev_trim_simple(vdev_t *vd, uint64_t start, uint64_t size)
ASSERT(!vd->vdev_top->vdev_rz_expanding);
ta.trim_vdev = vd;
- ta.trim_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0);
+ ta.trim_tree = zfs_range_tree_create_flags(
+ NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
+ ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "trim_tree"));
ta.trim_type = TRIM_TYPE_SIMPLE;
ta.trim_extent_bytes_max = zfs_trim_extent_bytes_max;
ta.trim_extent_bytes_min = SPA_MINBLOCKSIZE;
diff --git a/sys/contrib/openzfs/module/zfs/zap.c b/sys/contrib/openzfs/module/zfs/zap.c
index 9711c91d7e4e..0896690c97e3 100644
--- a/sys/contrib/openzfs/module/zfs/zap.c
+++ b/sys/contrib/openzfs/module/zfs/zap.c
@@ -1304,7 +1304,7 @@ zap_increment_int(objset_t *os, uint64_t obj, uint64_t key, int64_t delta,
int
fzap_cursor_retrieve(zap_t *zap, zap_cursor_t *zc, zap_attribute_t *za)
{
- int err = ENOENT;
+ int err;
zap_entry_handle_t zeh;
zap_leaf_t *l;
diff --git a/sys/contrib/openzfs/module/zfs/zcp.c b/sys/contrib/openzfs/module/zfs/zcp.c
index 6960ea360b15..9aecf67fd256 100644
--- a/sys/contrib/openzfs/module/zfs/zcp.c
+++ b/sys/contrib/openzfs/module/zfs/zcp.c
@@ -1175,7 +1175,7 @@ zcp_eval(const char *poolname, const char *program, boolean_t sync,
for (nvpair_t *pair = nvlist_next_nvpair(runinfo.zri_new_zvols, NULL);
pair != NULL;
pair = nvlist_next_nvpair(runinfo.zri_new_zvols, pair)) {
- zvol_create_minor(nvpair_name(pair));
+ zvol_create_minors(nvpair_name(pair));
}
fnvlist_free(runinfo.zri_new_zvols);
diff --git a/sys/contrib/openzfs/module/zfs/zfs_chksum.c b/sys/contrib/openzfs/module/zfs/zfs_chksum.c
index 5c92be21c0c8..21852bf3d865 100644
--- a/sys/contrib/openzfs/module/zfs/zfs_chksum.c
+++ b/sys/contrib/openzfs/module/zfs/zfs_chksum.c
@@ -32,9 +32,6 @@
#include <sys/blake3.h>
#include <sys/sha2.h>
-/* limit benchmarking to max 256KiB, when EdonR is slower then this: */
-#define LIMIT_PERF_MBS 300
-
typedef struct {
const char *name;
const char *impl;
@@ -52,9 +49,15 @@ typedef struct {
zio_checksum_tmpl_free_t *(free);
} chksum_stat_t;
+#define AT_STARTUP 0
+#define AT_BENCHMARK 1
+#define AT_DONE 2
+
static chksum_stat_t *chksum_stat_data = 0;
-static int chksum_stat_cnt = 0;
static kstat_t *chksum_kstat = NULL;
+static int chksum_stat_limit = AT_STARTUP;
+static int chksum_stat_cnt = 0;
+static void chksum_benchmark(void);
/*
* Sample output on i3-1005G1 System:
@@ -129,6 +132,9 @@ chksum_kstat_data(char *buf, size_t size, void *data)
static void *
chksum_kstat_addr(kstat_t *ksp, loff_t n)
{
+ /* full benchmark */
+ chksum_benchmark();
+
if (n < chksum_stat_cnt)
ksp->ks_private = (void *)(chksum_stat_data + n);
else
@@ -176,47 +182,36 @@ chksum_run(chksum_stat_t *cs, abd_t *abd, void *ctx, int round,
kpreempt_enable();
run_bw = size * run_count * NANOSEC;
- run_bw /= run_time_ns; /* B/s */
+ run_bw /= run_time_ns; /* B/s */
*result = run_bw/1024/1024; /* MiB/s */
}
-#define LIMIT_INIT 0
-#define LIMIT_NEEDED 1
-#define LIMIT_NOLIMIT 2
-
static void
chksum_benchit(chksum_stat_t *cs)
{
abd_t *abd;
void *ctx = 0;
void *salt = &cs->salt.zcs_bytes;
- static int chksum_stat_limit = LIMIT_INIT;
memset(salt, 0, sizeof (cs->salt.zcs_bytes));
if (cs->init)
ctx = cs->init(&cs->salt);
+ /* benchmarks in startup mode */
+ if (chksum_stat_limit == AT_STARTUP) {
+ abd = abd_alloc_linear(1<<18, B_FALSE);
+ chksum_run(cs, abd, ctx, 5, &cs->bs256k);
+ goto done;
+ }
+
/* allocate test memory via abd linear interface */
abd = abd_alloc_linear(1<<20, B_FALSE);
+
+ /* benchmarks when requested */
chksum_run(cs, abd, ctx, 1, &cs->bs1k);
chksum_run(cs, abd, ctx, 2, &cs->bs4k);
chksum_run(cs, abd, ctx, 3, &cs->bs16k);
chksum_run(cs, abd, ctx, 4, &cs->bs64k);
- chksum_run(cs, abd, ctx, 5, &cs->bs256k);
-
- /* check if we ran on a slow cpu */
- if (chksum_stat_limit == LIMIT_INIT) {
- if (cs->bs1k < LIMIT_PERF_MBS) {
- chksum_stat_limit = LIMIT_NEEDED;
- } else {
- chksum_stat_limit = LIMIT_NOLIMIT;
- }
- }
-
- /* skip benchmarks >= 1MiB when the CPU is to slow */
- if (chksum_stat_limit == LIMIT_NEEDED)
- goto abort;
-
chksum_run(cs, abd, ctx, 6, &cs->bs1m);
abd_free(abd);
@@ -225,7 +220,7 @@ chksum_benchit(chksum_stat_t *cs)
chksum_run(cs, abd, ctx, 7, &cs->bs4m);
chksum_run(cs, abd, ctx, 8, &cs->bs16m);
-abort:
+done:
abd_free(abd);
/* free up temp memory */
@@ -243,7 +238,6 @@ chksum_benchmark(void)
/* we need the benchmark only for the kernel module */
return;
#endif
-
chksum_stat_t *cs;
uint64_t max;
uint32_t id, cbid = 0, id_save;
@@ -251,8 +245,14 @@ chksum_benchmark(void)
const zfs_impl_t *sha256 = zfs_impl_get_ops("sha256");
const zfs_impl_t *sha512 = zfs_impl_get_ops("sha512");
+ /* benchmarks are done */
+ if (chksum_stat_limit == AT_DONE)
+ return;
+
+
/* count implementations */
- chksum_stat_cnt = 2;
+ chksum_stat_cnt = 1; /* edonr */
+ chksum_stat_cnt += 1; /* skein */
chksum_stat_cnt += sha256->getcnt();
chksum_stat_cnt += sha512->getcnt();
chksum_stat_cnt += blake3->getcnt();
@@ -332,6 +332,17 @@ chksum_benchmark(void)
}
}
blake3->setid(id_save);
+
+ switch (chksum_stat_limit) {
+ case AT_STARTUP:
+ /* next time we want a full benchmark */
+ chksum_stat_limit = AT_BENCHMARK;
+ break;
+ case AT_BENCHMARK:
+ /* no further benchmarks */
+ chksum_stat_limit = AT_DONE;
+ break;
+ }
}
void
@@ -341,7 +352,7 @@ chksum_init(void)
blake3_per_cpu_ctx_init();
#endif
- /* Benchmark supported implementations */
+ /* 256KiB benchmark */
chksum_benchmark();
/* Install kstats for all implementations */
diff --git a/sys/contrib/openzfs/module/zfs/zfs_crrd.c b/sys/contrib/openzfs/module/zfs/zfs_crrd.c
new file mode 100644
index 000000000000..f9267ed41d71
--- /dev/null
+++ b/sys/contrib/openzfs/module/zfs/zfs_crrd.c
@@ -0,0 +1,227 @@
+// SPDX-License-Identifier: CDDL-1.0
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or https://opensource.org/licenses/CDDL-1.0.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 2024 Klara Inc.
+ *
+ * This software was developed by
+ * Mariusz Zaborski <mariusz.zaborski@klarasystems.com>
+ * Fred Weigel <fred.weigel@klarasystems.com>
+ * under sponsorship from Wasabi Technology, Inc. and Klara Inc.
+ */
+/*
+ * This file implements a round-robin database that stores timestamps and txg
+ * numbers. Due to limited space, we use a round-robin approach, where
+ * the oldest records are overwritten when there is no longer enough room.
+ * This is a best-effort mechanism, and the database should be treated as
+ * an approximation. Consider this before consuming it.
+ *
+ * The database is linear, meaning we assume each new entry is newer than the
+ * ones already stored. Because of this, if time is manipulated, the database
+ * will only accept records that are newer than the existing ones.
+ * (For example, jumping 10 years into the future and then back can lead to
+ * situation when for 10 years we wont write anything to database)
+ *
+ * All times stored in the database use UTC, which makes it easy to convert to
+ * and from local time.
+ *
+ * Each database holds 256 records (as defined in the `RRD_MAX_ENTRIES` macro).
+ * This limit comes from the maximum size of a ZAP object, where we store the
+ * binary blob.
+ *
+ * We've split the database into three smaller ones.
+ * The `minute database` provides high resolution (default: every 10 minutes),
+ * but only covers approximately 1.5 days. This gives a detailed view of recent
+ * activity, useful, for example, when performing a scrub of the last hour.
+ * The `daily database` records one txg per day. With 256 entries, it retains
+ * roughly 8 months of data. This allows users to scrub or analyze txgs across
+ * a range of days.
+ * The `monthly database` stores one record per month, giving approximately
+ * 21 years of history.
+ * All these calculations assume the worst-case scenario: the pool is always
+ * online and actively written to.
+ *
+ * A potential source of confusion is that the database does not store data
+ * while the pool is offline, leading to potential gaps in timeline. Also,
+ * the database contains no records from before this feature was enabled.
+ * Both, upon reflection, are expected.
+ */
+#include <sys/zfs_context.h>
+
+#include "zfs_crrd.h"
+
+rrd_data_t *
+rrd_tail_entry(rrd_t *rrd)
+{
+ size_t n;
+
+ if (rrd_len(rrd) == 0)
+ return (NULL);
+
+ if (rrd->rrd_tail == 0)
+ n = RRD_MAX_ENTRIES - 1;
+ else
+ n = rrd->rrd_tail - 1;
+
+ return (&rrd->rrd_entries[n]);
+}
+
+uint64_t
+rrd_tail(rrd_t *rrd)
+{
+ const rrd_data_t *tail;
+
+ tail = rrd_tail_entry(rrd);
+
+ return (tail == NULL ? 0 : tail->rrdd_time);
+}
+
+/*
+ * Return length of data in the rrd.
+ * rrd_get works from 0..rrd_len()-1.
+ */
+size_t
+rrd_len(rrd_t *rrd)
+{
+
+ return (rrd->rrd_length);
+}
+
+const rrd_data_t *
+rrd_entry(rrd_t *rrd, size_t i)
+{
+ size_t n;
+
+ if (i >= rrd_len(rrd)) {
+ return (0);
+ }
+
+ n = (rrd->rrd_head + i) % RRD_MAX_ENTRIES;
+ return (&rrd->rrd_entries[n]);
+}
+
+uint64_t
+rrd_get(rrd_t *rrd, size_t i)
+{
+ const rrd_data_t *data = rrd_entry(rrd, i);
+
+ return (data == NULL ? 0 : data->rrdd_txg);
+}
+
+/* Add value to database. */
+void
+rrd_add(rrd_t *rrd, hrtime_t time, uint64_t txg)
+{
+ rrd_data_t *tail;
+
+ tail = rrd_tail_entry(rrd);
+ if (tail != NULL && tail->rrdd_time == time) {
+ if (tail->rrdd_txg < txg) {
+ tail->rrdd_txg = txg;
+ } else {
+ return;
+ }
+ }
+
+ rrd->rrd_entries[rrd->rrd_tail].rrdd_time = time;
+ rrd->rrd_entries[rrd->rrd_tail].rrdd_txg = txg;
+
+ rrd->rrd_tail = (rrd->rrd_tail + 1) % RRD_MAX_ENTRIES;
+
+ if (rrd->rrd_length < RRD_MAX_ENTRIES) {
+ rrd->rrd_length++;
+ } else {
+ rrd->rrd_head = (rrd->rrd_head + 1) % RRD_MAX_ENTRIES;
+ }
+}
+
+void
+dbrrd_add(dbrrd_t *db, hrtime_t time, uint64_t txg)
+{
+ hrtime_t daydiff, monthdiff, minutedif;
+
+ minutedif = time - rrd_tail(&db->dbr_minutes);
+ daydiff = time - rrd_tail(&db->dbr_days);
+ monthdiff = time - rrd_tail(&db->dbr_months);
+
+ if (monthdiff >= 0 && monthdiff >= SEC2NSEC(30 * 24 * 60 * 60))
+ rrd_add(&db->dbr_months, time, txg);
+ else if (daydiff >= 0 && daydiff >= SEC2NSEC(24 * 60 * 60))
+ rrd_add(&db->dbr_days, time, txg);
+ else if (minutedif >= 0)
+ rrd_add(&db->dbr_minutes, time, txg);
+}
+
+/*
+ * We could do a binary search here, but the routine isn't frequently
+ * called and the data is small so we stick to a simple loop.
+ */
+static const rrd_data_t *
+rrd_query(rrd_t *rrd, hrtime_t tv, dbrrd_rounding_t rounding)
+{
+ const rrd_data_t *data = NULL;
+
+ for (size_t i = 0; i < rrd_len(rrd); i++) {
+ const rrd_data_t *cur = rrd_entry(rrd, i);
+
+ if (rounding == DBRRD_FLOOR) {
+ if (tv < cur->rrdd_time) {
+ break;
+ }
+ data = cur;
+ } else {
+ /* DBRRD_CEILING */
+ if (tv <= cur->rrdd_time) {
+ data = cur;
+ break;
+ }
+ }
+ }
+
+ return (data);
+}
+
+static const rrd_data_t *
+dbrrd_closest(hrtime_t tv, const rrd_data_t *r1, const rrd_data_t *r2)
+{
+
+ if (r1 == NULL)
+ return (r2);
+ if (r2 == NULL)
+ return (r1);
+
+ return (ABS(tv - r1->rrdd_time) < ABS(tv - r2->rrdd_time) ? r1 : r2);
+}
+
+uint64_t
+dbrrd_query(dbrrd_t *r, hrtime_t tv, dbrrd_rounding_t rounding)
+{
+ const rrd_data_t *data, *dm, *dd, *dy;
+
+ data = NULL;
+ dm = rrd_query(&r->dbr_minutes, tv, rounding);
+ dd = rrd_query(&r->dbr_days, tv, rounding);
+ dy = rrd_query(&r->dbr_months, tv, rounding);
+
+ data = dbrrd_closest(tv, dbrrd_closest(tv, dd, dm), dy);
+
+ return (data == NULL ? 0 : data->rrdd_txg);
+}
diff --git a/sys/contrib/openzfs/module/zfs/zfs_ioctl.c b/sys/contrib/openzfs/module/zfs/zfs_ioctl.c
index ebb1cfd07125..dcb71229f96a 100644
--- a/sys/contrib/openzfs/module/zfs/zfs_ioctl.c
+++ b/sys/contrib/openzfs/module/zfs/zfs_ioctl.c
@@ -1704,6 +1704,8 @@ zfs_ioc_pool_scan(zfs_cmd_t *zc)
static const zfs_ioc_key_t zfs_keys_pool_scrub[] = {
{"scan_type", DATA_TYPE_UINT64, 0},
{"scan_command", DATA_TYPE_UINT64, 0},
+ {"scan_date_start", DATA_TYPE_UINT64, ZK_OPTIONAL},
+ {"scan_date_end", DATA_TYPE_UINT64, ZK_OPTIONAL},
};
static int
@@ -1712,6 +1714,7 @@ zfs_ioc_pool_scrub(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
spa_t *spa;
int error;
uint64_t scan_type, scan_cmd;
+ uint64_t date_start, date_end;
if (nvlist_lookup_uint64(innvl, "scan_type", &scan_type) != 0)
return (SET_ERROR(EINVAL));
@@ -1721,6 +1724,11 @@ zfs_ioc_pool_scrub(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
if (scan_cmd >= POOL_SCRUB_FLAGS_END)
return (SET_ERROR(EINVAL));
+ if (nvlist_lookup_uint64(innvl, "scan_date_start", &date_start) != 0)
+ date_start = 0;
+ if (nvlist_lookup_uint64(innvl, "scan_date_end", &date_end) != 0)
+ date_end = 0;
+
if ((error = spa_open(poolname, &spa, FTAG)) != 0)
return (error);
@@ -1732,7 +1740,24 @@ zfs_ioc_pool_scrub(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
error = spa_scan_range(spa, scan_type,
spa_get_last_scrubbed_txg(spa), 0);
} else {
- error = spa_scan(spa, scan_type);
+ uint64_t txg_start, txg_end;
+
+ txg_start = txg_end = 0;
+ if (date_start != 0 || date_end != 0) {
+ mutex_enter(&spa->spa_txg_log_time_lock);
+ if (date_start != 0) {
+ txg_start = dbrrd_query(&spa->spa_txg_log_time,
+ date_start, DBRRD_FLOOR);
+ }
+
+ if (date_end != 0) {
+ txg_end = dbrrd_query(&spa->spa_txg_log_time,
+ date_end, DBRRD_CEILING);
+ }
+ mutex_exit(&spa->spa_txg_log_time_lock);
+ }
+
+ error = spa_scan_range(spa, scan_type, txg_start, txg_end);
}
spa_close(spa, FTAG);
@@ -5000,15 +5025,6 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
}
break;
- case ZFS_PROP_SPECIAL_SMALL_BLOCKS:
- /*
- * This property could require the allocation classes
- * feature to be active for setting, however we allow
- * it so that tests of settable properties succeed.
- * The CLI will issue a warning in this case.
- */
- break;
-
case ZFS_PROP_SHARESMB:
if (zpl_earlier_version(dsname, ZPL_VERSION_FUID))
return (SET_ERROR(ENOTSUP));
diff --git a/sys/contrib/openzfs/module/zfs/zfs_log.c b/sys/contrib/openzfs/module/zfs/zfs_log.c
index 2ce25b72b288..2f61ecfd9b3b 100644
--- a/sys/contrib/openzfs/module/zfs/zfs_log.c
+++ b/sys/contrib/openzfs/module/zfs/zfs_log.c
@@ -607,8 +607,6 @@ zfs_log_rename_whiteout(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
* called as soon as the write is on stable storage (be it via a DMU sync or a
* ZIL commit).
*/
-static uint_t zfs_immediate_write_sz = 32768;
-
void
zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
znode_t *zp, offset_t off, ssize_t resid, boolean_t commit,
@@ -626,15 +624,8 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
return;
}
- if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT || o_direct)
- write_state = WR_INDIRECT;
- else if (!spa_has_slogs(zilog->zl_spa) &&
- resid >= zfs_immediate_write_sz)
- write_state = WR_INDIRECT;
- else if (commit)
- write_state = WR_COPIED;
- else
- write_state = WR_NEED_COPY;
+ write_state = zil_write_state(zilog, resid, blocksize, o_direct,
+ commit);
(void) sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(ZTOZSB(zp)), &gen,
sizeof (gen));
@@ -938,6 +929,3 @@ zfs_log_clone_range(zilog_t *zilog, dmu_tx_t *tx, int txtype, znode_t *zp,
len -= partlen;
}
}
-
-ZFS_MODULE_PARAM(zfs, zfs_, immediate_write_sz, UINT, ZMOD_RW,
- "Largest data block to write to zil");
diff --git a/sys/contrib/openzfs/module/zfs/zfs_vnops.c b/sys/contrib/openzfs/module/zfs/zfs_vnops.c
index 656ca4dc22ff..74aa91a4f2eb 100644
--- a/sys/contrib/openzfs/module/zfs/zfs_vnops.c
+++ b/sys/contrib/openzfs/module/zfs/zfs_vnops.c
@@ -49,6 +49,7 @@
#include <sys/dmu.h>
#include <sys/dmu_objset.h>
#include <sys/dsl_crypt.h>
+#include <sys/dsl_dataset.h>
#include <sys/spa.h>
#include <sys/txg.h>
#include <sys/dbuf.h>
@@ -67,13 +68,14 @@
int zfs_bclone_enabled = 1;
/*
- * When set zfs_clone_range() waits for dirty data to be written to disk.
- * This allows the clone operation to reliably succeed when a file is modified
- * and then immediately cloned. For small files this may be slower than making
- * a copy of the file and is therefore not the default. However, in certain
- * scenarios this behavior may be desirable so a tunable is provided.
+ * When set to 1 the FICLONE and FICLONERANGE ioctls will wait for any dirty
+ * data to be written to disk before proceeding. This ensures that the clone
+ * operation reliably succeeds, even if a file is modified and then immediately
+ * cloned. Note that for small files this may be slower than simply copying
+ * the file. When set to 0 the clone operation will immediately fail if it
+ * encounters any dirty blocks. By default waiting is enabled.
*/
-int zfs_bclone_wait_dirty = 0;
+int zfs_bclone_wait_dirty = 1;
/*
* Enable Direct I/O. If this setting is 0, then all I/O requests will be
@@ -114,9 +116,7 @@ zfs_fsync(znode_t *zp, int syncflag, cred_t *cr)
if (zfsvfs->z_os->os_sync != ZFS_SYNC_DISABLED) {
if ((error = zfs_enter_verify_zp(zfsvfs, zp, FTAG)) != 0)
return (error);
- atomic_inc_32(&zp->z_sync_writes_cnt);
zil_commit(zfsvfs->z_log, zp->z_id);
- atomic_dec_32(&zp->z_sync_writes_cnt);
zfs_exit(zfsvfs, FTAG);
}
return (error);
@@ -1102,13 +1102,21 @@ zfs_rewrite(znode_t *zp, uint64_t off, uint64_t len, uint64_t flags,
{
int error;
- if (flags != 0 || arg != 0)
+ if ((flags & ~ZFS_REWRITE_PHYSICAL) != 0 || arg != 0)
return (SET_ERROR(EINVAL));
zfsvfs_t *zfsvfs = ZTOZSB(zp);
if ((error = zfs_enter_verify_zp(zfsvfs, zp, FTAG)) != 0)
return (error);
+ /* Check if physical rewrite is allowed */
+ spa_t *spa = zfsvfs->z_os->os_spa;
+ if ((flags & ZFS_REWRITE_PHYSICAL) &&
+ !spa_feature_is_enabled(spa, SPA_FEATURE_PHYSICAL_REWRITE)) {
+ zfs_exit(zfsvfs, FTAG);
+ return (SET_ERROR(ENOTSUP));
+ }
+
if (zfs_is_readonly(zfsvfs)) {
zfs_exit(zfsvfs, FTAG);
return (SET_ERROR(EROFS));
@@ -1196,7 +1204,10 @@ zfs_rewrite(znode_t *zp, uint64_t off, uint64_t len, uint64_t flags,
if (dmu_buf_is_dirty(dbp[i], tx))
continue;
nw += dbp[i]->db_size;
- dmu_buf_will_dirty(dbp[i], tx);
+ if (flags & ZFS_REWRITE_PHYSICAL)
+ dmu_buf_will_rewrite(dbp[i], tx);
+ else
+ dmu_buf_will_dirty(dbp[i], tx);
}
dmu_buf_rele_array(dbp, numbufs, FTAG);
diff --git a/sys/contrib/openzfs/module/zfs/zil.c b/sys/contrib/openzfs/module/zfs/zil.c
index 00059b2c6de0..6e4f84257407 100644
--- a/sys/contrib/openzfs/module/zfs/zil.c
+++ b/sys/contrib/openzfs/module/zfs/zil.c
@@ -589,7 +589,7 @@ zil_clear_log_block(zilog_t *zilog, const blkptr_t *bp, void *tx,
* that we rewind to is invalid. Thus, we return -1 so
* zil_parse() doesn't attempt to read it.
*/
- if (BP_GET_LOGICAL_BIRTH(bp) >= first_txg)
+ if (BP_GET_BIRTH(bp) >= first_txg)
return (-1);
if (zil_bp_tree_add(zilog, bp) != 0)
@@ -615,7 +615,7 @@ zil_claim_log_block(zilog_t *zilog, const blkptr_t *bp, void *tx,
* Claim log block if not already committed and not already claimed.
* If tx == NULL, just verify that the block is claimable.
*/
- if (BP_IS_HOLE(bp) || BP_GET_LOGICAL_BIRTH(bp) < first_txg ||
+ if (BP_IS_HOLE(bp) || BP_GET_BIRTH(bp) < first_txg ||
zil_bp_tree_add(zilog, bp) != 0)
return (0);
@@ -640,7 +640,7 @@ zil_claim_write(zilog_t *zilog, const lr_t *lrc, void *tx, uint64_t first_txg)
* waited for all writes to be stable first), so it is semantically
* correct to declare this the end of the log.
*/
- if (BP_GET_LOGICAL_BIRTH(&lr->lr_blkptr) >= first_txg) {
+ if (BP_GET_BIRTH(&lr->lr_blkptr) >= first_txg) {
error = zil_read_log_data(zilog, lr, NULL);
if (error != 0)
return (error);
@@ -687,7 +687,7 @@ zil_claim_clone_range(zilog_t *zilog, const lr_t *lrc, void *tx,
* just in case lets be safe and just stop here now instead of
* corrupting the pool.
*/
- if (BP_GET_BIRTH(bp) >= first_txg)
+ if (BP_GET_PHYSICAL_BIRTH(bp) >= first_txg)
return (SET_ERROR(ENOENT));
/*
@@ -742,7 +742,7 @@ zil_free_write(zilog_t *zilog, const lr_t *lrc, void *tx, uint64_t claim_txg)
/*
* If we previously claimed it, we need to free it.
*/
- if (BP_GET_LOGICAL_BIRTH(bp) >= claim_txg &&
+ if (BP_GET_BIRTH(bp) >= claim_txg &&
zil_bp_tree_add(zilog, bp) == 0 && !BP_IS_HOLE(bp)) {
zio_free(zilog->zl_spa, dmu_tx_get_txg(tx), bp);
}
@@ -1997,7 +1997,7 @@ next_lwb:
&slog);
}
if (error == 0) {
- ASSERT3U(BP_GET_LOGICAL_BIRTH(bp), ==, txg);
+ ASSERT3U(BP_GET_BIRTH(bp), ==, txg);
BP_SET_CHECKSUM(bp, nlwb->lwb_slim ? ZIO_CHECKSUM_ZILOG2 :
ZIO_CHECKSUM_ZILOG);
bp->blk_cksum = lwb->lwb_blk.blk_cksum;
@@ -2095,6 +2095,19 @@ zil_max_waste_space(zilog_t *zilog)
*/
static uint_t zil_maxcopied = 7680;
+/*
+ * Largest write size to store the data directly into ZIL.
+ */
+uint_t zfs_immediate_write_sz = 32768;
+
+/*
+ * When enabled and blocks go to normal vdev, treat special vdevs as SLOG,
+ * writing data to ZIL (WR_COPIED/WR_NEED_COPY). Disabling this forces the
+ * indirect writes (WR_INDIRECT) to preserve special vdev throughput and
+ * endurance, likely at the cost of normal vdev latency.
+ */
+int zil_special_is_slog = 1;
+
uint64_t
zil_max_copied_data(zilog_t *zilog)
{
@@ -2102,6 +2115,46 @@ zil_max_copied_data(zilog_t *zilog)
return (MIN(max_data, zil_maxcopied));
}
+/*
+ * Determine the appropriate write state for ZIL transactions based on
+ * pool configuration, data placement, write size, and logbias settings.
+ */
+itx_wr_state_t
+zil_write_state(zilog_t *zilog, uint64_t size, uint32_t blocksize,
+ boolean_t o_direct, boolean_t commit)
+{
+ if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT || o_direct)
+ return (WR_INDIRECT);
+
+ /*
+ * Don't use indirect for too small writes to reduce overhead.
+ * Don't use indirect if written less than a half of a block if
+ * we are going to commit it immediately, since next write might
+ * rewrite the same block again, causing inflation. If commit
+ * is not planned, then next writes might coalesce, and so the
+ * indirect may be perfect.
+ */
+ boolean_t indirect = (size >= zfs_immediate_write_sz &&
+ (size >= blocksize / 2 || !commit));
+
+ if (spa_has_slogs(zilog->zl_spa)) {
+ /* Dedicated slogs: never use indirect */
+ indirect = B_FALSE;
+ } else if (spa_has_special(zilog->zl_spa)) {
+ /* Special vdevs: only when beneficial */
+ boolean_t on_special = (blocksize <=
+ zilog->zl_os->os_zpl_special_smallblock);
+ indirect &= (on_special || !zil_special_is_slog);
+ }
+
+ if (indirect)
+ return (WR_INDIRECT);
+ else if (commit)
+ return (WR_COPIED);
+ else
+ return (WR_NEED_COPY);
+}
+
static uint64_t
zil_itx_record_size(itx_t *itx)
{
@@ -2902,19 +2955,14 @@ zil_process_commit_list(zilog_t *zilog, zil_commit_waiter_t *zcw, list_t *ilwbs)
ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock));
- /*
- * Return if there's nothing to commit before we dirty the fs by
- * calling zil_create().
- */
- if (list_is_empty(&zilog->zl_itx_commit_list))
- return;
-
- list_create(&nolwb_itxs, sizeof (itx_t), offsetof(itx_t, itx_node));
- list_create(&nolwb_waiters, sizeof (zil_commit_waiter_t),
- offsetof(zil_commit_waiter_t, zcw_node));
-
lwb = list_tail(&zilog->zl_lwb_list);
if (lwb == NULL) {
+ /*
+ * Return if there's nothing to commit before we dirty the fs.
+ */
+ if (list_is_empty(&zilog->zl_itx_commit_list))
+ return;
+
lwb = zil_create(zilog);
} else {
/*
@@ -2942,6 +2990,10 @@ zil_process_commit_list(zilog_t *zilog, zil_commit_waiter_t *zcw, list_t *ilwbs)
}
}
+ list_create(&nolwb_itxs, sizeof (itx_t), offsetof(itx_t, itx_node));
+ list_create(&nolwb_waiters, sizeof (zil_commit_waiter_t),
+ offsetof(zil_commit_waiter_t, zcw_node));
+
while ((itx = list_remove_head(&zilog->zl_itx_commit_list)) != NULL) {
lr_t *lrc = &itx->itx_lr;
uint64_t txg = lrc->lrc_txg;
@@ -3111,7 +3163,8 @@ zil_process_commit_list(zilog_t *zilog, zil_commit_waiter_t *zcw, list_t *ilwbs)
* possible, without significantly impacting the latency
* of each individual itx.
*/
- if (lwb->lwb_state == LWB_STATE_OPENED && !zilog->zl_parallel) {
+ if (lwb->lwb_state == LWB_STATE_OPENED &&
+ (!zilog->zl_parallel || zilog->zl_suspend > 0)) {
zil_burst_done(zilog);
list_insert_tail(ilwbs, lwb);
lwb = zil_lwb_write_close(zilog, lwb, LWB_STATE_NEW);
@@ -4418,3 +4471,9 @@ ZFS_MODULE_PARAM(zfs_zil, zil_, maxblocksize, UINT, ZMOD_RW,
ZFS_MODULE_PARAM(zfs_zil, zil_, maxcopied, UINT, ZMOD_RW,
"Limit in bytes WR_COPIED size");
+
+ZFS_MODULE_PARAM(zfs, zfs_, immediate_write_sz, UINT, ZMOD_RW,
+ "Largest write size to store data into ZIL");
+
+ZFS_MODULE_PARAM(zfs_zil, zil_, special_is_slog, INT, ZMOD_RW,
+ "Treat special vdevs as SLOG");
diff --git a/sys/contrib/openzfs/module/zfs/zio.c b/sys/contrib/openzfs/module/zfs/zio.c
index 6d7bce8b0e10..218aec6093e2 100644
--- a/sys/contrib/openzfs/module/zfs/zio.c
+++ b/sys/contrib/openzfs/module/zfs/zio.c
@@ -692,7 +692,7 @@ error:
zio->io_error = SET_ERROR(EIO);
if ((zio->io_flags & ZIO_FLAG_SPECULATIVE) == 0) {
spa_log_error(spa, &zio->io_bookmark,
- BP_GET_LOGICAL_BIRTH(zio->io_bp));
+ BP_GET_PHYSICAL_BIRTH(zio->io_bp));
(void) zfs_ereport_post(FM_EREPORT_ZFS_AUTHENTICATION,
spa, NULL, &zio->io_bookmark, zio, 0);
}
@@ -850,15 +850,9 @@ zio_notify_parent(zio_t *pio, zio_t *zio, enum zio_wait_type wait,
mutex_enter(&pio->io_lock);
if (zio->io_error && !(zio->io_flags & ZIO_FLAG_DONT_PROPAGATE))
*errorp = zio_worst_error(*errorp, zio->io_error);
- pio->io_reexecute |= zio->io_reexecute;
+ pio->io_post |= zio->io_post;
ASSERT3U(*countp, >, 0);
- /*
- * Propogate the Direct I/O checksum verify failure to the parent.
- */
- if (zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR)
- pio->io_flags |= ZIO_FLAG_DIO_CHKSUM_ERR;
-
(*countp)--;
if (*countp == 0 && pio->io_stall == countp) {
@@ -1110,7 +1104,8 @@ zfs_blkptr_verify_log(spa_t *spa, const blkptr_t *bp,
"DVA[1]=%#llx/%#llx "
"DVA[2]=%#llx/%#llx "
"prop=%#llx "
- "pad=%#llx,%#llx "
+ "prop2=%#llx "
+ "pad=%#llx "
"phys_birth=%#llx "
"birth=%#llx "
"fill=%#llx "
@@ -1123,9 +1118,9 @@ zfs_blkptr_verify_log(spa_t *spa, const blkptr_t *bp,
(long long)bp->blk_dva[2].dva_word[0],
(long long)bp->blk_dva[2].dva_word[1],
(long long)bp->blk_prop,
- (long long)bp->blk_pad[0],
- (long long)bp->blk_pad[1],
- (long long)BP_GET_PHYSICAL_BIRTH(bp),
+ (long long)bp->blk_prop2,
+ (long long)bp->blk_pad,
+ (long long)BP_GET_RAW_PHYSICAL_BIRTH(bp),
(long long)BP_GET_LOGICAL_BIRTH(bp),
(long long)bp->blk_fill,
(long long)bp->blk_cksum.zc_word[0],
@@ -1340,7 +1335,7 @@ zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
{
zio_t *zio;
- zio = zio_create(pio, spa, BP_GET_BIRTH(bp), bp,
+ zio = zio_create(pio, spa, BP_GET_PHYSICAL_BIRTH(bp), bp,
data, size, size, done, private,
ZIO_TYPE_READ, priority, flags, NULL, 0, zb,
ZIO_STAGE_OPEN, (flags & ZIO_FLAG_DDT_CHILD) ?
@@ -1649,7 +1644,7 @@ zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset,
* through the mirror during self healing. See comment in
* vdev_mirror_io_done() for more details.
*/
- ASSERT0(pio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR);
+ ASSERT0(pio->io_post & ZIO_POST_DIO_CHKSUM_ERR);
} else if (type == ZIO_TYPE_WRITE &&
pio->io_prop.zp_direct_write == B_TRUE) {
/*
@@ -1685,7 +1680,7 @@ zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset,
* If this is a retried I/O then we ignore it since we will
* have already processed the original allocating I/O.
*/
- if (flags & ZIO_FLAG_IO_ALLOCATING &&
+ if (flags & ZIO_FLAG_ALLOC_THROTTLED &&
(vd != vd->vdev_top || (flags & ZIO_FLAG_IO_RETRY))) {
ASSERT(pio->io_metaslab_class != NULL);
ASSERT(pio->io_metaslab_class->mc_alloc_throttle_enabled);
@@ -1695,7 +1690,7 @@ zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset,
ASSERT(!(pio->io_flags & ZIO_FLAG_IO_REWRITE) ||
pio->io_child_type == ZIO_CHILD_GANG);
- flags &= ~ZIO_FLAG_IO_ALLOCATING;
+ flags &= ~ZIO_FLAG_ALLOC_THROTTLED;
}
zio = zio_create(pio, pio->io_spa, pio->io_txg, bp, data, size, size,
@@ -1860,7 +1855,7 @@ zio_write_bp_init(zio_t *zio)
blkptr_t *bp = zio->io_bp;
zio_prop_t *zp = &zio->io_prop;
- ASSERT(BP_GET_LOGICAL_BIRTH(bp) != zio->io_txg);
+ ASSERT(BP_GET_BIRTH(bp) != zio->io_txg);
*bp = *zio->io_bp_override;
zio->io_pipeline = ZIO_INTERLOCK_PIPELINE;
@@ -1948,7 +1943,7 @@ zio_write_compress(zio_t *zio)
ASSERT(zio->io_child_type != ZIO_CHILD_DDT);
ASSERT(zio->io_bp_override == NULL);
- if (!BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) == zio->io_txg) {
+ if (!BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) == zio->io_txg) {
/*
* We're rewriting an existing block, which means we're
* working on behalf of spa_sync(). For spa_sync() to
@@ -2085,7 +2080,7 @@ zio_write_compress(zio_t *zio)
* spa_sync() to allocate new blocks, but force rewrites after that.
* There should only be a handful of blocks after pass 1 in any case.
*/
- if (!BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) == zio->io_txg &&
+ if (!BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) == zio->io_txg &&
BP_GET_PSIZE(bp) == psize &&
pass >= zfs_sync_pass_rewrite) {
VERIFY3U(psize, !=, 0);
@@ -2602,7 +2597,7 @@ zio_reexecute(void *arg)
pio->io_flags = pio->io_orig_flags;
pio->io_stage = pio->io_orig_stage;
pio->io_pipeline = pio->io_orig_pipeline;
- pio->io_reexecute = 0;
+ pio->io_post = 0;
pio->io_flags |= ZIO_FLAG_REEXECUTED;
pio->io_pipeline_trace = 0;
pio->io_error = 0;
@@ -2749,11 +2744,14 @@ zio_resume_wait(spa_t *spa)
* being nearly full, it calls zio_write_gang_block() to construct the
* block from smaller fragments.
*
- * A gang block consists of a gang header (zio_gbh_phys_t) and up to
- * three (SPA_GBH_NBLKPTRS) gang members. The gang header is just like
- * an indirect block: it's an array of block pointers. It consumes
- * only one sector and hence is allocatable regardless of fragmentation.
- * The gang header's bps point to its gang members, which hold the data.
+ * A gang block consists of a a gang header and up to gbh_nblkptrs(size)
+ * gang members. The gang header is like an indirect block: it's an array
+ * of block pointers, though the header has a small tail (a zio_eck_t)
+ * that stores an embedded checksum. It is allocated using only a single
+ * sector as the requested size, and hence is allocatable regardless of
+ * fragmentation. Its size is determined by the smallest allocatable
+ * asize of the vdevs it was allocated on. The gang header's bps point
+ * to its gang members, which hold the data.
*
* Gang blocks are self-checksumming, using the bp's <vdev, offset, txg>
* as the verifier to ensure uniqueness of the SHA256 checksum.
@@ -2832,10 +2830,10 @@ zio_rewrite_gang(zio_t *pio, blkptr_t *bp, zio_gang_node_t *gn, abd_t *data,
if (gn != NULL) {
abd_t *gbh_abd =
- abd_get_from_buf(gn->gn_gbh, SPA_GANGBLOCKSIZE);
+ abd_get_from_buf(gn->gn_gbh, gn->gn_gangblocksize);
zio = zio_rewrite(pio, pio->io_spa, pio->io_txg, bp,
- gbh_abd, SPA_GANGBLOCKSIZE, zio_gang_issue_func_done, NULL,
- pio->io_priority, ZIO_GANG_CHILD_FLAGS(pio),
+ gbh_abd, gn->gn_gangblocksize, zio_gang_issue_func_done,
+ NULL, pio->io_priority, ZIO_GANG_CHILD_FLAGS(pio),
&pio->io_bookmark);
/*
* As we rewrite each gang header, the pipeline will compute
@@ -2906,14 +2904,16 @@ static zio_gang_issue_func_t *zio_gang_issue_func[ZIO_TYPES] = {
static void zio_gang_tree_assemble_done(zio_t *zio);
static zio_gang_node_t *
-zio_gang_node_alloc(zio_gang_node_t **gnpp)
+zio_gang_node_alloc(zio_gang_node_t **gnpp, uint64_t gangblocksize)
{
zio_gang_node_t *gn;
ASSERT(*gnpp == NULL);
- gn = kmem_zalloc(sizeof (*gn), KM_SLEEP);
- gn->gn_gbh = zio_buf_alloc(SPA_GANGBLOCKSIZE);
+ gn = kmem_zalloc(sizeof (*gn) +
+ (gbh_nblkptrs(gangblocksize) * sizeof (gn)), KM_SLEEP);
+ gn->gn_gangblocksize = gn->gn_allocsize = gangblocksize;
+ gn->gn_gbh = zio_buf_alloc(gangblocksize);
*gnpp = gn;
return (gn);
@@ -2924,11 +2924,12 @@ zio_gang_node_free(zio_gang_node_t **gnpp)
{
zio_gang_node_t *gn = *gnpp;
- for (int g = 0; g < SPA_GBH_NBLKPTRS; g++)
+ for (int g = 0; g < gbh_nblkptrs(gn->gn_allocsize); g++)
ASSERT(gn->gn_child[g] == NULL);
- zio_buf_free(gn->gn_gbh, SPA_GANGBLOCKSIZE);
- kmem_free(gn, sizeof (*gn));
+ zio_buf_free(gn->gn_gbh, gn->gn_allocsize);
+ kmem_free(gn, sizeof (*gn) +
+ (gbh_nblkptrs(gn->gn_allocsize) * sizeof (gn)));
*gnpp = NULL;
}
@@ -2940,7 +2941,7 @@ zio_gang_tree_free(zio_gang_node_t **gnpp)
if (gn == NULL)
return;
- for (int g = 0; g < SPA_GBH_NBLKPTRS; g++)
+ for (int g = 0; g < gbh_nblkptrs(gn->gn_allocsize); g++)
zio_gang_tree_free(&gn->gn_child[g]);
zio_gang_node_free(gnpp);
@@ -2949,13 +2950,28 @@ zio_gang_tree_free(zio_gang_node_t **gnpp)
static void
zio_gang_tree_assemble(zio_t *gio, blkptr_t *bp, zio_gang_node_t **gnpp)
{
- zio_gang_node_t *gn = zio_gang_node_alloc(gnpp);
- abd_t *gbh_abd = abd_get_from_buf(gn->gn_gbh, SPA_GANGBLOCKSIZE);
+ uint64_t gangblocksize = UINT64_MAX;
+ if (spa_feature_is_active(gio->io_spa,
+ SPA_FEATURE_DYNAMIC_GANG_HEADER)) {
+ spa_config_enter(gio->io_spa, SCL_VDEV, FTAG, RW_READER);
+ for (int dva = 0; dva < BP_GET_NDVAS(bp); dva++) {
+ vdev_t *vd = vdev_lookup_top(gio->io_spa,
+ DVA_GET_VDEV(&bp->blk_dva[dva]));
+ uint64_t psize = vdev_gang_header_psize(vd);
+ gangblocksize = MIN(gangblocksize, psize);
+ }
+ spa_config_exit(gio->io_spa, SCL_VDEV, FTAG);
+ } else {
+ gangblocksize = SPA_OLD_GANGBLOCKSIZE;
+ }
+ ASSERT3U(gangblocksize, !=, UINT64_MAX);
+ zio_gang_node_t *gn = zio_gang_node_alloc(gnpp, gangblocksize);
+ abd_t *gbh_abd = abd_get_from_buf(gn->gn_gbh, gangblocksize);
ASSERT(gio->io_gang_leader == gio);
ASSERT(BP_IS_GANG(bp));
- zio_nowait(zio_read(gio, gio->io_spa, bp, gbh_abd, SPA_GANGBLOCKSIZE,
+ zio_nowait(zio_read(gio, gio->io_spa, bp, gbh_abd, gangblocksize,
zio_gang_tree_assemble_done, gn, gio->io_priority,
ZIO_GANG_CHILD_FLAGS(gio), &gio->io_bookmark));
}
@@ -2978,13 +2994,17 @@ zio_gang_tree_assemble_done(zio_t *zio)
byteswap_uint64_array(abd_to_buf(zio->io_abd), zio->io_size);
ASSERT3P(abd_to_buf(zio->io_abd), ==, gn->gn_gbh);
- ASSERT(zio->io_size == SPA_GANGBLOCKSIZE);
- ASSERT(gn->gn_gbh->zg_tail.zec_magic == ZEC_MAGIC);
+ /*
+ * If this was an old-style gangblock, the gangblocksize should have
+ * been updated in zio_checksum_error to reflect that.
+ */
+ ASSERT3U(gbh_eck(gn->gn_gbh, gn->gn_gangblocksize)->zec_magic,
+ ==, ZEC_MAGIC);
abd_free(zio->io_abd);
- for (int g = 0; g < SPA_GBH_NBLKPTRS; g++) {
- blkptr_t *gbp = &gn->gn_gbh->zg_blkptr[g];
+ for (int g = 0; g < gbh_nblkptrs(gn->gn_gangblocksize); g++) {
+ blkptr_t *gbp = gbh_bp(gn->gn_gbh, g);
if (!BP_IS_GANG(gbp))
continue;
zio_gang_tree_assemble(gio, gbp, &gn->gn_child[g]);
@@ -3009,10 +3029,11 @@ zio_gang_tree_issue(zio_t *pio, zio_gang_node_t *gn, blkptr_t *bp, abd_t *data,
zio = zio_gang_issue_func[gio->io_type](pio, bp, gn, data, offset);
if (gn != NULL) {
- ASSERT(gn->gn_gbh->zg_tail.zec_magic == ZEC_MAGIC);
+ ASSERT3U(gbh_eck(gn->gn_gbh,
+ gn->gn_gangblocksize)->zec_magic, ==, ZEC_MAGIC);
- for (int g = 0; g < SPA_GBH_NBLKPTRS; g++) {
- blkptr_t *gbp = &gn->gn_gbh->zg_blkptr[g];
+ for (int g = 0; g < gbh_nblkptrs(gn->gn_gangblocksize); g++) {
+ blkptr_t *gbp = gbh_bp(gn->gn_gbh, g);
if (BP_IS_HOLE(gbp))
continue;
zio_gang_tree_issue(zio, gn->gn_child[g], gbp, data,
@@ -3119,6 +3140,13 @@ zio_write_gang_done(zio_t *zio)
abd_free(zio->io_abd);
}
+static void
+zio_update_feature(void *arg, dmu_tx_t *tx)
+{
+ spa_t *spa = dmu_tx_pool(tx)->dp_spa;
+ spa_feature_incr(spa, (spa_feature_t)(uintptr_t)arg, tx);
+}
+
static zio_t *
zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
{
@@ -3157,20 +3185,24 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
ASSERT(ZIO_HAS_ALLOCATOR(pio));
int flags = METASLAB_GANG_HEADER;
- if (pio->io_flags & ZIO_FLAG_IO_ALLOCATING) {
+ if (pio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
ASSERT(pio->io_priority == ZIO_PRIORITY_ASYNC_WRITE);
ASSERT(has_data);
flags |= METASLAB_ASYNC_ALLOC;
}
- error = metaslab_alloc(spa, mc, SPA_GANGBLOCKSIZE,
+ uint64_t gangblocksize = SPA_OLD_GANGBLOCKSIZE;
+ uint64_t candidate = gangblocksize;
+ error = metaslab_alloc_range(spa, mc, gangblocksize, gangblocksize,
bp, gbh_copies, txg, pio == gio ? NULL : gio->io_bp, flags,
- &pio->io_alloc_list, pio->io_allocator, pio);
+ &pio->io_alloc_list, pio->io_allocator, pio, &candidate);
if (error) {
pio->io_error = error;
return (pio);
}
+ if (spa_feature_is_active(spa, SPA_FEATURE_DYNAMIC_GANG_HEADER))
+ gangblocksize = candidate;
if (pio == gio) {
gnpp = &gio->io_gang_tree;
@@ -3179,23 +3211,24 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
ASSERT(pio->io_ready == zio_write_gang_member_ready);
}
- gn = zio_gang_node_alloc(gnpp);
+ gn = zio_gang_node_alloc(gnpp, gangblocksize);
gbh = gn->gn_gbh;
- memset(gbh, 0, SPA_GANGBLOCKSIZE);
- gbh_abd = abd_get_from_buf(gbh, SPA_GANGBLOCKSIZE);
+ memset(gbh, 0, gangblocksize);
+ gbh_abd = abd_get_from_buf(gbh, gangblocksize);
/*
* Create the gang header.
*/
- zio = zio_rewrite(pio, spa, txg, bp, gbh_abd, SPA_GANGBLOCKSIZE,
+ zio = zio_rewrite(pio, spa, txg, bp, gbh_abd, gangblocksize,
zio_write_gang_done, NULL, pio->io_priority,
ZIO_GANG_CHILD_FLAGS(pio), &pio->io_bookmark);
zio_gang_inherit_allocator(pio, zio);
- if (pio->io_flags & ZIO_FLAG_IO_ALLOCATING) {
+ if (pio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
boolean_t more;
- VERIFY(metaslab_class_throttle_reserve(mc, gbh_copies,
- zio, B_TRUE, &more));
+ VERIFY(metaslab_class_throttle_reserve(mc, zio->io_allocator,
+ gbh_copies, zio->io_size, B_TRUE, &more));
+ zio->io_flags |= ZIO_FLAG_ALLOC_THROTTLED;
}
/*
@@ -3203,7 +3236,9 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
* opportunistic allocations. If that fails to generate enough
* space, we fall back to normal zio_write calls for nested gang.
*/
- for (int g = 0; resid != 0; g++) {
+ int g;
+ boolean_t any_failed = B_FALSE;
+ for (g = 0; resid != 0; g++) {
flags &= METASLAB_ASYNC_ALLOC;
flags |= METASLAB_GANG_CHILD;
zp.zp_checksum = gio->io_prop.zp_checksum;
@@ -3224,9 +3259,9 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
memset(zp.zp_mac, 0, ZIO_DATA_MAC_LEN);
uint64_t min_size = zio_roundup_alloc_size(spa,
- resid / (SPA_GBH_NBLKPTRS - g));
+ resid / (gbh_nblkptrs(gangblocksize) - g));
min_size = MIN(min_size, resid);
- bp = &gbh->zg_blkptr[g];
+ bp = &((blkptr_t *)gbh)[g];
zio_alloc_list_t cio_list;
metaslab_trace_init(&cio_list);
@@ -3236,6 +3271,7 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
flags, &cio_list, zio->io_allocator, NULL, &allocated_size);
boolean_t allocated = error == 0;
+ any_failed |= !allocated;
uint64_t psize = allocated ? MIN(resid, allocated_size) :
min_size;
@@ -3268,6 +3304,29 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
}
/*
+ * If we used more gang children than the old limit, we must already be
+ * using the new headers. No need to update anything, just move on.
+ *
+ * Otherwise, we might be in a case where we need to turn on the new
+ * feature, so we check that. We enable the new feature if we didn't
+ * manage to fit everything into 3 gang children and we could have
+ * written more than that.
+ */
+ if (g > gbh_nblkptrs(SPA_OLD_GANGBLOCKSIZE)) {
+ ASSERT(spa_feature_is_active(spa,
+ SPA_FEATURE_DYNAMIC_GANG_HEADER));
+ } else if (any_failed && candidate > SPA_OLD_GANGBLOCKSIZE &&
+ spa_feature_is_enabled(spa, SPA_FEATURE_DYNAMIC_GANG_HEADER) &&
+ !spa_feature_is_active(spa, SPA_FEATURE_DYNAMIC_GANG_HEADER)) {
+ dmu_tx_t *tx =
+ dmu_tx_create_assigned(spa->spa_dsl_pool, txg + 1);
+ dsl_sync_task_nowait(spa->spa_dsl_pool,
+ zio_update_feature,
+ (void *)SPA_FEATURE_DYNAMIC_GANG_HEADER, tx);
+ dmu_tx_commit(tx);
+ }
+
+ /*
* Set pio's pipeline to just wait for zio to finish.
*/
pio->io_pipeline = ZIO_INTERLOCK_PIPELINE;
@@ -3836,7 +3895,7 @@ zio_ddt_write(zio_t *zio)
* block and leave.
*/
if (have_dvas == 0) {
- ASSERT(BP_GET_LOGICAL_BIRTH(bp) == txg);
+ ASSERT(BP_GET_BIRTH(bp) == txg);
ASSERT(BP_EQUAL(bp, zio->io_bp_override));
ddt_phys_extend(ddp, v, bp);
ddt_phys_addref(ddp, v);
@@ -3864,6 +3923,23 @@ zio_ddt_write(zio_t *zio)
* then we can just use them as-is.
*/
if (have_dvas >= need_dvas) {
+ /*
+ * For rewrite operations, try preserving the original
+ * logical birth time. If the result matches the
+ * original BP, this becomes a NOP.
+ */
+ if (zp->zp_rewrite) {
+ uint64_t orig_logical_birth =
+ BP_GET_LOGICAL_BIRTH(&zio->io_bp_orig);
+ ddt_bp_fill(ddp, v, bp, orig_logical_birth);
+ if (BP_EQUAL(bp, &zio->io_bp_orig)) {
+ /* We can skip accounting. */
+ zio->io_flags |= ZIO_FLAG_NOPWRITE;
+ ddt_exit(ddt);
+ return (zio);
+ }
+ }
+
ddt_bp_fill(ddp, v, bp, txg);
ddt_phys_addref(ddp, v);
ddt_exit(ddt);
@@ -4078,9 +4154,11 @@ zio_io_to_allocate(metaslab_class_allocator_t *mca, boolean_t *more)
* reserve then we throttle.
*/
if (!metaslab_class_throttle_reserve(zio->io_metaslab_class,
- zio->io_prop.zp_copies, zio, B_FALSE, more)) {
+ zio->io_allocator, zio->io_prop.zp_copies, zio->io_size,
+ B_FALSE, more)) {
return (NULL);
}
+ zio->io_flags |= ZIO_FLAG_ALLOC_THROTTLED;
avl_remove(&mca->mca_tree, zio);
ASSERT3U(zio->io_stage, <, ZIO_STAGE_DVA_ALLOCATE);
@@ -4164,8 +4242,10 @@ zio_dva_allocate(zio_t *zio)
ASSERT3U(zio->io_child_type, ==, ZIO_CHILD_GANG);
memcpy(zio->io_bp->blk_dva, zio->io_bp_orig.blk_dva,
3 * sizeof (dva_t));
- BP_SET_BIRTH(zio->io_bp, BP_GET_LOGICAL_BIRTH(&zio->io_bp_orig),
- BP_GET_PHYSICAL_BIRTH(&zio->io_bp_orig));
+ BP_SET_LOGICAL_BIRTH(zio->io_bp,
+ BP_GET_LOGICAL_BIRTH(&zio->io_bp_orig));
+ BP_SET_PHYSICAL_BIRTH(zio->io_bp,
+ BP_GET_RAW_PHYSICAL_BIRTH(&zio->io_bp_orig));
return (zio);
}
@@ -4236,13 +4316,14 @@ again:
* If we are holding old class reservation, drop it.
* Dispatch the next ZIO(s) there if some are waiting.
*/
- if (zio->io_flags & ZIO_FLAG_IO_ALLOCATING) {
+ if (zio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
if (metaslab_class_throttle_unreserve(mc,
- zio->io_prop.zp_copies, zio)) {
+ zio->io_allocator, zio->io_prop.zp_copies,
+ zio->io_size)) {
zio_allocate_dispatch(zio->io_metaslab_class,
zio->io_allocator);
}
- zio->io_flags &= ~ZIO_FLAG_IO_ALLOCATING;
+ zio->io_flags &= ~ZIO_FLAG_ALLOC_THROTTLED;
}
if (zfs_flags & ZFS_DEBUG_METASLAB_ALLOC) {
@@ -4291,6 +4372,15 @@ again:
error);
}
zio->io_error = error;
+ } else if (zio->io_prop.zp_rewrite) {
+ /*
+ * For rewrite operations, preserve the logical birth time
+ * but set the physical birth time to the current txg.
+ */
+ uint64_t logical_birth = BP_GET_LOGICAL_BIRTH(&zio->io_bp_orig);
+ ASSERT3U(logical_birth, <=, zio->io_txg);
+ BP_SET_BIRTH(zio->io_bp, logical_birth, zio->io_txg);
+ BP_SET_REWRITE(zio->io_bp, 1);
}
return (zio);
@@ -4324,18 +4414,17 @@ zio_dva_claim(zio_t *zio)
static void
zio_dva_unallocate(zio_t *zio, zio_gang_node_t *gn, blkptr_t *bp)
{
- ASSERT(BP_GET_LOGICAL_BIRTH(bp) == zio->io_txg || BP_IS_HOLE(bp));
+ ASSERT(BP_GET_BIRTH(bp) == zio->io_txg || BP_IS_HOLE(bp));
ASSERT(zio->io_bp_override == NULL);
if (!BP_IS_HOLE(bp)) {
- metaslab_free(zio->io_spa, bp, BP_GET_LOGICAL_BIRTH(bp),
- B_TRUE);
+ metaslab_free(zio->io_spa, bp, BP_GET_BIRTH(bp), B_TRUE);
}
if (gn != NULL) {
- for (int g = 0; g < SPA_GBH_NBLKPTRS; g++) {
+ for (int g = 0; g < gbh_nblkptrs(gn->gn_gangblocksize); g++) {
zio_dva_unallocate(zio, gn->gn_child[g],
- &gn->gn_gbh->zg_blkptr[g]);
+ gbh_bp(gn->gn_gbh, g));
}
}
}
@@ -4347,7 +4436,7 @@ int
zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp,
uint64_t size, boolean_t *slog)
{
- int error = 1;
+ int error;
zio_alloc_list_t io_alloc_list;
ASSERT(txg > spa_syncing_txg(spa));
@@ -4372,14 +4461,34 @@ zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp,
int allocator = (uint_t)cityhash1(os->os_dsl_dataset->ds_object)
% spa->spa_alloc_count;
ZIOSTAT_BUMP(ziostat_total_allocations);
+
+ /* Try log class (dedicated slog devices) first */
error = metaslab_alloc(spa, spa_log_class(spa), size, new_bp, 1,
txg, NULL, flags, &io_alloc_list, allocator, NULL);
*slog = (error == 0);
+
+ /* Try special_embedded_log class (reserved on special vdevs) */
+ if (error != 0) {
+ error = metaslab_alloc(spa, spa_special_embedded_log_class(spa),
+ size, new_bp, 1, txg, NULL, flags, &io_alloc_list,
+ allocator, NULL);
+ }
+
+ /* Try special class (general special vdev allocation) */
+ if (error != 0) {
+ error = metaslab_alloc(spa, spa_special_class(spa), size,
+ new_bp, 1, txg, NULL, flags, &io_alloc_list, allocator,
+ NULL);
+ }
+
+ /* Try embedded_log class (reserved on normal vdevs) */
if (error != 0) {
error = metaslab_alloc(spa, spa_embedded_log_class(spa), size,
new_bp, 1, txg, NULL, flags, &io_alloc_list, allocator,
NULL);
}
+
+ /* Finally fall back to normal class */
if (error != 0) {
ZIOSTAT_BUMP(ziostat_alloc_class_fallbacks);
error = metaslab_alloc(spa, spa_normal_class(spa), size,
@@ -4722,7 +4831,7 @@ zio_vdev_io_assess(zio_t *zio)
* If a Direct I/O operation has a checksum verify error then this I/O
* should not attempt to be issued again.
*/
- if (zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR) {
+ if (zio->io_post & ZIO_POST_DIO_CHKSUM_ERR) {
if (zio->io_type == ZIO_TYPE_WRITE) {
ASSERT3U(zio->io_child_type, ==, ZIO_CHILD_LOGICAL);
ASSERT3U(zio->io_error, ==, EIO);
@@ -5031,7 +5140,7 @@ zio_checksum_verify(zio_t *zio)
ASSERT3U(zio->io_prop.zp_checksum, ==, ZIO_CHECKSUM_LABEL);
}
- ASSERT0(zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR);
+ ASSERT0(zio->io_post & ZIO_POST_DIO_CHKSUM_ERR);
IMPLY(zio->io_flags & ZIO_FLAG_DIO_READ,
!(zio->io_flags & ZIO_FLAG_SPECULATIVE));
@@ -5040,7 +5149,7 @@ zio_checksum_verify(zio_t *zio)
if (error == ECKSUM &&
!(zio->io_flags & ZIO_FLAG_SPECULATIVE)) {
if (zio->io_flags & ZIO_FLAG_DIO_READ) {
- zio->io_flags |= ZIO_FLAG_DIO_CHKSUM_ERR;
+ zio->io_post |= ZIO_POST_DIO_CHKSUM_ERR;
zio_t *pio = zio_unique_parent(zio);
/*
* Any Direct I/O read that has a checksum
@@ -5090,7 +5199,7 @@ zio_dio_checksum_verify(zio_t *zio)
if ((error = zio_checksum_error(zio, NULL)) != 0) {
zio->io_error = error;
if (error == ECKSUM) {
- zio->io_flags |= ZIO_FLAG_DIO_CHKSUM_ERR;
+ zio->io_post |= ZIO_POST_DIO_CHKSUM_ERR;
zio_dio_chksum_verify_error_report(zio);
}
}
@@ -5115,7 +5224,7 @@ zio_checksum_verified(zio_t *zio)
void
zio_dio_chksum_verify_error_report(zio_t *zio)
{
- ASSERT(zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR);
+ ASSERT(zio->io_post & ZIO_POST_DIO_CHKSUM_ERR);
if (zio->io_child_type == ZIO_CHILD_LOGICAL)
return;
@@ -5187,7 +5296,7 @@ zio_ready(zio_t *zio)
if (zio->io_ready) {
ASSERT(IO_IS_ALLOCATING(zio));
- ASSERT(BP_GET_LOGICAL_BIRTH(bp) == zio->io_txg ||
+ ASSERT(BP_GET_BIRTH(bp) == zio->io_txg ||
BP_IS_HOLE(bp) || (zio->io_flags & ZIO_FLAG_NOPWRITE));
ASSERT(zio->io_children[ZIO_CHILD_GANG][ZIO_WAIT_READY] == 0);
@@ -5202,7 +5311,7 @@ zio_ready(zio_t *zio)
if (zio->io_error != 0) {
zio->io_pipeline = ZIO_INTERLOCK_PIPELINE;
- if (zio->io_flags & ZIO_FLAG_IO_ALLOCATING) {
+ if (zio->io_flags & ZIO_FLAG_ALLOC_THROTTLED) {
ASSERT(IO_IS_ALLOCATING(zio));
ASSERT(zio->io_priority == ZIO_PRIORITY_ASYNC_WRITE);
ASSERT(zio->io_metaslab_class != NULL);
@@ -5213,8 +5322,8 @@ zio_ready(zio_t *zio)
* issue the next I/O to allocate.
*/
if (metaslab_class_throttle_unreserve(
- zio->io_metaslab_class, zio->io_prop.zp_copies,
- zio)) {
+ zio->io_metaslab_class, zio->io_allocator,
+ zio->io_prop.zp_copies, zio->io_size)) {
zio_allocate_dispatch(zio->io_metaslab_class,
zio->io_allocator);
}
@@ -5264,6 +5373,7 @@ zio_dva_throttle_done(zio_t *zio)
vdev_t *vd = zio->io_vd;
int flags = METASLAB_ASYNC_ALLOC;
const void *tag = pio;
+ uint64_t size = pio->io_size;
ASSERT3P(zio->io_bp, !=, NULL);
ASSERT3U(zio->io_type, ==, ZIO_TYPE_WRITE);
@@ -5273,16 +5383,19 @@ zio_dva_throttle_done(zio_t *zio)
ASSERT3P(vd, ==, vd->vdev_top);
ASSERT(zio_injection_enabled || !(zio->io_flags & ZIO_FLAG_IO_RETRY));
ASSERT(!(zio->io_flags & ZIO_FLAG_IO_REPAIR));
- ASSERT(zio->io_flags & ZIO_FLAG_IO_ALLOCATING);
+ ASSERT(zio->io_flags & ZIO_FLAG_ALLOC_THROTTLED);
/*
* Parents of gang children can have two flavors -- ones that allocated
* the gang header (will have ZIO_FLAG_IO_REWRITE set) and ones that
* allocated the constituent blocks. The first use their parent as tag.
+ * We set the size to match the original allocation call for that case.
*/
if (pio->io_child_type == ZIO_CHILD_GANG &&
- (pio->io_flags & ZIO_FLAG_IO_REWRITE))
+ (pio->io_flags & ZIO_FLAG_IO_REWRITE)) {
tag = zio_unique_parent(pio);
+ size = SPA_OLD_GANGBLOCKSIZE;
+ }
ASSERT(IO_IS_ALLOCATING(pio) || (pio->io_child_type == ZIO_CHILD_GANG &&
(pio->io_flags & ZIO_FLAG_IO_REWRITE)));
@@ -5295,9 +5408,10 @@ zio_dva_throttle_done(zio_t *zio)
ASSERT(zio->io_metaslab_class->mc_alloc_throttle_enabled);
metaslab_group_alloc_decrement(zio->io_spa, vd->vdev_id,
- pio->io_allocator, flags, pio->io_size, tag);
+ pio->io_allocator, flags, size, tag);
- if (metaslab_class_throttle_unreserve(zio->io_metaslab_class, 1, pio)) {
+ if (metaslab_class_throttle_unreserve(pio->io_metaslab_class,
+ pio->io_allocator, 1, pio->io_size)) {
zio_allocate_dispatch(zio->io_metaslab_class,
pio->io_allocator);
}
@@ -5328,7 +5442,7 @@ zio_done(zio_t *zio)
* write. We must do this since the allocation is performed
* by the logical I/O but the actual write is done by child I/Os.
*/
- if (zio->io_flags & ZIO_FLAG_IO_ALLOCATING &&
+ if (zio->io_flags & ZIO_FLAG_ALLOC_THROTTLED &&
zio->io_child_type == ZIO_CHILD_VDEV)
zio_dva_throttle_done(zio);
@@ -5337,8 +5451,6 @@ zio_done(zio_t *zio)
ASSERT(zio->io_children[c][w] == 0);
if (zio->io_bp != NULL && !BP_IS_EMBEDDED(zio->io_bp)) {
- ASSERT(zio->io_bp->blk_pad[0] == 0);
- ASSERT(zio->io_bp->blk_pad[1] == 0);
ASSERT(memcmp(zio->io_bp, &zio->io_bp_copy,
sizeof (blkptr_t)) == 0 ||
(zio->io_bp == zio_unique_parent(zio)->io_bp));
@@ -5431,7 +5543,7 @@ zio_done(zio_t *zio)
*/
if (zio->io_error != ECKSUM && zio->io_vd != NULL &&
!vdev_is_dead(zio->io_vd) &&
- !(zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR)) {
+ !(zio->io_post & ZIO_POST_DIO_CHKSUM_ERR)) {
int ret = zfs_ereport_post(FM_EREPORT_ZFS_IO,
zio->io_spa, zio->io_vd, &zio->io_bookmark, zio, 0);
if (ret != EALREADY) {
@@ -5446,14 +5558,14 @@ zio_done(zio_t *zio)
if ((zio->io_error == EIO || !(zio->io_flags &
(ZIO_FLAG_SPECULATIVE | ZIO_FLAG_DONT_PROPAGATE))) &&
- !(zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR) &&
+ !(zio->io_post & ZIO_POST_DIO_CHKSUM_ERR) &&
zio == zio->io_logical) {
/*
* For logical I/O requests, tell the SPA to log the
* error and generate a logical data ereport.
*/
spa_log_error(zio->io_spa, &zio->io_bookmark,
- BP_GET_LOGICAL_BIRTH(zio->io_bp));
+ BP_GET_PHYSICAL_BIRTH(zio->io_bp));
(void) zfs_ereport_post(FM_EREPORT_ZFS_DATA,
zio->io_spa, NULL, &zio->io_bookmark, zio, 0);
}
@@ -5467,7 +5579,7 @@ zio_done(zio_t *zio)
*/
if (zio->io_error == EAGAIN && IO_IS_ALLOCATING(zio) &&
zio->io_prop.zp_dedup) {
- zio->io_reexecute |= ZIO_REEXECUTE_NOW;
+ zio->io_post |= ZIO_POST_REEXECUTE;
zio->io_prop.zp_dedup = B_FALSE;
}
/*
@@ -5479,11 +5591,11 @@ zio_done(zio_t *zio)
if (IO_IS_ALLOCATING(zio) &&
!(zio->io_flags & ZIO_FLAG_CANFAIL) &&
- !(zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR)) {
+ !(zio->io_post & ZIO_POST_DIO_CHKSUM_ERR)) {
if (zio->io_error != ENOSPC)
- zio->io_reexecute |= ZIO_REEXECUTE_NOW;
+ zio->io_post |= ZIO_POST_REEXECUTE;
else
- zio->io_reexecute |= ZIO_REEXECUTE_SUSPEND;
+ zio->io_post |= ZIO_POST_SUSPEND;
}
if ((zio->io_type == ZIO_TYPE_READ ||
@@ -5492,10 +5604,11 @@ zio_done(zio_t *zio)
zio->io_error == ENXIO &&
spa_load_state(zio->io_spa) == SPA_LOAD_NONE &&
spa_get_failmode(zio->io_spa) != ZIO_FAILURE_MODE_CONTINUE)
- zio->io_reexecute |= ZIO_REEXECUTE_SUSPEND;
+ zio->io_post |= ZIO_POST_SUSPEND;
- if (!(zio->io_flags & ZIO_FLAG_CANFAIL) && !zio->io_reexecute)
- zio->io_reexecute |= ZIO_REEXECUTE_SUSPEND;
+ if (!(zio->io_flags & ZIO_FLAG_CANFAIL) &&
+ !(zio->io_post & (ZIO_POST_REEXECUTE|ZIO_POST_SUSPEND)))
+ zio->io_post |= ZIO_POST_SUSPEND;
/*
* Here is a possibly good place to attempt to do
@@ -5514,7 +5627,8 @@ zio_done(zio_t *zio)
*/
zio_inherit_child_errors(zio, ZIO_CHILD_LOGICAL);
- if ((zio->io_error || zio->io_reexecute) &&
+ if ((zio->io_error ||
+ (zio->io_post & (ZIO_POST_REEXECUTE|ZIO_POST_SUSPEND))) &&
IO_IS_ALLOCATING(zio) && zio->io_gang_leader == zio &&
!(zio->io_flags & (ZIO_FLAG_IO_REWRITE | ZIO_FLAG_NOPWRITE)))
zio_dva_unallocate(zio, zio->io_gang_tree, zio->io_bp);
@@ -5525,16 +5639,16 @@ zio_done(zio_t *zio)
* Godfather I/Os should never suspend.
*/
if ((zio->io_flags & ZIO_FLAG_GODFATHER) &&
- (zio->io_reexecute & ZIO_REEXECUTE_SUSPEND))
- zio->io_reexecute &= ~ZIO_REEXECUTE_SUSPEND;
+ (zio->io_post & ZIO_POST_SUSPEND))
+ zio->io_post &= ~ZIO_POST_SUSPEND;
- if (zio->io_reexecute) {
+ if (zio->io_post & (ZIO_POST_REEXECUTE|ZIO_POST_SUSPEND)) {
/*
* A Direct I/O operation that has a checksum verify error
* should not attempt to reexecute. Instead, the error should
* just be propagated back.
*/
- ASSERT(!(zio->io_flags & ZIO_FLAG_DIO_CHKSUM_ERR));
+ ASSERT0(zio->io_post & ZIO_POST_DIO_CHKSUM_ERR);
/*
* This is a logical I/O that wants to reexecute.
@@ -5571,7 +5685,7 @@ zio_done(zio_t *zio)
pio_next = zio_walk_parents(zio, &zl);
if ((pio->io_flags & ZIO_FLAG_GODFATHER) &&
- (zio->io_reexecute & ZIO_REEXECUTE_SUSPEND)) {
+ (zio->io_post & ZIO_POST_SUSPEND)) {
zio_remove_child(pio, zio, remove_zl);
/*
* This is a rare code path, so we don't
@@ -5595,13 +5709,14 @@ zio_done(zio_t *zio)
* "next_to_execute".
*/
zio_notify_parent(pio, zio, ZIO_WAIT_DONE, NULL);
- } else if (zio->io_reexecute & ZIO_REEXECUTE_SUSPEND) {
+ } else if (zio->io_post & ZIO_POST_SUSPEND) {
/*
* We'd fail again if we reexecuted now, so suspend
* until conditions improve (e.g. device comes online).
*/
zio_suspend(zio->io_spa, zio, ZIO_SUSPEND_IOERR);
} else {
+ ASSERT(zio->io_post & ZIO_POST_REEXECUTE);
/*
* Reexecution is potentially a huge amount of work.
* Hand it off to the otherwise-unused claim taskq.
@@ -5614,7 +5729,8 @@ zio_done(zio_t *zio)
}
ASSERT(list_is_empty(&zio->io_child_list));
- ASSERT(zio->io_reexecute == 0);
+ ASSERT0(zio->io_post & ZIO_POST_REEXECUTE);
+ ASSERT0(zio->io_post & ZIO_POST_SUSPEND);
ASSERT(zio->io_error == 0 || (zio->io_flags & ZIO_FLAG_CANFAIL));
/*
diff --git a/sys/contrib/openzfs/module/zfs/zio_checksum.c b/sys/contrib/openzfs/module/zfs/zio_checksum.c
index a91775b04af2..63d0c6dadd46 100644
--- a/sys/contrib/openzfs/module/zfs/zio_checksum.c
+++ b/sys/contrib/openzfs/module/zfs/zio_checksum.c
@@ -279,7 +279,7 @@ static void
zio_checksum_gang_verifier(zio_cksum_t *zcp, const blkptr_t *bp)
{
const dva_t *dva = BP_IDENTITY(bp);
- uint64_t txg = BP_GET_BIRTH(bp);
+ uint64_t txg = BP_GET_PHYSICAL_BIRTH(bp);
ASSERT(BP_IS_GANG(bp));
@@ -545,14 +545,39 @@ zio_checksum_error(zio_t *zio, zio_bad_cksum_t *info)
uint_t checksum = (bp == NULL ? zio->io_prop.zp_checksum :
(BP_IS_GANG(bp) ? ZIO_CHECKSUM_GANG_HEADER : BP_GET_CHECKSUM(bp)));
int error;
- uint64_t size = (bp == NULL ? zio->io_size :
- (BP_IS_GANG(bp) ? SPA_GANGBLOCKSIZE : BP_GET_PSIZE(bp)));
+ uint64_t size = bp ? BP_GET_PSIZE(bp) : zio->io_size;
uint64_t offset = zio->io_offset;
abd_t *data = zio->io_abd;
spa_t *spa = zio->io_spa;
+ if (bp && BP_IS_GANG(bp)) {
+ if (spa_feature_is_active(spa, SPA_FEATURE_DYNAMIC_GANG_HEADER))
+ size = zio->io_size;
+ else
+ size = SPA_OLD_GANGBLOCKSIZE;
+ }
+
error = zio_checksum_error_impl(spa, bp, checksum, data, size,
offset, info);
+ if (error && bp && BP_IS_GANG(bp) && size > SPA_OLD_GANGBLOCKSIZE) {
+ /*
+ * It's possible that this is an old gang block. Rerun
+ * the checksum with the old size; if that passes, then
+ * update the gangblocksize appropriately.
+ */
+ error = zio_checksum_error_impl(spa, bp, checksum, data,
+ SPA_OLD_GANGBLOCKSIZE, offset, info);
+ if (error == 0) {
+ ASSERT3U(zio->io_child_type, ==, ZIO_CHILD_VDEV);
+ zio_t *pio;
+ for (pio = zio_unique_parent(zio);
+ pio->io_child_type != ZIO_CHILD_GANG;
+ pio = zio_unique_parent(pio))
+ ;
+ zio_gang_node_t *gn = pio->io_private;
+ gn->gn_gangblocksize = SPA_OLD_GANGBLOCKSIZE;
+ }
+ }
if (zio_injection_enabled && error == 0 && zio->io_error == 0) {
error = zio_handle_fault_injection(zio, ECKSUM);
diff --git a/sys/contrib/openzfs/module/zfs/zvol.c b/sys/contrib/openzfs/module/zfs/zvol.c
index 3568d4f43fcb..7e264f308cf2 100644
--- a/sys/contrib/openzfs/module/zfs/zvol.c
+++ b/sys/contrib/openzfs/module/zfs/zvol.c
@@ -102,6 +102,7 @@ extern int zfs_bclone_wait_dirty;
zv_taskq_t zvol_taskqs;
typedef enum {
+ ZVOL_ASYNC_CREATE_MINORS,
ZVOL_ASYNC_REMOVE_MINORS,
ZVOL_ASYNC_RENAME_MINORS,
ZVOL_ASYNC_SET_SNAPDEV,
@@ -110,10 +111,14 @@ typedef enum {
} zvol_async_op_t;
typedef struct {
- zvol_async_op_t op;
- char name1[MAXNAMELEN];
- char name2[MAXNAMELEN];
- uint64_t value;
+ zvol_async_op_t zt_op;
+ char zt_name1[MAXNAMELEN];
+ char zt_name2[MAXNAMELEN];
+ uint64_t zt_value;
+ uint32_t zt_total;
+ uint32_t zt_done;
+ int32_t zt_status;
+ int zt_error;
} zvol_task_t;
zv_request_task_t *
@@ -859,13 +864,8 @@ zil_replay_func_t *const zvol_replay_vector[TX_MAX_TYPE] = {
};
/*
- * zvol_log_write() handles synchronous writes using TX_WRITE ZIL transactions.
- *
- * We store data in the log buffers if it's small enough.
- * Otherwise we will later flush the data out via dmu_sync().
+ * zvol_log_write() handles TX_WRITE transactions.
*/
-static const ssize_t zvol_immediate_write_sz = 32768;
-
void
zvol_log_write(zvol_state_t *zv, dmu_tx_t *tx, uint64_t offset,
uint64_t size, boolean_t commit)
@@ -878,15 +878,7 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_t *tx, uint64_t offset,
if (zil_replaying(zilog, tx))
return;
- if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT)
- write_state = WR_INDIRECT;
- else if (!spa_has_slogs(zilog->zl_spa) &&
- size >= blocksize && blocksize > zvol_immediate_write_sz)
- write_state = WR_INDIRECT;
- else if (commit)
- write_state = WR_COPIED;
- else
- write_state = WR_NEED_COPY;
+ write_state = zil_write_state(zilog, size, blocksize, B_FALSE, commit);
while (size) {
itx_t *itx;
@@ -1434,6 +1426,57 @@ zvol_create_minors_cb(const char *dsname, void *arg)
return (0);
}
+static void
+zvol_task_update_status(zvol_task_t *task, uint64_t total, uint64_t done,
+ int error)
+{
+
+ task->zt_total += total;
+ task->zt_done += done;
+ if (task->zt_total != task->zt_done) {
+ task->zt_status = -1;
+ if (error)
+ task->zt_error = error;
+ }
+}
+
+static const char *
+zvol_task_op_msg(zvol_async_op_t op)
+{
+ switch (op) {
+ case ZVOL_ASYNC_CREATE_MINORS:
+ return ("create");
+ case ZVOL_ASYNC_REMOVE_MINORS:
+ return ("remove");
+ case ZVOL_ASYNC_RENAME_MINORS:
+ return ("rename");
+ case ZVOL_ASYNC_SET_SNAPDEV:
+ case ZVOL_ASYNC_SET_VOLMODE:
+ return ("set property");
+ default:
+ return ("unknown");
+ }
+
+ __builtin_unreachable();
+ return (NULL);
+}
+
+static void
+zvol_task_report_status(zvol_task_t *task)
+{
+
+ if (task->zt_status == 0)
+ return;
+
+ if (task->zt_error) {
+ dprintf("The %s minors zvol task was not ok, last error %d\n",
+ zvol_task_op_msg(task->zt_op), task->zt_error);
+ } else {
+ dprintf("The %s minors zvol task was not ok\n",
+ zvol_task_op_msg(task->zt_op));
+ }
+}
+
/*
* Create minors for the specified dataset, including children and snapshots.
* Pay attention to the 'snapdev' property and iterate over the snapshots
@@ -1451,14 +1494,27 @@ zvol_create_minors_cb(const char *dsname, void *arg)
* 'visible' (which also verifies that the parent is a zvol), and if so,
* a minor node for that snapshot is created.
*/
-void
-zvol_create_minors_recursive(const char *name)
+static void
+zvol_create_minors_impl(zvol_task_t *task)
{
+ const char *name = task->zt_name1;
list_t minors_list;
minors_job_t *job;
+ uint64_t snapdev;
+ int total = 0, done = 0, last_error, error;
- if (zvol_inhibit_dev)
+ /*
+ * Note: the dsl_pool_config_lock must not be held.
+ * Minor node creation needs to obtain the zvol_state_lock.
+ * zvol_open() obtains the zvol_state_lock and then the dsl pool
+ * config lock. Therefore, we can't have the config lock now if
+ * we are going to wait for the zvol_state_lock, because it
+ * would be a lock order inversion which could lead to deadlock.
+ */
+
+ if (zvol_inhibit_dev) {
return;
+ }
/*
* This is the list for prefetch jobs. Whenever we found a match
@@ -1474,13 +1530,16 @@ zvol_create_minors_recursive(const char *name)
if (strchr(name, '@') != NULL) {
- uint64_t snapdev;
-
- int error = dsl_prop_get_integer(name, "snapdev",
- &snapdev, NULL);
-
- if (error == 0 && snapdev == ZFS_SNAPDEV_VISIBLE)
- (void) zvol_os_create_minor(name);
+ error = dsl_prop_get_integer(name, "snapdev", &snapdev, NULL);
+ if (error == 0 && snapdev == ZFS_SNAPDEV_VISIBLE) {
+ error = zvol_os_create_minor(name);
+ if (error == 0) {
+ done++;
+ } else {
+ last_error = error;
+ }
+ total++;
+ }
} else {
fstrans_cookie_t cookie = spl_fstrans_mark();
(void) dmu_objset_find(name, zvol_create_minors_cb,
@@ -1495,41 +1554,30 @@ zvol_create_minors_recursive(const char *name)
* sequentially.
*/
while ((job = list_remove_head(&minors_list)) != NULL) {
- if (!job->error)
- (void) zvol_os_create_minor(job->name);
+ if (!job->error) {
+ error = zvol_os_create_minor(job->name);
+ if (error == 0) {
+ done++;
+ } else {
+ last_error = error;
+ }
+ } else if (job->error == EINVAL) {
+ /*
+ * The objset, with the name requested by current job
+ * exist, but have the type different from zvol.
+ * Just ignore this sort of errors.
+ */
+ done++;
+ } else {
+ last_error = job->error;
+ }
+ total++;
kmem_strfree(job->name);
kmem_free(job, sizeof (minors_job_t));
}
list_destroy(&minors_list);
-}
-
-void
-zvol_create_minor(const char *name)
-{
- /*
- * Note: the dsl_pool_config_lock must not be held.
- * Minor node creation needs to obtain the zvol_state_lock.
- * zvol_open() obtains the zvol_state_lock and then the dsl pool
- * config lock. Therefore, we can't have the config lock now if
- * we are going to wait for the zvol_state_lock, because it
- * would be a lock order inversion which could lead to deadlock.
- */
-
- if (zvol_inhibit_dev)
- return;
-
- if (strchr(name, '@') != NULL) {
- uint64_t snapdev;
-
- int error = dsl_prop_get_integer(name,
- "snapdev", &snapdev, NULL);
-
- if (error == 0 && snapdev == ZFS_SNAPDEV_VISIBLE)
- (void) zvol_os_create_minor(name);
- } else {
- (void) zvol_os_create_minor(name);
- }
+ zvol_task_update_status(task, total, done, last_error);
}
/*
@@ -1577,10 +1625,11 @@ zvol_free_task(void *arg)
zvol_os_free(arg);
}
-void
-zvol_remove_minors_impl(const char *name)
+static void
+zvol_remove_minors_impl(zvol_task_t *task)
{
zvol_state_t *zv, *zv_next;
+ const char *name = task ? task->zt_name1 : NULL;
int namelen = ((name) ? strlen(name) : 0);
taskqid_t t;
list_t delay_list, free_list;
@@ -1662,13 +1711,13 @@ zvol_remove_minors_impl(const char *name)
}
/* Remove minor for this specific volume only */
-static void
+static int
zvol_remove_minor_impl(const char *name)
{
zvol_state_t *zv = NULL, *zv_next;
if (zvol_inhibit_dev)
- return;
+ return (0);
rw_enter(&zvol_state_lock, RW_WRITER);
@@ -1684,7 +1733,7 @@ zvol_remove_minor_impl(const char *name)
if (zv == NULL) {
rw_exit(&zvol_state_lock);
- return;
+ return (ENOENT);
}
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -1698,7 +1747,7 @@ zvol_remove_minor_impl(const char *name)
mutex_exit(&zv->zv_state_lock);
rw_exit(&zvol_state_lock);
zvol_remove_minor_task(zv);
- return;
+ return (0);
}
zvol_remove(zv);
@@ -1708,16 +1757,20 @@ zvol_remove_minor_impl(const char *name)
rw_exit(&zvol_state_lock);
zvol_os_free(zv);
+
+ return (0);
}
/*
* Rename minors for specified dataset including children and snapshots.
*/
static void
-zvol_rename_minors_impl(const char *oldname, const char *newname)
+zvol_rename_minors_impl(zvol_task_t *task)
{
zvol_state_t *zv, *zv_next;
- int oldnamelen;
+ const char *oldname = task->zt_name1;
+ const char *newname = task->zt_name2;
+ int total = 0, done = 0, last_error, error, oldnamelen;
if (zvol_inhibit_dev)
return;
@@ -1732,24 +1785,31 @@ zvol_rename_minors_impl(const char *oldname, const char *newname)
mutex_enter(&zv->zv_state_lock);
if (strcmp(zv->zv_name, oldname) == 0) {
- zvol_os_rename_minor(zv, newname);
+ error = zvol_os_rename_minor(zv, newname);
} else if (strncmp(zv->zv_name, oldname, oldnamelen) == 0 &&
(zv->zv_name[oldnamelen] == '/' ||
zv->zv_name[oldnamelen] == '@')) {
char *name = kmem_asprintf("%s%c%s", newname,
zv->zv_name[oldnamelen],
zv->zv_name + oldnamelen + 1);
- zvol_os_rename_minor(zv, name);
+ error = zvol_os_rename_minor(zv, name);
kmem_strfree(name);
}
-
+ if (error) {
+ last_error = error;
+ } else {
+ done++;
+ }
+ total++;
mutex_exit(&zv->zv_state_lock);
}
rw_exit(&zvol_state_lock);
+ zvol_task_update_status(task, total, done, last_error);
}
typedef struct zvol_snapdev_cb_arg {
+ zvol_task_t *task;
uint64_t snapdev;
} zvol_snapdev_cb_arg_t;
@@ -1757,26 +1817,31 @@ static int
zvol_set_snapdev_cb(const char *dsname, void *param)
{
zvol_snapdev_cb_arg_t *arg = param;
+ int error = 0;
if (strchr(dsname, '@') == NULL)
return (0);
switch (arg->snapdev) {
case ZFS_SNAPDEV_VISIBLE:
- (void) zvol_os_create_minor(dsname);
+ error = zvol_os_create_minor(dsname);
break;
case ZFS_SNAPDEV_HIDDEN:
- (void) zvol_remove_minor_impl(dsname);
+ error = zvol_remove_minor_impl(dsname);
break;
}
+ zvol_task_update_status(arg->task, 1, error == 0, error);
return (0);
}
static void
-zvol_set_snapdev_impl(char *name, uint64_t snapdev)
+zvol_set_snapdev_impl(zvol_task_t *task)
{
- zvol_snapdev_cb_arg_t arg = {snapdev};
+ const char *name = task->zt_name1;
+ uint64_t snapdev = task->zt_value;
+
+ zvol_snapdev_cb_arg_t arg = {task, snapdev};
fstrans_cookie_t cookie = spl_fstrans_mark();
/*
* The zvol_set_snapdev_sync() sets snapdev appropriately
@@ -1787,11 +1852,14 @@ zvol_set_snapdev_impl(char *name, uint64_t snapdev)
}
static void
-zvol_set_volmode_impl(char *name, uint64_t volmode)
+zvol_set_volmode_impl(zvol_task_t *task)
{
+ const char *name = task->zt_name1;
+ uint64_t volmode = task->zt_value;
fstrans_cookie_t cookie;
uint64_t old_volmode;
zvol_state_t *zv;
+ int error;
if (strchr(name, '@') != NULL)
return;
@@ -1804,7 +1872,7 @@ zvol_set_volmode_impl(char *name, uint64_t volmode)
*/
zv = zvol_find_by_name(name, RW_NONE);
if (zv == NULL && volmode == ZFS_VOLMODE_NONE)
- return;
+ return;
if (zv != NULL) {
old_volmode = zv->zv_volmode;
mutex_exit(&zv->zv_state_lock);
@@ -1815,51 +1883,34 @@ zvol_set_volmode_impl(char *name, uint64_t volmode)
cookie = spl_fstrans_mark();
switch (volmode) {
case ZFS_VOLMODE_NONE:
- (void) zvol_remove_minor_impl(name);
+ error = zvol_remove_minor_impl(name);
break;
case ZFS_VOLMODE_GEOM:
case ZFS_VOLMODE_DEV:
- (void) zvol_remove_minor_impl(name);
- (void) zvol_os_create_minor(name);
+ error = zvol_remove_minor_impl(name);
+ /*
+ * The remove minor function call above, might be not
+ * needed, if volmode was switched from 'none' value.
+ * Ignore error in this case.
+ */
+ if (error == ENOENT)
+ error = 0;
+ else if (error)
+ break;
+ error = zvol_os_create_minor(name);
break;
case ZFS_VOLMODE_DEFAULT:
- (void) zvol_remove_minor_impl(name);
+ error = zvol_remove_minor_impl(name);
if (zvol_volmode == ZFS_VOLMODE_NONE)
break;
else /* if zvol_volmode is invalid defaults to "geom" */
- (void) zvol_os_create_minor(name);
+ error = zvol_os_create_minor(name);
break;
}
+ zvol_task_update_status(task, 1, error == 0, error);
spl_fstrans_unmark(cookie);
}
-static zvol_task_t *
-zvol_task_alloc(zvol_async_op_t op, const char *name1, const char *name2,
- uint64_t value)
-{
- zvol_task_t *task;
-
- /* Never allow tasks on hidden names. */
- if (name1[0] == '$')
- return (NULL);
-
- task = kmem_zalloc(sizeof (zvol_task_t), KM_SLEEP);
- task->op = op;
- task->value = value;
-
- strlcpy(task->name1, name1, sizeof (task->name1));
- if (name2 != NULL)
- strlcpy(task->name2, name2, sizeof (task->name2));
-
- return (task);
-}
-
-static void
-zvol_task_free(zvol_task_t *task)
-{
- kmem_free(task, sizeof (zvol_task_t));
-}
-
/*
* The worker thread function performed asynchronously.
*/
@@ -1868,25 +1919,29 @@ zvol_task_cb(void *arg)
{
zvol_task_t *task = arg;
- switch (task->op) {
+ switch (task->zt_op) {
+ case ZVOL_ASYNC_CREATE_MINORS:
+ zvol_create_minors_impl(task);
+ break;
case ZVOL_ASYNC_REMOVE_MINORS:
- zvol_remove_minors_impl(task->name1);
+ zvol_remove_minors_impl(task);
break;
case ZVOL_ASYNC_RENAME_MINORS:
- zvol_rename_minors_impl(task->name1, task->name2);
+ zvol_rename_minors_impl(task);
break;
case ZVOL_ASYNC_SET_SNAPDEV:
- zvol_set_snapdev_impl(task->name1, task->value);
+ zvol_set_snapdev_impl(task);
break;
case ZVOL_ASYNC_SET_VOLMODE:
- zvol_set_volmode_impl(task->name1, task->value);
+ zvol_set_volmode_impl(task);
break;
default:
VERIFY(0);
break;
}
- zvol_task_free(task);
+ zvol_task_report_status(task);
+ kmem_free(task, sizeof (zvol_task_t));
}
typedef struct zvol_set_prop_int_arg {
@@ -1931,23 +1986,17 @@ zvol_set_common_sync_cb(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg)
if (dsl_prop_get_int_ds(ds, prop_name, &prop) != 0)
return (0);
- switch (zsda->zsda_prop) {
- case ZFS_PROP_VOLMODE:
- task = zvol_task_alloc(ZVOL_ASYNC_SET_VOLMODE, dsname,
- NULL, prop);
- break;
- case ZFS_PROP_SNAPDEV:
- task = zvol_task_alloc(ZVOL_ASYNC_SET_SNAPDEV, dsname,
- NULL, prop);
- break;
- default:
- task = NULL;
- break;
- }
-
- if (task == NULL)
+ task = kmem_zalloc(sizeof (zvol_task_t), KM_SLEEP);
+ if (zsda->zsda_prop == ZFS_PROP_VOLMODE) {
+ task->zt_op = ZVOL_ASYNC_SET_VOLMODE;
+ } else if (zsda->zsda_prop == ZFS_PROP_SNAPDEV) {
+ task->zt_op = ZVOL_ASYNC_SET_SNAPDEV;
+ } else {
+ kmem_free(task, sizeof (zvol_task_t));
return (0);
-
+ }
+ task->zt_value = prop;
+ strlcpy(task->zt_name1, dsname, sizeof (task->zt_name1));
(void) taskq_dispatch(dp->dp_spa->spa_zvol_taskq, zvol_task_cb,
task, TQ_SLEEP);
return (0);
@@ -2001,15 +2050,34 @@ zvol_set_common(const char *ddname, zfs_prop_t prop, zprop_source_t source,
}
void
-zvol_remove_minors(spa_t *spa, const char *name, boolean_t async)
+zvol_create_minors(const char *name)
{
+ spa_t *spa;
zvol_task_t *task;
taskqid_t id;
- task = zvol_task_alloc(ZVOL_ASYNC_REMOVE_MINORS, name, NULL, ~0ULL);
- if (task == NULL)
+ if (spa_open(name, &spa, FTAG) != 0)
return;
+ task = kmem_zalloc(sizeof (zvol_task_t), KM_SLEEP);
+ task->zt_op = ZVOL_ASYNC_CREATE_MINORS;
+ strlcpy(task->zt_name1, name, sizeof (task->zt_name1));
+ id = taskq_dispatch(spa->spa_zvol_taskq, zvol_task_cb, task, TQ_SLEEP);
+ if (id != TASKQID_INVALID)
+ taskq_wait_id(spa->spa_zvol_taskq, id);
+
+ spa_close(spa, FTAG);
+}
+
+void
+zvol_remove_minors(spa_t *spa, const char *name, boolean_t async)
+{
+ zvol_task_t *task;
+ taskqid_t id;
+
+ task = kmem_zalloc(sizeof (zvol_task_t), KM_SLEEP);
+ task->zt_op = ZVOL_ASYNC_REMOVE_MINORS;
+ strlcpy(task->zt_name1, name, sizeof (task->zt_name1));
id = taskq_dispatch(spa->spa_zvol_taskq, zvol_task_cb, task, TQ_SLEEP);
if ((async == B_FALSE) && (id != TASKQID_INVALID))
taskq_wait_id(spa->spa_zvol_taskq, id);
@@ -2022,10 +2090,10 @@ zvol_rename_minors(spa_t *spa, const char *name1, const char *name2,
zvol_task_t *task;
taskqid_t id;
- task = zvol_task_alloc(ZVOL_ASYNC_RENAME_MINORS, name1, name2, ~0ULL);
- if (task == NULL)
- return;
-
+ task = kmem_zalloc(sizeof (zvol_task_t), KM_SLEEP);
+ task->zt_op = ZVOL_ASYNC_RENAME_MINORS;
+ strlcpy(task->zt_name1, name1, sizeof (task->zt_name1));
+ strlcpy(task->zt_name2, name2, sizeof (task->zt_name2));
id = taskq_dispatch(spa->spa_zvol_taskq, zvol_task_cb, task, TQ_SLEEP);
if ((async == B_FALSE) && (id != TASKQID_INVALID))
taskq_wait_id(spa->spa_zvol_taskq, id);
diff --git a/sys/contrib/openzfs/module/zstd/zfs_zstd.c b/sys/contrib/openzfs/module/zstd/zfs_zstd.c
index 4f7ac56a6273..391216d6e263 100644
--- a/sys/contrib/openzfs/module/zstd/zfs_zstd.c
+++ b/sys/contrib/openzfs/module/zstd/zfs_zstd.c
@@ -637,11 +637,10 @@ zfs_zstd_compress_buf(void *s_start, void *d_start, size_t s_len, size_t d_len,
size_t actual_abort_size = zstd_abort_size;
if (zstd_earlyabort_pass > 0 && zstd_level >= zstd_cutoff_level &&
s_len >= actual_abort_size) {
- int pass_len = 1;
abd_t sabd, dabd;
abd_get_from_buf_struct(&sabd, s_start, s_len);
abd_get_from_buf_struct(&dabd, d_start, d_len);
- pass_len = zfs_lz4_compress(&sabd, &dabd, s_len, d_len, 0);
+ int pass_len = zfs_lz4_compress(&sabd, &dabd, s_len, d_len, 0);
abd_free(&dabd);
abd_free(&sabd);
if (pass_len < d_len) {
diff --git a/sys/contrib/openzfs/rpm/generic/zfs.spec.in b/sys/contrib/openzfs/rpm/generic/zfs.spec.in
index 8cf13023f537..dddc0a6c8f02 100644
--- a/sys/contrib/openzfs/rpm/generic/zfs.spec.in
+++ b/sys/contrib/openzfs/rpm/generic/zfs.spec.in
@@ -87,7 +87,19 @@
%define __python %{__use_python}
%define __python_pkg_version %{__use_python_pkg_version}
%endif
-%define __python_sitelib %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())" 2>/dev/null || %{__python} -Esc "import sysconfig; print(sysconfig.get_path('purelib'))")
+%define __python_sitelib %(%{__python} -Esc "
+import sysconfig;
+if hasattr(sysconfig, 'get_default_scheme'):
+ scheme = sysconfig.get_default_scheme()
+else:
+ scheme = sysconfig._get_default_scheme()
+if scheme == 'posix_local':
+ scheme = 'posix_prefix'
+prefix = '%{_prefix}'
+if prefix == 'NONE':
+ prefix = '%{ac_default_prefix}'
+sitedir = sysconfig.get_path('purelib', scheme, vars={'base': prefix})
+print(sitedir);" 2>/dev/null || %{__python} -Esc "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0))")
Name: @PACKAGE@
Version: @VERSION@
@@ -376,7 +388,7 @@ support for unlocking datasets on user login.
%if 0%{?_systemd}
%define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --with-systemdmodulesloaddir=%{_modulesloaddir} --with-systemdgeneratordir=%{_systemdgeneratordir} --disable-sysvinit
- %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volumes.target
+ %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-mount@.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volumes.target
%else
%define systemd --enable-sysvinit --disable-systemd
%endif
diff --git a/sys/contrib/openzfs/scripts/spdxcheck.pl b/sys/contrib/openzfs/scripts/spdxcheck.pl
index 47128402f7bc..88f5a235d70c 100755
--- a/sys/contrib/openzfs/scripts/spdxcheck.pl
+++ b/sys/contrib/openzfs/scripts/spdxcheck.pl
@@ -253,7 +253,6 @@ my %override_file_license_tags = (
'GPL-2.0-or-later' => [qw(
include/os/freebsd/spl/sys/kstat.h
include/os/freebsd/spl/sys/sunddi.h
- include/sys/mod.h
)],
'CDDL-1.0' => [qw(
include/os/linux/spl/sys/errno.h
diff --git a/sys/contrib/openzfs/tests/runfiles/common.run b/sys/contrib/openzfs/tests/runfiles/common.run
index 7969945a4796..9fad8946f4f3 100644
--- a/sys/contrib/openzfs/tests/runfiles/common.run
+++ b/sys/contrib/openzfs/tests/runfiles/common.run
@@ -37,8 +37,7 @@ tests = ['alloc_class_001_pos', 'alloc_class_002_neg', 'alloc_class_003_pos',
'alloc_class_004_pos', 'alloc_class_005_pos', 'alloc_class_006_pos',
'alloc_class_007_pos', 'alloc_class_008_pos', 'alloc_class_009_pos',
'alloc_class_010_pos', 'alloc_class_011_neg', 'alloc_class_012_pos',
- 'alloc_class_013_pos', 'alloc_class_014_neg', 'alloc_class_015_pos',
- 'alloc_class_016_pos']
+ 'alloc_class_013_pos', 'alloc_class_016_pos']
tags = ['functional', 'alloc_class']
[tests/functional/append]
@@ -171,7 +170,8 @@ tests = ['zdb_002_pos', 'zdb_003_pos', 'zdb_004_pos', 'zdb_005_pos',
'zdb_block_size_histogram', 'zdb_checksum', 'zdb_decompress',
'zdb_display_block', 'zdb_encrypted', 'zdb_label_checksum',
'zdb_object_range_neg', 'zdb_object_range_pos', 'zdb_objset_id',
- 'zdb_decompress_zstd', 'zdb_recover', 'zdb_recover_2', 'zdb_backup']
+ 'zdb_decompress_zstd', 'zdb_recover', 'zdb_recover_2', 'zdb_backup',
+ 'zdb_tunables']
pre =
post =
tags = ['functional', 'cli_root', 'zdb']
@@ -308,7 +308,7 @@ tests = ['zfs_reservation_001_pos', 'zfs_reservation_002_pos']
tags = ['functional', 'cli_root', 'zfs_reservation']
[tests/functional/cli_root/zfs_rewrite]
-tests = ['zfs_rewrite']
+tests = ['zfs_rewrite', 'zfs_rewrite_physical']
tags = ['functional', 'cli_root', 'zfs_rewrite']
[tests/functional/cli_root/zfs_rollback]
@@ -497,6 +497,7 @@ tags = ['functional', 'cli_root', 'zpool_labelclear']
tests = ['zpool_initialize_attach_detach_add_remove',
'zpool_initialize_fault_export_import_online',
'zpool_initialize_import_export',
+ 'zpool_initialize_multiple_pools',
'zpool_initialize_offline_export_import_online',
'zpool_initialize_online_offline',
'zpool_initialize_split',
@@ -542,8 +543,10 @@ tests = ['zpool_scrub_001_neg', 'zpool_scrub_002_pos', 'zpool_scrub_003_pos',
'zpool_scrub_004_pos', 'zpool_scrub_005_pos',
'zpool_scrub_encrypted_unloaded', 'zpool_scrub_print_repairing',
'zpool_scrub_offline_device', 'zpool_scrub_multiple_copies',
+ 'zpool_scrub_multiple_pools',
'zpool_error_scrub_001_pos', 'zpool_error_scrub_002_pos',
- 'zpool_error_scrub_003_pos', 'zpool_error_scrub_004_pos']
+ 'zpool_error_scrub_003_pos', 'zpool_error_scrub_004_pos',
+ 'zpool_scrub_date_range_001']
tags = ['functional', 'cli_root', 'zpool_scrub']
[tests/functional/cli_root/zpool_set]
@@ -574,8 +577,8 @@ tags = ['functional', 'cli_root', 'zpool_sync']
[tests/functional/cli_root/zpool_trim]
tests = ['zpool_trim_attach_detach_add_remove',
- 'zpool_trim_fault_export_import_online',
- 'zpool_trim_import_export', 'zpool_trim_multiple', 'zpool_trim_neg',
+ 'zpool_trim_fault_export_import_online', 'zpool_trim_import_export',
+ 'zpool_trim_multiple', 'zpool_trim_multiple_pools', 'zpool_trim_neg',
'zpool_trim_offline_export_import_online', 'zpool_trim_online_offline',
'zpool_trim_partial', 'zpool_trim_rate', 'zpool_trim_rate_neg',
'zpool_trim_secure', 'zpool_trim_split', 'zpool_trim_start_and_cancel_neg',
@@ -740,7 +743,8 @@ tags = ['functional', 'features', 'large_dnode']
[tests/functional/gang_blocks]
tests = ['gang_blocks_001_pos', 'gang_blocks_redundant',
- 'gang_blocks_ddt_copies']
+ 'gang_blocks_ddt_copies', 'gang_blocks_dyn_header_pos',
+ 'gang_blocks_dyn_header_neg', 'gang_blocks_dyn_multi']
tags = ['functional', 'gang_blocks']
[tests/functional/grow]
@@ -798,7 +802,7 @@ tags = ['functional', 'migration']
[tests/functional/mmap]
tests = ['mmap_mixed', 'mmap_read_001_pos', 'mmap_seek_001_pos',
- 'mmap_sync_001_pos', 'mmap_write_001_pos']
+ 'mmap_sync_001_pos', 'mmap_write_001_pos', 'mmap_ftruncate']
tags = ['functional', 'mmap']
[tests/functional/mount]
diff --git a/sys/contrib/openzfs/tests/runfiles/sanity.run b/sys/contrib/openzfs/tests/runfiles/sanity.run
index 732f252b52d2..7767c0c2d535 100644
--- a/sys/contrib/openzfs/tests/runfiles/sanity.run
+++ b/sys/contrib/openzfs/tests/runfiles/sanity.run
@@ -195,7 +195,7 @@ tests = ['zfs_reservation_001_pos', 'zfs_reservation_002_pos']
tags = ['functional', 'cli_root', 'zfs_reservation']
[tests/functional/cli_root/zfs_rewrite]
-tests = ['zfs_rewrite']
+tests = ['zfs_rewrite', 'zfs_rewrite_physical']
tags = ['functional', 'cli_root', 'zfs_rewrite']
[tests/functional/cli_root/zfs_rollback]
diff --git a/sys/contrib/openzfs/tests/test-runner/bin/test-runner.py.in b/sys/contrib/openzfs/tests/test-runner/bin/test-runner.py.in
index 5bf13f5c08af..2158208be6e5 100755
--- a/sys/contrib/openzfs/tests/test-runner/bin/test-runner.py.in
+++ b/sys/contrib/openzfs/tests/test-runner/bin/test-runner.py.in
@@ -15,6 +15,7 @@
#
# Copyright (c) 2012, 2018 by Delphix. All rights reserved.
# Copyright (c) 2019 Datto Inc.
+# Copyright (c) 2025, Klara, Inc.
#
# This script must remain compatible with Python 3.6+.
#
@@ -372,6 +373,8 @@ User: %s
stdout/stderr/merged in its own file.
"""
+ timeprefix = datetime.now().strftime('[%FT%T.%f] ')
+
logname = getpwuid(os.getuid()).pw_name
rer = ''
if self.reran is True:
@@ -383,7 +386,7 @@ User: %s
msga = 'Test: %s%s ' % (self.pathname, user)
msgb = '[%s] [%s]%s\n' % (self.result.runtime, self.result.result, rer)
pad = ' ' * (80 - (len(msga) + len(msgb)))
- result_line = msga + pad + msgb
+ result_line = timeprefix + msga + pad + msgb
# The result line is always written to the log file. If -q was
# specified only failures are written to the console, otherwise
diff --git a/sys/contrib/openzfs/tests/test-runner/bin/zts-report.py.in b/sys/contrib/openzfs/tests/test-runner/bin/zts-report.py.in
index 40f5083d1294..001970120148 100755
--- a/sys/contrib/openzfs/tests/test-runner/bin/zts-report.py.in
+++ b/sys/contrib/openzfs/tests/test-runner/bin/zts-report.py.in
@@ -15,6 +15,7 @@
#
# Copyright (c) 2017 by Delphix. All rights reserved.
# Copyright (c) 2018 by Lawrence Livermore National Security, LLC.
+# Copyright (c) 2025, Klara, Inc.
#
# This script must remain compatible with Python 3.6+.
#
@@ -381,7 +382,8 @@ def process_results(pathname):
prefix = '/zfs-tests/tests/(?:functional|perf/regression)/'
pattern = \
- r'^Test(?:\s+\(\S+\))?:' + \
+ r'^(?:\[[0-9\-T:\.]+\]\s+)?' + \
+ r'Test(?:\s+\(\S+\))?:' + \
rf'\s*\S*{prefix}(\S+)' + \
r'\s*\(run as (\S+)\)\s*\[(\S+)\]\s*\[(\S+)\]'
pattern_log = r'^\s*Log directory:\s*(\S*)'
diff --git a/sys/contrib/openzfs/tests/test-runner/include/logapi.shlib b/sys/contrib/openzfs/tests/test-runner/include/logapi.shlib
index 670ecfefb986..29e0c7f1c9ca 100644
--- a/sys/contrib/openzfs/tests/test-runner/include/logapi.shlib
+++ b/sys/contrib/openzfs/tests/test-runner/include/logapi.shlib
@@ -25,6 +25,7 @@
# Use is subject to license terms.
#
# Copyright (c) 2012, 2020 by Delphix. All rights reserved.
+# Copyright (c) 2025, Klara, Inc.
#
STF_PASS=0
@@ -465,7 +466,11 @@ function _endlog
function _printline
{
- echo "$@"
+ if [[ -n "$ZTS_LOG_SUPPRESS_TIMESTAMP" ]] ; then
+ printf '[%(%FT%T.%6N)T] %s\n' now "$*"
+ else
+ echo "$@"
+ fi
}
# Output an error message
diff --git a/sys/contrib/openzfs/tests/zfs-tests/callbacks/zfs_dmesg.ksh b/sys/contrib/openzfs/tests/zfs-tests/callbacks/zfs_dmesg.ksh
index 73c654125319..de31765a52e4 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/callbacks/zfs_dmesg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/callbacks/zfs_dmesg.ksh
@@ -15,6 +15,7 @@
#
# Copyright (c) 2016 by Delphix. All rights reserved.
# Copyright (c) 2017 Lawrence Livermore National Security, LLC.
+# Copyright (c) 2025, Klara, Inc.
#
# $1: number of lines to output (default: 200)
@@ -25,7 +26,11 @@ echo " Tailing last $lines lines of dmesg log"
echo "================================================================="
# report and reset afterwards
-sudo dmesg -c | tail -n $lines
+dmesg_args="-c"
+if [[ $(uname) = "Linux" ]] ; then
+ dmesg_args="$dmesg_args --time-format=iso"
+fi
+sudo dmesg $dmesg_args | tail -n $lines
echo "================================================================="
echo " End of dmesg log"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore b/sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore
index e9a6f8f0ac17..1cd90024e94d 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore
@@ -23,6 +23,7 @@
/mkfiles
/mktree
/mmap_exec
+/mmap_ftruncate
/mmap_libaio
/mmap_seek
/mmap_sync
diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am
index 909a72c43d80..d5448055a1e1 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am
@@ -72,7 +72,9 @@ scripts_zfs_tests_bin_PROGRAMS += %D%/mkbusy %D%/mkfile %D%/mkfiles %D%/mktree
%C%_mkfile_LDADD = $(LTLIBINTL)
-scripts_zfs_tests_bin_PROGRAMS += %D%/mmap_exec %D%/mmap_seek %D%/mmap_sync %D%/mmapwrite %D%/readmmap
+scripts_zfs_tests_bin_PROGRAMS += \
+ %D%/mmap_exec %D%/mmap_ftruncate %D%/mmap_seek \
+ %D%/mmap_sync %D%/mmapwrite %D%/readmmap
%C%_mmapwrite_LDADD = -lpthread
if WANT_MMAP_LIBAIO
diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/draid.c b/sys/contrib/openzfs/tests/zfs-tests/cmd/draid.c
index 8d0bdc450f80..2c1ab1b9bec3 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/draid.c
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/draid.c
@@ -204,7 +204,7 @@ write_map(const char *filename, nvlist_t *allcfgs)
error = errno;
free(buf);
free(tmpname);
- return (errno);
+ return (error);
}
ssize_t rc, bytes = 0;
diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/idmap_util.c b/sys/contrib/openzfs/tests/zfs-tests/cmd/idmap_util.c
index 416e80714f9b..f332677f520c 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/idmap_util.c
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/idmap_util.c
@@ -301,7 +301,7 @@ static int
write_idmap(pid_t pid, char *buf, size_t buf_size, idmap_type_t type)
{
char path[PATH_MAX];
- int fd = -EBADF;
+ int fd;
int ret;
(void) snprintf(path, sizeof (path), "/proc/%d/%cid_map",
diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/mktree.c b/sys/contrib/openzfs/tests/zfs-tests/cmd/mktree.c
index 297cf6dea415..9a5253468bd2 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/mktree.c
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/mktree.c
@@ -152,7 +152,7 @@ getfdname(char *pdir, char type, int level, int dir, int file)
static void
crtfile(char *pname)
{
- int fd = -1;
+ int fd;
int i, size;
const char *context = "0123456789ABCDF";
char *pbuf;
diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/mmap_ftruncate.c b/sys/contrib/openzfs/tests/zfs-tests/cmd/mmap_ftruncate.c
new file mode 100644
index 000000000000..91cdfe3715e6
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/mmap_ftruncate.c
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: CDDL-1.0
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://opensource.org/licenses/CDDL-1.0.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2025, Klara, Inc.
+ */
+
+/*
+ * Tests async writeback behaviour. Creates a file, maps it into memory, and
+ * dirties every page within it. Then, calls ftruncate() to collapse the file
+ * back down to 0. This causes the kernel to begin writeback on the dirty
+ * pages so they can be freed, before it can complete the ftruncate() call.
+ * None of these are sync operations, so they should avoid the various "force
+ * flush" codepaths.
+ */
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define _pdfail(f, l, s) \
+ do { perror("[" f "#" #l "] " s); exit(2); } while (0)
+#define pdfail(str) _pdfail(__FILE__, __LINE__, str)
+
+int
+main(int argc, char **argv) {
+ if (argc != 3) {
+ printf("usage: mmap_ftruncate <file> <size>\n");
+ exit(2);
+ }
+
+ const char *file = argv[1];
+
+ char *end;
+ off_t sz = strtoull(argv[2], &end, 0);
+ if (end == argv[2] || *end != '\0' || sz == 0) {
+ fprintf(stderr, "E: invalid size");
+ exit(2);
+ }
+
+ int fd = open(file, O_CREAT|O_TRUNC|O_RDWR, S_IRUSR|S_IWUSR);
+ if (fd < 0)
+ pdfail("open");
+
+ if (ftruncate(fd, sz) < 0)
+ pdfail("ftruncate");
+
+ char *p = mmap(NULL, sz, PROT_WRITE, MAP_SHARED, fd, 0);
+ if (p == MAP_FAILED)
+ pdfail("mmap");
+
+ for (off_t off = 0; off < sz; off += 4096)
+ p[off] = 1;
+
+ if (ftruncate(fd, 0) < 0)
+ pdfail("ftruncate");
+
+ if (munmap(p, sz) < 0)
+ pdfail("munmap");
+
+ close(fd);
+ return (0);
+}
diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/mmapwrite.c b/sys/contrib/openzfs/tests/zfs-tests/cmd/mmapwrite.c
index 61fcdc35af13..31d61ffb07d0 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/mmapwrite.c
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/mmapwrite.c
@@ -59,7 +59,7 @@ static void *
normal_writer(void *filename)
{
char *file_path = filename;
- int fd = -1;
+ int fd;
ssize_t write_num = 0;
int page_size = getpagesize();
@@ -93,7 +93,7 @@ normal_writer(void *filename)
static void *
map_writer(void *filename)
{
- int fd = -1;
+ int fd;
int ret = 0;
char *buf = NULL;
int page_size = getpagesize();
diff --git a/sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg b/sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg
index 1c7e42a06e05..bbaa8665ecc8 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg
+++ b/sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg
@@ -205,6 +205,7 @@ export ZFSTEST_FILES='badsend
mkfiles
mktree
mmap_exec
+ mmap_ftruncate
mmap_libaio
mmap_seek
mmap_sync
diff --git a/sys/contrib/openzfs/tests/zfs-tests/include/libtest.shlib b/sys/contrib/openzfs/tests/zfs-tests/include/libtest.shlib
index 4b8db189310f..23e89599cae0 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/include/libtest.shlib
+++ b/sys/contrib/openzfs/tests/zfs-tests/include/libtest.shlib
@@ -2884,7 +2884,9 @@ function user_run
typeset out=$TEST_BASE_DIR/out
typeset err=$TEST_BASE_DIR/err
- sudo -Eu $user env PATH="$PATH" ksh <<<"$*" >$out 2>$err
+ sudo -Eu $user \
+ env PATH="$PATH" ZTS_LOG_SUPPRESS_TIMESTAMP=1 \
+ ksh <<<"$*" >$out 2>$err
typeset res=$?
log_note "out: $(<$out)"
log_note "err: $(<$err)"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg b/sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg
index 98e14ad97718..e273c9f85c28 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg
+++ b/sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg
@@ -87,6 +87,7 @@ SPA_ASIZE_INFLATION spa.asize_inflation spa_asize_inflation
SPA_DISCARD_MEMORY_LIMIT spa.discard_memory_limit zfs_spa_discard_memory_limit
SPA_LOAD_VERIFY_DATA spa.load_verify_data spa_load_verify_data
SPA_LOAD_VERIFY_METADATA spa.load_verify_metadata spa_load_verify_metadata
+SPA_NOTE_TXG_TIME spa.note_txg_time spa_note_txg_time
TRIM_EXTENT_BYTES_MIN trim.extent_bytes_min zfs_trim_extent_bytes_min
TRIM_METASLAB_SKIP trim.metaslab_skip zfs_trim_metaslab_skip
TRIM_TXG_BATCH trim.txg_batch zfs_trim_txg_batch
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
index d27660a42c5a..c2542287c1d7 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
@@ -429,8 +429,6 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/alloc_class/alloc_class_011_neg.ksh \
functional/alloc_class/alloc_class_012_pos.ksh \
functional/alloc_class/alloc_class_013_pos.ksh \
- functional/alloc_class/alloc_class_014_neg.ksh \
- functional/alloc_class/alloc_class_015_pos.ksh \
functional/alloc_class/alloc_class_016_pos.ksh \
functional/alloc_class/cleanup.ksh \
functional/alloc_class/setup.ksh \
@@ -647,6 +645,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/cli_root/zdb/zdb_objset_id.ksh \
functional/cli_root/zdb/zdb_recover_2.ksh \
functional/cli_root/zdb/zdb_recover.ksh \
+ functional/cli_root/zdb/zdb_tunables.ksh \
functional/cli_root/zfs_bookmark/cleanup.ksh \
functional/cli_root/zfs_bookmark/setup.ksh \
functional/cli_root/zfs_bookmark/zfs_bookmark_cliargs.ksh \
@@ -870,6 +869,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/cli_root/zfs_rewrite/cleanup.ksh \
functional/cli_root/zfs_rewrite/setup.ksh \
functional/cli_root/zfs_rewrite/zfs_rewrite.ksh \
+ functional/cli_root/zfs_rewrite/zfs_rewrite_physical.ksh \
functional/cli_root/zfs_rollback/cleanup.ksh \
functional/cli_root/zfs_rollback/setup.ksh \
functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh \
@@ -1177,6 +1177,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/cli_root/zpool_initialize/zpool_initialize_attach_detach_add_remove.ksh \
functional/cli_root/zpool_initialize/zpool_initialize_fault_export_import_online.ksh \
functional/cli_root/zpool_initialize/zpool_initialize_import_export.ksh \
+ functional/cli_root/zpool_initialize/zpool_initialize_multiple_pools.ksh \
functional/cli_root/zpool_initialize/zpool_initialize_offline_export_import_online.ksh \
functional/cli_root/zpool_initialize/zpool_initialize_online_offline.ksh \
functional/cli_root/zpool_initialize/zpool_initialize_split.ksh \
@@ -1240,9 +1241,11 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/cli_root/zpool_scrub/zpool_scrub_005_pos.ksh \
functional/cli_root/zpool_scrub/zpool_scrub_encrypted_unloaded.ksh \
functional/cli_root/zpool_scrub/zpool_scrub_multiple_copies.ksh \
+ functional/cli_root/zpool_scrub/zpool_scrub_multiple_pools.ksh \
functional/cli_root/zpool_scrub/zpool_scrub_offline_device.ksh \
functional/cli_root/zpool_scrub/zpool_scrub_print_repairing.ksh \
functional/cli_root/zpool_scrub/zpool_scrub_txg_continue_from_last.ksh \
+ functional/cli_root/zpool_scrub/zpool_scrub_date_range_001.ksh \
functional/cli_root/zpool_scrub/zpool_error_scrub_001_pos.ksh \
functional/cli_root/zpool_scrub/zpool_error_scrub_002_pos.ksh \
functional/cli_root/zpool_scrub/zpool_error_scrub_003_pos.ksh \
@@ -1292,6 +1295,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/cli_root/zpool_trim/zpool_trim_fault_export_import_online.ksh \
functional/cli_root/zpool_trim/zpool_trim_import_export.ksh \
functional/cli_root/zpool_trim/zpool_trim_multiple.ksh \
+ functional/cli_root/zpool_trim/zpool_trim_multiple_pools.ksh \
functional/cli_root/zpool_trim/zpool_trim_neg.ksh \
functional/cli_root/zpool_trim/zpool_trim_offline_export_import_online.ksh \
functional/cli_root/zpool_trim/zpool_trim_online_offline.ksh \
@@ -1444,6 +1448,9 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/crtime/setup.ksh \
functional/crypto/icp_aes_ccm.ksh \
functional/crypto/icp_aes_gcm.ksh \
+ functional/ctime/cleanup.ksh \
+ functional/ctime/ctime_001_pos.ksh \
+ functional/ctime/setup.ksh \
functional/deadman/deadman_ratelimit.ksh \
functional/deadman/deadman_sync.ksh \
functional/deadman/deadman_zio.ksh \
@@ -1578,6 +1585,9 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/gang_blocks/gang_blocks_001_pos.ksh \
functional/gang_blocks/gang_blocks_ddt_copies.ksh \
functional/gang_blocks/gang_blocks_redundant.ksh \
+ functional/gang_blocks/gang_blocks_dyn_header_neg.ksh \
+ functional/gang_blocks/gang_blocks_dyn_header_pos.ksh \
+ functional/gang_blocks/gang_blocks_dyn_multi.ksh \
functional/gang_blocks/setup.ksh \
functional/grow/grow_pool_001_pos.ksh \
functional/grow/grow_replicas_001_pos.ksh \
@@ -1667,6 +1677,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/mmap/mmap_seek_001_pos.ksh \
functional/mmap/mmap_sync_001_pos.ksh \
functional/mmap/mmap_write_001_pos.ksh \
+ functional/mmap/mmap_ftruncate.ksh \
functional/mmap/setup.ksh \
functional/mmp/cleanup.ksh \
functional/mmp/mmp_active_import.ksh \
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_002_neg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_002_neg.ksh
index 7d6924b2c9bf..79a431a13238 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_002_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_002_neg.ksh
@@ -41,9 +41,4 @@ log_mustnot zpool create $TESTPOOL $ZPOOL_DISKS special mirror \
log_mustnot display_status $TESTPOOL
log_mustnot zpool destroy -f $TESTPOOL
-log_mustnot zpool create $TESTPOOL raidz $ZPOOL_DISKS special raidz \
- $CLASS_DISK0 $CLASS_DISK1 $CLASS_DISK2
-log_mustnot display_status $TESTPOOL
-log_mustnot zpool destroy -f $TESTPOOL
-
log_pass $claim
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_003_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_003_pos.ksh
index 42d5deda3842..961dcd46429a 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_003_pos.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_003_pos.ksh
@@ -32,7 +32,7 @@ log_onexit cleanup
log_must disk_setup
-for type in "" "mirror" "raidz"
+for type in "" "mirror" "raidz" "draid"
do
log_must zpool create $TESTPOOL $type $ZPOOL_DISKS
@@ -47,6 +47,12 @@ do
$CLASS_DISK0 $CLASS_DISK1
log_must zpool iostat -H $TESTPOOL $CLASS_DISK0
log_must zpool iostat -H $TESTPOOL $CLASS_DISK1
+ elif [ "$type" = "draid" ]; then
+ log_must zpool add $TESTPOOL special raidz \
+ $CLASS_DISK0 $CLASS_DISK1 $CLASS_DISK2
+ log_must zpool iostat -H $TESTPOOL $CLASS_DISK0
+ log_must zpool iostat -H $TESTPOOL $CLASS_DISK1
+ log_must zpool iostat -H $TESTPOOL $CLASS_DISK2
else
log_must zpool add $TESTPOOL special $CLASS_DISK0
log_must zpool iostat -H $TESTPOOL $CLASS_DISK0
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_004_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_004_pos.ksh
index 684b6557e3f1..39ddaad1be5b 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_004_pos.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_004_pos.ksh
@@ -37,7 +37,7 @@ typeset ac_value
typeset stype=""
typeset sdisks=""
-for type in "" "mirror" "raidz"
+for type in "" "mirror" "raidz" "draid"
do
if [ "$type" = "mirror" ]; then
stype="mirror"
@@ -45,6 +45,9 @@ do
elif [ "$type" = "raidz" ]; then
stype="mirror"
sdisks="${CLASS_DISK0} ${CLASS_DISK1}"
+ elif [ "$type" = "draid" ]; then
+ stype="raidz"
+ sdisks="${CLASS_DISK0} ${CLASS_DISK1} ${CLASS_DISK2}"
else
stype=""
sdisks="${CLASS_DISK0}"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_009_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_009_pos.ksh
index 2223bb1c491d..b7e93fc7350e 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_009_pos.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_009_pos.ksh
@@ -36,7 +36,7 @@ typeset stype=""
typeset sdisks=""
typeset props=""
-for type in "" "mirror" "raidz"
+for type in "" "mirror" "raidz" "draid"
do
if [ "$type" = "mirror" ]; then
stype="mirror"
@@ -45,6 +45,9 @@ do
elif [ "$type" = "raidz" ]; then
stype="mirror"
sdisks="${CLASS_DISK0} ${CLASS_DISK1}"
+ elif [ "$type" = "draid" ]; then
+ stype="raidz"
+ sdisks="${CLASS_DISK0} ${CLASS_DISK1} ${CLASS_DISK2}"
else
stype=""
sdisks="${CLASS_DISK0}"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_010_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_010_pos.ksh
index 7f9d108ed184..f7dfd42b0f05 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_010_pos.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_010_pos.ksh
@@ -36,7 +36,7 @@ log_must disk_setup
log_must zpool create $TESTPOOL raidz $ZPOOL_DISKS special mirror \
$CLASS_DISK0 $CLASS_DISK1
-for value in 0 512 1024 2048 4096 8192 16384 32768 65536 131072
+for value in 0 200 512 1300 4096 12345 131072 1572864 16777216
do
log_must zfs set special_small_blocks=$value $TESTPOOL
ACTUAL=$(zfs get -p special_small_blocks $TESTPOOL | \
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_011_neg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_011_neg.ksh
index a04e9ca43273..0f90117544a6 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_011_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_011_neg.ksh
@@ -22,7 +22,7 @@
#
# DESCRIPTION:
# Setting the special_small_blocks property to invalid values fails.
-# Powers of two from 512 to 1M are allowed.
+# Only values between 0 and 16M including are allowed.
#
verify_runnable "global"
@@ -36,7 +36,7 @@ log_must disk_setup
log_must zpool create $TESTPOOL raidz $ZPOOL_DISKS special mirror \
$CLASS_DISK0 $CLASS_DISK1
-for value in 256 1025 33554432
+for value in 16777217 33554432 4294967296
do
log_mustnot zfs set special_small_blocks=$value $TESTPOOL
done
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_014_neg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_014_neg.ksh
deleted file mode 100755
index e16b64a964e4..000000000000
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_014_neg.ksh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/ksh -p
-# SPDX-License-Identifier: CDDL-1.0
-
-#
-# This file and its contents are supplied under the terms of the
-# Common Development and Distribution License ("CDDL"), version 1.0.
-# You may only use this file in accordance with the terms of version
-# 1.0 of the CDDL.
-#
-# A full copy of the text of the CDDL should have accompanied this
-# source. A copy of the CDDL is also available via the Internet at
-# http://www.illumos.org/license/CDDL.
-#
-
-. $STF_SUITE/tests/functional/alloc_class/alloc_class.kshlib
-
-#
-# DESCRIPTION:
-# Setting the special_small_blocks property greater than recordsize fails.
-#
-
-verify_runnable "global"
-
-claim="Setting the special_small_blocks property greater than recordsize fails"
-
-log_assert $claim
-log_onexit cleanup
-log_must disk_setup
-
-for size in 512 4096 32768 131072 524288 1048576
-do
- let bigger=$size*2
- log_mustnot zpool create -O recordsize=$size \
- -O special_small_blocks=$bigger \
- $TESTPOOL raidz $ZPOOL_DISKS special mirror \
- $CLASS_DISK0 $CLASS_DISK1
-done
-
-log_pass $claim
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_015_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_015_pos.ksh
deleted file mode 100755
index 9d34375b74ca..000000000000
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_015_pos.ksh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/ksh -p
-# SPDX-License-Identifier: CDDL-1.0
-
-#
-# This file and its contents are supplied under the terms of the
-# Common Development and Distribution License ("CDDL"), version 1.0.
-# You may only use this file in accordance with the terms of version
-# 1.0 of the CDDL.
-#
-# A full copy of the text of the CDDL should have accompanied this
-# source. A copy of the CDDL is also available via the Internet at
-# http://www.illumos.org/license/CDDL.
-#
-
-. $STF_SUITE/tests/functional/alloc_class/alloc_class.kshlib
-
-#
-# DESCRIPTION:
-# Can set special_small_blocks property less than or equal to recordsize.
-#
-
-verify_runnable "global"
-
-claim="Can set special_small_blocks property less than or equal to recordsize"
-
-log_assert $claim
-log_onexit cleanup
-log_must disk_setup
-
-for size in 8192 32768 131072 524288 1048576
-do
- let smaller=$size/2
- log_must zpool create -O recordsize=$size \
- -O special_small_blocks=$smaller \
- $TESTPOOL raidz $ZPOOL_DISKS special mirror \
- $CLASS_DISK0 $CLASS_DISK1
- log_must zpool destroy -f "$TESTPOOL"
-
- log_must zpool create -O recordsize=$size \
- -O special_small_blocks=$size \
- $TESTPOOL raidz $ZPOOL_DISKS special mirror \
- $CLASS_DISK0 $CLASS_DISK1
- log_must zpool destroy -f "$TESTPOOL"
-done
-
-log_pass $claim
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh
index 54ffdc75669a..4cede26b913a 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh
@@ -41,16 +41,22 @@ function cleanup
{
datasetexists $TESTPOOL && destroy_pool $TESTPOOL
set_tunable64 TXG_TIMEOUT $timeout
+ log_must restore_tunable BCLONE_WAIT_DIRTY
}
log_onexit cleanup
+log_must save_tunable BCLONE_WAIT_DIRTY
+
log_must set_tunable64 TXG_TIMEOUT 5000
log_must zpool create -o feature@block_cloning=enabled $TESTPOOL $DISKS
log_must sync_pool $TESTPOOL true
+# Verify fallback to copy when there are dirty blocks
+log_must set_tunable32 BCLONE_WAIT_DIRTY 0
+
log_must dd if=/dev/urandom of=/$TESTPOOL/file bs=128K count=4
log_must clonefile -f /$TESTPOOL/file /$TESTPOOL/clone 0 0 524288
@@ -61,5 +67,20 @@ log_must have_same_content /$TESTPOOL/file /$TESTPOOL/clone
typeset blocks=$(get_same_blocks $TESTPOOL file $TESTPOOL clone)
log_must [ "$blocks" = "" ]
+log_must rm /$TESTPOOL/file /$TESTPOOL/clone
+
+# Verify blocks are cloned even when there are dirty blocks
+log_must set_tunable32 BCLONE_WAIT_DIRTY 1
+
+log_must dd if=/dev/urandom of=/$TESTPOOL/file bs=128K count=4
+log_must clonefile -f /$TESTPOOL/file /$TESTPOOL/clone 0 0 524288
+
+log_must sync_pool $TESTPOOL
+
+log_must have_same_content /$TESTPOOL/file /$TESTPOOL/clone
+
+typeset blocks=$(get_same_blocks $TESTPOOL file $TESTPOOL clone)
+log_must [ "$blocks" = "0 1 2 3" ]
+
log_pass $claim
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_tunables.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_tunables.ksh
new file mode 100755
index 000000000000..46965aa7cc37
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_tunables.ksh
@@ -0,0 +1,71 @@
+#!/bin/ksh -p
+# SPDX-License-Identifier: CDDL-1.0
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or https://opensource.org/licenses/CDDL-1.0.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2025, Rob Norris <robn@despairlabs.com>
+#
+
+. $STF_SUITE/include/libtest.shlib
+
+verify_runnable "both"
+
+log_assert "zdb can work with libzpool tunables"
+
+# a tunable name by itself, or with the "show" command, produces name and value
+log_must eval 'zdb -o zfs_recover | grep -qE "^zfs_recover: 0$"'
+log_must eval 'zdb -o show=zfs_recover | grep -qE "^zfs_recover: 0$"'
+
+# info about a tunable shows a different format
+log_must eval 'zdb -o info=zfs_recover | grep -qE "^zfs_recover \[[[:alnum:]_]+ r[dw]]: .+"'
+
+# "show" by itself shows all the tunables and their values
+# this tests limits to 50 tunables, and then counts the number that match
+# the format, which should be all of them
+log_must test $(zdb -o show | head -50 | grep -cE "^[[:alnum:]_]+: .+") -eq 50
+
+# "info" by itself shows info about all tunables
+# like previous test, we limit and then count
+log_must test $(zdb -o info | head -50 | grep -cE "^[[:alnum:]_]+ \[[[:alnum:]_]+ r[dw]]: .+") -eq 50
+
+# can't lookup nonexistent tunables
+log_mustnot_expect 'no such tunable: hello' zdb -o hello
+log_mustnot_expect 'no such tunable: hello' zdb -o show=hello
+log_mustnot_expect 'no such tunable: hello' zdb -o info=hello
+
+# setting a tunable shows the old and the new value
+log_must eval 'zdb -o zfs_recover=1 | grep -qE "^zfs_recover: 0 -> 1$"'
+
+# replacing a value still sets it
+log_must eval 'zdb -o zfs_recover=0 | grep -qE "^zfs_recover: 0 -> 0$"'
+
+# can't set the "magic" commands
+log_mustnot_expect 'no such tunable: 0' zdb -o show=0
+log_mustnot_expect 'no such tunable: 1' zdb -o info=1
+
+# can set multiple in same command
+log_must eval 'zdb -o zfs_recover=1 -o zfs_flags=512 | xargs | grep -qE "^zfs_recover: 0 -> 1 zfs_flags: 4294965758 -> 512$"'
+
+# can set and show in same command
+log_must eval 'zdb -o zfs_recover=1 -o zfs_recover -o zfs_recover=0 | xargs | grep -qE "^zfs_recover: 0 -> 1 zfs_recover: 1 zfs_recover: 1 -> 0$"'
+
+log_pass "zdb can work with libzpool tunables"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite_physical.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite_physical.ksh
new file mode 100755
index 000000000000..142e44f53515
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite_physical.ksh
@@ -0,0 +1,100 @@
+#!/bin/ksh -p
+# SPDX-License-Identifier: CDDL-1.0
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or https://opensource.org/licenses/CDDL-1.0.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2025, iXsystems, Inc.
+#
+
+# DESCRIPTION:
+# Verify zfs rewrite -P flag correctly preserves logical birth times.
+#
+# STRATEGY:
+# 1. Create a test file and sync it.
+# 2. Create a snapshot to capture the original birth time.
+# 3. Test default rewrite behavior (updates logical birth time).
+# 4. Test -P flag behavior (preserves logical birth time).
+# 5. Verify incremental send behavior difference.
+
+. $STF_SUITE/include/libtest.shlib
+
+typeset tmp=$(mktemp)
+typeset send_default=$(mktemp)
+typeset send_physical=$(mktemp)
+
+function cleanup
+{
+ rm -rf $tmp $send_default $send_physical $TESTDIR/*
+ zfs destroy -R $TESTPOOL/$TESTFS@snap1 2>/dev/null || true
+ zfs destroy -R $TESTPOOL/$TESTFS@snap2 2>/dev/null || true
+ zfs destroy -R $TESTPOOL/$TESTFS@snap3 2>/dev/null || true
+}
+
+log_assert "zfs rewrite -P flag correctly preserves logical birth times"
+
+log_onexit cleanup
+
+log_must zfs set recordsize=128k $TESTPOOL/$TESTFS
+
+# Create test file and initial snapshot
+log_must dd if=/dev/urandom of=$TESTDIR/testfile bs=128k count=4
+log_must sync_pool $TESTPOOL
+typeset orig_hash=$(xxh128digest $TESTDIR/testfile)
+log_must zfs snapshot $TESTPOOL/$TESTFS@snap1
+
+# Test default rewrite behavior (updates logical birth time)
+log_must zfs rewrite $TESTDIR/testfile
+log_must sync_pool $TESTPOOL
+typeset default_hash=$(xxh128digest $TESTDIR/testfile)
+log_must [ "$orig_hash" = "$default_hash" ]
+log_must zfs snapshot $TESTPOOL/$TESTFS@snap2
+
+# Test incremental send size - should be large with updated birth time
+log_must eval "zfs send -i @snap1 $TESTPOOL/$TESTFS@snap2 > $send_default"
+typeset default_size=$(wc -c < $send_default)
+log_note "Default rewrite incremental send size: $default_size bytes"
+
+# Reset the file to original state
+log_must zfs rollback -r $TESTPOOL/$TESTFS@snap1
+
+# Test -P flag behavior (preserves logical birth time)
+log_must zfs rewrite -P $TESTDIR/testfile
+log_must sync_pool $TESTPOOL
+typeset physical_hash=$(xxh128digest $TESTDIR/testfile)
+log_must [ "$orig_hash" = "$physical_hash" ]
+log_must zfs snapshot $TESTPOOL/$TESTFS@snap3
+
+# Test incremental send size - should be minimal with preserved birth time
+log_must eval "zfs send -i @snap1 $TESTPOOL/$TESTFS@snap3 > $send_physical"
+typeset physical_size=$(wc -c < $send_physical)
+log_note "Physical rewrite incremental send size: $physical_size bytes"
+
+# Verify that -P flag produces smaller incremental send
+if [[ $physical_size -lt $default_size ]]; then
+ log_note "SUCCESS: -P flag produces smaller incremental send" \
+ "($physical_size < $default_size)"
+else
+ log_fail "FAIL: -P flag should produce smaller incremental send" \
+ "($physical_size >= $default_size)"
+fi
+
+log_pass
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_001_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_001_pos.ksh
index f96d291ccb1c..94ccabeb80a8 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_001_pos.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_001_pos.ksh
@@ -50,7 +50,7 @@ function cleanup
function check_features
{
- for state in $(zpool get all $TESTPOOL | \
+ for state in $(zpool get all $TESTPOOL | grep -v "dynamic_gang_header" | \
awk '$2 ~ /feature@/ { print $3 }'); do
if [[ "$state" != "enabled" && "$state" != "active" ]]; then
log_fail "some features are not enabled on new pool"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_005_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_005_pos.ksh
index 7366a46f9c81..676aca1a20a5 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_005_pos.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_005_pos.ksh
@@ -58,6 +58,9 @@ function check_features
return 1;
fi
else
+ if [[ "feature@dynamic_gang_header" == "${2}" ]]; then
+ continue
+ fi
# Failure other features must be enabled or active.
if [[ "${3}" != "enabled" && "${3}" != "active" ]]; then
return 2;
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg
index cf5e0961f9fd..bdf5fdf85cff 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg
@@ -91,6 +91,8 @@ typeset -a properties=(
"feature@device_rebuild"
"feature@draid"
"feature@redaction_list_spill"
+ "feature@dynamic_gang_header"
+ "feature@physical_rewrite"
)
if is_linux || is_freebsd; then
@@ -114,5 +116,6 @@ if is_linux || is_freebsd; then
"feature@fast_dedup"
"feature@longname"
"feature@large_microzap"
+ "feature@block_cloning_endian"
)
fi
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_multiple_pools.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_multiple_pools.ksh
new file mode 100755
index 000000000000..cc7bca5445d2
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_multiple_pools.ksh
@@ -0,0 +1,131 @@
+#!/bin/ksh -p
+# SPDX-License-Identifier: CDDL-1.0
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/cli_root/zpool_initialize/zpool_initialize.kshlib
+
+#
+# DESCRIPTION:
+# Verify 'zpool initialize -a' works correctly with multiple pools
+#
+# STRATEGY:
+# 1. Create multiple pools.
+# 2. Start a initialize operation on all pools using 'zpool initialize -a'.
+# 3. Verify that the initializing is active on all pools.
+# 4. Wait for the initialize operation to complete.
+# 5. Verify that the initialize operation is complete on all pools.
+# 6. Start a initializing on all pools using 'zpool initialize -w -a'.
+# 7. Verify that the initialize operation is complete on all pools.
+# 8. Now test the -u, -c and -s options on multiple pools with -a.
+# 9. Verify that the initialize status is correctly updated on all pools.
+#
+
+verify_runnable "global"
+
+cleanup() {
+ for pool in {1..4}; do
+ zpool destroy $TESTPOOL${pool}
+ rm -rf $TESTDIR${pool}
+ done
+ rm -f $DISK1 $DISK2 $DISK3 $DISK4
+}
+
+log_onexit cleanup
+
+log_assert "Verify if 'zpool initialize -a' works correctly with multiple pools."
+
+DEVSIZE='5G'
+TESTDIR="$TEST_BASE_DIR/zpool_initialize_multiple_pools"
+DISK1="$TEST_BASE_DIR/zpool_disk1.dat"
+DISK2="$TEST_BASE_DIR/zpool_disk2.dat"
+DISK3="$TEST_BASE_DIR/zpool_disk3.dat"
+DISK4="$TEST_BASE_DIR/zpool_disk4.dat"
+
+truncate -s $DEVSIZE $DISK1
+truncate -s $DEVSIZE $DISK2
+truncate -s $DEVSIZE $DISK3
+truncate -s $DEVSIZE $DISK4
+
+for pool in {1..4}; do
+ DISK[$pool]="$TEST_BASE_DIR/zpool_disk${pool}.dat"
+ truncate -s $DEVSIZE ${DISK[$pool]}
+ log_must zpool create $TESTPOOL${pool} ${DISK[$pool]}
+done
+sync_all_pools
+
+# Start an initialize operation on all pools using 'zpool initialize -a'.
+log_must zpool initialize -a
+
+# Verify that the initializing is active on all pools.
+for pool in {1..4}; do
+ if [[ -z "$(initialize_progress $TESTPOOL${pool} ${DISK[$pool]})" ]]; then
+ log_fail "Initializing did not start on pool $TESTPOOL${pool}"
+ fi
+done
+
+# Wait for the initialize operation to complete on all pools.
+for pool in {1..4}; do
+ log_must zpool wait -t initialize $TESTPOOL${pool}
+done
+
+# Verify that the initialize operation is complete on all pools.
+complete_count=$(zpool status -i | grep -c "completed")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have initialize status 'completed', but found ${complete_count}."
+fi
+
+# Start an initialize operation on all pools using 'zpool initialize -w -a'.
+log_must zpool initialize -w -a
+
+# Verify that the initialize operation is complete on all pools.
+complete_count=$(zpool status -i | grep -c "completed")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have initialize status 'completed', but found ${complete_count}."
+fi
+
+# Now test the -u, -c and -s options on multiple pools with -a.
+log_must zpool initialize -u -a
+complete_count=$(zpool status -i | grep -c "uninitialized")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have initialize status 'uninitialized', but found ${complete_count}."
+fi
+
+log_must zpool initialize -a
+
+for pool in {1..4}; do
+ if [[ -z "$(initialize_progress $TESTPOOL${pool} ${DISK[$pool]})" ]]; then
+ log_fail "Initializing did not start on pool $TESTPOOL${pool}"
+ fi
+done
+
+log_must zpool initialize -a -s
+complete_count=$(zpool status -i | grep -c "suspended")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have initialize status 'suspended', but found ${complete_count}."
+fi
+
+log_must zpool initialize -a -c
+for pool in {1..4}; do
+ [[ -z "$(initialize_progress $TESTPOOL${pool} ${DISK[$pool]})" ]] || \
+ log_fail "Initialize did not stop on pool $TESTPOOL${pool}"
+done
+
+log_pass "Initialize '-a' works on multiple pools correctly."
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_001_neg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_001_neg.ksh
index 431568053472..5ffba803342f 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_001_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_001_neg.ksh
@@ -28,6 +28,7 @@
#
# Copyright (c) 2016 by Delphix. All rights reserved.
+# Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
#
. $STF_SUITE/include/libtest.shlib
@@ -46,7 +47,7 @@
verify_runnable "global"
set -A args "" "-?" "blah blah" "-%" "--?" "-*" "-=" \
- "-a" "-b" "-c" "-d" "-e" "-f" "-g" "-h" "-i" "-j" "-k" "-l" \
+ "-b" "-c" "-d" "-e" "-f" "-g" "-h" "-i" "-j" "-k" "-l" \
"-m" "-n" "-o" "-p" "-q" "-r" "-s" "-t" "-u" "-v" "-w" "-x" "-y" "-z" \
"-A" "-B" "-C" "-D" "-E" "-F" "-G" "-H" "-I" "-J" "-K" "-L" \
"-M" "-N" "-O" "-P" "-Q" "-R" "-S" "-T" "-U" "-V" "-W" "-X" "-W" "-Z"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_date_range_001.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_date_range_001.ksh
new file mode 100755
index 000000000000..7f5f8052c8ec
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_date_range_001.ksh
@@ -0,0 +1,94 @@
+#!/bin/ksh -p
+# SPDX-License-Identifier: CDDL-1.0
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or https://opensource.org/licenses/CDDL-1.0.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2025 Klara, Inc.
+# Copyright 2025 Mariusz Zaborski <oshogbo@FreeBSD.org>
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/cli_root/zpool_scrub/zpool_scrub.cfg
+
+#
+# DESCRIPTION:
+# Verify that the date range scrub only scrubs the files that were
+# created/modified within a given time slot.
+#
+# STRATEGY:
+# 1. Write a file.
+# 2. Force a sync of everything via export/import.
+# 3. Wait for one minute.
+# 4. Repeat steps 1, 2, and 3 four two times.
+# 5. Inject checksum errors into all 3 files.
+# 6. Scrub the date range for the first file.
+# 7. Verify that the first file is scrubbed.
+# 8. Verify that newer files are not scrubbed.
+# 9. Repeat steps 6–8 for each of the remaining 2 files.
+#
+
+verify_runnable "global"
+
+function cleanup
+{
+ log_must zinject -c all
+ rm -f $TESTDIR/*_file
+ log_must restore_tunable SPA_NOTE_TXG_TIME
+}
+
+log_onexit cleanup
+
+log_assert "Verifiy scrub, -E, and -S show expected status."
+
+log_must save_tunable SPA_NOTE_TXG_TIME
+log_must set_tunable64 SPA_NOTE_TXG_TIME 30
+
+typeset -a date_list
+for i in `seq 0 2`; do
+ log_must sleep 60
+ log_must zpool export $TESTPOOL
+ log_must zpool import $TESTPOOL
+ date_list+=("$(date '+%Y-%m-%d %H:%M')")
+
+ log_must file_write -o create -f"$TESTDIR/${i}_file" \
+ -b 512 -c 2048 -dR
+
+ log_must sleep 60
+ log_must zpool export $TESTPOOL
+ log_must zpool import $TESTPOOL
+ date_list+=("$(date '+%Y-%m-%d %H:%M')")
+done
+
+for i in `seq 0 2`; do
+ log_must zinject -t data -e checksum -f 100 $TESTDIR/${i}_file
+done
+
+for i in `seq 0 2`; do
+ log_must zpool scrub -w -S "${date_list[$((i * 2))]}" -E "${date_list[$((i * 2 + 1))]}" $TESTPOOL
+ log_must eval "zpool status -v $TESTPOOL | grep '${i}_file'"
+ for j in `seq 0 2`; do
+ if [ $i == $j ]; then
+ continue
+ fi
+ log_mustnot eval "zpool status -v $TESTPOOL | grep '${j}_file'"
+ done
+done
+
+log_pass "Verified scrub, -E, and -S show expected status."
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_multiple_pools.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_multiple_pools.ksh
new file mode 100755
index 000000000000..b8647e208644
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_multiple_pools.ksh
@@ -0,0 +1,128 @@
+#!/bin/ksh -p
+# SPDX-License-Identifier: CDDL-1.0
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/cli_root/zpool_scrub/zpool_scrub.cfg
+
+#
+# DESCRIPTION:
+# Verify 'zpool scrub -a' works correctly with multiple pools
+#
+# STRATEGY:
+# 1. Create multiple pools.
+# 2. Start a scrub on all pools using 'zpool scrub -a'.
+# 3. Verify that the scrub is running on all pools.
+# 4. Wait for the scrub to complete.
+# 5. Verify that the scrub status is complete on all pools.
+# 6. Start a scrub on all pools using 'zpool scrub -w -a'.
+# 7. Verify that the scrub status is complete on all pools.
+# 8. Now test the -p and -s options on multiple pools with -a.
+# 9. Verify that the scrub status is correct for each option.
+#
+
+verify_runnable "global"
+
+cleanup() {
+ log_must set_tunable32 SCAN_SUSPEND_PROGRESS 0
+ for pool in {1..4}; do
+ zpool destroy $TESTPOOL${pool}
+ rm -rf $TESTDIR${pool}
+ done
+ rm -f $DISK1 $DISK2 $DISK3 $DISK4
+ # Import the testpool
+ zpool import -a
+}
+
+log_onexit cleanup
+
+log_assert "Verify if scrubbing multiple pools works correctly."
+
+# Export the testpool created by setup and Import them later.
+log_must zpool export -a
+
+DEVSIZE='128m'
+FILESIZE='50m'
+TESTDIR="$TEST_BASE_DIR/zpool_scrub_multiple_pools"
+DISK1="$TEST_BASE_DIR/zpool_disk1.dat"
+DISK2="$TEST_BASE_DIR/zpool_disk2.dat"
+DISK3="$TEST_BASE_DIR/zpool_disk3.dat"
+DISK4="$TEST_BASE_DIR/zpool_disk4.dat"
+
+truncate -s $DEVSIZE $DISK1
+truncate -s $DEVSIZE $DISK2
+truncate -s $DEVSIZE $DISK3
+truncate -s $DEVSIZE $DISK4
+
+for pool in {1..4}; do
+ DISK[$pool]="$TEST_BASE_DIR/zpool_disk${pool}.dat"
+ truncate -s $DEVSIZE ${DISK[$pool]}
+ log_must zpool create -O mountpoint=$TESTDIR${pool} $TESTPOOL${pool} ${DISK[$pool]}
+ log_must zfs create -o compression=off $TESTPOOL${pool}/testfs${pool}
+ typeset mntpnt=$(get_prop mountpoint $TESTPOOL${pool}/testfs${pool})
+ # Fill some data into the filesystem.
+ log_must mkfile $FILESIZE $mntpnt/file${pool}.dat
+done
+sync_all_pools
+
+# Start a scrub on all pools using 'zpool scrub -a'.
+log_must zpool scrub -a
+# Wait for the scrub to complete on all pools.
+for pool in {1..4}; do
+ log_must zpool wait -t scrub $TESTPOOL${pool}
+done
+
+# Verify that the scrub status is complete on all pools.
+complete_count=$(zpool status -v | grep -c "scrub repaired")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have scrub status 'scrub repaired', but found $complete_count."
+fi
+
+# Start a error scrub on all pools using 'zpool scrub -w -a'
+log_must zpool scrub -w -a
+
+# Verify that the scrub status is complete on all pools.
+complete_count=$(zpool status -v | grep -c "scrub repaired")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have scrub status 'scrub repaired', but found $complete_count."
+fi
+
+# Now test the -p and -s options on multiple pools with -a.
+log_must set_tunable32 SCAN_SUSPEND_PROGRESS 1
+
+log_must zpool scrub -a
+complete_count=$(zpool status -v | grep -c "scrub in progress since")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have scrub status 'scrub in progress since', but found $complete_count."
+fi
+
+log_must zpool scrub -a -p
+complete_count=$(zpool status -v | grep -c "scrub paused since")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have scrub status 'scrub paused since', but found $complete_count."
+fi
+
+log_must zpool scrub -a -s
+complete_count=$(zpool status -v | grep -c "scrub canceled")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have scrub status 'scrub canceled', but found $complete_count."
+fi
+
+log_pass "Scrubbing multiple pools works correctly."
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_multiple_pools.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_multiple_pools.ksh
new file mode 100755
index 000000000000..4348eecc698c
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_multiple_pools.ksh
@@ -0,0 +1,123 @@
+#!/bin/ksh -p
+# SPDX-License-Identifier: CDDL-1.0
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2025 Hewlett Packard Enterprise Development LP.
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/cli_root/zpool_trim/zpool_trim.kshlib
+
+#
+# DESCRIPTION:
+# Verify 'zpool trim -a' works correctly with multiple pools
+#
+# STRATEGY:
+# 1. Create multiple pools.
+# 2. Start a trim on all pools using 'zpool trim -a'.
+# 3. Verify that the trim is started on all pools.
+# 4. Wait for the trim to complete.
+# 5. Verify that the trim is complete on all pools.
+# 6. Start a trim on all pools using 'zpool trim -w -a'.
+# 7. Verify that the trim is complete on all pools.
+# 8. Now test the -c and -s options on multiple pools with -a.
+# 9. Verify that the trim status is correct for each option.
+#
+
+verify_runnable "global"
+
+cleanup() {
+ for pool in {1..4}; do
+ zpool destroy $TESTPOOL${pool}
+ rm -rf $TESTDIR${pool}
+ done
+ rm -f $DISK1 $DISK2 $DISK3 $DISK4
+}
+
+log_onexit cleanup
+
+log_assert "Verify if trim '-a' works on multiple pools correctly."
+
+DEVSIZE='5G'
+TESTDIR="$TEST_BASE_DIR/zpool_trim_multiple_pools"
+DISK1="$TEST_BASE_DIR/zpool_disk1.dat"
+DISK2="$TEST_BASE_DIR/zpool_disk2.dat"
+DISK3="$TEST_BASE_DIR/zpool_disk3.dat"
+DISK4="$TEST_BASE_DIR/zpool_disk4.dat"
+
+truncate -s $DEVSIZE $DISK1
+truncate -s $DEVSIZE $DISK2
+truncate -s $DEVSIZE $DISK3
+truncate -s $DEVSIZE $DISK4
+
+for pool in {1..4}; do
+ DISK[$pool]="$TEST_BASE_DIR/zpool_disk${pool}.dat"
+ truncate -s $DEVSIZE ${DISK[$pool]}
+ log_must zpool create $TESTPOOL${pool} ${DISK[$pool]}
+done
+sync_all_pools
+
+# Start a trim on all pools using 'zpool trim -a'.
+log_must zpool trim -a
+
+# Verify that the trim is started on all pools.
+for pool in {1..4}; do
+ [[ -z "$(trim_progress $TESTPOOL${pool} ${DISK[$pool]})" ]] && \
+ log_fail "Trim did not start on pool $TESTPOOL${pool}"
+done
+
+# Wait for the trim to complete on all pools.
+for pool in {1..4}; do
+ log_must zpool wait -t trim $TESTPOOL${pool}
+done
+
+# Verify that the trim status is complete on all pools.
+complete_count=$(zpool status -t | grep -c "completed")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have trim status 'completed', but found ${complete_count}."
+fi
+
+# Start a trim on all pools using 'zpool trim -w -a'
+log_must zpool trim -w -a
+
+# Verify that the trim status is complete on all pools.
+complete_count=$(zpool status -t | grep -c "completed")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have trim status 'completed', but found ${complete_count}."
+fi
+
+# Now test the -s and -c options on multiple pools with -a.
+log_must zpool trim -r 1 -a
+
+for pool in {1..4}; do
+ [[ -z "$(trim_progress $TESTPOOL${pool} ${DISK[$pool]})" ]] && \
+ log_fail "Trim did not start"
+done
+
+log_must zpool trim -a -s
+complete_count=$(zpool status -t | grep -c "suspended")
+if [[ $complete_count -ne 4 ]]; then
+ log_fail "Expected 4 pools to have trim status 'suspended', but found $complete_count."
+fi
+
+log_must zpool trim -a -c
+for pool in {1..4}; do
+ [[ -z "$(trim_progress $TESTPOOL${pool} ${DISK[$pool]})" ]] || \
+ log_fail "TRIM did not stop on pool $TESTPOOL${pool}"
+done
+
+log_pass "Trim '-a' works on multiple pools correctly."
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh
index 8f3e6d12e53d..449dedacb307 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh
@@ -56,7 +56,7 @@ function cleanup
{
datasetexists $TESTPOOL/cp-reflink && \
destroy_dataset $$TESTPOOL/cp-reflink -f
- log_must set_tunable32 BCLONE_WAIT_DIRTY 0
+ log_must restore_tunable BCLONE_WAIT_DIRTY
}
function verify_copy
@@ -81,6 +81,8 @@ SRC_SIZE=$((1024 + $RANDOM % 1024))
# A smaller recordsize is used merely to speed up the test.
RECORDSIZE=4096
+log_must save_tunable BCLONE_WAIT_DIRTY
+
log_must zfs create -o recordsize=$RECORDSIZE $TESTPOOL/cp-reflink
CP_TESTDIR=$(get_prop mountpoint $TESTPOOL/cp-reflink)
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib
index 553533377aa4..1fd9b321cd9e 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib
@@ -72,6 +72,23 @@ function get_num_dvas
sed 's/.*L[0-9] \(.*\) [a-f0-9]*L.*/\1/' | awk '{print NF}'
}
+function check_gang_bp
+{
+ typeset gang="$(echo -n $1 | grep -c 'gang')"
+ [[ "$gang" == "1" ]] || return 1
+ return 0
+}
+
+function check_is_gang_bp
+{
+ check_gang_bp $1 || log_fail "Not a gang DVA: \"$1\""
+}
+
+function check_not_gang_bp
+{
+ check_gang_bp $1 && log_fail "Gang DVA: \"$1\""
+}
+
function check_gang_dva
{
typeset last_byte="$(echo -n $1 | tail -c 1)"
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_header_neg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_header_neg.ksh
new file mode 100755
index 000000000000..e9cb1d2a034a
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_header_neg.ksh
@@ -0,0 +1,53 @@
+#!/bin/ksh
+# SPDX-License-Identifier: CDDL-1.0
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright (c) 2025 by Klara Inc.
+#
+
+#
+# Description:
+# Verify that we don't use larger gang headers on ashift=9 pools
+#
+# Strategy:
+# 1. Create a pool with dynamic gang headers.
+# 2. Set metaslab_force_ganging to force multi-level ganging.
+# 3. Verify that a large file has multi-level ganging
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/gang_blocks/gang_blocks.kshlib
+
+log_assert "Verify that we don't use large gang headers on small-ashift pools".
+
+log_onexit cleanup
+preamble
+
+log_must zpool create -f -o ashift=9 -o feature@dynamic_gang_header=enabled $TESTPOOL $DISKS
+log_must zfs create -o recordsize=1M $TESTPOOL/$TESTFS
+mountpoint=$(get_prop mountpoint $TESTPOOL/$TESTFS)
+set_tunable64 METASLAB_FORCE_GANGING 200000
+set_tunable32 METASLAB_FORCE_GANGING_PCT 100
+
+path="${mountpoint}/file"
+log_must dd if=/dev/urandom of=$path bs=1M count=1
+log_must zpool sync $TESTPOOL
+first_block=$(get_first_block_dva $TESTPOOL/$TESTFS file)
+leaves=$(read_gang_header $TESTPOOL $first_block 200)
+gangs=$(echo "$leaves" | grep -c gang)
+[[ "$gangs" -gt 0 ]] || log_fail "We didn't use a deep gang tree when needed"
+
+log_must verify_pool $TESTPOOL
+status=$(get_pool_prop feature@dynamic_gang_header $TESTPOOL)
+[[ "$status" == "enabled" ]] || log_fail "Dynamic gang headers active on an ashift-9 pool"
+log_pass "We don't use large gang headers on small-ashift pools".
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_header_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_header_pos.ksh
new file mode 100755
index 000000000000..2941325fdc33
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_header_pos.ksh
@@ -0,0 +1,81 @@
+#!/bin/ksh
+# SPDX-License-Identifier: CDDL-1.0
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright (c) 2025 by Klara Inc.
+#
+
+#
+# Description:
+# Verify that we use larger gang headers on ashift=12 pools
+#
+# Strategy:
+# 1. Create a pool with dynamic gang headers.
+# 2. Set metaslab_force_ganging to force ganging.
+# 3. Verify that a large file has more than 3 gang headers.
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/gang_blocks/gang_blocks.kshlib
+
+log_assert "Verify that we don't use large gang headers on small-ashift pools".
+
+log_onexit cleanup
+preamble
+
+for vdevtype in "" "mirror" "raidz" "raidz2" "draid"; do
+ log_must zpool create -f -o ashift=12 $TESTPOOL $vdevtype $DISKS
+ log_must zfs create -o recordsize=1M $TESTPOOL/$TESTFS
+ mountpoint=$(get_prop mountpoint $TESTPOOL/$TESTFS)
+ set_tunable64 METASLAB_FORCE_GANGING 200000
+ set_tunable32 METASLAB_FORCE_GANGING_PCT 100
+
+ status=$(get_pool_prop feature@dynamic_gang_header $TESTPOOL)
+ [[ "$status" == "enabled" ]] || \
+ log_fail "Dynamic gang headers not enabled"
+ path="${mountpoint}/file"
+ log_must dd if=/dev/urandom of=$path bs=1M count=1
+ log_must zpool sync $TESTPOOL
+ first_block=$(get_first_block_dva $TESTPOOL/$TESTFS file)
+ leaves=$(read_gang_header $TESTPOOL $first_block 1000 | \
+ grep -v HOLE | grep -v "^Found")
+ first_child=$(echo "$leaves" | head -n 1)
+ check_gang_bp $first_child
+
+ num_leaves=$(echo "$leaves" | wc -l)
+ [[ "$num_leaves" -gt 3 ]] && \
+ log_fail "used a larger gang header too soon: \"$leaves\""
+ log_must verify_pool $TESTPOOL
+ status=$(get_pool_prop feature@dynamic_gang_header $TESTPOOL)
+ [[ "$status" == "active" ]] || log_fail "Dynamic gang headers not active"
+
+ path="${mountpoint}/file2"
+ log_must dd if=/dev/urandom of=$path bs=1M count=1
+ log_must zpool sync $TESTPOOL
+ first_block=$(get_first_block_dva $TESTPOOL/$TESTFS file2)
+ leaves=$(read_gang_header $TESTPOOL $first_block 1000 | \
+ grep -v HOLE | grep -v "^Found")
+ first_child=$(echo "$leaves" | head -n 1)
+ check_not_gang_bp $first_child
+
+ num_leaves=$(echo "$leaves" | wc -l)
+ [[ "$num_leaves" -gt 3 ]] || \
+ log_fail "didn't use a larger gang header: \"$leaves\""
+
+
+ log_must verify_pool $TESTPOOL
+ status=$(get_pool_prop feature@dynamic_gang_header $TESTPOOL)
+ [[ "$status" == "active" ]] || log_fail "Dynamic gang headers not active"
+ log_must zpool destroy $TESTPOOL
+done
+log_pass "We don't use large gang headers on small-ashift pools".
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_multi.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_multi.ksh
new file mode 100755
index 000000000000..2ffe24968f10
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_dyn_multi.ksh
@@ -0,0 +1,54 @@
+#!/bin/ksh
+# SPDX-License-Identifier: CDDL-1.0
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright (c) 2025 by Klara Inc.
+#
+
+#
+# Description:
+# Verify that multi-level ganging still works with dynamic headers
+#
+# Strategy:
+# 1. Create a pool with dynamic gang headers and ashift=12.
+# 2. Set metaslab_force_ganging to force multi-level ganging.
+# 3. Verify that a large file has multi-level ganging
+#
+
+. $STF_SUITE/include/libtest.shlib
+. $STF_SUITE/tests/functional/gang_blocks/gang_blocks.kshlib
+
+log_assert "Verify that we can still multi-level gang with large headers."
+
+log_onexit cleanup
+preamble
+
+log_must zpool create -f -o ashift=12 -o feature@dynamic_gang_header=enabled $TESTPOOL $DISKS
+log_must zfs create -o recordsize=16M $TESTPOOL/$TESTFS
+mountpoint=$(get_prop mountpoint $TESTPOOL/$TESTFS)
+set_tunable64 METASLAB_FORCE_GANGING 50000
+set_tunable32 METASLAB_FORCE_GANGING_PCT 100
+
+path="${mountpoint}/file"
+log_must dd if=/dev/urandom of=$path bs=16M count=1
+log_must zpool sync $TESTPOOL
+first_block=$(get_first_block_dva $TESTPOOL/$TESTFS file)
+leaves=$(read_gang_header $TESTPOOL $first_block 200)
+gangs=$(echo "$leaves" | grep -c gang)
+[[ "$gangs" -gt 0 ]] || log_fail "We didn't use a deep gang tree when needed"
+
+log_must verify_pool $TESTPOOL
+status=$(get_pool_prop feature@dynamic_gang_header $TESTPOOL)
+[[ "$status" == "active" ]] || log_fail "Dynamic gang headers not active"
+
+log_pass "We can still multi-level gang with large headers."
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh
new file mode 100755
index 000000000000..63ebf95de7f0
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh
@@ -0,0 +1,80 @@
+#!/bin/ksh -p
+# SPDX-License-Identifier: CDDL-1.0
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or https://opensource.org/licenses/CDDL-1.0.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2025, Klara, Inc.
+#
+
+. $STF_SUITE/include/libtest.shlib
+
+#
+# This verifies that async writeback of dirty mmap()'d pages completes quickly.
+# ftruncate() is an operation that will trigger async writeback, but is not
+# itself a syncing operation, making it a useful proxy for any way the kernel
+# might trigger async writeback.
+#
+# The guts of this test is in the mmap_ftruncate program. This driver sets a
+# larger zfs_txg_timeout. Test failure occurs ftruncate() blocks waiting for
+# the writeback until the txg timeout is reached and the changes are forcibly
+# written out. Success means the DMU has accepted the changes and cleared the
+# page dirty flags.
+#
+
+TIMEOUT=180
+TESTFILE=/$TESTPOOL/truncfile
+TESTSIZE=$((2*1024*1024*1024)) # 2G
+
+verify_runnable "global"
+
+typeset claim="async writeback of dirty mmap()'d pages completes quickly"
+
+log_assert $claim
+
+log_must save_tunable TXG_TIMEOUT
+
+function cleanup
+{
+ log_must restore_tunable TXG_TIMEOUT
+ rm -f $TESTFILE
+}
+log_onexit cleanup
+
+log_must set_tunable32 TXG_TIMEOUT $TIMEOUT
+log_must zpool sync -f
+
+# run mmap_ftruncate and record the run time
+typeset -i start=$(date +%s)
+log_must mmap_ftruncate $TESTFILE $TESTSIZE
+typeset -i end=$(date +%s)
+typeset -i delta=$((end - start))
+
+# in practice, mmap_ftruncate needs a few seconds to dirty all the pages, and
+# when this test passes, the ftruncate() call itself should be near-instant.
+# when it fails, then its only the txg sync that allows ftruncate() to
+# complete, in that case, the run time will be extremely close to the timeout,
+# so to avoid any confusion at the edges, we require that it complets within
+# half the transaction time. for any timeout higher than ~30s that should be a
+# very bright line down the middle.
+log_must test $delta -lt $((TIMEOUT / 2))
+
+log_pass $claim
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh
index cd4573b2e4d1..b364a5cb4bdc 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh
@@ -63,6 +63,7 @@ log_must eval "zdb $TESTPOOL | grep -q \"Checkpointed uberblock found\""
log_mustnot eval "zdb -k $TESTPOOL | grep -q \"Checkpointed uberblock found\""
log_mustnot eval "zdb $TESTPOOL | grep \"Dataset $FS1\""
log_must eval "zdb -k $TESTPOOL | grep \"Dataset $CHECKPOINTED_FS1\""
+log_must eval "zdb -k $TESTPOOL/ | grep \"$TESTPOOL$BOGUS_SUFFIX\""
log_must zpool export $TESTPOOL
@@ -70,6 +71,7 @@ log_must eval "zdb -e $TESTPOOL | grep \"Checkpointed uberblock found\""
log_mustnot eval "zdb -k -e $TESTPOOL | grep \"Checkpointed uberblock found\""
log_mustnot eval "zdb -e $TESTPOOL | grep \"Dataset $FS1\""
log_must eval "zdb -k -e $TESTPOOL | grep \"Dataset $CHECKPOINTED_FS1\""
+log_must eval "zdb -k -e $TESTPOOL/ | grep \"$TESTPOOL$BOGUS_SUFFIX\""
log_must zpool import $TESTPOOL
diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
index 32872e8f3f3a..b90ce60ec664 100644
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -1219,36 +1219,20 @@ fuse_vnop_getattr(struct vop_getattr_args *ap)
struct vattr *vap = ap->a_vap;
struct ucred *cred = ap->a_cred;
struct thread *td = curthread;
-
int err = 0;
- int dataflags;
-
- dataflags = fuse_get_mpdata(vnode_mount(vp))->dataflags;
-
- /* Note that we are not bailing out on a dead file system just yet. */
- if (!(dataflags & FSESS_INITED)) {
- if (!vnode_isvroot(vp)) {
- fdata_set_dead(fuse_get_mpdata(vnode_mount(vp)));
- return (EXTERROR(ENOTCONN, "FUSE daemon is not "
- "initialized"));
- } else {
- goto fake;
- }
- }
err = fuse_internal_getattr(vp, vap, cred, td);
if (err == ENOTCONN && vnode_isvroot(vp)) {
- /* see comment in fuse_vfsop_statfs() */
- goto fake;
- } else {
- return err;
+ /*
+ * We want to seem a legitimate fs even if the daemon is dead,
+ * so that, eg., we can still do path based unmounting after
+ * the daemon dies.
+ */
+ err = 0;
+ bzero(vap, sizeof(*vap));
+ vap->va_type = vnode_vtype(vp);
}
-
-fake:
- bzero(vap, sizeof(*vap));
- vap->va_type = vnode_vtype(vp);
-
- return 0;
+ return err;
}
/*
diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c
index 7ee3b9e2048a..7351e9cb6313 100644
--- a/sys/kern/kern_racct.c
+++ b/sys/kern/kern_racct.c
@@ -96,6 +96,13 @@ static void racct_sub_cred_locked(struct ucred *cred, int resource,
uint64_t amount);
static void racct_add_cred_locked(struct ucred *cred, int resource,
uint64_t amount);
+static int racct_set_locked(struct proc *p, int resource, uint64_t amount,
+ int force);
+static void racct_updatepcpu_locked(struct proc *p);
+static void racct_updatepcpu_racct_locked(struct racct *racct);
+static void racct_updatepcpu_containers(void);
+static void racct_settime_locked(struct proc *p, bool exit);
+static void racct_zeropcpu_locked(struct proc *p);
SDT_PROVIDER_DEFINE(racct);
SDT_PROBE_DEFINE3(racct, , rusage, add,
@@ -308,68 +315,6 @@ fixpt_t ccpu_exp[] = {
#define CCPU_EXP_MAX 110
-/*
- * This function is analogical to the getpcpu() function in the ps(1) command.
- * They should both calculate in the same way so that the racct %cpu
- * calculations are consistent with the values shown by the ps(1) tool.
- * The calculations are more complex in the 4BSD scheduler because of the value
- * of the ccpu variable. In ULE it is defined to be zero which saves us some
- * work.
- */
-static uint64_t
-racct_getpcpu(struct proc *p, u_int pcpu)
-{
- u_int swtime;
-#ifdef SCHED_4BSD
- fixpt_t pctcpu, pctcpu_next;
-#endif
- fixpt_t p_pctcpu;
- struct thread *td;
-
- ASSERT_RACCT_ENABLED();
- KASSERT((p->p_flag & P_IDLEPROC) == 0,
- ("racct_getpcpu: idle process %p", p));
-
- swtime = (ticks - p->p_swtick) / hz;
-
- /*
- * For short-lived processes, the sched_pctcpu() returns small
- * values even for cpu intensive processes. Therefore we use
- * our own estimate in this case.
- */
- if (swtime < RACCT_PCPU_SECS)
- return (pcpu);
-
- p_pctcpu = 0;
- FOREACH_THREAD_IN_PROC(p, td) {
- thread_lock(td);
-#ifdef SCHED_4BSD
- pctcpu = sched_pctcpu(td);
- /* Count also the yet unfinished second. */
- pctcpu_next = (pctcpu * ccpu_exp[1]) >> FSHIFT;
- pctcpu_next += sched_pctcpu_delta(td);
- p_pctcpu += max(pctcpu, pctcpu_next);
-#else
- /*
- * In ULE the %cpu statistics are updated on every
- * sched_pctcpu() call. So special calculations to
- * account for the latest (unfinished) second are
- * not needed.
- */
- p_pctcpu += sched_pctcpu(td);
-#endif
- thread_unlock(td);
- }
-
-#ifdef SCHED_4BSD
- if (swtime <= CCPU_EXP_MAX)
- return ((100 * (uint64_t)p_pctcpu * 1000000) /
- (FSCALE - ccpu_exp[swtime]));
-#endif
-
- return ((100 * (uint64_t)p_pctcpu * 1000000) / FSCALE);
-}
-
static void
racct_add_racct(struct racct *dest, const struct racct *src)
{
@@ -499,19 +444,6 @@ racct_adjust_resource(struct racct *racct, int resource,
("%s: resource %d usage < 0", __func__, resource));
racct->r_resources[resource] = 0;
}
-
- /*
- * There are some cases where the racct %cpu resource would grow
- * beyond 100% per core. For example in racct_proc_exit() we add
- * the process %cpu usage to the ucred racct containers. If too
- * many processes terminated in a short time span, the ucred %cpu
- * resource could grow too much. Also, the 4BSD scheduler sometimes
- * returns for a thread more than 100% cpu usage. So we set a sane
- * boundary here to 100% * the maximum number of CPUs.
- */
- if ((resource == RACCT_PCTCPU) &&
- (racct->r_resources[RACCT_PCTCPU] > 100 * 1000000 * (int64_t)MAXCPU))
- racct->r_resources[RACCT_PCTCPU] = 100 * 1000000 * (int64_t)MAXCPU;
}
static int
@@ -635,10 +567,44 @@ racct_add_buf(struct proc *p, const struct buf *bp, int is_write)
RACCT_UNLOCK();
}
+static void
+racct_settime_locked(struct proc *p, bool exit)
+{
+ struct thread *td;
+ struct timeval wallclock;
+ uint64_t runtime;
+
+ ASSERT_RACCT_ENABLED();
+ RACCT_LOCK_ASSERT();
+ PROC_LOCK_ASSERT(p, MA_OWNED);
+
+ if (exit) {
+ /*
+ * proc_reap() has already calculated rux
+ * and added crux to rux.
+ */
+ runtime = cputick2usec(p->p_rux.rux_runtime -
+ p->p_crux.rux_runtime);
+ } else {
+ PROC_STATLOCK(p);
+ FOREACH_THREAD_IN_PROC(p, td)
+ ruxagg(p, td);
+ PROC_STATUNLOCK(p);
+ runtime = cputick2usec(p->p_rux.rux_runtime);
+ }
+ microuptime(&wallclock);
+ timevalsub(&wallclock, &p->p_stats->p_start);
+
+ racct_set_locked(p, RACCT_CPU, runtime, 0);
+ racct_set_locked(p, RACCT_WALLCLOCK,
+ (uint64_t)wallclock.tv_sec * 1000000 +
+ wallclock.tv_usec, 0);
+}
+
static int
racct_set_locked(struct proc *p, int resource, uint64_t amount, int force)
{
- int64_t old_amount, decayed_amount, diff_proc, diff_cred;
+ int64_t old_amount, diff_proc, diff_cred;
#ifdef RCTL
int error;
#endif
@@ -655,17 +621,7 @@ racct_set_locked(struct proc *p, int resource, uint64_t amount, int force)
* The diffs may be negative.
*/
diff_proc = amount - old_amount;
- if (resource == RACCT_PCTCPU) {
- /*
- * Resources in per-credential racct containers may decay.
- * If this is the case, we need to calculate the difference
- * between the new amount and the proportional value of the
- * old amount that has decayed in the ucred racct containers.
- */
- decayed_amount = old_amount * RACCT_DECAY_FACTOR / FSCALE;
- diff_cred = amount - decayed_amount;
- } else
- diff_cred = diff_proc;
+ diff_cred = diff_proc;
#ifdef notyet
KASSERT(diff_proc >= 0 || RACCT_CAN_DROP(resource),
("%s: usage of non-droppable resource %d dropping", __func__,
@@ -908,8 +864,6 @@ racct_proc_fork(struct proc *parent, struct proc *child)
goto out;
#endif
- /* Init process cpu time. */
- child->p_prev_runtime = 0;
child->p_throttled = 0;
/*
@@ -964,37 +918,16 @@ racct_proc_fork_done(struct proc *child)
void
racct_proc_exit(struct proc *p)
{
- struct timeval wallclock;
- uint64_t pct_estimate, pct, runtime;
int i;
if (!racct_enable)
return;
PROC_LOCK(p);
- /*
- * We don't need to calculate rux, proc_reap() has already done this.
- */
- runtime = cputick2usec(p->p_rux.rux_runtime);
-#ifdef notyet
- KASSERT(runtime >= p->p_prev_runtime, ("runtime < p_prev_runtime"));
-#else
- if (runtime < p->p_prev_runtime)
- runtime = p->p_prev_runtime;
-#endif
- microuptime(&wallclock);
- timevalsub(&wallclock, &p->p_stats->p_start);
- if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) {
- pct_estimate = (1000000 * runtime * 100) /
- ((uint64_t)wallclock.tv_sec * 1000000 +
- wallclock.tv_usec);
- } else
- pct_estimate = 0;
- pct = racct_getpcpu(p, pct_estimate);
-
RACCT_LOCK();
- racct_set_locked(p, RACCT_CPU, runtime, 0);
- racct_add_cred_locked(p->p_ucred, RACCT_PCTCPU, pct);
+
+ racct_settime_locked(p, true);
+ racct_zeropcpu_locked(p);
KASSERT(p->p_racct->r_resources[RACCT_RSS] == 0,
("process reaped with %ju allocated for RSS\n",
@@ -1068,6 +1001,10 @@ racct_move(struct racct *dest, struct racct *src)
RACCT_LOCK();
racct_add_racct(dest, src);
racct_sub_racct(src, src);
+ dest->r_runtime = src->r_runtime;
+ dest->r_time = src->r_time;
+ src->r_runtime = 0;
+ timevalsub(&src->r_time, &src->r_time);
RACCT_UNLOCK();
}
@@ -1170,8 +1107,6 @@ racct_proc_wakeup(struct proc *p)
static void
racct_decay_callback(struct racct *racct, void *dummy1, void *dummy2)
{
- int64_t r_old, r_new;
-
ASSERT_RACCT_ENABLED();
RACCT_LOCK_ASSERT();
@@ -1181,15 +1116,6 @@ racct_decay_callback(struct racct *racct, void *dummy1, void *dummy2)
rctl_throttle_decay(racct, RACCT_READIOPS);
rctl_throttle_decay(racct, RACCT_WRITEIOPS);
#endif
-
- r_old = racct->r_resources[RACCT_PCTCPU];
-
- /* If there is nothing to decay, just exit. */
- if (r_old <= 0)
- return;
-
- r_new = r_old * RACCT_DECAY_FACTOR / FSCALE;
- racct->r_resources[RACCT_PCTCPU] = r_new;
}
static void
@@ -1221,15 +1147,105 @@ racct_decay(void)
}
static void
+racct_updatepcpu_racct_locked(struct racct *racct)
+{
+ struct timeval diff;
+ uint64_t elapsed;
+ uint64_t runtime;
+ uint64_t newpcpu;
+ uint64_t oldpcpu;
+
+ ASSERT_RACCT_ENABLED();
+ RACCT_LOCK_ASSERT();
+
+ /* Difference between now and previously-recorded time. */
+ microuptime(&diff);
+ timevalsub(&diff, &racct->r_time);
+ elapsed = (uint64_t)diff.tv_sec * 1000000 + diff.tv_usec;
+
+ /* Difference between current and previously-recorded runtime. */
+ runtime = racct->r_resources[RACCT_CPU] - racct->r_runtime;
+
+ newpcpu = runtime * 100 * 1000000 / elapsed;
+ oldpcpu = racct->r_resources[RACCT_PCTCPU];
+ /*
+ * This calculation is equivalent to
+ * (1 - 0.3) * newpcpu + 0.3 * oldpcpu
+ * where RACCT_DECAY_FACTOR = 0.3 * FSCALE.
+ */
+ racct->r_resources[RACCT_PCTCPU] = ((FSCALE - RACCT_DECAY_FACTOR) *
+ newpcpu + RACCT_DECAY_FACTOR * oldpcpu) / FSCALE;
+ if (racct->r_resources[RACCT_PCTCPU] >
+ 100 * 1000000 * (uint64_t)mp_ncpus)
+ racct->r_resources[RACCT_PCTCPU] = 100 * 1000000 *
+ (uint64_t)mp_ncpus;
+
+ /* Record current times. */
+ racct->r_runtime = racct->r_resources[RACCT_CPU];
+ timevaladd(&racct->r_time, &diff);
+}
+
+static void
+racct_zeropcpu_locked(struct proc *p)
+{
+ ASSERT_RACCT_ENABLED();
+ PROC_LOCK_ASSERT(p, MA_OWNED);
+
+ p->p_racct->r_resources[RACCT_PCTCPU] = 0;
+}
+
+static void
+racct_updatepcpu_locked(struct proc *p)
+{
+ ASSERT_RACCT_ENABLED();
+ PROC_LOCK_ASSERT(p, MA_OWNED);
+
+ racct_updatepcpu_racct_locked(p->p_racct);
+}
+
+static void
+racct_updatepcpu_pre(void)
+{
+
+ RACCT_LOCK();
+}
+
+static void
+racct_updatepcpu_post(void)
+{
+
+ RACCT_UNLOCK();
+}
+
+static void
+racct_updatepcpu_racct_callback(struct racct *racct, void *dummy1, void *dummy2)
+{
+ racct_updatepcpu_racct_locked(racct);
+}
+
+static void
+racct_updatepcpu_containers(void)
+{
+ ASSERT_RACCT_ENABLED();
+
+ ui_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre,
+ racct_updatepcpu_post, NULL, NULL);
+ loginclass_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre,
+ racct_updatepcpu_post, NULL, NULL);
+ prison_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre,
+ racct_updatepcpu_post, NULL, NULL);
+}
+
+static void
racctd(void)
{
- struct thread *td;
struct proc *p;
- struct timeval wallclock;
- uint64_t pct, pct_estimate, runtime;
+ struct proc *idle;
ASSERT_RACCT_ENABLED();
+ idle = STAILQ_FIRST(&cpuhead)->pc_idlethread->td_proc;
+
for (;;) {
racct_decay();
@@ -1237,36 +1253,16 @@ racctd(void)
FOREACH_PROC_IN_SYSTEM(p) {
PROC_LOCK(p);
+ if (p == idle) {
+ PROC_UNLOCK(p);
+ continue;
+ }
if (p->p_state != PRS_NORMAL ||
(p->p_flag & P_IDLEPROC) != 0) {
- if (p->p_state == PRS_ZOMBIE)
- racct_set(p, RACCT_PCTCPU, 0);
PROC_UNLOCK(p);
continue;
}
- microuptime(&wallclock);
- timevalsub(&wallclock, &p->p_stats->p_start);
- PROC_STATLOCK(p);
- FOREACH_THREAD_IN_PROC(p, td)
- ruxagg(p, td);
- runtime = cputick2usec(p->p_rux.rux_runtime);
- PROC_STATUNLOCK(p);
-#ifdef notyet
- KASSERT(runtime >= p->p_prev_runtime,
- ("runtime < p_prev_runtime"));
-#else
- if (runtime < p->p_prev_runtime)
- runtime = p->p_prev_runtime;
-#endif
- p->p_prev_runtime = runtime;
- if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) {
- pct_estimate = (1000000 * runtime * 100) /
- ((uint64_t)wallclock.tv_sec * 1000000 +
- wallclock.tv_usec);
- } else
- pct_estimate = 0;
- pct = racct_getpcpu(p, pct_estimate);
RACCT_LOCK();
#ifdef RCTL
rctl_throttle_decay(p->p_racct, RACCT_READBPS);
@@ -1274,11 +1270,8 @@ racctd(void)
rctl_throttle_decay(p->p_racct, RACCT_READIOPS);
rctl_throttle_decay(p->p_racct, RACCT_WRITEIOPS);
#endif
- racct_set_locked(p, RACCT_PCTCPU, pct, 1);
- racct_set_locked(p, RACCT_CPU, runtime, 0);
- racct_set_locked(p, RACCT_WALLCLOCK,
- (uint64_t)wallclock.tv_sec * 1000000 +
- wallclock.tv_usec, 0);
+ racct_settime_locked(p, false);
+ racct_updatepcpu_locked(p);
RACCT_UNLOCK();
PROC_UNLOCK(p);
}
@@ -1306,6 +1299,8 @@ racctd(void)
PROC_UNLOCK(p);
}
sx_sunlock(&allproc_lock);
+
+ racct_updatepcpu_containers();
pause("-", hz);
}
}
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 9830e5093a3a..2a6f0989f6aa 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -571,7 +571,10 @@ kern_clock_nanosleep(struct thread *td, clockid_t clock_id, int flags,
td->td_rtcgen =
atomic_load_acq_int(&rtc_generation);
error = kern_clock_gettime(td, clock_id, &now);
- KASSERT(error == 0, ("kern_clock_gettime: %d", error));
+ if (error != 0) {
+ td->td_rtcgen = 0;
+ return (error);
+ }
timespecsub(&ts, &now, &ts);
}
if (ts.tv_sec < 0 || (ts.tv_sec == 0 && ts.tv_nsec == 0)) {
diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile
index 056530bc4645..2dd9e2be3f56 100644
--- a/sys/modules/zfs/Makefile
+++ b/sys/modules/zfs/Makefile
@@ -189,6 +189,7 @@ SRCS+= abd_os.c \
vdev_label_os.c \
zfs_acl.c \
zfs_ctldir.c \
+ zfs_crrd.c \
zfs_debug.c \
zfs_dir.c \
zfs_ioctl_compat.c \
diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h
index f59b31f2479d..6561d62b5e26 100644
--- a/sys/modules/zfs/zfs_config.h
+++ b/sys/modules/zfs/zfs_config.h
@@ -483,6 +483,9 @@
/* building against unsupported kernel version */
/* #undef HAVE_LINUX_EXPERIMENTAL */
+/* Define to 1 if you have the <linux/stat.h> header file. */
+/* #undef HAVE_LINUX_STAT_H */
+
/* makedev() is declared in sys/mkdev.h */
/* #undef HAVE_MAKEDEV_IN_MKDEV */
@@ -585,6 +588,9 @@
/* kernel_siginfo_t exists */
/* #undef HAVE_SIGINFO */
+/* sops->free_inode() exists */
+/* #undef HAVE_SOPS_FREE_INODE */
+
#if defined(__amd64__) || defined(__i386__)
/* Define if host toolchain supports SSE */
#define HAVE_SSE 1
@@ -614,6 +620,12 @@
/* standalone <linux/stdarg.h> exists */
/* #undef HAVE_STANDALONE_LINUX_STDARG */
+/* statx() is available */
+/* #undef HAVE_STATX */
+
+/* STATX_MNT_ID is available */
+/* #undef HAVE_STATX_MNT_ID */
+
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
@@ -818,7 +830,7 @@
/* #undef ZFS_DEVICE_MINOR */
/* Define the project alias string. */
-#define ZFS_META_ALIAS "zfs-2.3.99-443-FreeBSD_g69ee01aa4"
+#define ZFS_META_ALIAS "zfs-2.3.99-515-FreeBSD_g8302b6e32"
/* Define the project author. */
#define ZFS_META_AUTHOR "OpenZFS"
@@ -848,7 +860,7 @@
#define ZFS_META_NAME "zfs"
/* Define the project release. */
-#define ZFS_META_RELEASE "443-FreeBSD_g69ee01aa4"
+#define ZFS_META_RELEASE "515-FreeBSD_g8302b6e32"
/* Define the project version. */
#define ZFS_META_VERSION "2.3.99"
diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h
index 2791bc828657..2f1ffe504350 100644
--- a/sys/modules/zfs/zfs_gitrev.h
+++ b/sys/modules/zfs/zfs_gitrev.h
@@ -1 +1 @@
-#define ZFS_META_GITREV "zfs-2.3.99-443-g69ee01aa4"
+#define ZFS_META_GITREV "zfs-2.3.99-515-g8302b6e32"
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 46e54339a171..3aed54c58e04 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -259,6 +259,7 @@ struct bridge_iflist {
struct epoch_context bif_epoch_ctx;
ether_vlanid_t bif_pvid; /* port vlan id */
ifbvlan_set_t bif_vlan_set; /* if allowed tagged vlans */
+ uint16_t bif_vlanproto; /* vlan protocol */
};
/*
@@ -423,6 +424,7 @@ static int bridge_ioctl_gflags(struct bridge_softc *, void *);
static int bridge_ioctl_sflags(struct bridge_softc *, void *);
static int bridge_ioctl_gdefpvid(struct bridge_softc *, void *);
static int bridge_ioctl_sdefpvid(struct bridge_softc *, void *);
+static int bridge_ioctl_svlanproto(struct bridge_softc *, void *);
static int bridge_pfil(struct mbuf **, struct ifnet *, struct ifnet *,
int);
#ifdef INET
@@ -654,6 +656,9 @@ static const struct bridge_control bridge_control_table[] = {
{ bridge_ioctl_sdefpvid, sizeof(struct ifbrparam),
BC_F_COPYIN|BC_F_SUSER },
+
+ { bridge_ioctl_svlanproto, sizeof(struct ifbreq),
+ BC_F_COPYIN|BC_F_SUSER },
};
static const int bridge_control_table_size = nitems(bridge_control_table);
@@ -1494,8 +1499,11 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg)
bif->bif_ifp = ifs;
bif->bif_flags = IFBIF_LEARNING | IFBIF_DISCOVER;
bif->bif_savedcaps = ifs->if_capenable;
+ bif->bif_vlanproto = ETHERTYPE_VLAN;
if (sc->sc_flags & IFBRF_VLANFILTER)
bif->bif_pvid = sc->sc_defpvid;
+ if (sc->sc_flags & IFBRF_DEFQINQ)
+ bif->bif_flags |= IFBIF_QINQ;
/*
* Assign the interface's MAC address to the bridge if it's the first
@@ -1577,6 +1585,7 @@ bridge_ioctl_gifflags(struct bridge_softc *sc, void *arg)
req->ifbr_addrmax = bif->bif_addrmax;
req->ifbr_addrexceeded = bif->bif_addrexceeded;
req->ifbr_pvid = bif->bif_pvid;
+ req->ifbr_vlanproto = bif->bif_vlanproto;
/* Copy STP state options as flags */
if (bp->bp_operedge)
@@ -2252,6 +2261,24 @@ bridge_ioctl_sdefpvid(struct bridge_softc *sc, void *arg)
return (0);
}
+static int
+bridge_ioctl_svlanproto(struct bridge_softc *sc, void *arg)
+{
+ struct ifbreq *req = arg;
+ struct bridge_iflist *bif;
+
+ bif = bridge_lookup_member(sc, req->ifbr_ifsname);
+ if (bif == NULL)
+ return (EXTERROR(ENOENT, "Interface is not a bridge member"));
+
+ if (req->ifbr_vlanproto != ETHERTYPE_VLAN &&
+ req->ifbr_vlanproto != ETHERTYPE_QINQ)
+ return (EXTERROR(EINVAL, "Invalid VLAN protocol"));
+
+ bif->bif_vlanproto = req->ifbr_vlanproto;
+
+ return (0);
+}
/*
* bridge_ifdetach:
*
@@ -2395,12 +2422,15 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m,
}
/*
- * If underlying interface can not do VLAN tag insertion itself
- * then attach a packet tag that holds it.
+ * There are two cases where we have to insert our own tag:
+ * if the member interface doesn't support hardware tagging,
+ * or if the tag proto is not 802.1q.
*/
if ((m->m_flags & M_VLANTAG) &&
- (dst_ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) {
- m = ether_vlanencap(m, m->m_pkthdr.ether_vtag);
+ ((dst_ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0 ||
+ bif->bif_vlanproto != ETHERTYPE_VLAN)) {
+ m = ether_vlanencap_proto(m, m->m_pkthdr.ether_vtag,
+ bif->bif_vlanproto);
if (m == NULL) {
if_printf(dst_ifp,
"unable to prepend VLAN header\n");
@@ -2828,9 +2858,29 @@ bridge_input(struct ifnet *ifp, struct mbuf *m)
NET_EPOCH_ASSERT();
+ /* We need the Ethernet header later, so make sure we have it now. */
+ if (m->m_len < ETHER_HDR_LEN) {
+ m = m_pullup(m, ETHER_HDR_LEN);
+ if (m == NULL) {
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS, 1);
+ m_freem(m);
+ return (NULL);
+ }
+ }
+
eh = mtod(m, struct ether_header *);
vlan = VLANTAGOF(m);
+ /*
+ * If this frame has a VLAN tag and the receiving interface has a
+ * vlan(4) trunk, then it is is destined for vlan(4), not for us.
+ * This means if vlan(4) and bridge(4) are configured on the same
+ * interface, vlan(4) is preferred, which is what users typically
+ * expect.
+ */
+ if (vlan != DOT1Q_VID_NULL && ifp->if_vlantrunk != NULL)
+ return (m);
+
bif = ifp->if_bridge;
if (bif)
sc = bif->bif_sc;
@@ -3031,19 +3081,13 @@ bridge_input(struct ifnet *ifp, struct mbuf *m)
do { GRAB_OUR_PACKETS(bifp) } while (0);
/*
- * Check the interface the packet arrived on. For tagged frames,
- * we need to do this even if member_ifaddrs is disabled because
- * vlan(4) might need to handle the traffic.
+ * If member_ifaddrs is enabled, see if the packet is destined for
+ * one of the members' addresses.
*/
- if (V_member_ifaddrs || (vlan && ifp->if_vlantrunk))
+ if (V_member_ifaddrs) {
+ /* Check the interface the packet arrived on. */
do { GRAB_OUR_PACKETS(ifp) } while (0);
- /*
- * We only need to check other members interface if member_ifaddrs
- * is enabled; otherwise we should have never traffic destined for
- * a member's lladdr.
- */
- if (V_member_ifaddrs) {
CK_LIST_FOREACH(bif2, &sc->sc_iflist, bif_next) {
GRAB_OUR_PACKETS(bif2->bif_ifp)
}
@@ -3250,6 +3294,18 @@ bridge_vfilter_in(const struct bridge_iflist *sbif, struct mbuf *m)
if ((sbif->bif_sc->sc_flags & IFBRF_VLANFILTER) == 0)
return (true);
+ /* If Q-in-Q is disabled, check for stacked tags. */
+ if ((sbif->bif_flags & IFBIF_QINQ) == 0) {
+ struct ether_header *eh;
+ uint16_t proto;
+
+ eh = mtod(m, struct ether_header *);
+ proto = ntohs(eh->ether_type);
+
+ if (proto == ETHERTYPE_VLAN || proto == ETHERTYPE_QINQ)
+ return (false);
+ }
+
if (vlan == DOT1Q_VID_NULL) {
/*
* The frame doesn't have a tag. If the interface does not
diff --git a/sys/net/if_bridgevar.h b/sys/net/if_bridgevar.h
index 6718c5ebcc34..b0f579f688ac 100644
--- a/sys/net/if_bridgevar.h
+++ b/sys/net/if_bridgevar.h
@@ -131,13 +131,15 @@
#define BRDGSFLAGS 35 /* set bridge flags (ifbrparam) */
#define BRDGGDEFPVID 36 /* get default pvid (ifbrparam) */
#define BRDGSDEFPVID 37 /* set default pvid (ifbrparam) */
+#define BRDGSIFVLANPROTO 38 /* set if vlan protocol (ifbreq) */
/* BRDGSFLAGS, Bridge flags (non-interface-specific) */
typedef uint32_t ifbr_flags_t;
#define IFBRF_VLANFILTER (1U<<0) /* VLAN filtering enabled */
+#define IFBRF_DEFQINQ (1U<<1) /* 802.1ad Q-in-Q allowed by default */
-#define IFBRFBITS "\020\01VLANFILTER"
+#define IFBRFBITS "\020\01VLANFILTER\02DEFQINQ"
/*
* Generic bridge control request.
@@ -156,6 +158,7 @@ struct ifbreq {
uint32_t ifbr_addrmax; /* member if addr max */
uint32_t ifbr_addrexceeded; /* member if addr violations */
ether_vlanid_t ifbr_pvid; /* member if PVID */
+ uint16_t ifbr_vlanproto; /* member if VLAN protocol */
uint8_t pad[32];
};
@@ -172,12 +175,11 @@ struct ifbreq {
#define IFBIF_BSTP_ADMEDGE 0x0200 /* member stp admin edge enabled */
#define IFBIF_BSTP_ADMCOST 0x0400 /* member stp admin path cost */
#define IFBIF_PRIVATE 0x0800 /* if is a private segment */
-/* was IFBIF_VLANFILTER 0x1000 */
-#define IFBIF_QINQ 0x2000 /* if allows 802.1ad Q-in-Q */
+#define IFBIF_QINQ 0x1000 /* if allows 802.1ad Q-in-Q */
#define IFBIFBITS "\020\001LEARNING\002DISCOVER\003STP\004SPAN" \
"\005STICKY\014PRIVATE\006EDGE\007AUTOEDGE\010PTP" \
- "\011AUTOPTP"
+ "\011AUTOPTP\015QINQ"
#define IFBIFMASK ~(IFBIF_BSTP_EDGE|IFBIF_BSTP_AUTOEDGE|IFBIF_BSTP_PTP| \
IFBIF_BSTP_AUTOPTP|IFBIF_BSTP_ADMEDGE| \
IFBIF_BSTP_ADMCOST) /* not saved */
@@ -252,6 +254,7 @@ struct ifbrparam {
* addresses */
#define ifbrp_flags ifbrp_ifbrpu.ifbrpu_int32 /* bridge flags */
#define ifbrp_defpvid ifbrp_ifbrpu.ifbrpu_int16 /* default pvid */
+#define ifbrp_vlanproto ifbrp_ifbrpu.ifbrpu_int8 /* vlan protocol */
/*
* Bridge current operational parameters structure.
diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
index 4d35584925a1..a213a84e17db 100644
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -102,7 +102,7 @@ SYSCTL_DECL(_net_link);
static SYSCTL_NODE(_net_link, OID_AUTO, epair, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"Pair of virtual cross-over connected Ethernet-like interfaces");
-static bool use_ether_gen_addr = false;
+static bool use_ether_gen_addr = true;
SYSCTL_BOOL(_net_link_epair, OID_AUTO, ether_gen_addr, CTLFLAG_RWTUN,
&use_ether_gen_addr, false,
"Generate MAC with FreeBSD OUI using ether_gen_addr(9)");
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 8dae95c2cc2e..c397f0b67896 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -2338,6 +2338,10 @@ VNET_DECLARE(uma_zone_t, pf_udp_mapping_z);
#define V_pf_udp_mapping_z VNET(pf_udp_mapping_z)
VNET_DECLARE(uma_zone_t, pf_state_scrub_z);
#define V_pf_state_scrub_z VNET(pf_state_scrub_z)
+VNET_DECLARE(uma_zone_t, pf_anchor_z);
+#define V_pf_anchor_z VNET(pf_anchor_z)
+VNET_DECLARE(uma_zone_t, pf_eth_anchor_z);
+#define V_pf_eth_anchor_z VNET(pf_eth_anchor_z)
extern void pf_purge_thread(void *);
extern void pf_unload_vnet_purge(void);
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index bc5b42ee6f2c..2dfb7faf56e3 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1250,7 +1250,7 @@ send:
* fack acks recoverypoint.
*/
if ((tp->t_flags & TF_LRD) && SEQ_GEQ(p->rxmit, p->end))
- p->rxmit = tp->snd_recover;
+ p->rxmit = SEQ_MAX(p->rxmit, tp->snd_recover);
tp->sackhint.sack_bytes_rexmit += len;
}
if (IN_RECOVERY(tp->t_flags)) {
diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c
index 4405098a8620..b6c55fac50b3 100644
--- a/sys/netinet/tcp_sack.c
+++ b/sys/netinet/tcp_sack.c
@@ -283,7 +283,7 @@ tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_start, tcp_seq rcv_end)
INP_WLOCK_ASSERT(tptoinpcb(tp));
/* Check arguments. */
- KASSERT(SEQ_LEQ(rcv_start, rcv_end), ("rcv_start <= rcv_end"));
+ KASSERT(SEQ_LEQ(rcv_start, rcv_end), ("SEG_GT(rcv_start, rcv_end)"));
if ((rcv_start == rcv_end) &&
(tp->rcv_numsacks >= 1) &&
@@ -498,8 +498,8 @@ tcp_sackhole_free(struct tcpcb *tp, struct sackhole *hole)
tp->snd_numholes--;
atomic_subtract_int(&V_tcp_sack_globalholes, 1);
- KASSERT(tp->snd_numholes >= 0, ("tp->snd_numholes >= 0"));
- KASSERT(V_tcp_sack_globalholes >= 0, ("tcp_sack_globalholes >= 0"));
+ KASSERT(tp->snd_numholes >= 0, ("tp->snd_numholes < 0"));
+ KASSERT(V_tcp_sack_globalholes >= 0, ("tcp_sack_globalholes < 0"));
}
/*
@@ -583,6 +583,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
*/
if (SEQ_LT(tp->snd_una, th_ack) && !TAILQ_EMPTY(&tp->snd_holes)) {
left_edge_delta = th_ack - tp->snd_una;
+ delivered_data += left_edge_delta;
sack_blocks[num_sack_blks].start = tp->snd_una;
sack_blocks[num_sack_blks++].end = th_ack;
/*
@@ -590,7 +591,6 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
* due to DSACK blocks
*/
if (SEQ_LT(tp->snd_fack, th_ack)) {
- delivered_data += th_ack - tp->snd_una;
tp->snd_fack = th_ack;
sack_changed = SACK_CHANGE;
}
@@ -684,7 +684,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
delivered_data += sblkp->end - sblkp->start;
tp->sackhint.hole_bytes += temp->end - temp->start;
KASSERT(tp->sackhint.hole_bytes >= 0,
- ("sackhint hole bytes >= 0"));
+ ("sackhint hole bytes < 0"));
tp->snd_fack = sblkp->end;
sblkp--;
sack_changed = SACK_NEWLOSS;
@@ -783,7 +783,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
tp->sackhint.sack_bytes_rexmit -=
(SEQ_MIN(cur->rxmit, cur->end) - cur->start);
KASSERT(tp->sackhint.sack_bytes_rexmit >= 0,
- ("sackhint bytes rtx >= 0"));
+ ("sackhint bytes rtx < 0"));
sack_changed = SACK_CHANGE;
if (SEQ_LEQ(sblkp->start, cur->start)) {
/* Data acks at least the beginning of hole. */
@@ -816,7 +816,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
cur->end = sblkp->start;
cur->rxmit = SEQ_MIN(cur->rxmit, cur->end);
if ((tp->t_flags & TF_LRD) && SEQ_GEQ(cur->rxmit, cur->end))
- cur->rxmit = tp->snd_recover;
+ cur->rxmit = SEQ_MAX(cur->rxmit, tp->snd_recover);
} else {
/*
* ACKs some data in middle of a hole; need
@@ -843,7 +843,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
cur->rxmit = SEQ_MIN(cur->rxmit,
cur->end);
if ((tp->t_flags & TF_LRD) && SEQ_GEQ(cur->rxmit, cur->end))
- cur->rxmit = tp->snd_recover;
+ cur->rxmit = SEQ_MAX(cur->rxmit, tp->snd_recover);
delivered_data += (sblkp->end - sblkp->start);
}
}
@@ -874,13 +874,13 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
if (TAILQ_EMPTY(&tp->snd_holes)) {
KASSERT(tp->sackhint.hole_bytes == 0,
- ("SACK scoreboard empty, but accounting non-zero\n"));
+ ("SACK scoreboard empty, but sackhint hole bytes != 0"));
tp->sackhint.sack_bytes_rexmit = 0;
tp->sackhint.sacked_bytes = 0;
tp->sackhint.lost_bytes = 0;
} else {
KASSERT(tp->sackhint.hole_bytes > 0,
- ("SACK scoreboard not empty, but has no bytes\n"));
+ ("SACK scoreboard not empty, but sackhint hole bytes <= 0"));
tp->sackhint.delivered_data = delivered_data;
tp->sackhint.sacked_bytes += delivered_data - left_edge_delta;
KASSERT((tp->sackhint.sacked_bytes >= 0), ("sacked_bytes < 0"));
@@ -918,9 +918,9 @@ tcp_free_sackholes(struct tcpcb *tp)
tp->sackhint.hole_bytes = 0;
tp->sackhint.lost_bytes = 0;
- KASSERT(tp->snd_numholes == 0, ("tp->snd_numholes == 0"));
+ KASSERT(tp->snd_numholes == 0, ("tp->snd_numholes != 0"));
KASSERT(tp->sackhint.nexthole == NULL,
- ("tp->sackhint.nexthole == NULL"));
+ ("tp->sackhint.nexthole != NULL"));
}
/*
@@ -1061,11 +1061,15 @@ tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt)
}
}
}
- KASSERT(SEQ_LT(hole->start, hole->end), ("%s: hole.start >= hole.end", __func__));
+ KASSERT(SEQ_LT(hole->start, hole->end),
+ ("%s: SEQ_GEQ(hole.start, hole.end)", __func__));
if (!(V_tcp_do_newsack)) {
- KASSERT(SEQ_LT(hole->start, tp->snd_fack), ("%s: hole.start >= snd.fack", __func__));
- KASSERT(SEQ_LT(hole->end, tp->snd_fack), ("%s: hole.end >= snd.fack", __func__));
- KASSERT(SEQ_LT(hole->rxmit, tp->snd_fack), ("%s: hole.rxmit >= snd.fack", __func__));
+ KASSERT(SEQ_LT(hole->start, tp->snd_fack),
+ ("%s: SEG_GEQ(hole.start, snd.fack)", __func__));
+ KASSERT(SEQ_LT(hole->end, tp->snd_fack),
+ ("%s: SEG_GEQ(hole.end, snd.fack)", __func__));
+ KASSERT(SEQ_LT(hole->rxmit, tp->snd_fack),
+ ("%s: SEQ_GEQ(hole.rxmit, snd.fack)", __func__));
if (SEQ_GEQ(hole->start, hole->end) ||
SEQ_GEQ(hole->start, tp->snd_fack) ||
SEQ_GEQ(hole->end, tp->snd_fack) ||
diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c
index d1c4ba58bf55..fb013d3d17f0 100644
--- a/sys/netinet/tcp_stacks/rack_bbr_common.c
+++ b/sys/netinet/tcp_stacks/rack_bbr_common.c
@@ -509,11 +509,9 @@ void
ctf_do_dropwithreset(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th,
int32_t rstreason, int32_t tlen)
{
- if (tp != NULL) {
- tcp_dropwithreset(m, th, tp, tlen, rstreason);
+ tcp_dropwithreset(m, th, tp, tlen, rstreason);
+ if (tp != NULL)
INP_WUNLOCK(tptoinpcb(tp));
- } else
- tcp_dropwithreset(m, th, NULL, tlen, rstreason);
}
void
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 4801b3e2c766..3fa7789efcfe 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -621,7 +621,7 @@ static void
pf_packet_rework_nat(struct pf_pdesc *pd, int off, struct pf_state_key *nk)
{
- switch (pd->proto) {
+ switch (pd->virtual_proto) {
case IPPROTO_TCP: {
struct tcphdr *th = &pd->hdr.tcp;
@@ -1254,6 +1254,21 @@ pf_initialize(void)
MTX_DEF | MTX_DUPOK);
}
+ /* Anchors */
+ V_pf_anchor_z = uma_zcreate("pf anchors",
+ sizeof(struct pf_kanchor), NULL, NULL, NULL, NULL,
+ UMA_ALIGN_PTR, 0);
+ V_pf_limits[PF_LIMIT_ANCHORS].zone = V_pf_anchor_z;
+ uma_zone_set_max(V_pf_anchor_z, PF_ANCHOR_HIWAT);
+ uma_zone_set_warning(V_pf_anchor_z, "PF anchor limit reached");
+
+ V_pf_eth_anchor_z = uma_zcreate("pf Ethernet anchors",
+ sizeof(struct pf_keth_anchor), NULL, NULL, NULL, NULL,
+ UMA_ALIGN_PTR, 0);
+ V_pf_limits[PF_LIMIT_ETH_ANCHORS].zone = V_pf_eth_anchor_z;
+ uma_zone_set_max(V_pf_eth_anchor_z, PF_ANCHOR_HIWAT);
+ uma_zone_set_warning(V_pf_eth_anchor_z, "PF Ethernet anchor limit reached");
+
/* ALTQ */
TAILQ_INIT(&V_pf_altqs[0]);
TAILQ_INIT(&V_pf_altqs[1]);
@@ -6376,7 +6391,7 @@ pf_translate_compat(struct pf_test_ctx *ctx)
KASSERT(ctx->sk != NULL, ("%s: null sk", __func__));
KASSERT(ctx->nk != NULL, ("%s: null nk", __func__));
- switch (pd->proto) {
+ switch (pd->virtual_proto) {
case IPPROTO_TCP:
if (PF_ANEQ(&pd->nsaddr, &nk->addr[pd->sidx], pd->af) ||
nk->port[pd->sidx] != pd->nsport) {
diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h
index cfff58064922..51b3fd6390e1 100644
--- a/sys/netpfil/pf/pf.h
+++ b/sys/netpfil/pf/pf.h
@@ -120,7 +120,8 @@ enum {
enum { PF_NOPFROUTE, PF_FASTROUTE, PF_ROUTETO, PF_DUPTO, PF_REPLYTO };
enum { PF_LIMIT_STATES, PF_LIMIT_SRC_NODES, PF_LIMIT_FRAGS,
- PF_LIMIT_TABLE_ENTRIES, PF_LIMIT_MAX };
+ PF_LIMIT_TABLE_ENTRIES, PF_LIMIT_ANCHORS, PF_LIMIT_ETH_ANCHORS,
+ PF_LIMIT_MAX };
#define PF_POOL_IDMASK 0x0f
enum { PF_POOL_NONE, PF_POOL_BITMASK, PF_POOL_RANDOM,
PF_POOL_SRCHASH, PF_POOL_ROUNDROBIN };
@@ -490,6 +491,7 @@ struct pf_osfp_ioctl {
#define PF_ANCHOR_NAME_SIZE 64
#define PF_ANCHOR_MAXPATH (MAXPATHLEN - PF_ANCHOR_NAME_SIZE - 1)
+#define PF_ANCHOR_HIWAT 512
#define PF_OPTIMIZER_TABLE_PFX "__automatic_"
struct pf_rule {
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 178ee01649c6..b6f5d74b5b42 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -331,6 +331,8 @@ pfattach_vnet(void)
V_pf_limits[PF_LIMIT_STATES].limit = PFSTATE_HIWAT;
V_pf_limits[PF_LIMIT_SRC_NODES].limit = PFSNODE_HIWAT;
+ V_pf_limits[PF_LIMIT_ANCHORS].limit = PF_ANCHOR_HIWAT;
+ V_pf_limits[PF_LIMIT_ETH_ANCHORS].limit = PF_ANCHOR_HIWAT;
RB_INIT(&V_pf_anchors);
pf_init_kruleset(&pf_main_ruleset);
@@ -4973,6 +4975,7 @@ DIOCCHANGEADDR_error:
goto fail;
}
PF_RULES_WLOCK();
+ io->pfrio_nadd = 0;
error = pfr_add_addrs(&io->pfrio_table, pfras,
io->pfrio_size, &io->pfrio_nadd, io->pfrio_flags |
PFR_FLAG_USERIOCTL);
diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c
index c5de1e84a287..09754359ec2d 100644
--- a/sys/netpfil/pf/pf_nl.c
+++ b/sys/netpfil/pf/pf_nl.c
@@ -2082,6 +2082,123 @@ pf_handle_clear_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt)
return (error);
}
+TAILQ_HEAD(pfr_addrq, pfr_addr_item);
+struct nl_parsed_table_addrs {
+ struct pfr_table table;
+ uint32_t flags;
+ struct pfr_addr addrs[256];
+ size_t addr_count;
+ int nadd;
+ int ndel;
+};
+#define _OUT(_field) offsetof(struct pfr_addr, _field)
+static const struct nlattr_parser nla_p_pfr_addr[] = {
+ { .type = PFR_A_AF, .off = _OUT(pfra_af), .cb = nlattr_get_uint8 },
+ { .type = PFR_A_NET, .off = _OUT(pfra_net), .cb = nlattr_get_uint8 },
+ { .type = PFR_A_NOT, .off = _OUT(pfra_not), .cb = nlattr_get_bool },
+ { .type = PFR_A_ADDR, .off = _OUT(pfra_u), .cb = nlattr_get_in6_addr },
+};
+#undef _OUT
+NL_DECLARE_ATTR_PARSER(pfra_addr_parser, nla_p_pfr_addr);
+
+static int
+nlattr_get_pfr_addr(struct nlattr *nla, struct nl_pstate *npt, const void *arg,
+ void *target)
+{
+ struct nl_parsed_table_addrs *attrs = target;
+ struct pfr_addr addr = { 0 };
+ int error;
+
+ if (attrs->addr_count >= nitems(attrs->addrs))
+ return (E2BIG);
+
+ error = nlattr_get_nested(nla, npt, &pfra_addr_parser, &addr);
+ if (error != 0)
+ return (error);
+
+ memcpy(&attrs->addrs[attrs->addr_count], &addr, sizeof(addr));
+ attrs->addr_count++;
+
+ return (0);
+}
+
+NL_DECLARE_ATTR_PARSER(nested_table_parser, nla_p_table);
+
+#define _OUT(_field) offsetof(struct nl_parsed_table_addrs, _field)
+static const struct nlattr_parser nla_p_table_addr[] = {
+ { .type = PF_TA_TABLE, .off = _OUT(table), .arg = &nested_table_parser, .cb = nlattr_get_nested },
+ { .type = PF_TA_ADDR, .cb = nlattr_get_pfr_addr },
+ { .type = PF_TA_FLAGS, .off = _OUT(flags), .cb = nlattr_get_uint32 },
+};
+NL_DECLARE_PARSER(table_addr_parser, struct genlmsghdr, nlf_p_empty, nla_p_table_addr);
+#undef _OUT
+
+static int
+pf_handle_table_add_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt)
+{
+ struct nl_parsed_table_addrs attrs = { 0 };
+ struct nl_writer *nw = npt->nw;
+ struct genlmsghdr *ghdr_new;
+ int error;
+
+ error = nl_parse_nlmsg(hdr, &table_addr_parser, npt, &attrs);
+ if (error != 0)
+ return (error);
+
+ PF_RULES_WLOCK();
+ error = pfr_add_addrs(&attrs.table, &attrs.addrs[0],
+ attrs.addr_count, &attrs.nadd, attrs.flags | PFR_FLAG_USERIOCTL);
+ PF_RULES_WUNLOCK();
+
+ if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr)))
+ return (ENOMEM);
+
+ ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr);
+ ghdr_new->cmd = PFNL_CMD_TABLE_ADD_ADDR;
+ ghdr_new->version = 0;
+ ghdr_new->reserved = 0;
+
+ nlattr_add_u32(nw, PF_TA_NBR_ADDED, attrs.nadd);
+
+ if (!nlmsg_end(nw))
+ return (ENOMEM);
+
+ return (error);
+}
+
+static int
+pf_handle_table_del_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt)
+{
+ struct nl_parsed_table_addrs attrs = { 0 };
+ struct nl_writer *nw = npt->nw;
+ struct genlmsghdr *ghdr_new;
+ int error;
+
+ error = nl_parse_nlmsg(hdr, &table_addr_parser, npt, &attrs);
+ if (error != 0)
+ return (error);
+
+ PF_RULES_WLOCK();
+ error = pfr_del_addrs(&attrs.table, &attrs.addrs[0],
+ attrs.addr_count, &attrs.ndel, attrs.flags | PFR_FLAG_USERIOCTL);
+ PF_RULES_WUNLOCK();
+
+ if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr)))
+ return (ENOMEM);
+
+ ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr);
+ ghdr_new->cmd = PFNL_CMD_TABLE_DEL_ADDR;
+ ghdr_new->version = 0;
+ ghdr_new->reserved = 0;
+
+ nlattr_add_u32(nw, PF_TA_NBR_DELETED, attrs.ndel);
+
+ if (!nlmsg_end(nw))
+ return (ENOMEM);
+
+ return (error);
+}
+
static const struct nlhdr_parser *all_parsers[] = {
&state_parser,
&addrule_parser,
@@ -2096,6 +2213,7 @@ static const struct nlhdr_parser *all_parsers[] = {
&add_addr_parser,
&ruleset_parser,
&table_parser,
+ &table_addr_parser,
};
static uint16_t family_id;
@@ -2318,6 +2436,20 @@ static const struct genl_cmd pf_cmds[] = {
.cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL,
.cmd_priv = PRIV_NETINET_PF,
},
+ {
+ .cmd_num = PFNL_CMD_TABLE_ADD_ADDR,
+ .cmd_name = "TABLE_ADD_ADDRS",
+ .cmd_cb = pf_handle_table_add_addrs,
+ .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL,
+ .cmd_priv = PRIV_NETINET_PF,
+ },
+ {
+ .cmd_num = PFNL_CMD_TABLE_DEL_ADDR,
+ .cmd_name = "TABLE_DEL_ADDRS",
+ .cmd_cb = pf_handle_table_del_addrs,
+ .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL,
+ .cmd_priv = PRIV_NETINET_PF,
+ },
};
void
diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h
index d263a0b22deb..87daac393821 100644
--- a/sys/netpfil/pf/pf_nl.h
+++ b/sys/netpfil/pf/pf_nl.h
@@ -67,6 +67,8 @@ enum {
PFNL_CMD_GET_TSTATS = 29,
PFNL_CMD_CLR_TSTATS = 30,
PFNL_CMD_CLR_ADDRS = 31,
+ PFNL_CMD_TABLE_ADD_ADDR = 32,
+ PFNL_CMD_TABLE_DEL_ADDR = 33,
__PFNL_CMD_MAX,
};
#define PFNL_CMD_MAX (__PFNL_CMD_MAX -1)
@@ -461,6 +463,23 @@ enum pf_tstats_t {
PF_TS_NZERO = 9, /* u64 */
};
+enum pfr_addr_t {
+ PFR_A_UNSPEC,
+ PFR_A_AF = 1, /* uint8_t */
+ PFR_A_NET = 2, /* uint8_t */
+ PFR_A_NOT = 3, /* bool */
+ PFR_A_ADDR = 4, /* in6_addr */
+};
+
+enum pf_table_addrs_t {
+ PF_TA_UNSPEC,
+ PF_TA_TABLE = 1, /* nested, pf_table_t */
+ PF_TA_ADDR = 2, /* nested, pfr_addr_t */
+ PF_TA_FLAGS = 3, /* u32 */
+ PF_TA_NBR_ADDED = 4, /* u32 */
+ PF_TA_NBR_DELETED = 5, /* u32 */
+};
+
#ifdef _KERNEL
void pf_nl_register(void);
diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c
index 8cea9557633c..a684d778ab42 100644
--- a/sys/netpfil/pf/pf_norm.c
+++ b/sys/netpfil/pf/pf_norm.c
@@ -118,6 +118,8 @@ VNET_DEFINE_STATIC(uma_zone_t, pf_frnode_z);
#define V_pf_frnode_z VNET(pf_frnode_z)
VNET_DEFINE_STATIC(uma_zone_t, pf_frag_z);
#define V_pf_frag_z VNET(pf_frag_z)
+VNET_DEFINE(uma_zone_t, pf_anchor_z);
+VNET_DEFINE(uma_zone_t, pf_eth_anchor_z);
TAILQ_HEAD(pf_fragqueue, pf_fragment);
TAILQ_HEAD(pf_cachequeue, pf_fragment);
diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c
index 43b51f2933f4..039908a53126 100644
--- a/sys/netpfil/pf/pf_ruleset.c
+++ b/sys/netpfil/pf/pf_ruleset.c
@@ -238,7 +238,7 @@ pf_create_kanchor(struct pf_kanchor *parent, const char *aname)
((parent != NULL) && (strlen(parent->path) >= PF_ANCHOR_MAXPATH)))
return (NULL);
- anchor = rs_malloc(sizeof(*anchor));
+ anchor = uma_zalloc(V_pf_anchor_z, M_NOWAIT | M_ZERO);
if (anchor == NULL)
return (NULL);
@@ -259,7 +259,7 @@ pf_create_kanchor(struct pf_kanchor *parent, const char *aname)
printf("%s: RB_INSERT1 "
"'%s' '%s' collides with '%s' '%s'\n", __func__,
anchor->path, anchor->name, dup->path, dup->name);
- rs_free(anchor);
+ uma_zfree(V_pf_anchor_z, anchor);
return (NULL);
}
@@ -273,7 +273,7 @@ pf_create_kanchor(struct pf_kanchor *parent, const char *aname)
anchor->name, dup->path, dup->name);
RB_REMOVE(pf_kanchor_global, &V_pf_anchors,
anchor);
- rs_free(anchor);
+ uma_zfree(V_pf_anchor_z, anchor);
return (NULL);
}
}
@@ -350,7 +350,7 @@ pf_remove_if_empty_kruleset(struct pf_kruleset *ruleset)
if ((parent = ruleset->anchor->parent) != NULL)
RB_REMOVE(pf_kanchor_node, &parent->children,
ruleset->anchor);
- rs_free(ruleset->anchor);
+ uma_zfree(V_pf_anchor_z, ruleset->anchor);
if (parent == NULL)
return;
ruleset = &parent->ruleset;
@@ -613,7 +613,7 @@ pf_find_or_create_keth_ruleset(const char *path)
rs_free(p);
return (NULL);
}
- anchor = (struct pf_keth_anchor *)rs_malloc(sizeof(*anchor));
+ anchor = uma_zalloc(V_pf_eth_anchor_z, M_NOWAIT | M_ZERO);
if (anchor == NULL) {
rs_free(p);
return (NULL);
@@ -631,7 +631,7 @@ pf_find_or_create_keth_ruleset(const char *path)
printf("%s: RB_INSERT1 "
"'%s' '%s' collides with '%s' '%s'\n", __func__,
anchor->path, anchor->name, dup->path, dup->name);
- rs_free(anchor);
+ uma_zfree(V_pf_eth_anchor_z, anchor);
rs_free(p);
return (NULL);
}
@@ -645,7 +645,7 @@ pf_find_or_create_keth_ruleset(const char *path)
anchor->name, dup->path, dup->name);
RB_REMOVE(pf_keth_anchor_global, &V_pf_keth_anchors,
anchor);
- rs_free(anchor);
+ uma_zfree(V_pf_eth_anchor_z, anchor);
rs_free(p);
return (NULL);
}
@@ -754,7 +754,7 @@ pf_remove_if_empty_keth_ruleset(struct pf_keth_ruleset *ruleset)
if ((parent = ruleset->anchor->parent) != NULL)
RB_REMOVE(pf_keth_anchor_node, &parent->children,
ruleset->anchor);
- rs_free(ruleset->anchor);
+ uma_zfree(V_pf_eth_anchor_z, ruleset->anchor);
if (parent == NULL)
return;
ruleset = &parent->ruleset;
diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c
index ecc185f89ad7..73ec18fa7646 100644
--- a/sys/netpfil/pf/pf_table.c
+++ b/sys/netpfil/pf/pf_table.c
@@ -294,7 +294,7 @@ pfr_add_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size,
else
pfr_destroy_kentries(&workq);
if (nadd != NULL)
- *nadd = xadd;
+ *nadd += xadd;
pfr_destroy_ktable(tmpkt, 0);
return (0);
_bad:
diff --git a/sys/sys/cpuset.h b/sys/sys/cpuset.h
index b036b45da283..e861321586db 100644
--- a/sys/sys/cpuset.h
+++ b/sys/sys/cpuset.h
@@ -61,8 +61,10 @@
#define CPU_ANDNOT(d, s1, s2) __BIT_ANDNOT2(CPU_SETSIZE, d, s1, s2)
#define CPU_XOR(d, s1, s2) __BIT_XOR2(CPU_SETSIZE, d, s1, s2)
#define CPU_CLR_ATOMIC(n, p) __BIT_CLR_ATOMIC(CPU_SETSIZE, n, p)
+#define CPU_TEST_CLR_ATOMIC(n, p) __BIT_TEST_CLR_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_SET_ATOMIC(n, p) __BIT_SET_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_SET_ATOMIC_ACQ(n, p) __BIT_SET_ATOMIC_ACQ(CPU_SETSIZE, n, p)
+#define CPU_TEST_SET_ATOMIC(n, p) __BIT_TEST_SET_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_AND_ATOMIC(n, p) __BIT_AND_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_OR_ATOMIC(d, s) __BIT_OR_ATOMIC(CPU_SETSIZE, d, s)
#define CPU_COPY_STORE_REL(f, t) __BIT_COPY_STORE_REL(CPU_SETSIZE, f, t)
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index af9cafa99dd0..9140cee56885 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -763,7 +763,6 @@ struct proc {
LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/
struct kdtrace_proc *p_dtrace; /* (*) DTrace-specific data. */
struct cv p_pwait; /* (*) wait cv for exit/exec. */
- uint64_t p_prev_runtime; /* (c) Resource usage accounting. */
struct racct *p_racct; /* (b) Resource accounting. */
int p_throttled; /* (c) Flag for racct pcpu throttling */
/*
diff --git a/sys/sys/racct.h b/sys/sys/racct.h
index c6020b82c865..92b50353774e 100644
--- a/sys/sys/racct.h
+++ b/sys/sys/racct.h
@@ -141,13 +141,17 @@ extern bool racct_enable;
/*
* The 'racct' structure defines resource consumption for a particular
- * subject, such as process or jail.
+ * subject, such as process or jail. It also contains the total
+ * cpu time and real time of the subject, recorded at the most recent
+ * time that RACCT_PCPU was updated.
*
* This structure must be filled with zeroes initially.
*/
struct racct {
int64_t r_resources[RACCT_MAX + 1];
LIST_HEAD(, rctl_rule_link) r_rule_links;
+ uint64_t r_runtime;
+ struct timeval r_time;
};
SYSCTL_DECL(_kern_racct);
diff --git a/tests/sys/fs/fusefs/pre-init.cc b/tests/sys/fs/fusefs/pre-init.cc
index e990d3cafffa..2d3257500304 100644
--- a/tests/sys/fs/fusefs/pre-init.cc
+++ b/tests/sys/fs/fusefs/pre-init.cc
@@ -44,12 +44,26 @@ using namespace testing;
/* Tests for behavior that happens before the server responds to FUSE_INIT */
class PreInit: public FuseTest {
+public:
void SetUp() {
m_no_auto_init = true;
FuseTest::SetUp();
}
};
+/*
+ * Tests for behavior that happens before the server responds to FUSE_INIT,
+ * parameterized on default_permissions
+ */
+class PreInitP: public PreInit,
+ public WithParamInterface<bool>
+{
+void SetUp() {
+ m_default_permissions = GetParam();
+ PreInit::SetUp();
+}
+};
+
static void* unmount1(void* arg __unused) {
ssize_t r;
@@ -152,3 +166,61 @@ TEST_F(PreInit, signal_during_unmount_before_init)
sem_post(&sem0);
m_mock->join_daemon();
}
+
+/*
+ * If some process attempts VOP_GETATTR for the mountpoint before init is
+ * complete, fusefs should wait, just like it does for other VOPs.
+ *
+ * To verify that fuse_vnop_getattr does indeed wait for FUSE_INIT to complete,
+ * invoke the test like this:
+ *
+> sudo cpuset -c -l 0 dtrace -i 'fbt:fusefs:fuse_internal_init_callback:' -i 'fbt:fusefs:fuse_vnop_getattr:' -c "./pre-init --gtest_filter=PI/PreInitP.getattr_before_init/0"
+...
+dtrace: pid 4224 has exited
+CPU ID FUNCTION:NAME
+ 0 68670 fuse_vnop_getattr:entry
+ 0 68893 fuse_internal_init_callback:entry
+ 0 68894 fuse_internal_init_callback:return
+ 0 68671 fuse_vnop_getattr:return
+ *
+ * Note that fuse_vnop_getattr was entered first, but exitted last.
+ */
+TEST_P(PreInitP, getattr_before_init)
+{
+ struct stat sb;
+ nlink_t nlink = 12345;
+
+ EXPECT_CALL(*m_mock, process(
+ ResultOf([=](auto in) {
+ return (in.header.opcode == FUSE_INIT);
+ }, Eq(true)),
+ _)
+ ).WillOnce(Invoke(ReturnImmediate([&](auto in, auto& out) {
+ SET_OUT_HEADER_LEN(out, init);
+ out.body.init.major = FUSE_KERNEL_VERSION;
+ out.body.init.minor = FUSE_KERNEL_MINOR_VERSION;
+ out.body.init.flags = in.body.init.flags & m_init_flags;
+ out.body.init.max_write = m_maxwrite;
+ out.body.init.max_readahead = m_maxreadahead;
+ out.body.init.time_gran = m_time_gran;
+ nap(); /* Allow stat() to run first */
+ })));
+ EXPECT_CALL(*m_mock, process(
+ ResultOf([=](auto in) {
+ return (in.header.opcode == FUSE_GETATTR &&
+ in.header.nodeid == FUSE_ROOT_ID);
+ }, Eq(true)),
+ _)
+ ).WillOnce(Invoke(ReturnImmediate([=](auto& in, auto& out) {
+ SET_OUT_HEADER_LEN(out, attr);
+ out.body.attr.attr.ino = in.header.nodeid;
+ out.body.attr.attr.mode = S_IFDIR | 0644;
+ out.body.attr.attr.nlink = nlink;
+ out.body.attr.attr_valid = UINT64_MAX;
+ })));
+
+ EXPECT_EQ(0, stat("mountpoint", &sb));
+ EXPECT_EQ(nlink, sb.st_nlink);
+}
+
+INSTANTIATE_TEST_SUITE_P(PI, PreInitP, Bool());
diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh
index 534144f46632..906f586d2483 100755
--- a/tests/sys/net/if_bridge_test.sh
+++ b/tests/sys/net/if_bridge_test.sh
@@ -922,15 +922,15 @@ vlan_pvid_body()
ifconfig ${bridge} vlanfilter up
ifconfig ${epone}a up
ifconfig ${eptwo}a up
- ifconfig ${bridge} addm ${epone}a untagged ${epone}a 20
- ifconfig ${bridge} addm ${eptwo}a untagged ${eptwo}a 20
+ ifconfig ${bridge} addm ${epone}a untagged 20
+ ifconfig ${bridge} addm ${eptwo}a untagged 20
# With VLAN filtering enabled, traffic should be passed.
atf_check -s exit:0 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
atf_check -s exit:0 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
# Removed the untagged VLAN on one port; traffic should not be passed.
- ifconfig ${bridge} -untagged ${epone}a
+ ifconfig ${bridge} -ifuntagged ${epone}a
atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
}
@@ -966,10 +966,8 @@ vlan_pvid_filtered_body()
atf_check -s exit:0 ifconfig ${bridge} vlanfilter up
atf_check -s exit:0 ifconfig ${epone}a up
atf_check -s exit:0 ifconfig ${eptwo}a up
- atf_check -s exit:0 ifconfig ${bridge} \
- addm ${epone}a untagged ${epone}a 20
- atf_check -s exit:0 ifconfig ${bridge} \
- addm ${eptwo}a untagged ${eptwo}a 30
+ atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a untagged 20
+ atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a untagged 30
atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
@@ -1011,10 +1009,8 @@ vlan_pvid_tagged_body()
atf_check -s exit:0 ifconfig ${bridge} vlanfilter up
atf_check -s exit:0 ifconfig ${epone}a up
atf_check -s exit:0 ifconfig ${eptwo}a up
- atf_check -s exit:0 ifconfig ${bridge} \
- addm ${epone}a untagged ${epone}a 20
- atf_check -s exit:0 ifconfig ${bridge} \
- addm ${eptwo}a untagged ${eptwo}a 20
+ atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a untagged 20
+ atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a untagged 20
# Tagged frames should not be passed.
atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
@@ -1055,10 +1051,8 @@ vlan_pvid_1q_body()
bridge=$(vnet_mkbridge)
atf_check -s exit:0 ifconfig ${bridge} vlanfilter up
- atf_check -s exit:0 ifconfig ${bridge} \
- addm ${epone}a untagged ${epone}a 20
- atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a \
- tagged ${eptwo}a 20
+ atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a untagged 20
+ atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a tagged 20
atf_check -s exit:0 ifconfig ${epone}a up
atf_check -s exit:0 ifconfig ${eptwo}a up
@@ -1116,25 +1110,25 @@ vlan_filtering_body()
# Set the untagged vlan on both ports to 20 and make sure traffic is
# still blocked. We intentionally do not pass tagged traffic for the
# untagged vlan.
- atf_check -s exit:0 ifconfig ${bridge} untagged ${epone}a 20
- atf_check -s exit:0 ifconfig ${bridge} untagged ${eptwo}a 20
+ atf_check -s exit:0 ifconfig ${bridge} ifuntagged ${epone}a 20
+ atf_check -s exit:0 ifconfig ${bridge} ifuntagged ${eptwo}a 20
atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
- atf_check -s exit:0 ifconfig ${bridge} -untagged ${epone}a
- atf_check -s exit:0 ifconfig ${bridge} -untagged ${eptwo}a
+ atf_check -s exit:0 ifconfig ${bridge} -ifuntagged ${epone}a
+ atf_check -s exit:0 ifconfig ${bridge} -ifuntagged ${eptwo}a
# Add VLANs 10-30 to the access list; now access should be allowed.
- atf_check -s exit:0 ifconfig ${bridge} +tagged ${epone}a 10-30
- atf_check -s exit:0 ifconfig ${bridge} +tagged ${eptwo}a 10-30
+ atf_check -s exit:0 ifconfig ${bridge} +iftagged ${epone}a 10-30
+ atf_check -s exit:0 ifconfig ${bridge} +iftagged ${eptwo}a 10-30
atf_check -s exit:0 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
atf_check -s exit:0 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
# Remove vlan 20 from the access list, now access should be blocked
# again.
- atf_check -s exit:0 ifconfig ${bridge} -tagged ${epone}a 20
- atf_check -s exit:0 ifconfig ${bridge} -tagged ${eptwo}a 20
+ atf_check -s exit:0 ifconfig ${bridge} -iftagged ${epone}a 20
+ atf_check -s exit:0 ifconfig ${bridge} -iftagged ${eptwo}a 20
atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
}
@@ -1145,16 +1139,16 @@ vlan_filtering_cleanup()
}
#
-# Test the ifconfig 'tagged' option.
+# Test the ifconfig 'iftagged' option.
#
-atf_test_case "vlan_ifconfig_tagged" "cleanup"
-vlan_ifconfig_tagged_head()
+atf_test_case "vlan_ifconfig_iftagged" "cleanup"
+vlan_ifconfig_iftagged_head()
{
- atf_set descr 'test the ifconfig tagged option'
+ atf_set descr 'test the ifconfig iftagged option'
atf_set require.user root
}
-vlan_ifconfig_tagged_body()
+vlan_ifconfig_iftagged_body()
{
vnet_init
vnet_init_bridge
@@ -1170,34 +1164,34 @@ vlan_ifconfig_tagged_body()
atf_check -s exit:0 -o not-match:"tagged" ifconfig ${bridge}
# Add vlans 100-149.
- atf_check -s exit:0 ifconfig ${bridge} tagged ${ep}a 100-149
+ atf_check -s exit:0 ifconfig ${bridge} iftagged ${ep}a 100-149
atf_check -s exit:0 -o match:"tagged 100-149" ifconfig ${bridge}
# Replace the vlan list with 139-199.
- atf_check -s exit:0 ifconfig ${bridge} tagged ${ep}a 139-199
+ atf_check -s exit:0 ifconfig ${bridge} iftagged ${ep}a 139-199
atf_check -s exit:0 -o match:"tagged 139-199" ifconfig ${bridge}
# Add vlans 100-170.
- atf_check -s exit:0 ifconfig ${bridge} +tagged ${ep}a 100-170
+ atf_check -s exit:0 ifconfig ${bridge} +iftagged ${ep}a 100-170
atf_check -s exit:0 -o match:"tagged 100-199" ifconfig ${bridge}
# Remove vlans 104, 105, and 150-159
- atf_check -s exit:0 ifconfig ${bridge} -tagged ${ep}a 104,105,150-159
+ atf_check -s exit:0 ifconfig ${bridge} -iftagged ${ep}a 104,105,150-159
atf_check -s exit:0 -o match:"tagged 100-103,106-149,160-199" \
ifconfig ${bridge}
# Remove the entire vlan list.
- atf_check -s exit:0 ifconfig ${bridge} tagged ${ep}a none
+ atf_check -s exit:0 ifconfig ${bridge} iftagged ${ep}a none
atf_check -s exit:0 -o not-match:"tagged" ifconfig ${bridge}
# Test some invalid vlans sets.
for bad_vlan in -1 0 4096 4097 foo 0-10 4000-5000 foo-40 40-foo; do
atf_check -s exit:1 -e ignore \
- ifconfig ${bridge} tagged "$bad_vlan"
+ ifconfig ${bridge} iftagged "$bad_vlan"
done
}
-vlan_ifconfig_tagged_cleanup()
+vlan_ifconfig_iftagged_cleanup()
{
vnet_cleanup
}
@@ -1229,8 +1223,7 @@ vlan_svi_body()
atf_check -s exit:0 ifconfig ${bridge} vlanfilter up
atf_check -s exit:0 ifconfig ${epone}a up
- atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a \
- tagged ${epone}a 20
+ atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a tagged 20
svi=$(vnet_mkvlan)
atf_check -s exit:0 ifconfig ${svi} vlan 20 vlandev ${bridge}
@@ -1268,21 +1261,25 @@ vlan_qinq_body()
# Create a QinQ trunk between the two jails. The outer (provider) tag
# is 5, and the inner tag is 10.
- jexec one ifconfig ${epone}b up
- jexec one ifconfig ${epone}b.5 create vlanproto 802.1ad up
- jexec one ifconfig ${epone}b.5.10 create inet 192.0.2.1/24 up
+ atf_check -s exit:0 jexec one ifconfig ${epone}b up
+ atf_check -s exit:0 jexec one \
+ ifconfig ${epone}b.5 create vlanproto 802.1ad up
+ atf_check -s exit:0 jexec one \
+ ifconfig ${epone}b.5.10 create inet 192.0.2.1/24 up
- jexec two ifconfig ${eptwo}b up
- jexec two ifconfig ${eptwo}b.5 create vlanproto 802.1ad up
- jexec two ifconfig ${eptwo}b.5.10 create inet 192.0.2.2/24 up
+ atf_check -s exit:0 jexec two ifconfig ${eptwo}b up
+ atf_check -s exit:0 jexec two ifconfig \
+ ${eptwo}b.5 create vlanproto 802.1ad up
+ atf_check -s exit:0 jexec two ifconfig \
+ ${eptwo}b.5.10 create inet 192.0.2.2/24 up
bridge=$(vnet_mkbridge)
- ifconfig ${bridge} up
- ifconfig ${epone}a up
- ifconfig ${eptwo}a up
- ifconfig ${bridge} addm ${epone}a vlanfilter ${epone}a
- ifconfig ${bridge} addm ${eptwo}a vlanfilter ${eptwo}a
+ atf_check -s exit:0 ifconfig ${bridge} vlanfilter defqinq up
+ atf_check -s exit:0 ifconfig ${epone}a up
+ atf_check -s exit:0 ifconfig ${eptwo}a up
+ atf_check -s exit:0 ifconfig ${bridge} addm ${epone}a
+ atf_check -s exit:0 ifconfig ${bridge} addm ${eptwo}a
# Right now there are no VLANs on the access list, so everything
# should be blocked.
@@ -1290,10 +1287,16 @@ vlan_qinq_body()
atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
# Add the provider tag to the access list; now traffic should be passed.
- ifconfig ${bridge} +tagged ${epone}a 5
- ifconfig ${bridge} +tagged ${eptwo}a 5
+ atf_check -s exit:0 ifconfig ${bridge} +iftagged ${epone}a 5
+ atf_check -s exit:0 ifconfig ${bridge} +iftagged ${eptwo}a 5
atf_check -s exit:0 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
atf_check -s exit:0 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
+
+ # Remove the qinq flag from one of the interfaces; traffic should
+ # be blocked again.
+ atf_check -s exit:0 ifconfig ${bridge} -qinq ${epone}a
+ atf_check -s exit:2 -o ignore jexec one ping -c 3 -t 1 192.0.2.2
+ atf_check -s exit:2 -o ignore jexec two ping -c 3 -t 1 192.0.2.1
}
vlan_qinq_cleanup()
@@ -1401,7 +1404,7 @@ atf_init_test_cases()
atf_add_test_case "vlan_pvid_filtered"
atf_add_test_case "vlan_pvid_tagged"
atf_add_test_case "vlan_filtering"
- atf_add_test_case "vlan_ifconfig_tagged"
+ atf_add_test_case "vlan_ifconfig_iftagged"
atf_add_test_case "vlan_svi"
atf_add_test_case "vlan_qinq"
atf_add_test_case "vlan_defuntagged"
diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile
index 404d5adfb07a..616ffe560b3a 100644
--- a/tests/sys/netpfil/pf/Makefile
+++ b/tests/sys/netpfil/pf/Makefile
@@ -55,6 +55,7 @@ ATF_TESTS_SH+= altq \
tcp \
tos
+ATF_TESTS_PYTEST+= frag4.py
ATF_TESTS_PYTEST+= frag6.py
ATF_TESTS_PYTEST+= header.py
ATF_TESTS_PYTEST+= icmp.py
diff --git a/tests/sys/netpfil/pf/frag4.py b/tests/sys/netpfil/pf/frag4.py
new file mode 100644
index 000000000000..3303d2ee7780
--- /dev/null
+++ b/tests/sys/netpfil/pf/frag4.py
@@ -0,0 +1,72 @@
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright (c) 2025 Rubicon Communications, LLC (Netgate)
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+import pytest
+from utils import DelayedSend
+from atf_python.sys.net.tools import ToolsHelper
+from atf_python.sys.net.vnet import VnetTestTemplate
+
+class TestFrag4_NoReassemble(VnetTestTemplate):
+ REQUIRED_MODULES = [ "pf" ]
+ TOPOLOGY = {
+ "vnet1": {"ifaces": ["if1"]},
+ "vnet2": {"ifaces": ["if1", "if2"]},
+ "vnet3": {"ifaces": ["if2"]},
+ "if1": {"prefixes4": [("192.0.2.1/24", "192.0.2.2/24")]},
+ "if2": {"prefixes4": [("198.51.100.1/24", "198.51.100.2/24")]},
+ }
+
+ def vnet2_handler(self, vnet):
+ outifname = vnet.iface_alias_map["if2"].name
+
+ ToolsHelper.print_output("/sbin/pfctl -e")
+ ToolsHelper.pf_rules([
+ "set reassemble no",
+ "nat on %s from 192.0.2.0/24 to any -> (%s)" % (outifname, outifname),
+ "pass out"
+ ])
+
+ ToolsHelper.print_output("/sbin/sysctl net.inet.ip.forwarding=1")
+
+ def vnet3_handler(self, vnet):
+ # We deliberately don't set the default gateway here, so if we get a
+ # reply from this we know we did NAT in vnet2
+ pass
+
+ @pytest.mark.require_user("root")
+ @pytest.mark.require_progs(["scapy"])
+ def test_udp_frag(self):
+ ToolsHelper.print_output("/sbin/route add default 192.0.2.2")
+ ToolsHelper.print_output("/sbin/ping -c 3 198.51.100.2")
+
+ # Import in the correct vnet, so at to not confuse Scapy
+ import scapy.all as sp
+
+ pkt = sp.IP(dst="198.51.100.2", frag=123) \
+ / sp.UDP(dport=12345, sport=54321)
+ reply = sp.sr1(pkt, timeout=3)
+ # We don't expect a reply
+ assert not reply
diff --git a/tests/sys/netpfil/pf/nat64.sh b/tests/sys/netpfil/pf/nat64.sh
index da95a7bf9893..f92a69f2abce 100644
--- a/tests/sys/netpfil/pf/nat64.sh
+++ b/tests/sys/netpfil/pf/nat64.sh
@@ -200,7 +200,7 @@ tcp_in_body()
# Sanity check & delay for nc startup
atf_check -s exit:0 -o ignore \
- ping6 -c 1 64:ff9b::192.0.2.2
+ ping6 -c 3 64:ff9b::192.0.2.2
rcv=$(nc -w 3 -6 64:ff9b::c000:202 1234)
if [ "${rcv}" != "foo" ];
@@ -230,7 +230,7 @@ tcp_out_body()
# Sanity check & delay for nc startup
atf_check -s exit:0 -o ignore \
- ping6 -c 1 64:ff9b::192.0.2.2
+ ping6 -c 3 64:ff9b::192.0.2.2
rcv=$(nc -w 3 -6 64:ff9b::c000:202 1234)
if [ "${rcv}" != "foo" ];
@@ -260,7 +260,7 @@ udp_in_body()
# Sanity check & delay for nc startup
atf_check -s exit:0 -o ignore \
- ping6 -c 1 64:ff9b::192.0.2.2
+ ping6 -c 3 64:ff9b::192.0.2.2
rcv=$(echo bar | nc -w 3 -6 -u 64:ff9b::c000:202 1234)
if [ "${rcv}" != "foo" ];
@@ -290,7 +290,7 @@ udp_out_body()
# Sanity check & delay for nc startup
atf_check -s exit:0 -o ignore \
- ping6 -c 1 64:ff9b::192.0.2.2
+ ping6 -c 3 64:ff9b::192.0.2.2
rcv=$(echo bar | nc -w 3 -6 -u 64:ff9b::c000:202 1234)
if [ "${rcv}" != "foo" ];
@@ -323,7 +323,7 @@ sctp_in_body()
# Sanity check & delay for nc startup
atf_check -s exit:0 -o ignore \
- ping6 -c 1 64:ff9b::192.0.2.2
+ ping6 -c 3 64:ff9b::192.0.2.2
rcv=$(echo bar | nc --sctp -w 3 -6 64:ff9b::c000:202 1234)
if [ "${rcv}" != "foo" ];
@@ -356,7 +356,7 @@ sctp_out_body()
# Sanity check & delay for nc startup
atf_check -s exit:0 -o ignore \
- ping6 -c 1 64:ff9b::192.0.2.2
+ ping6 -c 3 64:ff9b::192.0.2.2
rcv=$(echo bar | nc --sctp -w 3 -6 64:ff9b::c000:202 1234)
if [ "${rcv}" != "foo" ];
diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py
index da42ce527195..f492f26b63a1 100644
--- a/tests/sys/netpfil/pf/sctp.py
+++ b/tests/sys/netpfil/pf/sctp.py
@@ -271,6 +271,9 @@ class TestSCTP(VnetTestTemplate):
"pass inet proto sctp to 192.0.2.0/24",
"pass on lo"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("192.0.2.3", 1234)
client.send(b"hello", 0)
@@ -309,6 +312,9 @@ class TestSCTP(VnetTestTemplate):
"pass on lo",
"pass inet proto sctp from 192.0.2.0/24"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("192.0.2.3", 1234, "192.0.2.1")
client.send(b"hello", 0)
@@ -379,6 +385,9 @@ class TestSCTP(VnetTestTemplate):
"pass on lo",
"pass inet proto sctp to 192.0.2.0/24"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("192.0.2.3", 1234)
client.send(b"hello", 0)
@@ -410,6 +419,9 @@ class TestSCTP(VnetTestTemplate):
"pass on lo",
"pass inet proto sctp to 192.0.2.0/24"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("192.0.2.3", 1234)
client.send(b"hello", 0)
@@ -440,6 +452,9 @@ class TestSCTP(VnetTestTemplate):
"pass on lo",
"pass inet proto sctp to 192.0.2.0/24"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Set up a connection, which will try to create states for all addresses
# we have assigned
client = SCTPClient("192.0.2.3", 1234)
@@ -464,6 +479,9 @@ class TestSCTP(VnetTestTemplate):
"pass inet proto sctp to 192.0.2.3",
"pass on lo"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("192.0.2.3", 1234)
client.send(b"hello", 0)
@@ -502,6 +520,9 @@ class TestSCTP(VnetTestTemplate):
"pass inet proto sctp to 192.0.2.3 keep state (allow-related)",
"pass on lo"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("192.0.2.3", 1234)
client.send(b"hello", 0)
@@ -558,6 +579,9 @@ class TestSCTPv6(VnetTestTemplate):
"pass on lo",
"pass inet6 proto sctp to 2001:db8::0/64"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("2001:db8::3", 1234)
client.send(b"hello", 0)
@@ -596,6 +620,9 @@ class TestSCTPv6(VnetTestTemplate):
"pass on lo",
"pass inet6 proto sctp from 2001:db8::/64"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("2001:db8::3", 1234, "2001:db8::1")
client.send(b"hello", 0)
@@ -665,6 +692,9 @@ class TestSCTPv6(VnetTestTemplate):
"pass on lo",
"pass inet6 proto sctp to 2001:db8::0/64"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("2001:db8::3", 1234)
client.send(b"hello", 0)
@@ -696,6 +726,9 @@ class TestSCTPv6(VnetTestTemplate):
"pass on lo",
"pass inet6 proto sctp to 2001:db8::0/64"])
+ # Give the server some time to come up
+ time.sleep(3)
+
# Sanity check, we can communicate with the primary address.
client = SCTPClient("2001:db8::3", 1234)
client.send(b"hello", 0)
diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh
index 5e5fccdaca20..c773518e95e4 100644
--- a/tests/sys/netpfil/pf/table.sh
+++ b/tests/sys/netpfil/pf/table.sh
@@ -610,6 +610,47 @@ flush_cleanup()
pft_cleanup
}
+atf_test_case "large" "cleanup"
+large_head()
+{
+ atf_set descr 'Test loading a large list of addresses'
+ atf_set require.user root
+}
+
+large_body()
+{
+ pft_init
+ pwd=$(pwd)
+
+ vnet_mkjail alcatraz
+
+ for i in `seq 1 255`; do
+ for j in `seq 1 255`; do
+ echo "1.2.${i}.${j}" >> ${pwd}/foo.lst
+ done
+ done
+ expected=$(wc -l foo.lst | awk '{ print $1; }')
+
+ jexec alcatraz pfctl -e
+ pft_set_rules alcatraz \
+ "table <foo>" \
+ "pass in from <foo>" \
+ "pass"
+
+ atf_check -s exit:0 \
+ -e match:"${expected}/${expected} addresses added." \
+ jexec alcatraz pfctl -t foo -T add -f ${pwd}/foo.lst
+ actual=$(jexec alcatraz pfctl -t foo -T show | wc -l | awk '{ print $1; }')
+ if [[ $actual -ne $expected ]]; then
+ atf_fail "Unexpected number of table entries $expected $acual"
+ fi
+}
+
+large_cleanup()
+{
+ pft_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case "v4_counters"
@@ -625,4 +666,5 @@ atf_init_test_cases()
atf_add_test_case "precreate"
atf_add_test_case "anchor"
atf_add_test_case "flush"
+ atf_add_test_case "large"
}
diff --git a/tools/build/make.py b/tools/build/make.py
index ec42cb70dd21..2f36a3e23e32 100755
--- a/tools/build/make.py
+++ b/tools/build/make.py
@@ -34,12 +34,24 @@
# On FreeBSD you can use it the same way as just calling make:
# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py buildworld -DWITH_FOO`
#
-# On Linux and MacOS you will either need to set XCC/XCXX/XLD/XCPP or pass
-# --cross-bindir to specify the path to the cross-compiler bindir:
-# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py
-# --cross-bindir=/path/to/cross/compiler buildworld -DWITH_FOO TARGET=foo
-# TARGET_ARCH=bar`
+# On Linux and MacOS you may need to explicitly indicate the cross toolchain
+# to use. You can do this by:
+# - setting XCC/XCXX/XLD/XCPP to the paths of each tool
+# - using --cross-bindir to specify the path to the cross-compiler bindir:
+# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py
+# --cross-bindir=/path/to/cross/compiler buildworld -DWITH_FOO TARGET=foo
+# TARGET_ARCH=bar`
+# - using --cross-toolchain to specify the package containing the cross-compiler
+# (MacOS only currently):
+# `MAKEOBJDIRPREFIX=~/obj ./tools/build/make.py
+# --cross-toolchain=llvm@NN buildworld -DWITH_FOO TARGET=foo
+# TARGET_ARCH=bar`
+#
+# On MacOS, this tool will search for an llvm toolchain installed via brew and
+# use it as the cross toolchain if an explicit toolchain is not specified.
+
import argparse
+import functools
import os
import shlex
import shutil
@@ -159,7 +171,8 @@ def check_required_make_env_var(varname, binary_name, bindir):
return
if not bindir:
sys.exit("Could not infer value for $" + varname + ". Either set $" +
- varname + " or pass --cross-bindir=/cross/compiler/dir/bin")
+ varname + " or pass --cross-bindir=/cross/compiler/dir/bin" +
+ " or --cross-toolchain=<package>")
# try to infer the path to the tool
guess = os.path.join(bindir, binary_name)
if not os.path.isfile(guess):
@@ -178,24 +191,45 @@ def check_xtool_make_env_var(varname, binary_name):
return
global parsed_args
if parsed_args.cross_bindir is None:
- parsed_args.cross_bindir = default_cross_toolchain()
+ cross_bindir = cross_toolchain_bindir(binary_name,
+ parsed_args.cross_toolchain)
+ else:
+ cross_bindir = parsed_args.cross_bindir
return check_required_make_env_var(varname, binary_name,
- parsed_args.cross_bindir)
+ cross_bindir)
+
+
+@functools.cache
+def brew_prefix(package: str) -> str:
+ path = subprocess.run(["brew", "--prefix", package], stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).stdout.strip()
+ debug("Inferred", package, "dir as", path)
+ return path.decode("utf-8")
+def binary_path(bindir: str, binary_name: str) -> "Optional[str]":
+ try:
+ if bindir and Path(bindir, "bin", binary_name).exists():
+ return str(Path(bindir, "bin"))
+ except OSError:
+ pass
+ return None
-def default_cross_toolchain():
+def cross_toolchain_bindir(binary_name: str, package: "Optional[str]") -> str:
# default to homebrew-installed clang on MacOS if available
if sys.platform.startswith("darwin"):
if shutil.which("brew"):
- llvm_dir = subprocess.run([
- "brew", "--prefix", "llvm"],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.strip()
- debug("Inferred LLVM dir as", llvm_dir)
- try:
- if llvm_dir and Path(llvm_dir.decode("utf-8"), "bin").exists():
- return str(Path(llvm_dir.decode("utf-8"), "bin"))
- except OSError:
- return None
+ if not package:
+ package = "llvm"
+ bindir = binary_path(brew_prefix(package), binary_name)
+ if bindir:
+ return bindir
+
+ # brew installs lld as a separate package for LLVM 19 and later
+ if binary_name == "ld.lld":
+ lld_package = package.replace("llvm", "lld")
+ bindir = binary_path(brew_prefix(lld_package), binary_name)
+ if bindir:
+ return bindir
return None
@@ -215,6 +249,10 @@ if __name__ == "__main__":
help="Compiler type to find in --cross-bindir (only "
"needed if XCC/XCPP/XLD are not set)"
"Note: using CC is currently highly experimental")
+ parser.add_argument("--cross-toolchain", default=None,
+ help="Name of package containing cc/c++/cpp/ld to build "
+ "target binaries (only needed if XCC/XCPP/XLD "
+ "are not set)")
parser.add_argument("--host-compiler-type", choices=("cc", "clang", "gcc"),
default="cc",
help="Compiler type to find in --host-bindir (only "
diff --git a/usr.bin/bmake/Makefile b/usr.bin/bmake/Makefile
index bbceea3ae8c2..a8bcdfd9f859 100644
--- a/usr.bin/bmake/Makefile
+++ b/usr.bin/bmake/Makefile
@@ -99,6 +99,8 @@ COPTS.filemon_ktrace.c+= -Wno-error=unused-parameter
SUBDIR.${MK_TESTS}+= unit-tests
.endif
+MAN1= ${MAN}
+
.if ${MK_GEN_MAN:Uno} == "yes"
# we use this to generate ${MAN}
diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config
index 8ff6c81b8c78..2415f9d3882c 100644
--- a/usr.bin/bmake/Makefile.config
+++ b/usr.bin/bmake/Makefile.config
@@ -6,7 +6,7 @@ SRCTOP?= ${.CURDIR:H:H}
# things set by configure
-_MAKE_VERSION?=20250707
+_MAKE_VERSION?=20250804
prefix?= /usr
srcdir= ${SRCTOP}/contrib/bmake
diff --git a/usr.bin/bmake/unit-tests/Makefile b/usr.bin/bmake/unit-tests/Makefile
index d4ee6f33f862..66bdc04321e8 100644
--- a/usr.bin/bmake/unit-tests/Makefile
+++ b/usr.bin/bmake/unit-tests/Makefile
@@ -1,9 +1,9 @@
# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
-# $Id: Makefile,v 1.240 2025/06/30 18:40:54 sjg Exp $
+# $Id: Makefile,v 1.245 2025/08/05 16:18:07 sjg Exp $
#
-# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $
+# $NetBSD: Makefile,v 1.372 2025/08/04 22:44:49 sjg Exp $
#
# Unit tests for make(1)
#
@@ -237,6 +237,7 @@ TESTS+= jobs-error-nested-make
TESTS+= lint
TESTS+= make-exported
TESTS+= meta-cmd-cmp
+TESTS+= meta-output
TESTS+= moderrs
TESTS+= modmisc
.if ${.MAKE.UID} > 0
@@ -595,6 +596,7 @@ SED_CMDS.directive-include-guard= \
-e '/^ParseDependency/d' \
-e '/^ParseEOF:/d'
SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d'
+SED_CMDS.export+= -e '/^DIFF/d'
.if ${.MAKE.OS:NCygwin} == ""
SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d'
.endif
@@ -805,6 +807,7 @@ EGREP= grep -E
EGREP?= egrep
MAKE_TEST_ENV= EGREP="${EGREP}"
+MAKE_TEST_ENV+= DIFF="${TOOL_DIFF}" DIFF_FLAGS="${DIFF_FLAGS}"
MAKE_TEST_ENV+= MALLOC_OPTIONS="JA" # for jemalloc 100
MAKE_TEST_ENV+= MALLOC_CONF="junk:true" # for jemalloc 510
MAKE_TEST_ENV+= TMPDIR=${TMPDIR}
diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1
index b16c4bcc95a2..98521a98762d 100644
--- a/usr.bin/find/find.1
+++ b/usr.bin/find/find.1
@@ -1144,9 +1144,18 @@ Inode of the file.
.It n
Number of hard links.
.It y
-Unimplemented -- Type of the file
+A single character representing the type of the file.
.It Y
-Unimplemented -- Type of the file with loop detection
+A single character representing the type of the file.
+If the file is a symbolic link, show information for the target of the
+link instead, or
+.Sq L
+if the link loops,
+.Sq N
+if the target does not exist, or
+.Sq ?
+if any other error occurs while attempting to determine the type of
+the target.
.It a
Access time of the file.
.It A
diff --git a/usr.bin/find/printf.c b/usr.bin/find/printf.c
index 671d1d1dbb9a..c1be04376156 100644
--- a/usr.bin/find/printf.c
+++ b/usr.bin/find/printf.c
@@ -5,15 +5,18 @@
*/
#include <sys/types.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+
#include <err.h>
+#include <errno.h>
#include <fts.h>
#include <grp.h>
#include <pwd.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <time.h>
+#include <unistd.h>
#include "find.h"
@@ -32,7 +35,7 @@ isesc(char c)
return (c >= 'a' && c <= 'v' && esc[c - 'a'] != c);
}
-static const char *
+static char *
escape(const char *str, bool *flush, bool *warned)
{
char c;
@@ -147,7 +150,6 @@ fp_strftime(FILE *fp, time_t t, char mod)
gmtime_r(&t, &tm);
fmt[1] = mod;
- printf("fmt is '%s'\n", fmt);
if (strftime(buffer, sizeof(buffer), fmt, &tm) == 0)
errx(1, "Format bad or data too long for buffer"); /* Can't really happen ??? */
fputs(buffer, fp);
@@ -156,36 +158,36 @@ fp_strftime(FILE *fp, time_t t, char mod)
void
do_printf(PLAN *plan, FTSENT *entry, FILE *fout)
{
- const char *fmt, *path, *pend, *all;
- char c;
- FILE *fp;
+ char buf[4096];
+ struct stat sb;
+ struct stat *sp;
+ const char *path, *pend;
+ char *all, *fmt;
+ ssize_t ret;
+ int c;
bool flush, warned;
- struct stat *sb;
- char *tmp;
- size_t tmplen;
- fp = open_memstream(&tmp, &tmplen);
warned = (plan->flags & F_HAS_WARNED) != 0;
all = fmt = escape(plan->c_data, &flush, &warned);
if (warned)
plan->flags |= F_HAS_WARNED;
- sb = entry->fts_statp;
for (c = *fmt++; c; c = *fmt++) {
+ sp = entry->fts_statp;
if (c != '%') {
- putc(c, fp);
+ putc(c, fout);
continue;
}
c = *fmt++;
/* Style(9) deviation: case order same as gnu find info doc */
switch (c) {
case '%':
- putc(c, fp);
+ putc(c, fout);
break;
case 'p': /* Path to file */
- fputs(entry->fts_path, fp);
+ fputs(entry->fts_path, fout);
break;
case 'f': /* filename w/o dirs */
- fputs(entry->fts_name, fp);
+ fputs(entry->fts_name, fout);
break;
case 'h':
/*
@@ -195,98 +197,139 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout)
path = entry->fts_path;
pend = strrchr(path, '/');
if (pend == NULL)
- putc('.', fp);
- else {
- char *t = malloc(pend - path + 1);
- memcpy(t, path, pend - path);
- t[pend - path] = '\0';
- fputs(t, fp);
- free(t);
- }
+ putc('.', fout);
+ else
+ fwrite(path, pend - path, 1, fout);
break;
case 'P': /* file with command line arg rm'd -- HOW? fts_parent? */
errx(1, "%%%c is unimplemented", c);
case 'H': /* Command line arg -- HOW? */
errx(1, "%%%c is unimplemented", c);
case 'g': /* gid human readable */
- fputs(group_from_gid(sb->st_gid, 0), fp);
+ fputs(group_from_gid(sp->st_gid, 0), fout);
break;
case 'G': /* gid numeric */
- fprintf(fp, "%d", sb->st_gid);
+ fprintf(fout, "%d", sp->st_gid);
break;
case 'u': /* uid human readable */
- fputs(user_from_uid(sb->st_uid, 0), fp);
+ fputs(user_from_uid(sp->st_uid, 0), fout);
break;
case 'U': /* uid numeric */
- fprintf(fp, "%d", sb->st_uid);
+ fprintf(fout, "%d", sp->st_uid);
break;
case 'm': /* mode in octal */
- fprintf(fp, "%o", sb->st_mode & 07777);
+ fprintf(fout, "%o", sp->st_mode & 07777);
break;
- case 'M': { /* Mode in ls-standard form */
- char mode[12];
- strmode(sb->st_mode, mode);
- fputs(mode, fp);
+ case 'M': /* Mode in ls-standard form */
+ strmode(sp->st_mode, buf);
+ fwrite(buf, 10, 1, fout);
break;
- }
case 'k': /* kbytes used by file */
- fprintf(fp, "%jd", (intmax_t)sb->st_blocks / 2);
+ fprintf(fout, "%jd", (intmax_t)sp->st_blocks / 2);
break;
case 'b': /* blocks used by file */
- fprintf(fp, "%jd", (intmax_t)sb->st_blocks);
+ fprintf(fout, "%jd", (intmax_t)sp->st_blocks);
break;
case 's': /* size in bytes of file */
- fprintf(fp, "%ju", (uintmax_t)sb->st_size);
+ fprintf(fout, "%ju", (uintmax_t)sp->st_size);
break;
case 'S': /* sparseness of file */
- fprintf(fp, "%3.1f",
- (float)sb->st_blocks * 512 / (float)sb->st_size);
+ fprintf(fout, "%3.1f",
+ (float)sp->st_blocks * 512 / (float)sp->st_size);
break;
case 'd': /* Depth in tree */
- fprintf(fp, "%ld", entry->fts_level);
+ fprintf(fout, "%ld", entry->fts_level);
break;
case 'D': /* device number */
- fprintf(fp, "%ju", (uintmax_t)sb->st_dev);
+ fprintf(fout, "%ju", (uintmax_t)sp->st_dev);
break;
case 'F': /* Filesystem type */
errx(1, "%%%c is unimplemented", c);
case 'l': /* object of symbolic link */
- fprintf(fp, "%s", entry->fts_accpath);
+ ret = readlink(entry->fts_accpath, buf, sizeof(buf));
+ if (ret > 0)
+ fwrite(buf, ret, 1, fout);
break;
case 'i': /* inode # */
- fprintf(fp, "%ju", (uintmax_t)sb->st_ino);
+ fprintf(fout, "%ju", (uintmax_t)sp->st_ino);
break;
case 'n': /* number of hard links */
- fprintf(fp, "%ju", (uintmax_t)sb->st_nlink);
+ fprintf(fout, "%ju", (uintmax_t)sp->st_nlink);
break;
- case 'y': /* -type of file, incl 'l' */
- errx(1, "%%%c is unimplemented", c);
case 'Y': /* -type of file, following 'l' types L loop ? error */
- errx(1, "%%%c is unimplemented", c);
+ if (S_ISLNK(sp->st_mode)) {
+ if (stat(entry->fts_accpath, &sb) != 0) {
+ switch (errno) {
+ case ELOOP:
+ putc('L', fout);
+ break;
+ case ENOENT:
+ putc('N', fout);
+ break;
+ default:
+ putc('?', fout);
+ break;
+ }
+ break;
+ }
+ sp = &sb;
+ }
+ /* FALLTHROUGH */
+ case 'y': /* -type of file, incl 'l' */
+ switch (sp->st_mode & S_IFMT) {
+ case S_IFIFO:
+ putc('p', fout);
+ break;
+ case S_IFCHR:
+ putc('c', fout);
+ break;
+ case S_IFDIR:
+ putc('d', fout);
+ break;
+ case S_IFBLK:
+ putc('b', fout);
+ break;
+ case S_IFREG:
+ putc('f', fout);
+ break;
+ case S_IFLNK:
+ putc('l', fout);
+ break;
+ case S_IFSOCK:
+ putc('s', fout);
+ break;
+ case S_IFWHT:
+ putc('w', fout);
+ break;
+ default:
+ putc('U', fout);
+ break;
+ }
+ break;
case 'a': /* access time ctime */
- fp_ctime(fp, sb->st_atime);
+ fp_ctime(fout, sp->st_atime);
break;
case 'A': /* access time with next char strftime format */
- fp_strftime(fp, sb->st_atime, *fmt++);
+ fp_strftime(fout, sp->st_atime, *fmt++);
break;
case 'B': /* birth time with next char strftime format */
#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME
- if (sb->st_birthtime != 0)
- fp_strftime(fp, sb->st_birthtime, *fmt);
+ if (sp->st_birthtime != 0)
+ fp_strftime(fout, sp->st_birthtime, *fmt);
#endif
fmt++;
break; /* blank on systems that don't support it */
case 'c': /* status change time ctime */
- fp_ctime(fp, sb->st_ctime);
+ fp_ctime(fout, sp->st_ctime);
break;
case 'C': /* status change time with next char strftime format */
- fp_strftime(fp, sb->st_ctime, *fmt++);
+ fp_strftime(fout, sp->st_ctime, *fmt++);
break;
case 't': /* modification change time ctime */
- fp_ctime(fp, sb->st_mtime);
+ fp_ctime(fout, sp->st_mtime);
break;
case 'T': /* modification time with next char strftime format */
- fp_strftime(fp, sb->st_mtime, *fmt++);
+ fp_strftime(fout, sp->st_mtime, *fmt++);
break;
case 'Z': /* empty string for compat SELinux context string */
break;
@@ -299,9 +342,7 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout)
errx(1, "Unknown format %c '%s'", c, all);
}
}
- fputs(tmp, fout);
if (flush)
fflush(fout);
- free(__DECONST(char *, fmt));
- free(tmp);
+ free(all);
}
diff --git a/usr.bin/find/tests/find_test.sh b/usr.bin/find/tests/find_test.sh
index 8b8c23688018..99d2f6af4d45 100755
--- a/usr.bin/find/tests/find_test.sh
+++ b/usr.bin/find/tests/find_test.sh
@@ -1,5 +1,8 @@
+#-
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright 2017, Conrad Meyer <cem@FreeBSD.org>.
+# Copyright (c) 2025 Dag-Erling Smørgrav <des@FreeBSD.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -64,8 +67,116 @@ find_samefile_link_body()
atf_check -s exit:0 -o "inline:test/link2\n" find test -samefile test/link2
}
+atf_test_case find_printf
+find_printf_head()
+{
+ atf_set "descr" "Test the -printf primary"
+}
+find_printf_body()
+{
+ mkdir dir
+ chmod 0755 dir
+ jot -b hello 1024 >dir/file
+ chmod 0644 dir/file
+ ln -s file dir/link
+ chmod -h 0444 dir/link
+ local db=$(stat -f %b dir)
+ local fb=$(stat -f %b dir/file)
+ local lb=$(stat -f %b dir/link)
+
+ # paths
+ atf_check -o inline:"dir\ndir/file\ndir/link\n" \
+ find -s dir -printf '%p\n'
+ atf_check -o inline:"dir\nfile\nlink\n" \
+ find -s dir -printf '%f\n'
+ atf_check -o inline:".\ndir\ndir\n" \
+ find -s dir -printf '%h\n'
+ atf_check -s exit:1 -e match:"unimplemented" -o ignore \
+ find -s dir -printf '%P\n'
+ atf_check -s exit:1 -e match:"unimplemented" -o ignore \
+ find -s dir -printf '%H\n'
+
+ # group
+ atf_check -o inline:"$(stat -f %Sg dir dir/file dir/link)\n" \
+ find -s dir -printf '%g\n'
+ atf_check -o inline:"$(stat -f %g dir dir/file dir/link)\n" \
+ find -s dir -printf '%G\n'
+
+ # owner
+ atf_check -o inline:"$(stat -f %Su dir dir/file dir/link)\n" \
+ find -s dir -printf '%u\n'
+ atf_check -o inline:"$(stat -f %u dir dir/file dir/link)\n" \
+ find -s dir -printf '%U\n'
+
+ # mode
+ atf_check -o inline:"$(stat -f %Lp dir dir/file dir/link)\n" \
+ find -s dir -printf '%m\n'
+ atf_check -o inline:"$(stat -f %Sp dir dir/file dir/link)\n" \
+ find -s dir -printf '%M\n'
+
+ # size
+ atf_check -o inline:"$((db/2))\n$((fb/2))\n$((lb/2))\n" \
+ find -s dir -printf '%k\n'
+ atf_check -o inline:"$db\n$fb\n$lb\n" \
+ find -s dir -printf '%b\n'
+ atf_check -o inline:"$(stat -f %z dir dir/file dir/link)\n" \
+ find -s dir -printf '%s\n'
+ # XXX test %S properly
+ atf_check -o ignore \
+ find -s dir -printf '%S\n'
+ atf_check -o inline:"0\n1\n1\n" \
+ find -s dir -printf '%d\n'
+
+ # device
+ atf_check -o inline:"$(stat -f %d dir dir/file dir/link)\n" \
+ find -s dir -printf '%D\n'
+ atf_check -s exit:1 -e match:"unimplemented" -o ignore \
+ find -s dir -printf '%F\n'
+
+ # link target
+ atf_check -o inline:"\n\nfile\n" \
+ find -s dir -printf '%l\n'
+
+ # inode
+ atf_check -o inline:"$(stat -f %i dir dir/file dir/link)\n" \
+ find -s dir -printf '%i\n'
+
+ # nlinks
+ atf_check -o inline:"$(stat -f %l dir dir/file dir/link)\n" \
+ find -s dir -printf '%n\n'
+
+ # type
+ atf_check -o inline:"d\nf\nl\n" \
+ find -s dir -printf '%y\n'
+ atf_check -o inline:"d\nf\nf\n" \
+ find -s dir -printf '%Y\n'
+
+ # access time
+ atf_check -o inline:"$(stat -f %Sa -t '%a %b %e %T %Y' dir dir/file dir/link)\n" \
+ find -s dir -printf '%a\n'
+ atf_check -o inline:"$(stat -f %Sa -t '%e' dir dir/file dir/link)\n" \
+ find -s dir -printf '%Ae\n'
+
+ # birth time
+ atf_check -o inline:"$(stat -f %SB -t '%e' dir dir/file dir/link)\n" \
+ find -s dir -printf '%Be\n'
+
+ # inode change time
+ atf_check -o inline:"$(stat -f %Sc -t '%a %b %e %T %Y' dir dir/file dir/link)\n" \
+ find -s dir -printf '%c\n'
+ atf_check -o inline:"$(stat -f %Sc -t '%e' dir dir/file dir/link)\n" \
+ find -s dir -printf '%Ce\n'
+
+ # modification time
+ atf_check -o inline:"$(stat -f %Sm -t '%a %b %e %T %Y' dir dir/file dir/link)\n" \
+ find -s dir -printf '%t\n'
+ atf_check -o inline:"$(stat -f %Sm -t '%e' dir dir/file dir/link)\n" \
+ find -s dir -printf '%Te\n'
+}
+
atf_init_test_cases()
{
atf_add_test_case find_newer_link
atf_add_test_case find_samefile_link
+ atf_add_test_case find_printf
}
diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c
index fc60a82287df..a92eee3881b4 100644
--- a/usr.bin/tail/tail.c
+++ b/usr.bin/tail/tail.c
@@ -95,15 +95,17 @@ main(int argc, char *argv[])
* -r is the entire file, not 10 lines.
*/
#define ARG(units, forward, backward) { \
+ int64_t num; \
if (style) \
usage(); \
- if (expand_number(optarg, &off)) \
+ if (expand_number(optarg, &num)) \
err(1, "illegal offset -- %s", optarg); \
- if (off > INT64_MAX / units || off < INT64_MIN / units ) \
+ if (num > INT64_MAX / units || num < INT64_MIN / units) \
errx(1, "illegal offset -- %s", optarg); \
- switch(optarg[0]) { \
+ off = num * units; \
+ switch (optarg[0]) { \
case '+': \
- if (off) \
+ if (off != 0) \
off -= (units); \
style = (forward); \
break; \
@@ -121,7 +123,7 @@ main(int argc, char *argv[])
off = 0;
while ((ch = getopt_long(argc, argv, "+Fb:c:fn:qrv", long_opts, NULL)) !=
-1)
- switch(ch) {
+ switch (ch) {
case 'F': /* -F is superset of (and implies) -f */
Fflag = fflag = 1;
break;
diff --git a/usr.bin/tail/tests/tail_test.sh b/usr.bin/tail/tests/tail_test.sh
index 9c941f8a2c2f..74d6908f7568 100755
--- a/usr.bin/tail/tests/tail_test.sh
+++ b/usr.bin/tail/tests/tail_test.sh
@@ -423,6 +423,51 @@ no_lf_at_eof_body()
atf_check -o inline:"a\nb\nc" tail -4 infile
}
+atf_test_case tail_b
+tail_b_head()
+{
+ atf_set "descr" "Test -b option"
+}
+tail_b_body()
+{
+ (jot -b a 256 ; jot -b b 256 ; jot -b c 256) >infile
+ (jot -b b 256 ; jot -b c 256) >outfile
+ # infile is 3 blocks long, outfile contains the last two
+ atf_check -o file:outfile tail -b +2 infile # start at the 2nd block
+ atf_check -o file:outfile tail -b -2 infile # 2 blocks from the end
+ atf_check -o file:outfile tail -b 2 infile # 2 blocks from the end
+}
+
+atf_test_case tail_c
+tail_c_head()
+{
+ atf_set "descr" "Test -c option"
+}
+tail_c_body()
+{
+ (jot -b a 256 ; jot -b b 256 ; jot -b c 256) >infile
+ (jot -b b 256 ; jot -b c 256) >outfile
+ # infile is 1536 bytes long, outfile contains the last 1024
+ atf_check -o file:outfile tail -c +513 infile # start at the 513th byte
+ atf_check -o file:outfile tail -c -1024 infile # 1024 bytes from the end
+ atf_check -o file:outfile tail -c 1024 infile # 1024 bytes from the end
+}
+
+atf_test_case tail_n
+tail_n_head()
+{
+ atf_set "descr" "Test -n option"
+}
+tail_n_body()
+{
+ (jot -b a 256 ; jot -b b 256 ; jot -b c 256) >infile
+ (jot -b b 256 ; jot -b c 256) >outfile
+ # infile is 768 lines long, outfile contains the last 512
+ atf_check -o file:outfile tail -n +257 infile # start at the 257th line
+ atf_check -o file:outfile tail -n -512 infile # 512 lines from the end
+ atf_check -o file:outfile tail -n 512 infile # 512 lines from the end
+}
+
atf_init_test_cases()
{
atf_add_test_case empty_r
@@ -448,4 +493,7 @@ atf_init_test_cases()
atf_add_test_case verbose_header
atf_add_test_case si_number
atf_add_test_case no_lf_at_eof
+ atf_add_test_case tail_b
+ atf_add_test_case tail_c
+ atf_add_test_case tail_n
}
diff --git a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
index fbaba3128def..ffca4aa8c5a6 100644
--- a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
+++ b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
@@ -396,6 +396,9 @@ bhyve_init_platform(struct vmctx *ctx, struct vcpu *bsp)
pci_irq_init(pcie_intrs);
fdt_add_pcie(pcie_intrs);
+ /* Mark CPU0 as running */
+ CPU_SET(0, &running_cpumask);
+
return (0);
}
diff --git a/usr.sbin/bhyve/aarch64/vmexit.c b/usr.sbin/bhyve/aarch64/vmexit.c
index 9ecf25c04e41..2d350566675a 100644
--- a/usr.sbin/bhyve/aarch64/vmexit.c
+++ b/usr.sbin/bhyve/aarch64/vmexit.c
@@ -54,7 +54,7 @@
#include "mem.h"
#include "vmexit.h"
-static cpuset_t running_cpumask;
+cpuset_t running_cpumask;
static int
vmexit_inst_emul(struct vmctx *ctx __unused, struct vcpu *vcpu,
@@ -216,7 +216,7 @@ vmexit_smccc(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun)
break;
}
- if (CPU_ISSET(newcpu, &running_cpumask)) {
+ if (CPU_TEST_SET_ATOMIC(newcpu, &running_cpumask)) {
smccc_rv = PSCI_RETVAL_ALREADY_ON;
break;
}
@@ -235,7 +235,6 @@ vmexit_smccc(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun)
assert(error == 0);
vm_resume_cpu(newvcpu);
- CPU_SET_ATOMIC(newcpu, &running_cpumask);
smccc_rv = PSCI_RETVAL_SUCCESS;
break;
diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8
index beb1b102b194..9e54445a012b 100644
--- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8
+++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8
@@ -26,12 +26,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 31, 2024
+.Dd July 15, 2025
.Dt ATH3KFW 8
.Os
.Sh NAME
.Nm ath3kfw
-.Nd download firmware for Atheros AR3011/AR3012 Bluetooth USB devices
+.Nd load firmware for Atheros AR3011/AR3012 Bluetooth USB devices
.Sh SYNOPSIS
.Nm
.Op Fl DI
diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8
index 50e9739340ee..28f0cbbafe00 100644
--- a/usr.sbin/bluetooth/bcmfw/bcmfw.8
+++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8
@@ -25,12 +25,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 31, 2024
+.Dd July 15, 2025
.Dt BCMFW 8
.Os
.Sh NAME
.Nm bcmfw
-.Nd download firmware for Broadcom BCM2033 Bluetooth USB devices
+.Nd load firmware for Broadcom BCM2033 Bluetooth USB devices
.Sh SYNOPSIS
.Nm
.Op Fl h
diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8
index 87f34435d3f4..ac32a675aa63 100644
--- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8
+++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8
@@ -26,12 +26,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 15, 2024
+.Dd July 15, 2025
.Dt IWMBTFW 8
.Os
.Sh NAME
.Nm iwmbtfw
-.Nd download firmware for Intel Wireless AC Bluetooth USB devices
+.Nd load firmware for Intel Wireless AC Bluetooth USB devices
.Sh SYNOPSIS
.Nm
.Op Fl DI
diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8 b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8
index c3c0b83d97e5..5cae9c9d288d 100644
--- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8
+++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.8
@@ -23,13 +23,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 19, 2023
+.Dd July 15, 2025
.Dt RTLBTFW 8
.Os
.Sh NAME
.Nm rtlbtfw
-.Nd firmware download utility for Realtek 87XX/88XX chip based Bluetooth
-USB devices
+.Nd load firmware for Realtek 87XX/88XX Bluetooth USB devices
.Sh SYNOPSIS
.Nm
.Fl d Ar device_name
diff --git a/usr.sbin/ctld/Makefile b/usr.sbin/ctld/Makefile
index 26cc03c036cb..61efe8a05cfb 100644
--- a/usr.sbin/ctld/Makefile
+++ b/usr.sbin/ctld/Makefile
@@ -5,30 +5,28 @@ CFLAGS+=-I${SRCTOP}/contrib/libucl/include
PACKAGE= ctl
PROG_CXX= ctld
-SRCS= ctld.cc conf.cc discovery.cc isns.cc kernel.cc
-SRCS+= login.cc parse.y token.l y.tab.h uclparse.cc
+SRCS= ctld.cc conf.cc discovery.cc iscsi.cc isns.cc kernel.cc
+SRCS+= login.cc nvmf.cc nvmf_discovery.cc
+SRCS+= parse.y token.l y.tab.h uclparse.cc
CFLAGS+= -I${.CURDIR}
CFLAGS+= -I${SRCTOP}/sys
CFLAGS+= -I${SRCTOP}/sys/cam/ctl
CFLAGS+= -I${SRCTOP}/sys/dev/iscsi
CFLAGS+= -I${SRCTOP}/lib/libiscsiutil
CFLAGS+= -I${SRCTOP}/lib/libutil++
+CFLAGS+= -I${SRCTOP}/lib/libnvmf
#CFLAGS+= -DICL_KERNEL_PROXY
NO_WCAST_ALIGN=
CXXWARNFLAGS.gcc= -Wno-shadow
MAN= ctld.8 ctl.conf.5
-LIBADD= bsdxml iscsiutil md sbuf util ucl m nv util++
+LIBADD= bsdxml iscsiutil nvmf md sbuf util ucl m nv util++
YFLAGS+= -v
CLEANFILES= y.tab.c y.tab.h y.output
NO_WMISSING_VARIABLE_DECLARATIONS=
-.if ${MK_ISCSI} != "no"
-CFLAGS+= -DWANT_ISCSI
-.endif
-
.include <bsd.prog.mk>
CXXWARNFLAGS.uclparse.cc= -Wno-shadow -Wno-cast-qual
diff --git a/usr.sbin/ctld/conf.cc b/usr.sbin/ctld/conf.cc
index 2eae12c31d0c..ab76f8e2ed0b 100644
--- a/usr.sbin/ctld/conf.cc
+++ b/usr.sbin/ctld/conf.cc
@@ -123,6 +123,18 @@ auth_group_add_chap_mutual(const char *user, const char *secret,
}
bool
+auth_group_add_host_address(const char *portal)
+{
+ return (auth_group->add_host_address(portal));
+}
+
+bool
+auth_group_add_host_nqn(const char *name)
+{
+ return (auth_group->add_host_nqn(name));
+}
+
+bool
auth_group_add_initiator_name(const char *name)
{
return (auth_group->add_initiator_name(name));
@@ -175,7 +187,8 @@ portal_group_finish(void)
bool
portal_group_add_listen(const char *listen, bool iser)
{
- return (portal_group->add_portal(listen, iser));
+ return (portal_group->add_portal(listen, iser ? portal_protocol::ISER :
+ portal_protocol::ISCSI));
}
bool
@@ -233,6 +246,29 @@ portal_group_set_tag(uint16_t tag)
}
bool
+transport_group_start(const char *name)
+{
+ if (strcmp(name, "default") == 0)
+ portal_group = conf->define_default_transport_group();
+ else
+ portal_group = conf->add_transport_group(name);
+ return (portal_group != NULL);
+}
+
+bool
+transport_group_add_listen_discovery_tcp(const char *listen)
+{
+ return portal_group->add_portal(listen,
+ portal_protocol::NVME_DISCOVERY_TCP);
+}
+
+bool
+transport_group_add_listen_tcp(const char *listen)
+{
+ return portal_group->add_portal(listen, portal_protocol::NVME_TCP);
+}
+
+bool
lun_start(const char *name)
{
lun = conf->add_lun(name);
@@ -387,6 +423,38 @@ target_start_lun(u_int id)
}
bool
+controller_start(const char *name)
+{
+ target = conf->add_controller(name);
+ return (target != nullptr);
+}
+
+bool
+controller_add_host_address(const char *addr)
+{
+ return (target->add_host_address(addr));
+}
+
+bool
+controller_add_host_nqn(const char *name)
+{
+ return (target->add_host_nqn(name));
+}
+
+bool
+controller_add_namespace(u_int id, const char *name)
+{
+ return (target->add_namespace(id, name));
+}
+
+bool
+controller_start_namespace(u_int id)
+{
+ lun = target->start_namespace(id);
+ return (lun != nullptr);
+}
+
+bool
parse_conf(const char *path)
{
freebsd::FILE_up fp(fopen(path, "r"));
diff --git a/usr.sbin/ctld/conf.h b/usr.sbin/ctld/conf.h
index b13fd80e9fe5..642c8f234d30 100644
--- a/usr.sbin/ctld/conf.h
+++ b/usr.sbin/ctld/conf.h
@@ -43,6 +43,8 @@ void auth_group_finish(void);
bool auth_group_add_chap(const char *user, const char *secret);
bool auth_group_add_chap_mutual(const char *user, const char *secret,
const char *user2, const char *secret2);
+bool auth_group_add_host_address(const char *portal);
+bool auth_group_add_host_nqn(const char *name);
bool auth_group_add_initiator_name(const char *name);
bool auth_group_add_initiator_portal(const char *portal);
bool auth_group_set_type(const char *type);
@@ -69,6 +71,10 @@ bool portal_group_set_pcp(u_int pcp);
bool portal_group_set_redirection(const char *addr);
void portal_group_set_tag(uint16_t tag);
+bool transport_group_start(const char *name);
+bool transport_group_add_listen_discovery_tcp(const char *listen);
+bool transport_group_add_listen_tcp(const char *listen);
+
bool target_start(const char *name);
void target_finish(void);
bool target_add_chap(const char *user, const char *secret);
@@ -85,6 +91,12 @@ bool target_set_physical_port(const char *pport);
bool target_set_redirection(const char *addr);
bool target_start_lun(u_int id);
+bool controller_start(const char *name);
+bool controller_add_host_address(const char *addr);
+bool controller_add_host_nqn(const char *name);
+bool controller_add_namespace(u_int id, const char *name);
+bool controller_start_namespace(u_int id);
+
bool lun_start(const char *name);
void lun_finish(void);
bool lun_add_option(const char *name, const char *value);
diff --git a/usr.sbin/ctld/ctl.conf.5 b/usr.sbin/ctld/ctl.conf.5
index e42dd8067006..12f4186a6844 100644
--- a/usr.sbin/ctld/ctl.conf.5
+++ b/usr.sbin/ctld/ctl.conf.5
@@ -26,12 +26,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 26, 2025
+.Dd August 6, 2025
.Dt CTL.CONF 5
.Os
.Sh NAME
.Nm ctl.conf
-.Nd CAM Target Layer / iSCSI target daemon configuration file
+.Nd CAM Target Layer / iSCSI target / NVMeoF controller daemon configuration file
.Sh DESCRIPTION
The
.Nm
@@ -59,6 +59,11 @@ file is:
.Dl ...
}
+.No transport-group Ar name No {
+.Dl listen Ar transport Ar address
+.Dl ...
+}
+
.No target Ar name {
.Dl auth-group Ar name
.Dl portal-group Ar name
@@ -67,6 +72,15 @@ file is:
.Dl }
.Dl ...
}
+
+.No controller Ar name {
+.Dl auth-group Ar name
+.Dl transport-group Ar name
+.Dl namespace Ar number No {
+.Dl path Ar path
+.Dl }
+.Dl ...
+}
.Ed
.Ss Global Context
.Bl -tag -width indent
@@ -94,16 +108,29 @@ Create a
configuration context,
defining a new portal-group,
which can then be assigned to any number of targets.
+.It Ic transport-group Ar name
+Create a
+.Sy transport-group
+configuration context,
+defining a new transport-group,
+which can then be assigned to any number of NVMeoF controllers.
.It Ic lun Ar name
Create a
.Sy lun
-configuration context, defining a LUN to be exported by any number of targets.
+configuration context, defining a LUN to be exported by any number of targets
+or controllers.
.It Ic target Ar name
Create a
.Sy target
configuration context, which can optionally contain one or more
.Sy lun
contexts.
+.It Ic controller Ar name
+Create a
+.Sy controller
+configuration context, which can optionally contain one or more
+.Sy namespace
+contexts.
.It Ic timeout Ar seconds
The timeout for login sessions, after which the connection
will be forcibly terminated.
@@ -150,6 +177,19 @@ the configuration may only contain either
or
.Sy chap-mutual
entries; it is an error to mix them.
+.It Ic host-address Ar address Ns Op / Ns Ar prefixlen
+An NVMeoF host address: an IPv4 or IPv6 address, optionally
+followed by a literal slash and a prefix length.
+Only NVMeoF hosts with an address matching one of the defined
+addresses will be allowed to connect.
+If not defined, there will be no restrictions based on host
+address.
+.It Ic host-nqn Ar name
+An NVMeoF host name.
+Only NVMeoF hosts with a name matching one of the defined
+names will be allowed to connect.
+If not defined, there will be no restrictions based on NVMe host
+name.
.It Ic initiator-name Ar initiator-name
An iSCSI initiator name.
Only initiators with a name matching one of the defined
@@ -264,6 +304,75 @@ to
.Qq Ar 7 .
When omitted, the default for the outgoing interface is used.
.El
+.Ss transport-group Context
+.Bl -tag -width indent
+.It Ic discovery-auth-group Ar name
+See the description for this option for
+.Sy portal-group
+contexts.
+.It Ic discovery-filter Ar filter
+Filter can be either
+.Qq Ar none ,
+.Qq Ar address ,
+or
+.Qq Ar address-name .
+When set to
+.Qq Ar none ,
+discovery will return all controllers assigned to that transport group.
+When set to
+.Qq Ar address ,
+discovery will not return controllers that cannot be accessed by the
+host because of their
+.Sy host-address .
+When set to
+.Qq Ar address-name ,
+the check will include both
+.Sy host-address
+and
+.Sy host-nqn .
+The default is
+.Qq Ar none .
+.It Ic listen Ar transport Ar address
+An IPv4 or IPv6 address and port to listen on for incoming connections
+using the specified NVMeoF transport.
+Supported transports are
+.Qq Ar tcp
+.Pq for NVMe/TCP I/O controllers
+and
+.Qq Ar discovery-tcp
+.Pq for NVMe/TCP discovery controllers .
+.It Ic option Ar name Ar value
+One of the following options:
+.Bl -column "max_admin_qsize" "Default" "Transports"
+.It Sy Name Ta Sy Default Ta Sy Transports Ta Sy Description
+.It MAXH2CDATA Ta 256KiB Ta TCP Ta
+Size in bytes of the maximum data payload size for data PDUs accepted from
+remote hosts.
+The value must be at least 4KiB and must be a multiple of 4.
+.It SQFC Ta false Ta any Ta
+Always enable SQ flow control.
+.It HDGST Ta false Ta TCP Ta
+Enable PDU header digests if requested by a remote host.
+.It DDGST Ta false Ta TCP Ta
+Enable PDU data digests if requested by a remote host.
+.It max_admin_qsize Ta 4096 Ta any Ta
+The maximum number of entries a remote host can request for an admin queue pair.
+.It max_io_qsize Ta 65536 Ta any Ta
+The maximum number of entries a remote host can request for an I/O queue pair.
+.El
+.It Ic tag Ar value
+Unique 16-bit port ID for this
+.Sy transport-group .
+If not specified, the value is generated automatically.
+.It Ic dscp Ar value
+See the description for this option for
+.Sy portal-group
+contexts.
+.It Ic pcp Ar value
+See the description for this option for
+.Sy portal-group
+contexts.
+.El
.Ss target Context
.Bl -tag -width indent
.It Ic alias Ar text
@@ -390,6 +499,101 @@ configuration context, defining a LUN exported by the parent target.
This is an alternative to defining the LUN separately, useful in the common
case of a LUN being exported by a single target.
.El
+.Ss controller Context
+.Bl -tag -width indent
+.It Ic auth-group Ar name
+Assign a previously defined authentication group to the controller.
+By default, controllers that do not specify their own auth settings,
+using clauses such as
+.Sy host-address
+or
+.Sy host-nqn ,
+are assigned to the
+predefined
+.Sy auth-group
+.Qq Ar default ,
+which denies all access.
+Another predefined
+.Sy auth-group ,
+.Qq Ar no-authentication ,
+may be used to permit access
+without authentication.
+Note that this clause can be overridden using the second argument
+to a
+.Sy transport-group
+clause.
+.It Ic auth-type Ar type
+Sets the authentication type.
+Type can be either
+.Qq Ar none
+or
+.Qq Ar deny .
+In most cases it is not necessary to set the type using this clause;
+it is usually used to disable authentication for a given
+.Sy controller .
+This clause is mutually exclusive with
+.Sy auth-group ;
+one cannot use
+both in a single controller.
+.It Ic host-address Ar address Ns Op / Ns Ar prefixlen
+An NVMeoF host address: an IPv4 or IPv6 address, optionally
+followed by a literal slash and a prefix length.
+Only NVMeoF hosts with an address matching one of the defined
+addresses will be allowed to connect.
+If not defined, there will be no restrictions based on host
+address.
+This clause is mutually exclusive with
+.Sy auth-group ;
+one cannot use
+both in a single controller.
+.It Ic host-nqn Ar name
+An NVMeoF host name.
+Only NVMeoF hosts with a name matching one of the defined
+names will be allowed to connect.
+If not defined, there will be no restrictions based on NVMe host
+name.
+This clause is mutually exclusive with
+.Sy auth-group ;
+one cannot use
+both in a single target.
+.Pp
+The
+.Sy auth-type ,
+.Sy host-address ,
+and
+.Sy host-nqn
+clauses in the controller context provide an alternative to assigning an
+.Sy auth-group
+defined separately, useful in the common case of authentication settings
+specific to a single controller.
+.It Ic transport-group Ar name Op Ar ag-name
+Assign a previously defined transport group to the controller.
+The default transport group is
+.Qq Ar default ,
+which makes the controller available
+on TCP port 4420 on all configured IPv4 and IPv6 addresses.
+The optional second argument specifies the
+.Sy auth-group
+for connections to this specific transport group group.
+If the second argument is not specified, the controller
+.Sy auth-group
+is used.
+.It Ic namespace Ar number Ar name
+Export previously defined
+.Sy lun
+as an NVMe namespace from the parent controller.
+.It Ic namespace Ar number
+Create a
+.Sy namespace
+configuration context, defining an NVMe namespace exported by the parent target.
+.Pp
+This is an alternative to defining the namespace separately,
+useful in the common case of a namespace being exported by a single controller.
+.Sy namespace
+configuration contexts accept the the same properties as
+.Sy lun
+contexts.
+.El
.Ss lun Context
.Bl -tag -width indent
.It Ic backend Ar block No | Ar ramdisk
@@ -410,7 +614,7 @@ Global numeric identifier to use for a given LUN inside CTL.
By default CTL allocates those IDs dynamically, but explicit specification
may be needed for consistency in HA configurations.
.It Ic device-id Ar string
-The SCSI Device Identification string presented to the initiator.
+The SCSI Device Identification string presented to iSCSI initiators.
.It Ic device-type Ar type
Specify the SCSI device type to use when creating the LUN.
Currently CTL supports Direct Access (type 0), Processor (type 3)
@@ -425,11 +629,11 @@ section of
The path to the file, device node, or
.Xr zfs 8
volume used to back the LUN.
-For optimal performance, create the volume with the
+For optimal performance, create ZFS volumes with the
.Qq Ar volmode=dev
property set.
.It Ic serial Ar string
-The SCSI serial number presented to the initiator.
+The SCSI serial number presented to iSCSI initiators.
.It Ic size Ar size
The LUN size, in bytes or by number with a suffix of
.Sy K , M , G , T
@@ -498,6 +702,16 @@ target naa.50015178f369f092 {
port isp1
lun 0 example_1
}
+
+controller nqn.2012-06.com.example:controller1 {
+ auth-group no-authentication;
+ namespace 1 example_1
+ namespace 2 {
+ backend ramdisk
+ size 1G
+ option capacity 1G
+ }
+}
.Ed
.Pp
An equivalent configuration in UCL format, for use with
@@ -585,6 +799,22 @@ target {
}
}
}
+
+controller {
+ "nqn.2012-06.com.example:controller1" {
+ auth-group = no-authentication
+ namespace = {
+ 1 = example_1,
+ 2 {
+ backend = ramdisk
+ size = 1G
+ options {
+ capacity = 1G
+ }
+ }
+ }
+ }
+}
.Ed
.Sh SEE ALSO
.Xr ctl 4 ,
diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc
index 23d01364a6a4..10c12f25068e 100644
--- a/usr.sbin/ctld/ctld.cc
+++ b/usr.sbin/ctld/ctld.cc
@@ -41,6 +41,7 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h>
+#include <libnvmf.h>
#include <netdb.h>
#include <signal.h>
#include <stdbool.h>
@@ -58,13 +59,6 @@
#include "ctld.hh"
#include "isns.hh"
-static bool timed_out(void);
-#ifdef ICL_KERNEL_PROXY
-static void pdu_receive_proxy(struct pdu *pdu);
-static void pdu_send_proxy(struct pdu *pdu);
-#endif /* ICL_KERNEL_PROXY */
-static void pdu_fail(const struct connection *conn, const char *reason);
-
bool proxy_mode = false;
static volatile bool sighup_received = false;
@@ -73,19 +67,8 @@ static volatile bool sigalrm_received = false;
static int kqfd;
static int nchildren = 0;
-static uint16_t last_portal_group_tag = 0xff;
-static struct connection_ops conn_ops = {
- .timed_out = timed_out,
-#ifdef ICL_KERNEL_PROXY
- .pdu_receive_proxy = pdu_receive_proxy,
- .pdu_send_proxy = pdu_send_proxy,
-#else
- .pdu_receive_proxy = nullptr,
- .pdu_send_proxy = nullptr,
-#endif
- .fail = pdu_fail,
-};
+uint32_t conf::global_genctr;
static void
usage(void)
@@ -96,6 +79,11 @@ usage(void)
exit(1);
}
+conf::conf()
+{
+ conf_genctr = global_genctr++;
+}
+
void
conf::set_debug(int debug)
{
@@ -298,20 +286,37 @@ auth_group::add_chap_mutual(const char *user, const char *secret,
}
bool
+auth_group::add_host_nqn(std::string_view nqn)
+{
+ /* Silently ignore duplicates. */
+ ag_host_names.emplace(nqn);
+ return (true);
+}
+
+bool
+auth_group::host_permitted(std::string_view nqn) const
+{
+ if (ag_host_names.empty())
+ return (true);
+
+ return (ag_host_names.count(std::string(nqn)) != 0);
+}
+
+bool
auth_group::add_initiator_name(std::string_view name)
{
/* Silently ignore duplicates. */
- ag_names.emplace(name);
+ ag_initiator_names.emplace(name);
return (true);
}
bool
auth_group::initiator_permitted(std::string_view initiator_name) const
{
- if (ag_names.empty())
+ if (ag_initiator_names.empty())
return (true);
- return (ag_names.count(std::string(initiator_name)) != 0);
+ return (ag_initiator_names.count(std::string(initiator_name)) != 0);
}
bool
@@ -381,6 +386,20 @@ auth_portal::parse(const char *portal)
}
bool
+auth_group::add_host_address(const char *address)
+{
+ auth_portal ap;
+ if (!ap.parse(address)) {
+ log_warnx("invalid controller address \"%s\" for %s", address,
+ label());
+ return (false);
+ }
+
+ ag_host_addresses.emplace_back(ap);
+ return (true);
+}
+
+bool
auth_group::add_initiator_portal(const char *portal)
{
auth_portal ap;
@@ -390,7 +409,7 @@ auth_group::add_initiator_portal(const char *portal)
return (false);
}
- ag_portals.emplace_back(ap);
+ ag_initiator_portals.emplace_back(ap);
return (true);
}
@@ -427,12 +446,24 @@ auth_portal::matches(const struct sockaddr *sa) const
}
bool
+auth_group::host_permitted(const struct sockaddr *sa) const
+{
+ if (ag_host_addresses.empty())
+ return (true);
+
+ for (const auth_portal &ap : ag_host_addresses)
+ if (ap.matches(sa))
+ return (true);
+ return (false);
+}
+
+bool
auth_group::initiator_permitted(const struct sockaddr *sa) const
{
- if (ag_portals.empty())
+ if (ag_initiator_portals.empty())
return (true);
- for (const auth_portal &ap : ag_portals)
+ for (const auth_portal &ap : ag_initiator_portals)
if (ap.matches(sa))
return (true);
return (false);
@@ -477,8 +508,8 @@ conf::find_auth_group(std::string_view name)
return (it->second);
}
-portal_group::portal_group(struct conf *conf, std::string_view name)
- : pg_conf(conf), pg_options(nvlist_create(0)), pg_name(name)
+portal_group::portal_group(struct conf *conf, std::string_view name) :
+ pg_conf(conf), pg_options(nvlist_create(0)), pg_name(name)
{
}
@@ -486,7 +517,7 @@ struct portal_group *
conf::add_portal_group(const char *name)
{
auto pair = conf_portal_groups.try_emplace(name,
- std::make_unique<portal_group>(this, name));
+ iscsi_make_portal_group(this, name));
if (!pair.second) {
log_warnx("duplicated portal-group \"%s\"", name);
return (nullptr);
@@ -521,6 +552,45 @@ conf::find_portal_group(std::string_view name)
return (it->second.get());
}
+struct portal_group *
+conf::add_transport_group(const char *name)
+{
+ auto pair = conf_transport_groups.try_emplace(name,
+ nvmf_make_transport_group(this, name));
+ if (!pair.second) {
+ log_warnx("duplicated transport-group \"%s\"", name);
+ return (nullptr);
+ }
+
+ return (pair.first->second.get());
+}
+
+/*
+ * Make it possible to redefine the default transport-group, but only
+ * once.
+ */
+struct portal_group *
+conf::define_default_transport_group()
+{
+ if (conf_default_tg_defined) {
+ log_warnx("duplicated transport-group \"default\"");
+ return (nullptr);
+ }
+
+ conf_default_tg_defined = true;
+ return (find_transport_group("default"));
+}
+
+struct portal_group *
+conf::find_transport_group(std::string_view name)
+{
+ auto it = conf_transport_groups.find(std::string(name));
+ if (it == conf_transport_groups.end())
+ return (nullptr);
+
+ return (it->second.get());
+}
+
bool
portal_group::is_dummy() const
{
@@ -531,7 +601,7 @@ portal_group::is_dummy() const
return (false);
}
-static freebsd::addrinfo_up
+freebsd::addrinfo_up
parse_addr_port(const char *address, const char *def_port)
{
struct addrinfo hints, *ai;
@@ -599,25 +669,6 @@ portal_group::options() const
}
bool
-portal_group::add_portal(const char *value, bool iser)
-{
- freebsd::addrinfo_up ai = parse_addr_port(value, "3260");
- if (!ai) {
- log_warnx("invalid listen address %s", value);
- return (false);
- }
-
- /*
- * XXX: getaddrinfo(3) may return multiple addresses; we should turn
- * those into multiple portals.
- */
-
- pg_portals.emplace_back(std::make_unique<portal>(this, value, iser,
- std::move(ai)));
- return (true);
-}
-
-bool
portal_group::add_option(const char *name, const char *value)
{
return (option_new(pg_options.get(), name, value));
@@ -627,14 +678,14 @@ bool
portal_group::set_discovery_auth_group(const char *ag_name)
{
if (pg_discovery_auth_group != nullptr) {
- log_warnx("discovery-auth-group for portal-group "
- "\"%s\" specified more than once", name());
+ log_warnx("discovery-auth-group for %s "
+ "\"%s\" specified more than once", keyword(), name());
return (false);
}
pg_discovery_auth_group = pg_conf->find_auth_group(ag_name);
if (pg_discovery_auth_group == nullptr) {
log_warnx("unknown discovery-auth-group \"%s\" "
- "for portal-group \"%s\"", ag_name, name());
+ "for %s \"%s\"", ag_name, keyword(), name());
return (false);
}
return (true);
@@ -644,8 +695,8 @@ bool
portal_group::set_dscp(u_int dscp)
{
if (dscp >= 0x40) {
- log_warnx("invalid DSCP value %u for portal-group \"%s\"",
- dscp, name());
+ log_warnx("invalid DSCP value %u for %s \"%s\"",
+ dscp, keyword(), name());
return (false);
}
@@ -653,39 +704,6 @@ portal_group::set_dscp(u_int dscp)
return (true);
}
-bool
-portal_group::set_filter(const char *str)
-{
- enum discovery_filter filter;
-
- if (strcmp(str, "none") == 0) {
- filter = discovery_filter::NONE;
- } else if (strcmp(str, "portal") == 0) {
- filter = discovery_filter::PORTAL;
- } else if (strcmp(str, "portal-name") == 0) {
- filter = discovery_filter::PORTAL_NAME;
- } else if (strcmp(str, "portal-name-auth") == 0) {
- filter = discovery_filter::PORTAL_NAME_AUTH;
- } else {
- log_warnx("invalid discovery-filter \"%s\" for portal-group "
- "\"%s\"; valid values are \"none\", \"portal\", "
- "\"portal-name\", and \"portal-name-auth\"",
- str, name());
- return (false);
- }
-
- if (pg_discovery_filter != discovery_filter::UNKNOWN &&
- pg_discovery_filter != filter) {
- log_warnx("cannot set discovery-filter to \"%s\" for "
- "portal-group \"%s\"; already has a different "
- "value", str, name());
- return (false);
- }
-
- pg_discovery_filter = filter;
- return (true);
-}
-
void
portal_group::set_foreign()
{
@@ -697,8 +715,8 @@ portal_group::set_offload(const char *offload)
{
if (!pg_offload.empty()) {
log_warnx("cannot set offload to \"%s\" for "
- "portal-group \"%s\"; already defined",
- offload, name());
+ "%s \"%s\"; already defined",
+ offload, keyword(), name());
return (false);
}
@@ -710,8 +728,8 @@ bool
portal_group::set_pcp(u_int pcp)
{
if (pcp > 7) {
- log_warnx("invalid PCP value %u for portal-group \"%s\"",
- pcp, name());
+ log_warnx("invalid PCP value %u for %s \"%s\"",
+ pcp, keyword(), name());
return (false);
}
@@ -724,8 +742,8 @@ portal_group::set_redirection(const char *addr)
{
if (!pg_redirection.empty()) {
log_warnx("cannot set redirection to \"%s\" for "
- "portal-group \"%s\"; already defined",
- addr, name());
+ "%s \"%s\"; already defined",
+ addr, keyword(), name());
return (false);
}
@@ -752,16 +770,17 @@ portal_group::verify(struct conf *conf)
if (!pg_redirection.empty()) {
if (!pg_ports.empty()) {
- log_debugx("portal-group \"%s\" assigned to target, "
- "but configured for redirection", name());
+ log_debugx("%s \"%s\" assigned to target, "
+ "but configured for redirection", keyword(),
+ name());
}
pg_assigned = true;
} else if (!pg_ports.empty()) {
pg_assigned = true;
} else {
if (pg_name != "default")
- log_warnx("portal-group \"%s\" not assigned "
- "to any target", name());
+ log_warnx("%s \"%s\" not assigned "
+ "to any target", keyword(), name());
pg_assigned = false;
}
}
@@ -789,8 +808,8 @@ portal_group::open_sockets(struct conf &oldconf)
return (0);
if (!pg_assigned) {
- log_debugx("not listening on portal-group \"%s\", "
- "not assigned to any target", name());
+ log_debugx("not listening on %s \"%s\", "
+ "not assigned to any target", keyword(), name());
return (0);
}
@@ -818,8 +837,8 @@ portal_group::close_sockets()
for (portal_up &portal : pg_portals) {
if (portal->socket() < 0)
continue;
- log_debugx("closing socket for %s, portal-group \"%s\"",
- portal->listen(), name());
+ log_debugx("closing socket for %s, %s \"%s\"",
+ portal->listen(), keyword(), name());
portal->close();
}
}
@@ -1111,8 +1130,8 @@ conf::add_port(struct target *target, struct portal_group *pg, auth_group_sp ag)
{
std::string name = freebsd::stringf("%s-%s", pg->name(),
target->name());
- const auto &pair = conf_ports.try_emplace(name,
- std::make_unique<portal_group_port>(target, pg, ag));
+ const auto &pair = conf_ports.try_emplace(name, pg->create_port(target,
+ ag));
if (!pair.second) {
log_warnx("duplicate port \"%s\"", name.c_str());
return (false);
@@ -1127,8 +1146,8 @@ conf::add_port(struct target *target, struct portal_group *pg,
{
std::string name = freebsd::stringf("%s-%s", pg->name(),
target->name());
- const auto &pair = conf_ports.try_emplace(name,
- std::make_unique<portal_group_port>(target, pg, ctl_port));
+ const auto &pair = conf_ports.try_emplace(name, pg->create_port(target,
+ ctl_port));
if (!pair.second) {
log_warnx("duplicate port \"%s\"", name.c_str());
return (false);
@@ -1185,6 +1204,46 @@ portal_group::find_port(std::string_view target) const
}
struct target *
+conf::add_controller(const char *name)
+{
+ if (!nvmf_nqn_valid_strict(name)) {
+ log_warnx("controller name \"%s\" is invalid for NVMe", name);
+ return nullptr;
+ }
+
+ /*
+ * Normalize the name to lowercase to match iSCSI.
+ */
+ std::string t_name(name);
+ for (char &c : t_name)
+ c = tolower(c);
+
+ auto const &pair = conf_controllers.try_emplace(t_name,
+ nvmf_make_controller(this, t_name));
+ if (!pair.second) {
+ log_warnx("duplicated controller \"%s\"", name);
+ return nullptr;
+ }
+
+ return pair.first->second.get();
+}
+
+struct target *
+conf::find_controller(std::string_view name)
+{
+ auto it = conf_controllers.find(std::string(name));
+ if (it == conf_controllers.end())
+ return nullptr;
+ return it->second.get();
+}
+
+target::target(struct conf *conf, const char *keyword, std::string_view name) :
+ t_conf(conf), t_name(name)
+{
+ t_label = freebsd::stringf("%s \"%s\"", keyword, t_name.c_str());
+}
+
+struct target *
conf::add_target(const char *name)
{
if (!valid_iscsi_name(name, log_warnx))
@@ -1198,7 +1257,7 @@ conf::add_target(const char *name)
c = tolower(c);
auto const &pair = conf_targets.try_emplace(t_name,
- std::make_unique<target>(this, t_name));
+ iscsi_make_target(this, t_name));
if (!pair.second) {
log_warnx("duplicated target \"%s\"", name);
return (NULL);
@@ -1225,13 +1284,12 @@ target::use_private_auth(const char *keyword)
return (true);
if (t_auth_group != nullptr) {
- log_warnx("cannot use both auth-group and %s for target \"%s\"",
- keyword, name());
+ log_warnx("cannot use both auth-group and %s for %s",
+ keyword, label());
return (false);
}
- std::string label = freebsd::stringf("target \"%s\"", name());
- t_auth_group = std::make_shared<struct auth_group>(label);
+ t_auth_group = std::make_shared<struct auth_group>(t_label);
t_private_auth = true;
return (true);
}
@@ -1254,40 +1312,24 @@ target::add_chap_mutual(const char *user, const char *secret,
}
bool
-target::add_initiator_name(std::string_view name)
-{
- if (!use_private_auth("initiator-name"))
- return (false);
- return (t_auth_group->add_initiator_name(name));
-}
-
-bool
-target::add_initiator_portal(const char *addr)
-{
- if (!use_private_auth("initiator-portal"))
- return (false);
- return (t_auth_group->add_initiator_portal(addr));
-}
-
-bool
-target::add_lun(u_int id, const char *lun_name)
+target::add_lun(u_int id, const char *lun_label, const char *lun_name)
{
struct lun *t_lun;
if (id >= MAX_LUNS) {
- log_warnx("LUN %u too big for target \"%s\"", id, name());
+ log_warnx("%s too big for %s", lun_label, label());
return (false);
}
if (t_luns[id] != NULL) {
- log_warnx("duplicate LUN %u for target \"%s\"", id, name());
+ log_warnx("duplicate %s for %s", lun_label, label());
return (false);
}
t_lun = t_conf->find_lun(lun_name);
if (t_lun == NULL) {
- log_warnx("unknown LUN named %s used for target \"%s\"",
- lun_name, name());
+ log_warnx("unknown LUN named %s used for %s", lun_name,
+ label());
return (false);
}
@@ -1296,41 +1338,10 @@ target::add_lun(u_int id, const char *lun_name)
}
bool
-target::add_portal_group(const char *pg_name, const char *ag_name)
-{
- struct portal_group *pg;
- auth_group_sp ag;
-
- pg = t_conf->find_portal_group(pg_name);
- if (pg == NULL) {
- log_warnx("unknown portal-group \"%s\" for target \"%s\"",
- pg_name, name());
- return (false);
- }
-
- if (ag_name != NULL) {
- ag = t_conf->find_auth_group(ag_name);
- if (ag == NULL) {
- log_warnx("unknown auth-group \"%s\" for target \"%s\"",
- ag_name, name());
- return (false);
- }
- }
-
- if (!t_conf->add_port(this, pg, std::move(ag))) {
- log_warnx("can't link portal-group \"%s\" to target \"%s\"",
- pg_name, name());
- return (false);
- }
- return (true);
-}
-
-bool
target::set_alias(std::string_view alias)
{
if (has_alias()) {
- log_warnx("alias for target \"%s\" specified more than once",
- name());
+ log_warnx("alias for %s specified more than once", label());
return (false);
}
t_alias = alias;
@@ -1343,16 +1354,16 @@ target::set_auth_group(const char *ag_name)
if (t_auth_group != nullptr) {
if (t_private_auth)
log_warnx("cannot use both auth-group and explicit "
- "authorisations for target \"%s\"", name());
+ "authorisations for %s", label());
else
- log_warnx("auth-group for target \"%s\" "
- "specified more than once", name());
+ log_warnx("auth-group for %s "
+ "specified more than once", label());
return (false);
}
t_auth_group = t_conf->find_auth_group(ag_name);
if (t_auth_group == nullptr) {
- log_warnx("unknown auth-group \"%s\" for target \"%s\"",
- ag_name, name());
+ log_warnx("unknown auth-group \"%s\" for %s",
+ ag_name, label());
return (false);
}
return (true);
@@ -1383,8 +1394,8 @@ target::set_redirection(const char *addr)
{
if (!t_redirection.empty()) {
log_warnx("cannot set redirection to \"%s\" for "
- "target \"%s\"; already defined",
- addr, name());
+ "%s; already defined",
+ addr, label());
return (false);
}
@@ -1393,28 +1404,23 @@ target::set_redirection(const char *addr)
}
struct lun *
-target::start_lun(u_int id)
+target::start_lun(u_int id, const char *lun_label, const char *lun_name)
{
- struct lun *new_lun;
-
if (id >= MAX_LUNS) {
- log_warnx("LUN %u too big for target \"%s\"", id,
- name());
+ log_warnx("%s too big for %s", lun_label, label());
return (nullptr);
}
if (t_luns[id] != NULL) {
- log_warnx("duplicate LUN %u for target \"%s\"", id,
- name());
+ log_warnx("duplicate %s for %s", lun_label, label());
return (nullptr);
}
- std::string lun_name = freebsd::stringf("%s,lun,%u", name(), id);
- new_lun = t_conf->add_lun(lun_name.c_str());
+ struct lun *new_lun = t_conf->add_lun(lun_name);
if (new_lun == nullptr)
return (nullptr);
- new_lun->set_scsiname(lun_name.c_str());
+ new_lun->set_scsiname(lun_name);
t_luns[id] = new_lun;
@@ -1449,7 +1455,7 @@ target::verify()
assert(t_auth_group != nullptr);
}
if (t_ports.empty()) {
- struct portal_group *pg = t_conf->find_portal_group("default");
+ struct portal_group *pg = default_portal_group();
assert(pg != NULL);
t_conf->add_port(this, pg, nullptr);
}
@@ -1457,10 +1463,10 @@ target::verify()
bool found = std::any_of(t_luns.begin(), t_luns.end(),
[](struct lun *lun) { return (lun != nullptr); });
if (!found && t_redirection.empty())
- log_warnx("no LUNs defined for target \"%s\"", name());
+ log_warnx("no LUNs defined for %s", label());
if (found && !t_redirection.empty())
- log_debugx("target \"%s\" contains luns, but configured "
- "for redirection", name());
+ log_debugx("%s contains LUNs, but configured "
+ "for redirection", label());
}
lun::lun(struct conf *conf, std::string_view name)
@@ -1485,6 +1491,8 @@ conf::delete_target_luns(struct lun *lun)
{
for (const auto &kv : conf_targets)
kv.second->remove_lun(lun);
+ for (const auto &kv : conf_controllers)
+ kv.second->remove_lun(lun);
}
struct lun *
@@ -1714,59 +1722,6 @@ option_new(nvlist_t *nvl, const char *name, const char *value)
return (true);
}
-#ifdef ICL_KERNEL_PROXY
-
-static void
-pdu_receive_proxy(struct pdu *pdu)
-{
- struct connection *conn;
- size_t len;
-
- assert(proxy_mode);
- conn = pdu->pdu_connection;
-
- kernel_receive(pdu);
-
- len = pdu_ahs_length(pdu);
- if (len > 0)
- log_errx(1, "protocol error: non-empty AHS");
-
- len = pdu_data_segment_length(pdu);
- assert(len <= (size_t)conn->conn_max_recv_data_segment_length);
- pdu->pdu_data_len = len;
-}
-
-static void
-pdu_send_proxy(struct pdu *pdu)
-{
-
- assert(proxy_mode);
-
- pdu_set_data_segment_length(pdu, pdu->pdu_data_len);
- kernel_send(pdu);
-}
-
-#endif /* ICL_KERNEL_PROXY */
-
-static void
-pdu_fail(const struct connection *conn __unused, const char *reason __unused)
-{
-}
-
-ctld_connection::ctld_connection(struct portal *portal, int fd,
- const char *host, const struct sockaddr *client_sa) :
- conn_portal(portal), conn_initiator_addr(host),
- conn_initiator_sa(client_sa)
-{
- connection_init(&conn, &conn_ops, proxy_mode);
- conn.conn_socket = fd;
-}
-
-ctld_connection::~ctld_connection()
-{
- chap_delete(conn_chap);
-}
-
bool
lun::verify()
{
@@ -1838,9 +1793,15 @@ conf::verify()
for (auto &kv : conf_targets) {
kv.second->verify();
}
+ for (auto &kv : conf_controllers) {
+ kv.second->verify();
+ }
for (auto &kv : conf_portal_groups) {
kv.second->verify(this);
}
+ for (auto &kv : conf_transport_groups) {
+ kv.second->verify(this);
+ }
for (const auto &kv : conf_auth_groups) {
const std::string &ag_name = kv.first;
if (ag_name == "default" ||
@@ -1882,23 +1843,23 @@ portal::init_socket()
struct portal_group *pg = portal_group();
struct kevent kev;
freebsd::fd_up s;
- int error, sockbuf;
+ int error;
int one = 1;
#ifdef ICL_KERNEL_PROXY
if (proxy_mode) {
int id = pg->conf()->add_proxy_portal(this);
- log_debugx("listening on %s, portal-group \"%s\", "
- "portal id %d, using ICL proxy", listen(), pg->pg_name,
- id);
- kernel_listen(ai(), p_iser, id);
+ log_debugx("listening on %s, %s \"%s\", "
+ "portal id %d, using ICL proxy", listen(), pg->keyword(),
+ pg->name(), id);
+ kernel_listen(ai(), protocol() == ISER, id);
return (true);
}
#endif
assert(proxy_mode == false);
- assert(p_iser == false);
+ assert(protocol() != portal_protocol::ISER);
- log_debugx("listening on %s, portal-group \"%s\"", listen(),
+ log_debugx("listening on %s, %s \"%s\"", listen(), pg->keyword(),
pg->name());
s = ::socket(p_ai->ai_family, p_ai->ai_socktype, p_ai->ai_protocol);
if (!s) {
@@ -1906,14 +1867,6 @@ portal::init_socket()
return (false);
}
- sockbuf = SOCKBUF_SIZE;
- if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, &sockbuf,
- sizeof(sockbuf)) == -1)
- log_warn("setsockopt(SO_RCVBUF) failed for %s", listen());
- sockbuf = SOCKBUF_SIZE;
- if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sockbuf,
- sizeof(sockbuf)) == -1)
- log_warn("setsockopt(SO_SNDBUF) failed for %s", listen());
if (setsockopt(s, SOL_SOCKET, SO_NO_DDP, &one,
sizeof(one)) == -1)
log_warn("setsockopt(SO_NO_DDP) failed for %s", listen());
@@ -1960,6 +1913,9 @@ portal::init_socket()
}
}
+ if (!init_socket_options(s))
+ return (false);
+
error = bind(s, p_ai->ai_addr, p_ai->ai_addrlen);
if (error != 0) {
log_warn("bind(2) failed for %s", listen());
@@ -1989,6 +1945,12 @@ conf::reuse_portal_group_socket(struct portal &newp)
if (pg.reuse_socket(newp))
return (true);
}
+ for (auto &kv : conf_transport_groups) {
+ struct portal_group &pg = *kv.second;
+
+ if (pg.reuse_socket(newp))
+ return (true);
+ }
return (false);
}
@@ -2038,7 +2000,18 @@ conf::apply(struct conf *oldconf)
if (it != oldconf->conf_portal_groups.end())
newpg.set_tag(it->second->tag());
else
- newpg.set_tag(++last_portal_group_tag);
+ newpg.allocate_tag();
+ }
+ for (auto &kv : conf_transport_groups) {
+ struct portal_group &newpg = *kv.second;
+
+ if (newpg.tag() != 0)
+ continue;
+ auto it = oldconf->conf_transport_groups.find(kv.first);
+ if (it != oldconf->conf_transport_groups.end())
+ newpg.set_tag(it->second->tag());
+ else
+ newpg.allocate_tag();
}
/* Deregister on removed iSNS servers. */
@@ -2203,6 +2176,9 @@ conf::apply(struct conf *oldconf)
for (auto &kv : conf_portal_groups) {
cumulated_error += kv.second->open_sockets(*oldconf);
}
+ for (auto &kv : conf_transport_groups) {
+ cumulated_error += kv.second->open_sockets(*oldconf);
+ }
/*
* Go through the no longer used sockets, closing them.
@@ -2210,6 +2186,9 @@ conf::apply(struct conf *oldconf)
for (auto &kv : oldconf->conf_portal_groups) {
kv.second->close_sockets();
}
+ for (auto &kv : oldconf->conf_transport_groups) {
+ kv.second->close_sockets();
+ }
/* (Re-)Register on remaining/new iSNS servers. */
for (auto &kv : conf_isns) {
@@ -2225,7 +2204,7 @@ conf::apply(struct conf *oldconf)
return (cumulated_error);
}
-static bool
+bool
timed_out(void)
{
@@ -2342,7 +2321,7 @@ wait_for_children(bool block)
}
static void
-handle_connection(struct portal *portal, int fd,
+handle_connection(struct portal *portal, freebsd::fd_up fd,
const struct sockaddr *client_sa, bool dont_fork)
{
struct portal_group *pg;
@@ -2373,10 +2352,8 @@ handle_connection(struct portal *portal, int fd,
pid = fork();
if (pid < 0)
log_err(1, "fork");
- if (pid > 0) {
- close(fd);
+ if (pid > 0)
return;
- }
conf->close_pidfile();
}
@@ -2390,17 +2367,7 @@ handle_connection(struct portal *portal, int fd,
log_set_peer_addr(host);
setproctitle("%s", host);
- ctld_connection conn(portal, fd, host, client_sa);
- start_timer(conf->timeout(), true);
- kernel_capsicate();
- conn.login();
- if (conn.session_type() == CONN_SESSION_TYPE_NORMAL) {
- conn.kernel_handoff();
- log_debugx("connection handed off to the kernel");
- } else {
- assert(conn.session_type() == CONN_SESSION_TYPE_DISCOVERY);
- conn.discovery();
- }
+ portal->handle_connection(std::move(fd), host, client_sa);
log_debugx("nothing more to do; exiting");
exit(0);
}
@@ -2585,6 +2552,9 @@ conf_new_from_file(const char *path, bool ucl)
pg = conf->add_portal_group("default");
assert(pg != NULL);
+ pg = conf->add_transport_group("default");
+ assert(pg != NULL);
+
conf_start(conf.get());
if (ucl)
valid = uclparse_conf(path);
@@ -2612,8 +2582,15 @@ conf_new_from_file(const char *path, bool ucl)
"going with defaults");
pg = conf->find_portal_group("default");
assert(pg != NULL);
- pg->add_portal("0.0.0.0", false);
- pg->add_portal("[::]", false);
+ pg->add_default_portals();
+ }
+
+ if (!conf->default_portal_group_defined()) {
+ log_debugx("transport-group \"default\" not defined; "
+ "going with defaults");
+ pg = conf->find_transport_group("default");
+ assert(pg != NULL);
+ pg->add_default_portals();
}
if (!conf->verify()) {
@@ -2644,7 +2621,7 @@ conf::add_pports(struct kports &kports)
if (ret > 0) {
if (!add_port(kports, targ, i_pp, i_vp)) {
log_warnx("can't create new ioctl port "
- "for target \"%s\"", targ->name());
+ "for %s", targ->label());
return (false);
}
@@ -2653,19 +2630,19 @@ conf::add_pports(struct kports &kports)
pp = kports.find_port(targ->pport());
if (pp == NULL) {
- log_warnx("unknown port \"%s\" for target \"%s\"",
- targ->pport(), targ->name());
+ log_warnx("unknown port \"%s\" for %s",
+ targ->pport(), targ->label());
return (false);
}
if (pp->linked()) {
- log_warnx("can't link port \"%s\" to target \"%s\", "
+ log_warnx("can't link port \"%s\" to %s, "
"port already linked to some target",
- targ->pport(), targ->name());
+ targ->pport(), targ->label());
return (false);
}
if (!add_port(targ, pp)) {
- log_warnx("can't link port \"%s\" to target \"%s\"",
- targ->pport(), targ->name());
+ log_warnx("can't link port \"%s\" to %s",
+ targ->pport(), targ->label());
return (false);
}
}
diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh
index 059f719668f9..a5aab65e339b 100644
--- a/usr.sbin/ctld/ctld.hh
+++ b/usr.sbin/ctld/ctld.hh
@@ -56,7 +56,6 @@
#define DEFAULT_CD_BLOCKSIZE 2048
#define MAX_LUNS 1024
-#define SOCKBUF_SIZE 1048576
struct isns_req;
struct port;
@@ -111,6 +110,12 @@ struct auth_group {
const char *user2, const char *secret2);
const struct auth *find_auth(std::string_view user) const;
+ bool add_host_nqn(std::string_view nqn);
+ bool host_permitted(std::string_view nqn) const;
+
+ bool add_host_address(const char *address);
+ bool host_permitted(const struct sockaddr *sa) const;
+
bool add_initiator_name(std::string_view initiator_name);
bool initiator_permitted(std::string_view initiator_name) const;
@@ -124,24 +129,38 @@ private:
std::string ag_label;
auth_type ag_type = auth_type::UNKNOWN;
std::unordered_map<std::string, auth> ag_auths;
- std::unordered_set<std::string> ag_names;
- std::list<auth_portal> ag_portals;
+ std::unordered_set<std::string> ag_host_names;
+ std::list<auth_portal> ag_host_addresses;
+ std::unordered_set<std::string> ag_initiator_names;
+ std::list<auth_portal> ag_initiator_portals;
};
using auth_group_sp = std::shared_ptr<auth_group>;
+enum class portal_protocol {
+ ISCSI,
+ ISER,
+ NVME_TCP,
+ NVME_DISCOVERY_TCP,
+};
+
struct portal {
- portal(struct portal_group *pg, std::string_view listen, bool iser,
- freebsd::addrinfo_up ai) :
+ portal(struct portal_group *pg, std::string_view listen,
+ portal_protocol protocol, freebsd::addrinfo_up ai) :
p_portal_group(pg), p_listen(listen), p_ai(std::move(ai)),
- p_iser(iser) {}
+ p_protocol(protocol) {}
+ virtual ~portal() = default;
bool reuse_socket(portal &oldp);
bool init_socket();
+ virtual bool init_socket_options(int s __unused) { return true; }
+ virtual void handle_connection(freebsd::fd_up fd, const char *host,
+ const struct sockaddr *client_sa) = 0;
- portal_group *portal_group() { return p_portal_group; }
+ portal_group *portal_group() const { return p_portal_group; }
const char *listen() const { return p_listen.c_str(); }
const addrinfo *ai() const { return p_ai.get(); }
+ portal_protocol protocol() const { return p_protocol; }
int socket() const { return p_socket; }
void close() { p_socket.reset(); }
@@ -149,12 +168,13 @@ private:
struct portal_group *p_portal_group;
std::string p_listen;
freebsd::addrinfo_up p_ai;
- bool p_iser;
+ portal_protocol p_protocol;
freebsd::fd_up p_socket;
};
using portal_up = std::unique_ptr<portal>;
+using port_up = std::unique_ptr<port>;
enum class discovery_filter {
UNKNOWN,
@@ -166,8 +186,10 @@ enum class discovery_filter {
struct portal_group {
portal_group(struct conf *conf, std::string_view name);
+ virtual ~portal_group() = default;
struct conf *conf() const { return pg_conf; }
+ virtual const char *keyword() const = 0;
const char *name() const { return pg_name.c_str(); }
bool assigned() const { return pg_assigned; }
bool is_dummy() const;
@@ -188,17 +210,25 @@ struct portal_group {
const std::unordered_map<std::string, port *> &ports() const
{ return pg_ports; }
- bool add_portal(const char *value, bool iser);
+ virtual void allocate_tag() = 0;
+ virtual bool add_portal(const char *value,
+ portal_protocol protocol) = 0;
+ virtual void add_default_portals() = 0;
bool add_option(const char *name, const char *value);
bool set_discovery_auth_group(const char *name);
bool set_dscp(u_int dscp);
- bool set_filter(const char *str);
+ virtual bool set_filter(const char *str) = 0;
void set_foreign();
bool set_offload(const char *offload);
bool set_pcp(u_int pcp);
bool set_redirection(const char *addr);
void set_tag(uint16_t tag);
+ virtual port_up create_port(struct target *target, auth_group_sp ag) =
+ 0;
+ virtual port_up create_port(struct target *target, uint32_t ctl_port) =
+ 0;
+
void add_port(struct portal_group_port *port);
const struct port *find_port(std::string_view target) const;
void remove_port(struct portal_group_port *port);
@@ -208,9 +238,10 @@ struct portal_group {
int open_sockets(struct conf &oldconf);
void close_sockets();
-private:
+protected:
struct conf *pg_conf;
freebsd::nvlist_up pg_options;
+ const char *pg_keyword;
std::string pg_name;
auth_group_sp pg_discovery_auth_group;
enum discovery_filter pg_discovery_filter =
@@ -254,7 +285,7 @@ protected:
uint32_t p_ctl_port = 0;
};
-struct portal_group_port final : public port {
+struct portal_group_port : public port {
portal_group_port(struct target *target, struct portal_group *pg,
auth_group_sp ag);
portal_group_port(struct target *target, struct portal_group *pg,
@@ -270,10 +301,7 @@ struct portal_group_port final : public port {
void clear_references() override;
- bool kernel_create_port() override;
- bool kernel_remove_port() override;
-
-private:
+protected:
auth_group_sp p_auth_group;
struct portal_group *p_portal_group;
};
@@ -348,14 +376,15 @@ private:
};
struct target {
- target(struct conf *conf, std::string_view name) :
- t_conf(conf), t_name(name) {}
+ target(struct conf *conf, const char *keyword, std::string_view name);
+ virtual ~target() = default;
bool has_alias() const { return !t_alias.empty(); }
bool has_pport() const { return !t_pport.empty(); }
bool has_redirection() const { return !t_redirection.empty(); }
const char *alias() const { return t_alias.c_str(); }
const char *name() const { return t_name.c_str(); }
+ const char *label() const { return t_label.c_str(); }
const char *pport() const { return t_pport.c_str(); }
bool private_auth() const { return t_private_auth; }
const char *redirection() const { return t_redirection.c_str(); }
@@ -367,30 +396,40 @@ struct target {
bool add_chap(const char *user, const char *secret);
bool add_chap_mutual(const char *user, const char *secret,
const char *user2, const char *secret2);
- bool add_initiator_name(std::string_view name);
- bool add_initiator_portal(const char *addr);
- bool add_lun(u_int id, const char *lun_name);
- bool add_portal_group(const char *pg_name, const char *ag_name);
+ virtual bool add_host_address(const char *) { return false; }
+ virtual bool add_host_nqn(std::string_view) { return false; }
+ virtual bool add_initiator_name(std::string_view) { return false; }
+ virtual bool add_initiator_portal(const char *) { return false; }
+ virtual bool add_lun(u_int, const char *) { return false; }
+ virtual bool add_namespace(u_int, const char *) { return false; }
+ virtual bool add_portal_group(const char *pg_name,
+ const char *ag_name) = 0;
bool set_alias(std::string_view alias);
bool set_auth_group(const char *ag_name);
bool set_auth_type(const char *type);
bool set_physical_port(std::string_view pport);
bool set_redirection(const char *addr);
- struct lun *start_lun(u_int id);
+ virtual struct lun *start_lun(u_int) { return nullptr; }
+ virtual struct lun *start_namespace(u_int) { return nullptr; }
void add_port(struct port *port);
void remove_lun(struct lun *lun);
void remove_port(struct port *port);
void verify();
-private:
+protected:
bool use_private_auth(const char *keyword);
+ bool add_lun(u_int id, const char *lun_label, const char *lun_name);
+ struct lun *start_lun(u_int id, const char *lun_label,
+ const char *lun_name);
+ virtual struct portal_group *default_portal_group() = 0;
struct conf *t_conf;
std::array<struct lun *, MAX_LUNS> t_luns;
auth_group_sp t_auth_group;
std::list<port *> t_ports;
std::string t_name;
+ std::string t_label;
std::string t_alias;
std::string t_redirection;
/* Name of this target's physical port, if any, i.e. "isp0" */
@@ -398,6 +437,8 @@ private:
bool t_private_auth;
};
+using target_up = std::unique_ptr<target>;
+
struct isns {
isns(std::string_view addr, freebsd::addrinfo_up ai) :
i_addr(addr), i_ai(std::move(ai)) {}
@@ -413,13 +454,18 @@ private:
};
struct conf {
+ conf();
+
int maxproc() const { return conf_maxproc; }
int timeout() const { return conf_timeout; }
+ uint32_t genctr() const { return conf_genctr; }
bool default_auth_group_defined() const
{ return conf_default_ag_defined; }
bool default_portal_group_defined() const
{ return conf_default_pg_defined; }
+ bool default_transport_group_defined() const
+ { return conf_default_tg_defined; }
struct auth_group *add_auth_group(const char *ag_name);
struct auth_group *define_default_auth_group();
@@ -429,6 +475,10 @@ struct conf {
struct portal_group *define_default_portal_group();
struct portal_group *find_portal_group(std::string_view name);
+ struct portal_group *add_transport_group(const char *name);
+ struct portal_group *define_default_transport_group();
+ struct portal_group *find_transport_group(std::string_view name);
+
bool add_port(struct target *target, struct portal_group *pg,
auth_group_sp ag);
bool add_port(struct target *target, struct portal_group *pg,
@@ -438,6 +488,9 @@ struct conf {
int vp);
bool add_pports(struct kports &kports);
+ struct target *add_controller(const char *name);
+ struct target *find_controller(std::string_view name);
+
struct target *add_target(const char *name);
struct target *find_target(std::string_view name);
@@ -474,10 +527,12 @@ private:
std::string conf_pidfile_path;
std::unordered_map<std::string, std::unique_ptr<lun>> conf_luns;
- std::unordered_map<std::string, std::unique_ptr<target>> conf_targets;
+ std::unordered_map<std::string, target_up> conf_targets;
+ std::unordered_map<std::string, target_up> conf_controllers;
std::unordered_map<std::string, auth_group_sp> conf_auth_groups;
std::unordered_map<std::string, std::unique_ptr<port>> conf_ports;
std::unordered_map<std::string, portal_group_up> conf_portal_groups;
+ std::unordered_map<std::string, portal_group_up> conf_transport_groups;
std::unordered_map<std::string, isns> conf_isns;
struct target *conf_first_target = nullptr;
int conf_isns_period = 900;
@@ -485,12 +540,16 @@ private:
int conf_debug = 0;
int conf_timeout = 60;
int conf_maxproc = 30;
+ uint32_t conf_genctr = 0;
freebsd::pidfile conf_pidfile;
bool conf_default_pg_defined = false;
+ bool conf_default_tg_defined = false;
bool conf_default_ag_defined = false;
+ static uint32_t global_genctr;
+
#ifdef ICL_KERNEL_PROXY
public:
int add_proxy_portal(portal *);
@@ -528,50 +587,7 @@ private:
std::unordered_map<std::string, struct pport> pports;
};
-#define CONN_SESSION_TYPE_NONE 0
-#define CONN_SESSION_TYPE_DISCOVERY 1
-#define CONN_SESSION_TYPE_NORMAL 2
-
-struct ctld_connection {
- ctld_connection(struct portal *portal, int fd, const char *host,
- const struct sockaddr *client_sa);
- ~ctld_connection();
-
- int session_type() const { return conn_session_type; }
-
- void login();
- void discovery();
- void kernel_handoff();
-private:
- void login_chap(struct auth_group *ag);
- void login_negotiate_key(struct pdu *request, const char *name,
- const char *value, bool skipped_security,
- struct keys *response_keys);
- bool login_portal_redirect(struct pdu *request);
- bool login_target_redirect(struct pdu *request);
- void login_negotiate(struct pdu *request);
- void login_wait_transition();
-
- bool discovery_target_filtered_out(const struct port *port) const;
-
- struct connection conn;
- struct portal *conn_portal = nullptr;
- const struct port *conn_port = nullptr;
- struct target *conn_target = nullptr;
- int conn_session_type = CONN_SESSION_TYPE_NONE;
- std::string conn_initiator_name;
- std::string conn_initiator_addr;
- std::string conn_initiator_alias;
- uint8_t conn_initiator_isid[6];
- const struct sockaddr *conn_initiator_sa = nullptr;
- int conn_max_recv_data_segment_limit = 0;
- int conn_max_send_data_segment_limit = 0;
- int conn_max_burst_limit = 0;
- int conn_first_burst_limit = 0;
- std::string conn_user;
- struct chap *conn_chap = nullptr;
-};
-
+extern bool proxy_mode;
extern int ctl_fd;
bool parse_conf(const char *path);
@@ -584,6 +600,9 @@ void conf_start(struct conf *new_conf);
bool option_new(nvlist_t *nvl,
const char *name, const char *value);
+freebsd::addrinfo_up parse_addr_port(const char *address,
+ const char *def_port);
+
void kernel_init(void);
void kernel_capsicate(void);
@@ -597,7 +616,22 @@ void kernel_send(struct pdu *pdu);
void kernel_receive(struct pdu *pdu);
#endif
+bool ctl_create_port(const char *driver,
+ const nvlist_t *nvl, uint32_t *ctl_port);
+bool ctl_remove_port(const char *driver, nvlist_t *nvl);
+
+portal_group_up iscsi_make_portal_group(struct conf *conf,
+ std::string_view name);
+target_up iscsi_make_target(struct conf *conf,
+ std::string_view name);
+
+portal_group_up nvmf_make_transport_group(struct conf *conf,
+ std::string_view name);
+target_up nvmf_make_controller(struct conf *conf,
+ std::string_view name);
+
void start_timer(int timeout, bool fatal = false);
void stop_timer();
+bool timed_out();
#endif /* !__CTLD_HH__ */
diff --git a/usr.sbin/ctld/discovery.cc b/usr.sbin/ctld/discovery.cc
index 3c9f1cfa1dac..8f6d371b696d 100644
--- a/usr.sbin/ctld/discovery.cc
+++ b/usr.sbin/ctld/discovery.cc
@@ -39,6 +39,7 @@
#include <sys/socket.h>
#include "ctld.hh"
+#include "iscsi.hh"
#include "iscsi_proto.h"
static struct pdu *
@@ -112,6 +113,9 @@ discovery_add_target(struct keys *response_keys, const struct target *targ)
if (pg == nullptr)
continue;
for (const portal_up &portal : pg->portals()) {
+ if (portal->protocol() != portal_protocol::ISCSI &&
+ portal->protocol() != portal_protocol::ISER)
+ continue;
ai = portal->ai();
ret = getnameinfo(ai->ai_addr, ai->ai_addrlen,
hbuf, sizeof(hbuf), sbuf, sizeof(sbuf),
@@ -145,7 +149,7 @@ discovery_add_target(struct keys *response_keys, const struct target *targ)
}
bool
-ctld_connection::discovery_target_filtered_out(const struct port *port) const
+iscsi_connection::discovery_target_filtered_out(const struct port *port) const
{
const struct auth_group *ag;
const struct portal_group *pg;
@@ -208,7 +212,7 @@ ctld_connection::discovery_target_filtered_out(const struct port *port) const
}
void
-ctld_connection::discovery()
+iscsi_connection::discovery()
{
struct pdu *request, *response;
struct keys *request_keys, *response_keys;
diff --git a/usr.sbin/ctld/iscsi.cc b/usr.sbin/ctld/iscsi.cc
new file mode 100644
index 000000000000..bee036b95bf2
--- /dev/null
+++ b/usr.sbin/ctld/iscsi.cc
@@ -0,0 +1,508 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2003, 2004 Silicon Graphics International Corp.
+ * Copyright (c) 1997-2007 Kenneth D. Merry
+ * Copyright (c) 2012 The FreeBSD Foundation
+ * Copyright (c) 2017 Jakub Wojciech Klama <jceel@FreeBSD.org>
+ * All rights reserved.
+ * Copyright (c) 2025 Chelsio Communications, Inc.
+ *
+ * Portions of this software were developed by Edward Tomasz Napierala
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+#include <sys/param.h>
+#include <sys/linker.h>
+#include <sys/module.h>
+#include <sys/time.h>
+#include <assert.h>
+#include <libiscsiutil.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_ioctl.h>
+
+#include "ctld.hh"
+#include "iscsi.hh"
+
+#define SOCKBUF_SIZE 1048576
+
+struct iscsi_portal final : public portal {
+ iscsi_portal(struct portal_group *pg, const char *listen,
+ portal_protocol protocol, freebsd::addrinfo_up ai) :
+ portal(pg, listen, protocol, std::move(ai)) {}
+
+ bool init_socket_options(int s) override;
+ void handle_connection(freebsd::fd_up fd, const char *host,
+ const struct sockaddr *client_sa) override;
+};
+
+struct iscsi_portal_group final : public portal_group {
+ iscsi_portal_group(struct conf *conf, std::string_view name) :
+ portal_group(conf, name) {}
+
+ const char *keyword() const override
+ { return "portal-group"; }
+
+ void allocate_tag() override;
+ bool add_portal(const char *value, portal_protocol protocol)
+ override;
+ void add_default_portals() override;
+ bool set_filter(const char *str) override;
+
+ virtual port_up create_port(struct target *target, auth_group_sp ag)
+ override;
+ virtual port_up create_port(struct target *target, uint32_t ctl_port)
+ override;
+private:
+ static uint16_t last_portal_group_tag;
+};
+
+struct iscsi_port final : public portal_group_port {
+ iscsi_port(struct target *target, struct portal_group *pg,
+ auth_group_sp ag) :
+ portal_group_port(target, pg, ag) {}
+ iscsi_port(struct target *target, struct portal_group *pg,
+ uint32_t ctl_port) :
+ portal_group_port(target, pg, ctl_port) {}
+
+ bool kernel_create_port() override;
+ bool kernel_remove_port() override;
+
+private:
+ static bool module_loaded;
+ static void load_kernel_module();
+};
+
+struct iscsi_target final : public target {
+ iscsi_target(struct conf *conf, std::string_view name) :
+ target(conf, "target", name) {}
+
+ bool add_initiator_name(std::string_view name) override;
+ bool add_initiator_portal(const char *addr) override;
+ bool add_lun(u_int id, const char *lun_name) override;
+ bool add_portal_group(const char *pg_name, const char *ag_name)
+ override;
+ struct lun *start_lun(u_int id) override;
+
+protected:
+ struct portal_group *default_portal_group() override;
+};
+
+#ifdef ICL_KERNEL_PROXY
+static void pdu_receive_proxy(struct pdu *pdu);
+static void pdu_send_proxy(struct pdu *pdu);
+#endif /* ICL_KERNEL_PROXY */
+static void pdu_fail(const struct connection *conn, const char *reason);
+
+uint16_t iscsi_portal_group::last_portal_group_tag = 0xff;
+bool iscsi_port::module_loaded = false;
+
+static struct connection_ops conn_ops = {
+ .timed_out = timed_out,
+#ifdef ICL_KERNEL_PROXY
+ .pdu_receive_proxy = pdu_receive_proxy,
+ .pdu_send_proxy = pdu_send_proxy,
+#else
+ .pdu_receive_proxy = nullptr,
+ .pdu_send_proxy = nullptr,
+#endif
+ .fail = pdu_fail,
+};
+
+portal_group_up
+iscsi_make_portal_group(struct conf *conf, std::string_view name)
+{
+ return std::make_unique<iscsi_portal_group>(conf, name);
+}
+
+target_up
+iscsi_make_target(struct conf *conf, std::string_view name)
+{
+ return std::make_unique<iscsi_target>(conf, name);
+}
+
+void
+iscsi_portal_group::allocate_tag()
+{
+ set_tag(++last_portal_group_tag);
+}
+
+bool
+iscsi_portal_group::add_portal(const char *value, portal_protocol protocol)
+{
+ switch (protocol) {
+ case portal_protocol::ISCSI:
+ case portal_protocol::ISER:
+ break;
+ default:
+ log_warnx("unsupported portal protocol for %s", value);
+ return (false);
+ }
+
+ freebsd::addrinfo_up ai = parse_addr_port(value, "3260");
+ if (!ai) {
+ log_warnx("invalid listen address %s", value);
+ return (false);
+ }
+
+ /*
+ * XXX: getaddrinfo(3) may return multiple addresses; we should turn
+ * those into multiple portals.
+ */
+
+ pg_portals.emplace_back(std::make_unique<iscsi_portal>(this, value,
+ protocol, std::move(ai)));
+ return (true);
+}
+
+void
+iscsi_portal_group::add_default_portals()
+{
+ add_portal("0.0.0.0", portal_protocol::ISCSI);
+ add_portal("[::]", portal_protocol::ISCSI);
+}
+
+bool
+iscsi_portal_group::set_filter(const char *str)
+{
+ enum discovery_filter filter;
+
+ if (strcmp(str, "none") == 0) {
+ filter = discovery_filter::NONE;
+ } else if (strcmp(str, "portal") == 0) {
+ filter = discovery_filter::PORTAL;
+ } else if (strcmp(str, "portal-name") == 0) {
+ filter = discovery_filter::PORTAL_NAME;
+ } else if (strcmp(str, "portal-name-auth") == 0) {
+ filter = discovery_filter::PORTAL_NAME_AUTH;
+ } else {
+ log_warnx("invalid discovery-filter \"%s\" for portal-group "
+ "\"%s\"; valid values are \"none\", \"portal\", "
+ "\"portal-name\", and \"portal-name-auth\"",
+ str, name());
+ return (false);
+ }
+
+ if (pg_discovery_filter != discovery_filter::UNKNOWN &&
+ pg_discovery_filter != filter) {
+ log_warnx("cannot set discovery-filter to \"%s\" for "
+ "portal-group \"%s\"; already has a different "
+ "value", str, name());
+ return (false);
+ }
+
+ pg_discovery_filter = filter;
+ return (true);
+}
+
+port_up
+iscsi_portal_group::create_port(struct target *target, auth_group_sp ag)
+{
+ return std::make_unique<iscsi_port>(target, this, ag);
+}
+
+port_up
+iscsi_portal_group::create_port(struct target *target, uint32_t ctl_port)
+{
+ return std::make_unique<iscsi_port>(target, this, ctl_port);
+}
+
+void
+iscsi_port::load_kernel_module()
+{
+ int saved_errno;
+
+ if (module_loaded)
+ return;
+
+ saved_errno = errno;
+ if (modfind("cfiscsi") == -1 && kldload("cfiscsi") == -1)
+ log_warn("couldn't load cfiscsi");
+ errno = saved_errno;
+ module_loaded = true;
+}
+
+bool
+iscsi_port::kernel_create_port()
+{
+ struct portal_group *pg = p_portal_group;
+ struct target *targ = p_target;
+
+ load_kernel_module();
+
+ freebsd::nvlist_up nvl = pg->options();
+ nvlist_add_string(nvl.get(), "cfiscsi_target", targ->name());
+ nvlist_add_string(nvl.get(), "ctld_portal_group_name", pg->name());
+ nvlist_add_stringf(nvl.get(), "cfiscsi_portal_group_tag", "%u",
+ pg->tag());
+
+ if (targ->has_alias()) {
+ nvlist_add_string(nvl.get(), "cfiscsi_target_alias",
+ targ->alias());
+ }
+
+ return (ctl_create_port("iscsi", nvl.get(), &p_ctl_port));
+}
+
+bool
+iscsi_port::kernel_remove_port()
+{
+ freebsd::nvlist_up nvl(nvlist_create(0));
+ nvlist_add_string(nvl.get(), "cfiscsi_target", p_target->name());
+ nvlist_add_stringf(nvl.get(), "cfiscsi_portal_group_tag", "%u",
+ p_portal_group->tag());
+
+ return (ctl_remove_port("iscsi", nvl.get()));
+}
+
+bool
+iscsi_portal::init_socket_options(int s)
+{
+ int sockbuf;
+
+ sockbuf = SOCKBUF_SIZE;
+ if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, &sockbuf,
+ sizeof(sockbuf)) == -1) {
+ log_warn("setsockopt(SO_RCVBUF) failed for %s", listen());
+ return (false);
+ }
+ sockbuf = SOCKBUF_SIZE;
+ if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sockbuf,
+ sizeof(sockbuf)) == -1) {
+ log_warn("setsockopt(SO_SNDBUF) failed for %s", listen());
+ return (false);
+ }
+ return (true);
+}
+
+bool
+iscsi_target::add_initiator_name(std::string_view name)
+{
+ if (!use_private_auth("initiator-name"))
+ return (false);
+ return (t_auth_group->add_initiator_name(name));
+}
+
+bool
+iscsi_target::add_initiator_portal(const char *addr)
+{
+ if (!use_private_auth("initiator-portal"))
+ return (false);
+ return (t_auth_group->add_initiator_portal(addr));
+}
+
+bool
+iscsi_target::add_lun(u_int id, const char *lun_name)
+{
+ std::string lun_label = "LUN " + std::to_string(id);
+ return target::add_lun(id, lun_label.c_str(), lun_name);
+}
+
+bool
+iscsi_target::add_portal_group(const char *pg_name, const char *ag_name)
+{
+ struct portal_group *pg;
+ auth_group_sp ag;
+
+ pg = t_conf->find_portal_group(pg_name);
+ if (pg == NULL) {
+ log_warnx("unknown portal-group \"%s\" for %s", pg_name,
+ label());
+ return (false);
+ }
+
+ if (ag_name != NULL) {
+ ag = t_conf->find_auth_group(ag_name);
+ if (ag == NULL) {
+ log_warnx("unknown auth-group \"%s\" for %s", ag_name,
+ label());
+ return (false);
+ }
+ }
+
+ if (!t_conf->add_port(this, pg, std::move(ag))) {
+ log_warnx("can't link portal-group \"%s\" to %s", pg_name,
+ label());
+ return (false);
+ }
+ return (true);
+}
+
+struct lun *
+iscsi_target::start_lun(u_int id)
+{
+ std::string lun_label = "LUN " + std::to_string(id);
+ std::string lun_name = freebsd::stringf("%s,lun,%u", name(), id);
+ return target::start_lun(id, lun_label.c_str(), lun_name.c_str());
+}
+
+struct portal_group *
+iscsi_target::default_portal_group()
+{
+ return t_conf->find_portal_group("default");
+}
+
+#ifdef ICL_KERNEL_PROXY
+
+static void
+pdu_receive_proxy(struct pdu *pdu)
+{
+ struct connection *conn;
+ size_t len;
+
+ assert(proxy_mode);
+ conn = pdu->pdu_connection;
+
+ kernel_receive(pdu);
+
+ len = pdu_ahs_length(pdu);
+ if (len > 0)
+ log_errx(1, "protocol error: non-empty AHS");
+
+ len = pdu_data_segment_length(pdu);
+ assert(len <= (size_t)conn->conn_max_recv_data_segment_length);
+ pdu->pdu_data_len = len;
+}
+
+static void
+pdu_send_proxy(struct pdu *pdu)
+{
+
+ assert(proxy_mode);
+
+ pdu_set_data_segment_length(pdu, pdu->pdu_data_len);
+ kernel_send(pdu);
+}
+
+#endif /* ICL_KERNEL_PROXY */
+
+static void
+pdu_fail(const struct connection *conn __unused, const char *reason __unused)
+{
+}
+
+iscsi_connection::iscsi_connection(struct portal *portal, freebsd::fd_up fd,
+ const char *host, const struct sockaddr *client_sa) :
+ conn_portal(portal), conn_fd(std::move(fd)), conn_initiator_addr(host),
+ conn_initiator_sa(client_sa)
+{
+ connection_init(&conn, &conn_ops, proxy_mode);
+ conn.conn_socket = conn_fd;
+}
+
+iscsi_connection::~iscsi_connection()
+{
+ chap_delete(conn_chap);
+}
+
+void
+iscsi_connection::kernel_handoff()
+{
+ struct portal_group *pg = conn_portal->portal_group();
+ struct ctl_iscsi req;
+
+ bzero(&req, sizeof(req));
+
+ req.type = CTL_ISCSI_HANDOFF;
+ strlcpy(req.data.handoff.initiator_name, conn_initiator_name.c_str(),
+ sizeof(req.data.handoff.initiator_name));
+ strlcpy(req.data.handoff.initiator_addr, conn_initiator_addr.c_str(),
+ sizeof(req.data.handoff.initiator_addr));
+ if (!conn_initiator_alias.empty()) {
+ strlcpy(req.data.handoff.initiator_alias,
+ conn_initiator_alias.c_str(),
+ sizeof(req.data.handoff.initiator_alias));
+ }
+ memcpy(req.data.handoff.initiator_isid, conn_initiator_isid,
+ sizeof(req.data.handoff.initiator_isid));
+ strlcpy(req.data.handoff.target_name, conn_target->name(),
+ sizeof(req.data.handoff.target_name));
+ strlcpy(req.data.handoff.offload, pg->offload(),
+ sizeof(req.data.handoff.offload));
+#ifdef ICL_KERNEL_PROXY
+ if (proxy_mode)
+ req.data.handoff.connection_id = conn.conn_socket;
+ else
+ req.data.handoff.socket = conn.conn_socket;
+#else
+ req.data.handoff.socket = conn.conn_socket;
+#endif
+ req.data.handoff.portal_group_tag = pg->tag();
+ if (conn.conn_header_digest == CONN_DIGEST_CRC32C)
+ req.data.handoff.header_digest = CTL_ISCSI_DIGEST_CRC32C;
+ if (conn.conn_data_digest == CONN_DIGEST_CRC32C)
+ req.data.handoff.data_digest = CTL_ISCSI_DIGEST_CRC32C;
+ req.data.handoff.cmdsn = conn.conn_cmdsn;
+ req.data.handoff.statsn = conn.conn_statsn;
+ req.data.handoff.max_recv_data_segment_length =
+ conn.conn_max_recv_data_segment_length;
+ req.data.handoff.max_send_data_segment_length =
+ conn.conn_max_send_data_segment_length;
+ req.data.handoff.max_burst_length = conn.conn_max_burst_length;
+ req.data.handoff.first_burst_length = conn.conn_first_burst_length;
+ req.data.handoff.immediate_data = conn.conn_immediate_data;
+
+ if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
+ log_err(1, "error issuing CTL_ISCSI ioctl; "
+ "dropping connection");
+ }
+
+ if (req.status != CTL_ISCSI_OK) {
+ log_errx(1, "error returned from CTL iSCSI handoff request: "
+ "%s; dropping connection", req.error_str);
+ }
+}
+
+void
+iscsi_connection::handle()
+{
+ login();
+ if (conn_session_type == CONN_SESSION_TYPE_NORMAL) {
+ kernel_handoff();
+ log_debugx("connection handed off to the kernel");
+ } else {
+ assert(conn_session_type == CONN_SESSION_TYPE_DISCOVERY);
+ discovery();
+ }
+}
+
+void
+iscsi_portal::handle_connection(freebsd::fd_up fd, const char *host,
+ const struct sockaddr *client_sa)
+{
+ struct conf *conf = portal_group()->conf();
+
+ iscsi_connection conn(this, std::move(fd), host, client_sa);
+ start_timer(conf->timeout(), true);
+ kernel_capsicate();
+ conn.handle();
+}
diff --git a/usr.sbin/ctld/iscsi.hh b/usr.sbin/ctld/iscsi.hh
new file mode 100644
index 000000000000..d510e8c6731b
--- /dev/null
+++ b/usr.sbin/ctld/iscsi.hh
@@ -0,0 +1,79 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2012 The FreeBSD Foundation
+ *
+ * This software was developed by Edward Tomasz Napierala under sponsorship
+ * from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef __ISCSI_HH__
+#define __ISCSI_HH__
+
+#define CONN_SESSION_TYPE_NONE 0
+#define CONN_SESSION_TYPE_DISCOVERY 1
+#define CONN_SESSION_TYPE_NORMAL 2
+
+struct iscsi_connection {
+ iscsi_connection(struct portal *portal, freebsd::fd_up fd,
+ const char *host, const struct sockaddr *client_sa);
+ ~iscsi_connection();
+
+ void handle();
+private:
+ void login();
+ void login_chap(struct auth_group *ag);
+ void login_negotiate_key(struct pdu *request, const char *name,
+ const char *value, bool skipped_security,
+ struct keys *response_keys);
+ bool login_portal_redirect(struct pdu *request);
+ bool login_target_redirect(struct pdu *request);
+ void login_negotiate(struct pdu *request);
+ void login_wait_transition();
+
+ void discovery();
+ bool discovery_target_filtered_out(const struct port *port) const;
+
+ void kernel_handoff();
+
+ struct connection conn;
+ struct portal *conn_portal = nullptr;
+ const struct port *conn_port = nullptr;
+ struct target *conn_target = nullptr;
+ freebsd::fd_up conn_fd;
+ int conn_session_type = CONN_SESSION_TYPE_NONE;
+ std::string conn_initiator_name;
+ std::string conn_initiator_addr;
+ std::string conn_initiator_alias;
+ uint8_t conn_initiator_isid[6];
+ const struct sockaddr *conn_initiator_sa = nullptr;
+ int conn_max_recv_data_segment_limit = 0;
+ int conn_max_send_data_segment_limit = 0;
+ int conn_max_burst_limit = 0;
+ int conn_first_burst_limit = 0;
+ std::string conn_user;
+ struct chap *conn_chap = nullptr;
+};
+
+#endif /* !__ISCSI_HH__ */
diff --git a/usr.sbin/ctld/kernel.cc b/usr.sbin/ctld/kernel.cc
index 39bbb4290e84..b214cd4e8c29 100644
--- a/usr.sbin/ctld/kernel.cc
+++ b/usr.sbin/ctld/kernel.cc
@@ -75,8 +75,6 @@
#define NVLIST_BUFSIZE 1024
-extern bool proxy_mode;
-
int ctl_fd = 0;
void
@@ -128,10 +126,13 @@ struct cctl_port {
std::string port_name;
int pp;
int vp;
+ uint16_t portid;
int cfiscsi_state;
std::string cfiscsi_target;
+ std::string nqn;
uint16_t cfiscsi_portal_group_tag;
std::string ctld_portal_group_name;
+ std::string ctld_transport_group_name;
attr_list attr_list;
};
@@ -324,6 +325,14 @@ cctl_end_pelement(void *user_data, const char *name)
cur_port->cfiscsi_portal_group_tag = strtoul(str.c_str(), NULL, 0);
} else if (strcmp(name, "ctld_portal_group_name") == 0) {
cur_port->ctld_portal_group_name = std::move(str);
+ } else if (strcmp(name, "ctld_transport_group_name") == 0) {
+ cur_port->ctld_transport_group_name = std::move(str);
+ } else if (strcmp(name, "nqn") == 0) {
+ cur_port->nqn = std::move(str);
+ } else if (strcmp(name, "portid") == 0) {
+ if (str.empty())
+ log_errx(1, "%s: %s missing its argument", __func__, name);
+ cur_port->portid = strtoul(str.c_str(), NULL, 0);
} else if (strcmp(name, "targ_port") == 0) {
devlist->cur_port = NULL;
} else if (strcmp(name, "ctlportlist") == 0) {
@@ -432,6 +441,93 @@ retry_port:
return (true);
}
+void
+add_iscsi_port(struct kports &kports, struct conf *conf,
+ const struct cctl_port &port, std::string &name)
+{
+ if (port.cfiscsi_target.empty()) {
+ log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ",
+ port.port_id, name.c_str());
+ if (!kports.has_port(name)) {
+ if (!kports.add_port(name, port.port_id)) {
+ log_warnx("kports::add_port failed");
+ return;
+ }
+ }
+ return;
+ }
+ if (port.cfiscsi_state != 1) {
+ log_debugx("CTL port %ju is not active (%d); ignoring",
+ (uintmax_t)port.port_id, port.cfiscsi_state);
+ return;
+ }
+
+ const char *t_name = port.cfiscsi_target.c_str();
+ struct target *targ = conf->find_target(t_name);
+ if (targ == nullptr) {
+ targ = conf->add_target(t_name);
+ if (targ == nullptr) {
+ log_warnx("Failed to add target \"%s\"", t_name);
+ return;
+ }
+ }
+
+ if (port.ctld_portal_group_name.empty())
+ return;
+
+ const char *pg_name = port.ctld_portal_group_name.c_str();
+ struct portal_group *pg = conf->find_portal_group(pg_name);
+ if (pg == nullptr) {
+ pg = conf->add_portal_group(pg_name);
+ if (pg == nullptr) {
+ log_warnx("Failed to add portal-group \"%s\"", pg_name);
+ return;
+ }
+ }
+ pg->set_tag(port.cfiscsi_portal_group_tag);
+ if (!conf->add_port(targ, pg, port.port_id)) {
+ log_warnx("Failed to add port for target \"%s\" and portal-group \"%s\"",
+ t_name, pg_name);
+ }
+}
+
+void
+add_nvmf_port(struct conf *conf, const struct cctl_port &port,
+ std::string &name)
+{
+ if (port.nqn.empty() || port.ctld_transport_group_name.empty()) {
+ log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ",
+ port.port_id, name.c_str());
+ return;
+ }
+
+ const char *nqn = port.nqn.c_str();
+ struct target *targ = conf->find_controller(nqn);
+ if (targ == nullptr) {
+ targ = conf->add_controller(nqn);
+ if (targ == nullptr) {
+ log_warnx("Failed to add controller \"%s\"", nqn);
+ return;
+ }
+ }
+
+ const char *tg_name = port.ctld_transport_group_name.c_str();
+ struct portal_group *pg = conf->find_transport_group(tg_name);
+ if (pg == nullptr) {
+ pg = conf->add_transport_group(tg_name);
+ if (pg == nullptr) {
+ log_warnx("Failed to add transport-group \"%s\"",
+ tg_name);
+ return;
+ }
+ }
+ pg->set_tag(port.portid);
+ if (!conf->add_port(targ, pg, port.port_id)) {
+ log_warnx("Failed to add port for controller \"%s\" and transport-group \"%s\"",
+ nqn, tg_name);
+ }
+}
+
conf_up
conf_new_from_kernel(struct kports &kports)
{
@@ -455,51 +551,13 @@ conf_new_from_kernel(struct kports &kports)
name += "/" + std::to_string(port.vp);
}
- if (port.cfiscsi_target.empty()) {
- log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ",
- port.port_id, name.c_str());
- if (!kports.has_port(name)) {
- if (!kports.add_port(name, port.port_id)) {
- log_warnx("kports::add_port failed");
- continue;
- }
- }
- continue;
- }
- if (port.cfiscsi_state != 1) {
- log_debugx("CTL port %ju is not active (%d); ignoring",
- (uintmax_t)port.port_id, port.cfiscsi_state);
- continue;
- }
-
- const char *t_name = port.cfiscsi_target.c_str();
- struct target *targ = conf->find_target(t_name);
- if (targ == NULL) {
- targ = conf->add_target(t_name);
- if (targ == NULL) {
- log_warnx("Failed to add target \"%s\"",
- t_name);
- continue;
- }
- }
-
- if (port.ctld_portal_group_name.empty())
- continue;
- const char *pg_name = port.ctld_portal_group_name.c_str();
- struct portal_group *pg = conf->find_portal_group(pg_name);
- if (pg == NULL) {
- pg = conf->add_portal_group(pg_name);
- if (pg == NULL) {
- log_warnx("Failed to add portal_group \"%s\"",
- pg_name);
- continue;
- }
- }
- pg->set_tag(port.cfiscsi_portal_group_tag);
- if (!conf->add_port(targ, pg, port.port_id)) {
- log_warnx("Failed to add port for target \"%s\" and portal-group \"%s\"",
- t_name, pg_name);
- continue;
+ if (port.port_frontend == "iscsi") {
+ add_iscsi_port(kports, conf.get(), port, name);
+ } else if (port.port_frontend == "nvmf") {
+ add_nvmf_port(conf.get(), port, name);
+ } else {
+ /* XXX: Treat all unknown ports as iSCSI? */
+ add_iscsi_port(kports, conf.get(), port, name);
}
}
@@ -705,65 +763,7 @@ lun::kernel_remove() const
return (true);
}
-void
-ctld_connection::kernel_handoff()
-{
- struct portal_group *pg = conn_portal->portal_group();
- struct ctl_iscsi req;
-
- bzero(&req, sizeof(req));
-
- req.type = CTL_ISCSI_HANDOFF;
- strlcpy(req.data.handoff.initiator_name, conn_initiator_name.c_str(),
- sizeof(req.data.handoff.initiator_name));
- strlcpy(req.data.handoff.initiator_addr, conn_initiator_addr.c_str(),
- sizeof(req.data.handoff.initiator_addr));
- if (!conn_initiator_alias.empty()) {
- strlcpy(req.data.handoff.initiator_alias,
- conn_initiator_alias.c_str(),
- sizeof(req.data.handoff.initiator_alias));
- }
- memcpy(req.data.handoff.initiator_isid, conn_initiator_isid,
- sizeof(req.data.handoff.initiator_isid));
- strlcpy(req.data.handoff.target_name, conn_target->name(),
- sizeof(req.data.handoff.target_name));
- strlcpy(req.data.handoff.offload, pg->offload(),
- sizeof(req.data.handoff.offload));
-#ifdef ICL_KERNEL_PROXY
- if (proxy_mode)
- req.data.handoff.connection_id = conn.conn_socket;
- else
- req.data.handoff.socket = conn.conn_socket;
-#else
- req.data.handoff.socket = conn.conn_socket;
-#endif
- req.data.handoff.portal_group_tag = pg->tag();
- if (conn.conn_header_digest == CONN_DIGEST_CRC32C)
- req.data.handoff.header_digest = CTL_ISCSI_DIGEST_CRC32C;
- if (conn.conn_data_digest == CONN_DIGEST_CRC32C)
- req.data.handoff.data_digest = CTL_ISCSI_DIGEST_CRC32C;
- req.data.handoff.cmdsn = conn.conn_cmdsn;
- req.data.handoff.statsn = conn.conn_statsn;
- req.data.handoff.max_recv_data_segment_length =
- conn.conn_max_recv_data_segment_length;
- req.data.handoff.max_send_data_segment_length =
- conn.conn_max_send_data_segment_length;
- req.data.handoff.max_burst_length = conn.conn_max_burst_length;
- req.data.handoff.first_burst_length = conn.conn_first_burst_length;
- req.data.handoff.immediate_data = conn.conn_immediate_data;
-
- if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
- log_err(1, "error issuing CTL_ISCSI ioctl; "
- "dropping connection");
- }
-
- if (req.status != CTL_ISCSI_OK) {
- log_errx(1, "error returned from CTL iSCSI handoff request: "
- "%s; dropping connection", req.error_str);
- }
-}
-
-static bool
+bool
ctl_create_port(const char *driver, const nvlist_t *nvl, uint32_t *ctl_port)
{
struct ctl_req req;
@@ -812,26 +812,6 @@ ctl_create_port(const char *driver, const nvlist_t *nvl, uint32_t *ctl_port)
}
bool
-portal_group_port::kernel_create_port()
-{
- struct portal_group *pg = p_portal_group;
- struct target *targ = p_target;
-
- freebsd::nvlist_up nvl = pg->options();
- nvlist_add_string(nvl.get(), "cfiscsi_target", targ->name());
- nvlist_add_string(nvl.get(), "ctld_portal_group_name", pg->name());
- nvlist_add_stringf(nvl.get(), "cfiscsi_portal_group_tag", "%u",
- pg->tag());
-
- if (targ->has_alias()) {
- nvlist_add_string(nvl.get(), "cfiscsi_target_alias",
- targ->alias());
- }
-
- return (ctl_create_port("iscsi", nvl.get(), &p_ctl_port));
-}
-
-bool
ioctl_port::kernel_create_port()
{
freebsd::nvlist_up nvl(nvlist_create(0));
@@ -971,17 +951,6 @@ ctl_remove_port(const char *driver, nvlist_t *nvl)
}
bool
-portal_group_port::kernel_remove_port()
-{
- freebsd::nvlist_up nvl(nvlist_create(0));
- nvlist_add_string(nvl.get(), "cfiscsi_target", p_target->name());
- nvlist_add_stringf(nvl.get(), "cfiscsi_portal_group_tag", "%u",
- p_portal_group->tag());
-
- return (ctl_remove_port("iscsi", nvl.get()));
-}
-
-bool
ioctl_port::kernel_remove_port()
{
freebsd::nvlist_up nvl(nvlist_create(0));
@@ -1141,7 +1110,7 @@ void
kernel_capsicate(void)
{
cap_rights_t rights;
- const unsigned long cmds[] = { CTL_ISCSI };
+ const unsigned long cmds[] = { CTL_ISCSI, CTL_NVMF };
cap_rights_init(&rights, CAP_IOCTL);
if (caph_rights_limit(ctl_fd, &rights) < 0)
diff --git a/usr.sbin/ctld/login.cc b/usr.sbin/ctld/login.cc
index aa62cd4c8b5b..cda11cc1f21b 100644
--- a/usr.sbin/ctld/login.cc
+++ b/usr.sbin/ctld/login.cc
@@ -42,6 +42,7 @@
#include <cam/ctl/ctl_ioctl.h>
#include "ctld.hh"
+#include "iscsi.hh"
#include "iscsi_proto.h"
#define MAX_DATA_SEGMENT_LENGTH (128 * 1024)
@@ -455,7 +456,7 @@ login_send_chap_success(struct pdu *request,
}
void
-ctld_connection::login_chap(struct auth_group *ag)
+iscsi_connection::login_chap(struct auth_group *ag)
{
std::string user;
const struct auth *auth;
@@ -503,7 +504,7 @@ ctld_connection::login_chap(struct auth_group *ag)
}
void
-ctld_connection::login_negotiate_key(struct pdu *request, const char *name,
+iscsi_connection::login_negotiate_key(struct pdu *request, const char *name,
const char *value, bool skipped_security, struct keys *response_keys)
{
int which;
@@ -694,7 +695,7 @@ login_redirect(struct pdu *request, const char *target_address)
}
bool
-ctld_connection::login_portal_redirect(struct pdu *request)
+iscsi_connection::login_portal_redirect(struct pdu *request)
{
const struct portal_group *pg;
@@ -710,7 +711,7 @@ ctld_connection::login_portal_redirect(struct pdu *request)
}
bool
-ctld_connection::login_target_redirect(struct pdu *request)
+iscsi_connection::login_target_redirect(struct pdu *request)
{
const char *target_address;
@@ -731,7 +732,7 @@ ctld_connection::login_target_redirect(struct pdu *request)
}
void
-ctld_connection::login_negotiate(struct pdu *request)
+iscsi_connection::login_negotiate(struct pdu *request)
{
struct portal_group *pg = conn_portal->portal_group();
struct pdu *response;
@@ -751,7 +752,7 @@ ctld_connection::login_negotiate(struct pdu *request)
conn_max_burst_limit = (1 << 24) - 1;
conn_first_burst_limit = (1 << 24) - 1;
kernel_limits(pg->offload(),
- conn.conn_socket,
+ conn_fd,
&conn_max_recv_data_segment_limit,
&conn_max_send_data_segment_limit,
&conn_max_burst_limit,
@@ -860,7 +861,7 @@ ctld_connection::login_negotiate(struct pdu *request)
}
void
-ctld_connection::login_wait_transition()
+iscsi_connection::login_wait_transition()
{
struct pdu *request, *response;
struct iscsi_bhs_login_request *bhslr;
@@ -884,7 +885,7 @@ ctld_connection::login_wait_transition()
}
void
-ctld_connection::login()
+iscsi_connection::login()
{
struct pdu *request, *response;
struct iscsi_bhs_login_request *bhslr;
diff --git a/usr.sbin/ctld/nvmf.cc b/usr.sbin/ctld/nvmf.cc
new file mode 100644
index 000000000000..d1240bfa4f6c
--- /dev/null
+++ b/usr.sbin/ctld/nvmf.cc
@@ -0,0 +1,478 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <sys/param.h>
+#include <sys/linker.h>
+#include <sys/module.h>
+#include <sys/time.h>
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <libiscsiutil.h>
+#include <libnvmf.h>
+#include <libutil.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <cam/ctl/ctl.h>
+#include <cam/ctl/ctl_io.h>
+#include <cam/ctl/ctl_ioctl.h>
+
+#include <memory>
+
+#include "ctld.hh"
+#include "nvmf.hh"
+
+#define DEFAULT_MAXH2CDATA (256 * 1024)
+
+struct nvmf_io_portal final : public nvmf_portal {
+ nvmf_io_portal(struct portal_group *pg, const char *listen,
+ portal_protocol protocol, freebsd::addrinfo_up ai,
+ const struct nvmf_association_params &aparams,
+ nvmf_association_up na) :
+ nvmf_portal(pg, listen, protocol, std::move(ai), aparams,
+ std::move(na)) {}
+
+ void handle_connection(freebsd::fd_up fd, const char *host,
+ const struct sockaddr *client_sa) override;
+};
+
+struct nvmf_transport_group final : public portal_group {
+ nvmf_transport_group(struct conf *conf, std::string_view name) :
+ portal_group(conf, name) {}
+
+ const char *keyword() const override
+ { return "transport-group"; }
+
+ void allocate_tag() override;
+ bool add_portal(const char *value, portal_protocol protocol)
+ override;
+ void add_default_portals() override;
+ bool set_filter(const char *str) override;
+
+ virtual port_up create_port(struct target *target, auth_group_sp ag)
+ override;
+ virtual port_up create_port(struct target *target, uint32_t ctl_port)
+ override;
+
+private:
+ struct nvmf_association_params init_aparams(portal_protocol protocol);
+
+ static uint16_t last_port_id;
+};
+
+struct nvmf_port final : public portal_group_port {
+ nvmf_port(struct target *target, struct portal_group *pg,
+ auth_group_sp ag) :
+ portal_group_port(target, pg, ag) {}
+ nvmf_port(struct target *target, struct portal_group *pg,
+ uint32_t ctl_port) :
+ portal_group_port(target, pg, ctl_port) {}
+
+ bool kernel_create_port() override;
+ bool kernel_remove_port() override;
+
+private:
+ static bool modules_loaded;
+ static void load_kernel_modules();
+};
+
+struct nvmf_controller final : public target {
+ nvmf_controller(struct conf *conf, std::string_view name) :
+ target(conf, "controller", name) {}
+
+ bool add_host_nqn(std::string_view name) override;
+ bool add_host_address(const char *addr) override;
+ bool add_namespace(u_int id, const char *lun_name) override;
+ bool add_portal_group(const char *pg_name, const char *ag_name)
+ override;
+ struct lun *start_namespace(u_int id) override;
+
+protected:
+ struct portal_group *default_portal_group() override;
+};
+
+uint16_t nvmf_transport_group::last_port_id = 0;
+bool nvmf_port::modules_loaded = false;
+
+static bool need_tcp_transport = false;
+
+static bool
+parse_bool(const nvlist_t *nvl, const char *key, bool def)
+{
+ const char *value;
+
+ if (!nvlist_exists_string(nvl, key))
+ return def;
+
+ value = nvlist_get_string(nvl, key);
+ if (strcasecmp(value, "true") == 0 ||
+ strcasecmp(value, "1") == 0)
+ return true;
+ if (strcasecmp(value, "false") == 0 ||
+ strcasecmp(value, "0") == 0)
+ return false;
+
+ log_warnx("Invalid value \"%s\" for boolean option %s", value, key);
+ return def;
+}
+
+static uint64_t
+parse_number(const nvlist_t *nvl, const char *key, uint64_t def, uint64_t minv,
+ uint64_t maxv)
+{
+ const char *value;
+ int64_t val;
+
+ if (!nvlist_exists_string(nvl, key))
+ return def;
+
+ value = nvlist_get_string(nvl, key);
+ if (expand_number(value, &val) == 0 && val >= 0 &&
+ (uint64_t)val >= minv && (uint64_t)val <= maxv)
+ return (uint64_t)val;
+
+ log_warnx("Invalid value \"%s\" for numeric option %s", value, key);
+ return def;
+}
+
+struct nvmf_association_params
+nvmf_transport_group::init_aparams(portal_protocol protocol)
+{
+ struct nvmf_association_params params;
+ memset(&params, 0, sizeof(params));
+
+ /* Options shared between discovery and I/O associations. */
+ const nvlist_t *nvl = pg_options.get();
+ params.tcp.header_digests = parse_bool(nvl, "HDGST", false);
+ params.tcp.data_digests = parse_bool(nvl, "DDGST", false);
+ uint64_t value = parse_number(nvl, "MAXH2CDATA", DEFAULT_MAXH2CDATA,
+ 4096, UINT32_MAX);
+ if (value % 4 != 0) {
+ log_warnx("Invalid value \"%ju\" for option MAXH2CDATA",
+ (uintmax_t)value);
+ value = DEFAULT_MAXH2CDATA;
+ }
+ params.tcp.maxh2cdata = value;
+
+ switch (protocol) {
+ case portal_protocol::NVME_TCP:
+ params.sq_flow_control = parse_bool(nvl, "SQFC", false);
+ params.dynamic_controller_model = true;
+ params.max_admin_qsize = parse_number(nvl, "max_admin_qsize",
+ NVME_MAX_ADMIN_ENTRIES, NVME_MIN_ADMIN_ENTRIES,
+ NVME_MAX_ADMIN_ENTRIES);
+ params.max_io_qsize = parse_number(nvl, "max_io_qsize",
+ NVME_MAX_IO_ENTRIES, NVME_MIN_IO_ENTRIES,
+ NVME_MAX_IO_ENTRIES);
+ params.tcp.pda = 0;
+ break;
+ case portal_protocol::NVME_DISCOVERY_TCP:
+ params.sq_flow_control = false;
+ params.dynamic_controller_model = true;
+ params.max_admin_qsize = NVME_MAX_ADMIN_ENTRIES;
+ params.tcp.pda = 0;
+ break;
+ default:
+ __assert_unreachable();
+ }
+
+ return params;
+}
+
+portal_group_up
+nvmf_make_transport_group(struct conf *conf, std::string_view name)
+{
+ return std::make_unique<nvmf_transport_group>(conf, name);
+}
+
+target_up
+nvmf_make_controller(struct conf *conf, std::string_view name)
+{
+ return std::make_unique<nvmf_controller>(conf, name);
+}
+
+void
+nvmf_transport_group::allocate_tag()
+{
+ set_tag(++last_port_id);
+}
+
+bool
+nvmf_transport_group::add_portal(const char *value, portal_protocol protocol)
+{
+ freebsd::addrinfo_up ai;
+ enum nvmf_trtype trtype;
+
+ switch (protocol) {
+ case portal_protocol::NVME_TCP:
+ trtype = NVMF_TRTYPE_TCP;
+ ai = parse_addr_port(value, "4420");
+ break;
+ case portal_protocol::NVME_DISCOVERY_TCP:
+ trtype = NVMF_TRTYPE_TCP;
+ ai = parse_addr_port(value, "8009");
+ break;
+ default:
+ log_warnx("unsupported transport protocol for %s", value);
+ return false;
+ }
+
+ if (!ai) {
+ log_warnx("invalid listen address %s", value);
+ return false;
+ }
+
+ struct nvmf_association_params aparams = init_aparams(protocol);
+ nvmf_association_up association(nvmf_allocate_association(trtype, true,
+ &aparams));
+ if (!association) {
+ log_warn("Failed to create NVMe controller association");
+ return false;
+ }
+
+ /*
+ * XXX: getaddrinfo(3) may return multiple addresses; we should turn
+ * those into multiple portals.
+ */
+
+ portal_up portal;
+ if (protocol == portal_protocol::NVME_DISCOVERY_TCP) {
+ portal = std::make_unique<nvmf_discovery_portal>(this, value,
+ protocol, std::move(ai), aparams, std::move(association));
+ } else {
+ portal = std::make_unique<nvmf_io_portal>(this, value,
+ protocol, std::move(ai), aparams, std::move(association));
+ need_tcp_transport = true;
+ }
+
+ pg_portals.emplace_back(std::move(portal));
+ return true;
+}
+
+void
+nvmf_transport_group::add_default_portals()
+{
+ add_portal("0.0.0.0", portal_protocol::NVME_DISCOVERY_TCP);
+ add_portal("[::]", portal_protocol::NVME_DISCOVERY_TCP);
+ add_portal("0.0.0.0", portal_protocol::NVME_TCP);
+ add_portal("[::]", portal_protocol::NVME_TCP);
+}
+
+bool
+nvmf_transport_group::set_filter(const char *str)
+{
+ enum discovery_filter filter;
+
+ if (strcmp(str, "none") == 0) {
+ filter = discovery_filter::NONE;
+ } else if (strcmp(str, "address") == 0) {
+ filter = discovery_filter::PORTAL;
+ } else if (strcmp(str, "address-name") == 0) {
+ filter = discovery_filter::PORTAL_NAME;
+ } else {
+ log_warnx("invalid discovery-filter \"%s\" for transport-group "
+ "\"%s\"; valid values are \"none\", \"address\", "
+ "and \"address-name\"",
+ str, name());
+ return false;
+ }
+
+ if (pg_discovery_filter != discovery_filter::UNKNOWN &&
+ pg_discovery_filter != filter) {
+ log_warnx("cannot set discovery-filter to \"%s\" for "
+ "transport-group \"%s\"; already has a different "
+ "value", str, name());
+ return false;
+ }
+
+ pg_discovery_filter = filter;
+ return true;
+}
+
+port_up
+nvmf_transport_group::create_port(struct target *target, auth_group_sp ag)
+{
+ return std::make_unique<nvmf_port>(target, this, ag);
+}
+
+port_up
+nvmf_transport_group::create_port(struct target *target, uint32_t ctl_port)
+{
+ return std::make_unique<nvmf_port>(target, this, ctl_port);
+}
+
+void
+nvmf_port::load_kernel_modules()
+{
+ int saved_errno;
+
+ if (modules_loaded)
+ return;
+
+ saved_errno = errno;
+ if (modfind("nvmft") == -1 && kldload("nvmft") == -1)
+ log_warn("couldn't load nvmft");
+
+ if (need_tcp_transport) {
+ if (modfind("nvmf/tcp") == -1 && kldload("nvmf_tcp") == -1)
+ log_warn("couldn't load nvmf_tcp");
+ }
+
+ errno = saved_errno;
+ modules_loaded = true;
+}
+
+bool
+nvmf_port::kernel_create_port()
+{
+ struct portal_group *pg = p_portal_group;
+ struct target *targ = p_target;
+
+ load_kernel_modules();
+
+ freebsd::nvlist_up nvl = pg->options();
+ nvlist_add_string(nvl.get(), "subnqn", targ->name());
+ nvlist_add_string(nvl.get(), "ctld_transport_group_name",
+ pg->name());
+ nvlist_add_stringf(nvl.get(), "portid", "%u", pg->tag());
+ if (!nvlist_exists_string(nvl.get(), "max_io_qsize"))
+ nvlist_add_stringf(nvl.get(), "max_io_qsize", "%u",
+ NVME_MAX_IO_ENTRIES);
+
+ return ctl_create_port("nvmf", nvl.get(), &p_ctl_port);
+}
+
+bool
+nvmf_port::kernel_remove_port()
+{
+ freebsd::nvlist_up nvl(nvlist_create(0));
+ nvlist_add_string(nvl.get(), "subnqn", p_target->name());
+
+ return ctl_remove_port("nvmf", nvl.get());
+}
+
+bool
+nvmf_controller::add_host_nqn(std::string_view name)
+{
+ if (!use_private_auth("host-nqn"))
+ return false;
+ return t_auth_group->add_host_nqn(name);
+}
+
+bool
+nvmf_controller::add_host_address(const char *addr)
+{
+ if (!use_private_auth("host-address"))
+ return false;
+ return t_auth_group->add_host_address(addr);
+}
+
+bool
+nvmf_controller::add_namespace(u_int id, const char *lun_name)
+{
+ if (id == 0) {
+ log_warnx("namespace ID cannot be 0 for %s", label());
+ return false;
+ }
+
+ std::string lun_label = "namespace ID " + std::to_string(id - 1);
+ return target::add_lun(id, lun_label.c_str(), lun_name);
+}
+
+bool
+nvmf_controller::add_portal_group(const char *pg_name, const char *ag_name)
+{
+ struct portal_group *pg;
+ auth_group_sp ag;
+
+ pg = t_conf->find_transport_group(pg_name);
+ if (pg == NULL) {
+ log_warnx("unknown transport-group \"%s\" for %s", pg_name,
+ label());
+ return false;
+ }
+
+ if (ag_name != NULL) {
+ ag = t_conf->find_auth_group(ag_name);
+ if (ag == NULL) {
+ log_warnx("unknown auth-group \"%s\" for %s", ag_name,
+ label());
+ return false;
+ }
+ }
+
+ if (!t_conf->add_port(this, pg, std::move(ag))) {
+ log_warnx("can't link transport-group \"%s\" to %s", pg_name,
+ label());
+ return false;
+ }
+ return true;
+}
+
+struct lun *
+nvmf_controller::start_namespace(u_int id)
+{
+ if (id == 0) {
+ log_warnx("namespace ID cannot be 0 for %s", label());
+ return nullptr;
+ }
+
+ std::string lun_label = "namespace ID " + std::to_string(id - 1);
+ std::string lun_name = freebsd::stringf("%s,nsid,%u", name(), id);
+ return target::start_lun(id, lun_label.c_str(), lun_name.c_str());
+}
+
+struct portal_group *
+nvmf_controller::default_portal_group()
+{
+ return t_conf->find_transport_group("default");
+}
+
+void
+nvmf_io_portal::handle_connection(freebsd::fd_up fd, const char *host __unused,
+ const struct sockaddr *client_sa __unused)
+{
+ struct nvmf_qpair_params qparams;
+ memset(&qparams, 0, sizeof(qparams));
+ qparams.tcp.fd = fd;
+
+ struct nvmf_capsule *nc = NULL;
+ struct nvmf_fabric_connect_data data;
+ nvmf_qpair_up qp(nvmf_accept(association(), &qparams, &nc, &data));
+ if (!qp) {
+ log_warnx("Failed to create NVMe I/O qpair: %s",
+ nvmf_association_error(association()));
+ return;
+ }
+ nvmf_capsule_up nc_guard(nc);
+ const struct nvmf_fabric_connect_cmd *cmd =
+ (const struct nvmf_fabric_connect_cmd *)nvmf_capsule_sqe(nc);
+
+ struct ctl_nvmf req;
+ memset(&req, 0, sizeof(req));
+ req.type = CTL_NVMF_HANDOFF;
+ int error = nvmf_handoff_controller_qpair(qp.get(), cmd, &data,
+ &req.data.handoff);
+ if (error != 0) {
+ log_warnc(error,
+ "Failed to prepare NVMe I/O qpair for handoff");
+ return;
+ }
+
+ if (ioctl(ctl_fd, CTL_NVMF, &req) != 0)
+ log_warn("ioctl(CTL_NVMF/CTL_NVMF_HANDOFF)");
+ if (req.status == CTL_NVMF_ERROR)
+ log_warnx("Failed to handoff NVMF connection: %s",
+ req.error_str);
+ else if (req.status != CTL_NVMF_OK)
+ log_warnx("Failed to handoff NVMF connection with status %d",
+ req.status);
+}
diff --git a/usr.sbin/ctld/nvmf.hh b/usr.sbin/ctld/nvmf.hh
new file mode 100644
index 000000000000..0b4f8d45adfd
--- /dev/null
+++ b/usr.sbin/ctld/nvmf.hh
@@ -0,0 +1,71 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#ifndef __NVMF_HH__
+#define __NVMF_HH__
+
+struct nvmf_association_deleter {
+ void operator()(struct nvmf_association *na) const
+ {
+ nvmf_free_association(na);
+ }
+};
+
+using nvmf_association_up = std::unique_ptr<nvmf_association,
+ nvmf_association_deleter>;
+
+struct nvmf_capsule_deleter {
+ void operator()(struct nvmf_capsule *nc) const
+ {
+ nvmf_free_capsule(nc);
+ }
+};
+
+using nvmf_capsule_up = std::unique_ptr<nvmf_capsule, nvmf_capsule_deleter>;
+
+struct nvmf_qpair_deleter {
+ void operator()(struct nvmf_qpair *qp) const
+ {
+ nvmf_free_qpair(qp);
+ }
+};
+
+using nvmf_qpair_up = std::unique_ptr<nvmf_qpair, nvmf_qpair_deleter>;
+
+struct nvmf_portal : public portal {
+ nvmf_portal(struct portal_group *pg, const char *listen,
+ portal_protocol protocol, freebsd::addrinfo_up ai,
+ const struct nvmf_association_params &aparams,
+ nvmf_association_up na) :
+ portal(pg, listen, protocol, std::move(ai)),
+ p_aparams(aparams), p_association(std::move(na)) {}
+ virtual ~nvmf_portal() override = default;
+
+ const struct nvmf_association_params *aparams() const
+ { return &p_aparams; }
+
+protected:
+ struct nvmf_association *association() { return p_association.get(); }
+
+private:
+ struct nvmf_association_params p_aparams;
+ nvmf_association_up p_association;
+};
+
+struct nvmf_discovery_portal final : public nvmf_portal {
+ nvmf_discovery_portal(struct portal_group *pg, const char *listen,
+ portal_protocol protocol, freebsd::addrinfo_up ai,
+ const struct nvmf_association_params &aparams,
+ nvmf_association_up na) :
+ nvmf_portal(pg, listen, protocol, std::move(ai), aparams,
+ std::move(na)) {}
+
+ void handle_connection(freebsd::fd_up fd, const char *host,
+ const struct sockaddr *client_sa) override;
+};
+
+#endif /* !__NVMF_HH__ */
diff --git a/usr.sbin/ctld/nvmf_discovery.cc b/usr.sbin/ctld/nvmf_discovery.cc
new file mode 100644
index 000000000000..a32094ddafa1
--- /dev/null
+++ b/usr.sbin/ctld/nvmf_discovery.cc
@@ -0,0 +1,518 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2023-2025 Chelsio Communications, Inc.
+ * Written by: John Baldwin <jhb@FreeBSD.org>
+ */
+
+#include <assert.h>
+#include <errno.h>
+#include <netdb.h>
+#include <libiscsiutil.h>
+#include <libnvmf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <netinet/in.h>
+
+#include "ctld.hh"
+#include "nvmf.hh"
+
+struct discovery_log {
+ discovery_log(const struct portal_group *pg);
+
+ const char *data() const { return buf.data(); }
+ size_t length() const { return buf.size(); }
+
+ void append(const struct nvme_discovery_log_entry *entry);
+
+private:
+ struct nvme_discovery_log *header()
+ { return reinterpret_cast<struct nvme_discovery_log *>(buf.data()); }
+
+ std::vector<char> buf;
+};
+
+struct discovery_controller {
+ discovery_controller(freebsd::fd_up s, struct nvmf_qpair *qp,
+ const discovery_log &discovery_log);
+
+ void handle_admin_commands();
+private:
+ bool update_cc(uint32_t new_cc);
+ void handle_property_get(const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_prop_get_cmd *pget);
+ void handle_property_set(const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_prop_set_cmd *pset);
+ void handle_fabrics_command(const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_cmd *cmd);
+ void handle_identify_command(const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd);
+ void handle_get_log_page_command(const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd);
+
+ struct nvmf_qpair *qp;
+
+ uint64_t cap = 0;
+ uint32_t vs = 0;
+ uint32_t cc = 0;
+ uint32_t csts = 0;
+
+ bool shutdown = false;
+
+ struct nvme_controller_data cdata;
+
+ const discovery_log &discovery_log;
+ freebsd::fd_up s;
+};
+
+discovery_log::discovery_log(const struct portal_group *pg) :
+ buf(sizeof(nvme_discovery_log))
+{
+ struct nvme_discovery_log *log = header();
+
+ log->genctr = htole32(pg->conf()->genctr());
+ log->recfmt = 0;
+}
+
+void
+discovery_log::append(const struct nvme_discovery_log_entry *entry)
+{
+ const char *cp = reinterpret_cast<const char *>(entry);
+ buf.insert(buf.end(), cp, cp + sizeof(*entry));
+
+ struct nvme_discovery_log *log = header();
+ log->numrec = htole32(le32toh(log->numrec) + 1);
+}
+
+static bool
+discovery_controller_filtered(const struct portal_group *pg,
+ const struct sockaddr *client_sa, std::string_view hostnqn,
+ const struct port *port)
+{
+ const struct target *targ = port->target();
+ const struct auth_group *ag = port->auth_group();
+ if (ag == nullptr)
+ ag = targ->auth_group();
+
+ assert(pg->discovery_filter() != discovery_filter::UNKNOWN);
+
+ if (pg->discovery_filter() >= discovery_filter::PORTAL &&
+ !ag->host_permitted(client_sa)) {
+ log_debugx("host address does not match addresses "
+ "allowed for controller \"%s\"; skipping", targ->name());
+ return true;
+ }
+
+ if (pg->discovery_filter() >= discovery_filter::PORTAL_NAME &&
+ !ag->host_permitted(hostnqn) != 0) {
+ log_debugx("HostNQN does not match NQNs "
+ "allowed for controller \"%s\"; skipping", targ->name());
+ return true;
+ }
+
+ /* XXX: auth not yet implemented for NVMe */
+
+ return false;
+}
+
+static bool
+portal_uses_wildcard_address(const struct portal *p)
+{
+ const struct addrinfo *ai = p->ai();
+
+ switch (ai->ai_family) {
+ case AF_INET:
+ {
+ const struct sockaddr_in *sin;
+
+ sin = (const struct sockaddr_in *)ai->ai_addr;
+ return sin->sin_addr.s_addr == htonl(INADDR_ANY);
+ }
+ case AF_INET6:
+ {
+ const struct sockaddr_in6 *sin6;
+
+ sin6 = (const struct sockaddr_in6 *)ai->ai_addr;
+ return memcmp(&sin6->sin6_addr, &in6addr_any,
+ sizeof(in6addr_any)) == 0;
+ }
+ default:
+ __assert_unreachable();
+ }
+}
+
+static bool
+init_discovery_log_entry(struct nvme_discovery_log_entry *entry,
+ const struct target *target, const struct portal *portal,
+ const char *wildcard_host)
+{
+ /*
+ * The TCP port for I/O controllers might not be fixed, so
+ * fetch the sockaddr of the socket to determine which port
+ * the kernel chose.
+ */
+ struct sockaddr_storage ss;
+ socklen_t len = sizeof(ss);
+ if (getsockname(portal->socket(), (struct sockaddr *)&ss, &len) == -1) {
+ log_warn("Failed getsockname building discovery log entry");
+ return false;
+ }
+
+ const struct nvmf_association_params *aparams =
+ static_cast<const nvmf_portal *>(portal)->aparams();
+
+ memset(entry, 0, sizeof(*entry));
+ entry->trtype = NVMF_TRTYPE_TCP;
+ int error = getnameinfo((struct sockaddr *)&ss, len,
+ (char *)entry->traddr, sizeof(entry->traddr),
+ (char *)entry->trsvcid, sizeof(entry->trsvcid),
+ NI_NUMERICHOST | NI_NUMERICSERV);
+ if (error != 0) {
+ log_warnx("Failed getnameinfo building discovery log entry: %s",
+ gai_strerror(error));
+ return false;
+ }
+
+ if (portal_uses_wildcard_address(portal))
+ strncpy((char *)entry->traddr, wildcard_host,
+ sizeof(entry->traddr));
+ switch (portal->ai()->ai_family) {
+ case AF_INET:
+ entry->adrfam = NVMF_ADRFAM_IPV4;
+ break;
+ case AF_INET6:
+ entry->adrfam = NVMF_ADRFAM_IPV6;
+ break;
+ default:
+ __assert_unreachable();
+ }
+ entry->subtype = NVMF_SUBTYPE_NVME;
+ if (!aparams->sq_flow_control)
+ entry->treq |= (1 << 2);
+ entry->portid = htole16(portal->portal_group()->tag());
+ entry->cntlid = htole16(NVMF_CNTLID_DYNAMIC);
+ entry->aqsz = aparams->max_admin_qsize;
+ strncpy((char *)entry->subnqn, target->name(), sizeof(entry->subnqn));
+ return true;
+}
+
+static discovery_log
+build_discovery_log_page(const struct portal_group *pg, int fd,
+ const struct sockaddr *client_sa,
+ const struct nvmf_fabric_connect_data &data)
+{
+ discovery_log discovery_log(pg);
+
+ struct sockaddr_storage ss;
+ socklen_t len = sizeof(ss);
+ if (getsockname(fd, (struct sockaddr *)&ss, &len) == -1) {
+ log_warn("build_discovery_log_page: getsockname");
+ return discovery_log;
+ }
+
+ char wildcard_host[NI_MAXHOST];
+ int error = getnameinfo((struct sockaddr *)&ss, len, wildcard_host,
+ sizeof(wildcard_host), NULL, 0, NI_NUMERICHOST);
+ if (error != 0) {
+ log_warnx("build_discovery_log_page: getnameinfo: %s",
+ gai_strerror(error));
+ return discovery_log;
+ }
+
+ const char *nqn = (const char *)data.hostnqn;
+ std::string hostnqn(nqn, strnlen(nqn, sizeof(data.hostnqn)));
+ for (const auto &kv : pg->ports()) {
+ const struct port *port = kv.second;
+ if (discovery_controller_filtered(pg, client_sa, hostnqn, port))
+ continue;
+
+ for (const portal_up &portal : pg->portals()) {
+ if (portal->protocol() != portal_protocol::NVME_TCP)
+ continue;
+
+ if (portal_uses_wildcard_address(portal.get()) &&
+ portal->ai()->ai_family != client_sa->sa_family)
+ continue;
+
+ struct nvme_discovery_log_entry entry;
+ if (init_discovery_log_entry(&entry, port->target(),
+ portal.get(), wildcard_host))
+ discovery_log.append(&entry);
+ }
+ }
+
+ return discovery_log;
+}
+
+bool
+discovery_controller::update_cc(uint32_t new_cc)
+{
+ uint32_t changes;
+
+ if (shutdown)
+ return false;
+ if (!nvmf_validate_cc(qp, cap, cc, new_cc))
+ return false;
+
+ changes = cc ^ new_cc;
+ cc = new_cc;
+
+ /* Handle shutdown requests. */
+ if (NVMEV(NVME_CC_REG_SHN, changes) != 0 &&
+ NVMEV(NVME_CC_REG_SHN, new_cc) != 0) {
+ csts &= ~NVMEM(NVME_CSTS_REG_SHST);
+ csts |= NVMEF(NVME_CSTS_REG_SHST, NVME_SHST_COMPLETE);
+ shutdown = true;
+ }
+
+ if (NVMEV(NVME_CC_REG_EN, changes) != 0) {
+ if (NVMEV(NVME_CC_REG_EN, new_cc) == 0) {
+ /* Controller reset. */
+ csts = 0;
+ shutdown = true;
+ } else
+ csts |= NVMEF(NVME_CSTS_REG_RDY, 1);
+ }
+ return true;
+}
+
+void
+discovery_controller::handle_property_get(const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_prop_get_cmd *pget)
+{
+ struct nvmf_fabric_prop_get_rsp rsp;
+
+ nvmf_init_cqe(&rsp, nc, 0);
+
+ switch (le32toh(pget->ofst)) {
+ case NVMF_PROP_CAP:
+ if (pget->attrib.size != NVMF_PROP_SIZE_8)
+ goto error;
+ rsp.value.u64 = htole64(cap);
+ break;
+ case NVMF_PROP_VS:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = htole32(vs);
+ break;
+ case NVMF_PROP_CC:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = htole32(cc);
+ break;
+ case NVMF_PROP_CSTS:
+ if (pget->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ rsp.value.u32.low = htole32(csts);
+ break;
+ default:
+ goto error;
+ }
+
+ nvmf_send_response(nc, &rsp);
+ return;
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+void
+discovery_controller::handle_property_set(const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_prop_set_cmd *pset)
+{
+ switch (le32toh(pset->ofst)) {
+ case NVMF_PROP_CC:
+ if (pset->attrib.size != NVMF_PROP_SIZE_4)
+ goto error;
+ if (!update_cc(le32toh(pset->value.u32.low)))
+ goto error;
+ break;
+ default:
+ goto error;
+ }
+
+ nvmf_send_success(nc);
+ return;
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+void
+discovery_controller::handle_fabrics_command(const struct nvmf_capsule *nc,
+ const struct nvmf_fabric_cmd *fc)
+{
+ switch (fc->fctype) {
+ case NVMF_FABRIC_COMMAND_PROPERTY_GET:
+ handle_property_get(nc,
+ (const struct nvmf_fabric_prop_get_cmd *)fc);
+ break;
+ case NVMF_FABRIC_COMMAND_PROPERTY_SET:
+ handle_property_set(nc,
+ (const struct nvmf_fabric_prop_set_cmd *)fc);
+ break;
+ case NVMF_FABRIC_COMMAND_CONNECT:
+ log_warnx("CONNECT command on connected queue");
+ nvmf_send_generic_error(nc, NVME_SC_COMMAND_SEQUENCE_ERROR);
+ break;
+ case NVMF_FABRIC_COMMAND_DISCONNECT:
+ log_warnx("DISCONNECT command on admin queue");
+ nvmf_send_error(nc, NVME_SCT_COMMAND_SPECIFIC,
+ NVMF_FABRIC_SC_INVALID_QUEUE_TYPE);
+ break;
+ default:
+ log_warnx("Unsupported fabrics command %#x", fc->fctype);
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_OPCODE);
+ break;
+ }
+}
+
+void
+discovery_controller::handle_identify_command(const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd)
+{
+ uint8_t cns;
+
+ cns = le32toh(cmd->cdw10) & 0xFF;
+ switch (cns) {
+ case 1:
+ break;
+ default:
+ log_warnx("Unsupported CNS %#x for IDENTIFY", cns);
+ goto error;
+ }
+
+ nvmf_send_controller_data(nc, &cdata, sizeof(cdata));
+ return;
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+void
+discovery_controller::handle_get_log_page_command(const struct nvmf_capsule *nc,
+ const struct nvme_command *cmd)
+{
+ uint64_t offset;
+ uint32_t length;
+
+ switch (nvmf_get_log_page_id(cmd)) {
+ case NVME_LOG_DISCOVERY:
+ break;
+ default:
+ log_warnx("Unsupported log page %u for discovery controller",
+ nvmf_get_log_page_id(cmd));
+ goto error;
+ }
+
+ offset = nvmf_get_log_page_offset(cmd);
+ if (offset >= discovery_log.length())
+ goto error;
+
+ length = nvmf_get_log_page_length(cmd);
+ if (length > discovery_log.length() - offset)
+ length = discovery_log.length() - offset;
+
+ nvmf_send_controller_data(nc, discovery_log.data() + offset, length);
+ return;
+error:
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_FIELD);
+}
+
+void
+discovery_controller::handle_admin_commands()
+{
+ for (;;) {
+ struct nvmf_capsule *nc;
+ int error = nvmf_controller_receive_capsule(qp, &nc);
+ if (error != 0) {
+ if (error != ECONNRESET)
+ log_warnc(error,
+ "Failed to read command capsule");
+ break;
+ }
+ nvmf_capsule_up nc_guard(nc);
+
+ const struct nvme_command *cmd =
+ (const struct nvme_command *)nvmf_capsule_sqe(nc);
+
+ /*
+ * Only permit Fabrics commands while a controller is
+ * disabled.
+ */
+ if (NVMEV(NVME_CC_REG_EN, cc) == 0 &&
+ cmd->opc != NVME_OPC_FABRICS_COMMANDS) {
+ log_warnx("Unsupported admin opcode %#x while disabled\n",
+ cmd->opc);
+ nvmf_send_generic_error(nc,
+ NVME_SC_COMMAND_SEQUENCE_ERROR);
+ continue;
+ }
+
+ switch (cmd->opc) {
+ case NVME_OPC_FABRICS_COMMANDS:
+ handle_fabrics_command(nc,
+ (const struct nvmf_fabric_cmd *)cmd);
+ break;
+ case NVME_OPC_IDENTIFY:
+ handle_identify_command(nc, cmd);
+ break;
+ case NVME_OPC_GET_LOG_PAGE:
+ handle_get_log_page_command(nc, cmd);
+ break;
+ default:
+ log_warnx("Unsupported admin opcode %#x", cmd->opc);
+ nvmf_send_generic_error(nc, NVME_SC_INVALID_OPCODE);
+ break;
+ }
+ }
+}
+
+discovery_controller::discovery_controller(freebsd::fd_up fd,
+ struct nvmf_qpair *qp, const struct discovery_log &discovery_log) :
+ qp(qp), discovery_log(discovery_log), s(std::move(fd))
+{
+ nvmf_init_discovery_controller_data(qp, &cdata);
+ cap = nvmf_controller_cap(qp);
+ vs = cdata.ver;
+}
+
+void
+nvmf_discovery_portal::handle_connection(freebsd::fd_up fd,
+ const char *host __unused, const struct sockaddr *client_sa)
+{
+ struct nvmf_qpair_params qparams;
+ memset(&qparams, 0, sizeof(qparams));
+ qparams.tcp.fd = fd;
+
+ struct nvmf_capsule *nc = NULL;
+ struct nvmf_fabric_connect_data data;
+ nvmf_qpair_up qp(nvmf_accept(association(), &qparams, &nc, &data));
+ if (!qp) {
+ log_warnx("Failed to create NVMe discovery qpair: %s",
+ nvmf_association_error(association()));
+ return;
+ }
+ nvmf_capsule_up nc_guard(nc);
+
+ if (strncmp((char *)data.subnqn, NVMF_DISCOVERY_NQN,
+ sizeof(data.subnqn)) != 0) {
+ log_warnx("Discovery NVMe qpair with invalid SubNQN: %.*s",
+ (int)sizeof(data.subnqn), data.subnqn);
+ nvmf_connect_invalid_parameters(nc, true,
+ offsetof(struct nvmf_fabric_connect_data, subnqn));
+ return;
+ }
+
+ /* Just use a controller ID of 1 for all discovery controllers. */
+ int error = nvmf_finish_accept(nc, 1);
+ if (error != 0) {
+ log_warnc(error, "Failed to send NVMe CONNECT reponse");
+ return;
+ }
+ nc_guard.reset();
+
+ discovery_log discovery_log = build_discovery_log_page(portal_group(),
+ fd, client_sa, data);
+
+ discovery_controller controller(std::move(fd), qp.get(), discovery_log);
+ controller.handle_admin_commands();
+}
diff --git a/usr.sbin/ctld/parse.y b/usr.sbin/ctld/parse.y
index 432183ed794c..5725c16b459a 100644
--- a/usr.sbin/ctld/parse.y
+++ b/usr.sbin/ctld/parse.y
@@ -54,12 +54,14 @@ extern void yyrestart(FILE *);
%}
%token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL
-%token CLOSING_BRACKET CTL_LUN DEBUG DEVICE_ID DEVICE_TYPE
-%token DISCOVERY_AUTH_GROUP DISCOVERY_FILTER DSCP FOREIGN
+%token CLOSING_BRACKET CONTROLLER CTL_LUN DEBUG DEVICE_ID DEVICE_TYPE
+%token DISCOVERY_AUTH_GROUP DISCOVERY_FILTER DISCOVERY_TCP DSCP FOREIGN
+%token HOST_ADDRESS HOST_NQN
%token INITIATOR_NAME INITIATOR_PORTAL ISNS_SERVER ISNS_PERIOD ISNS_TIMEOUT
-%token LISTEN LISTEN_ISER LUN MAXPROC OFFLOAD OPENING_BRACKET OPTION
+%token LISTEN LISTEN_ISER LUN MAXPROC NAMESPACE
+%token OFFLOAD OPENING_BRACKET OPTION
%token PATH PCP PIDFILE PORT PORTAL_GROUP REDIRECT SEMICOLON SERIAL
-%token SIZE STR TAG TARGET TIMEOUT
+%token SIZE STR TAG TARGET TCP TIMEOUT TRANSPORT_GROUP
%token AF11 AF12 AF13 AF21 AF22 AF23 AF31 AF32 AF33 AF41 AF42 AF43
%token BE EF CS0 CS1 CS2 CS3 CS4 CS5 CS6 CS7
@@ -98,9 +100,13 @@ statement:
|
portal_group
|
+ transport_group
+ |
lun
|
target
+ |
+ controller
;
debug: DEBUG STR
@@ -232,6 +238,10 @@ auth_group_entry:
|
auth_group_chap_mutual
|
+ auth_group_host_address
+ |
+ auth_group_host_nqn
+ |
auth_group_initiator_name
|
auth_group_initiator_portal
@@ -274,6 +284,28 @@ auth_group_chap_mutual: CHAP_MUTUAL STR STR STR STR
}
;
+auth_group_host_address: HOST_ADDRESS STR
+ {
+ bool ok;
+
+ ok = auth_group_add_host_address($2);
+ free($2);
+ if (!ok)
+ return (1);
+ }
+ ;
+
+auth_group_host_nqn: HOST_NQN STR
+ {
+ bool ok;
+
+ ok = auth_group_add_host_nqn($2);
+ free($2);
+ if (!ok)
+ return (1);
+ }
+ ;
+
auth_group_initiator_name: INITIATOR_NAME STR
{
bool ok;
@@ -502,6 +534,71 @@ portal_group_pcp: PCP STR
}
;
+transport_group: TRANSPORT_GROUP transport_group_name
+ OPENING_BRACKET transport_group_entries CLOSING_BRACKET
+ {
+ portal_group_finish();
+ }
+ ;
+
+transport_group_name: STR
+ {
+ bool ok;
+
+ ok = transport_group_start($1);
+ free($1);
+ if (!ok)
+ return (1);
+ }
+ ;
+
+transport_group_entries:
+ |
+ transport_group_entries transport_group_entry
+ |
+ transport_group_entries transport_group_entry SEMICOLON
+ ;
+
+transport_group_entry:
+ portal_group_discovery_auth_group
+ |
+ portal_group_discovery_filter
+ |
+ transport_group_listen_discovery_tcp
+ |
+ transport_group_listen_tcp
+ |
+ portal_group_option
+ |
+ portal_group_tag
+ |
+ portal_group_dscp
+ |
+ portal_group_pcp
+ ;
+
+transport_group_listen_discovery_tcp: LISTEN DISCOVERY_TCP STR
+ {
+ bool ok;
+
+ ok = transport_group_add_listen_discovery_tcp($3);
+ free($3);
+ if (!ok)
+ return (1);
+ }
+ ;
+
+transport_group_listen_tcp: LISTEN TCP STR
+ {
+ bool ok;
+
+ ok = transport_group_add_listen_tcp($3);
+ free($3);
+ if (!ok)
+ return (1);
+ }
+ ;
+
lun: LUN lun_name
OPENING_BRACKET lun_entries CLOSING_BRACKET
{
@@ -738,6 +835,133 @@ target_lun_ref: LUN STR STR
}
;
+controller: CONTROLLER controller_name
+ OPENING_BRACKET controller_entries CLOSING_BRACKET
+ {
+ target_finish();
+ }
+ ;
+
+controller_name: STR
+ {
+ bool ok;
+
+ ok = controller_start($1);
+ free($1);
+ if (!ok)
+ return (1);
+ }
+ ;
+
+controller_entries:
+ |
+ controller_entries controller_entry
+ |
+ controller_entries controller_entry SEMICOLON
+ ;
+
+controller_entry:
+ target_auth_group
+ |
+ target_auth_type
+ |
+ controller_host_address
+ |
+ controller_host_nqn
+ |
+ controller_transport_group
+ |
+ controller_namespace
+ |
+ controller_namespace_ref
+ ;
+
+controller_host_address: HOST_ADDRESS STR
+ {
+ bool ok;
+
+ ok = controller_add_host_address($2);
+ free($2);
+ if (!ok)
+ return (1);
+ }
+ ;
+
+controller_host_nqn: HOST_NQN STR
+ {
+ bool ok;
+
+ ok = controller_add_host_nqn($2);
+ free($2);
+ if (!ok)
+ return (1);
+ }
+ ;
+
+controller_transport_group: TRANSPORT_GROUP STR STR
+ {
+ bool ok;
+
+ ok = target_add_portal_group($2, $3);
+ free($2);
+ free($3);
+ if (!ok)
+ return (1);
+ }
+ | TRANSPORT_GROUP STR
+ {
+ bool ok;
+
+ ok = target_add_portal_group($2, NULL);
+ free($2);
+ if (!ok)
+ return (1);
+ }
+ ;
+
+controller_namespace: NAMESPACE ns_number
+ OPENING_BRACKET lun_entries CLOSING_BRACKET
+ {
+ lun_finish();
+ }
+ ;
+
+ns_number: STR
+ {
+ uint64_t tmp;
+
+ if (expand_number($1, &tmp) != 0) {
+ yyerror("invalid numeric value");
+ free($1);
+ return (1);
+ }
+ free($1);
+
+ if (!controller_start_namespace(tmp))
+ return (1);
+ }
+ ;
+
+controller_namespace_ref: NAMESPACE STR STR
+ {
+ uint64_t tmp;
+ bool ok;
+
+ if (expand_number($2, &tmp) != 0) {
+ yyerror("invalid numeric value");
+ free($2);
+ free($3);
+ return (1);
+ }
+ free($2);
+
+ ok = controller_add_namespace(tmp, $3);
+ free($3);
+ if (!ok)
+ return (1);
+ }
+ ;
+
lun_entries:
|
lun_entries lun_entry
diff --git a/usr.sbin/ctld/token.l b/usr.sbin/ctld/token.l
index c8f54103db55..5f959f648969 100644
--- a/usr.sbin/ctld/token.l
+++ b/usr.sbin/ctld/token.l
@@ -54,21 +54,26 @@ backend { return BACKEND; }
blocksize { return BLOCKSIZE; }
chap { return CHAP; }
chap-mutual { return CHAP_MUTUAL; }
+controller { return CONTROLLER; }
ctl-lun { return CTL_LUN; }
debug { return DEBUG; }
device-id { return DEVICE_ID; }
device-type { return DEVICE_TYPE; }
discovery-auth-group { return DISCOVERY_AUTH_GROUP; }
discovery-filter { return DISCOVERY_FILTER; }
+discovery-tcp { return DISCOVERY_TCP; }
dscp { return DSCP; }
pcp { return PCP; }
foreign { return FOREIGN; }
+host-address { return HOST_ADDRESS; }
+host-nqn { return HOST_NQN; }
initiator-name { return INITIATOR_NAME; }
initiator-portal { return INITIATOR_PORTAL; }
listen { return LISTEN; }
listen-iser { return LISTEN_ISER; }
lun { return LUN; }
maxproc { return MAXPROC; }
+namespace { return NAMESPACE; }
offload { return OFFLOAD; }
option { return OPTION; }
path { return PATH; }
@@ -83,7 +88,9 @@ serial { return SERIAL; }
size { return SIZE; }
tag { return TAG; }
target { return TARGET; }
+tcp { return TCP; }
timeout { return TIMEOUT; }
+transport-group { return TRANSPORT_GROUP; }
af11 { return AF11; }
af12 { return AF12; }
af13 { return AF13; }
diff --git a/usr.sbin/ctld/uclparse.cc b/usr.sbin/ctld/uclparse.cc
index 843e727a2e52..cb3b0a17cd74 100644
--- a/usr.sbin/ctld/uclparse.cc
+++ b/usr.sbin/ctld/uclparse.cc
@@ -64,6 +64,10 @@ static bool uclparse_lun(const char *, const ucl::Ucl &);
static bool uclparse_lun_entries(const char *, const ucl::Ucl &);
static bool uclparse_auth_group(const char *, const ucl::Ucl &);
static bool uclparse_portal_group(const char *, const ucl::Ucl &);
+static bool uclparse_transport_group(const char *, const ucl::Ucl &);
+static bool uclparse_controller(const char *, const ucl::Ucl &);
+static bool uclparse_controller_transport_group(const char *, const ucl::Ucl &);
+static bool uclparse_controller_namespace(const char *, const ucl::Ucl &);
static bool uclparse_target(const char *, const ucl::Ucl &);
static bool uclparse_target_portal_group(const char *, const ucl::Ucl &);
static bool uclparse_target_lun(const char *, const ucl::Ucl &);
@@ -230,6 +234,47 @@ uclparse_target_portal_group(const char *t_name, const ucl::Ucl &obj)
}
static bool
+uclparse_controller_transport_group(const char *t_name, const ucl::Ucl &obj)
+{
+ /*
+ * If the value is a single string, assume it is a
+ * transport-group name.
+ */
+ if (obj.type() == UCL_STRING)
+ return target_add_portal_group(obj.string_value().c_str(),
+ nullptr);
+
+ if (obj.type() != UCL_OBJECT) {
+ log_warnx("transport-group section in controller \"%s\" must "
+ "be an object or string", t_name);
+ return false;
+ }
+
+ auto portal_group = obj["name"];
+ if (!portal_group || portal_group.type() != UCL_STRING) {
+ log_warnx("transport-group section in controller \"%s\" is "
+ "missing \"name\" string key", t_name);
+ return false;
+ }
+
+ auto auth_group = obj["auth-group-name"];
+ if (auth_group) {
+ if (auth_group.type() != UCL_STRING) {
+ log_warnx("\"auth-group-name\" property in "
+ "transport-group section for controller \"%s\" is "
+ "not a string", t_name);
+ return false;
+ }
+ return target_add_portal_group(
+ portal_group.string_value().c_str(),
+ auth_group.string_value().c_str());
+ }
+
+ return target_add_portal_group(portal_group.string_value().c_str(),
+ nullptr);
+}
+
+static bool
uclparse_target_lun(const char *t_name, const ucl::Ucl &obj)
{
char *end;
@@ -285,6 +330,62 @@ uclparse_target_lun(const char *t_name, const ucl::Ucl &obj)
}
static bool
+uclparse_controller_namespace(const char *t_name, const ucl::Ucl &obj)
+{
+ char *end;
+ u_int id;
+
+ std::string key = obj.key();
+ if (!key.empty()) {
+ id = strtoul(key.c_str(), &end, 0);
+ if (*end != '\0') {
+ log_warnx("namespace key \"%s\" in controller \"%s\""
+ " is invalid", key.c_str(), t_name);
+ return false;
+ }
+
+ if (obj.type() == UCL_STRING)
+ return controller_add_namespace(id,
+ obj.string_value().c_str());
+ }
+
+ if (obj.type() != UCL_OBJECT) {
+ log_warnx("namespace section entries in controller \"%s\""
+ " must be objects", t_name);
+ return false;
+ }
+
+ if (key.empty()) {
+ auto num = obj["number"];
+ if (!num || num.type() != UCL_INT) {
+ log_warnx("namespace section in controller \"%s\" is "
+ "missing \"id\" integer property", t_name);
+ return (false);
+ }
+ id = num.int_value();
+ }
+
+ auto name = obj["name"];
+ if (!name) {
+ if (!controller_start_namespace(id))
+ return false;
+
+ std::string lun_name =
+ freebsd::stringf("namespace %u for controller \"%s\"", id,
+ t_name);
+ return uclparse_lun_entries(lun_name.c_str(), obj);
+ }
+
+ if (name.type() != UCL_STRING) {
+ log_warnx("\"name\" property for namespace %u for "
+ "controller \"%s\" is not a string", id, t_name);
+ return (false);
+ }
+
+ return controller_add_namespace(id, name.string_value().c_str());
+}
+
+static bool
uclparse_toplevel(const ucl::Ucl &top)
{
/* Pass 1 - everything except targets */
@@ -390,6 +491,19 @@ uclparse_toplevel(const ucl::Ucl &top)
}
}
+ if (key == "transport-group") {
+ if (obj.type() == UCL_OBJECT) {
+ for (const auto &child : obj) {
+ if (!uclparse_transport_group(
+ child.key().c_str(), child))
+ return false;
+ }
+ } else {
+ log_warnx("\"transport-group\" section is not an object");
+ return false;
+ }
+ }
+
if (key == "lun") {
if (obj.type() == UCL_OBJECT) {
for (const auto &child : obj) {
@@ -408,6 +522,19 @@ uclparse_toplevel(const ucl::Ucl &top)
for (const auto &obj : top) {
std::string key = obj.key();
+ if (key == "controller") {
+ if (obj.type() == UCL_OBJECT) {
+ for (const auto &child : obj) {
+ if (!uclparse_controller(
+ child.key().c_str(), child))
+ return false;
+ }
+ } else {
+ log_warnx("\"controller\" section is not an object");
+ return false;
+ }
+ }
+
if (key == "target") {
if (obj.type() == UCL_OBJECT) {
for (const auto &child : obj) {
@@ -474,6 +601,44 @@ uclparse_auth_group(const char *name, const ucl::Ucl &top)
}
}
+ if (key == "host-address") {
+ if (obj.type() == UCL_STRING) {
+ if (!auth_group_add_host_address(
+ obj.string_value().c_str()))
+ return false;
+ } else if (obj.type() == UCL_ARRAY) {
+ for (const auto &tmp : obj) {
+ if (!auth_group_add_host_address(
+ tmp.string_value().c_str()))
+ return false;
+ }
+ } else {
+ log_warnx("\"host-address\" property of "
+ "auth-group \"%s\" is not an array or string",
+ name);
+ return false;
+ }
+ }
+
+ if (key == "host-nqn") {
+ if (obj.type() == UCL_STRING) {
+ if (!auth_group_add_host_nqn(
+ obj.string_value().c_str()))
+ return false;
+ } else if (obj.type() == UCL_ARRAY) {
+ for (const auto &tmp : obj) {
+ if (!auth_group_add_host_nqn(
+ tmp.string_value().c_str()))
+ return false;
+ }
+ } else {
+ log_warnx("\"host-nqn\" property of "
+ "auth-group \"%s\" is not an array or string",
+ name);
+ return false;
+ }
+ }
+
if (key == "initiator-name") {
if (obj.type() == UCL_STRING) {
if (!auth_group_add_initiator_name(
@@ -739,6 +904,222 @@ uclparse_portal_group(const char *name, const ucl::Ucl &top)
}
static bool
+uclparse_transport_listen_obj(const char *pg_name, const ucl::Ucl &top)
+{
+ for (const auto &obj : top) {
+ std::string key = obj.key();
+
+ if (key.empty()) {
+ log_warnx("missing protocol for \"listen\" "
+ "property of transport-group \"%s\"", pg_name);
+ return false;
+ }
+
+ if (key == "tcp") {
+ if (obj.type() == UCL_STRING) {
+ if (!transport_group_add_listen_tcp(
+ obj.string_value().c_str()))
+ return false;
+ } else if (obj.type() == UCL_ARRAY) {
+ for (const auto &tmp : obj) {
+ if (!transport_group_add_listen_tcp(
+ tmp.string_value().c_str()))
+ return false;
+ }
+ }
+ } else if (key == "discovery-tcp") {
+ if (obj.type() == UCL_STRING) {
+ if (!transport_group_add_listen_discovery_tcp(
+ obj.string_value().c_str()))
+ return false;
+ } else if (obj.type() == UCL_ARRAY) {
+ for (const auto &tmp : obj) {
+ if (!transport_group_add_listen_discovery_tcp(
+ tmp.string_value().c_str()))
+ return false;
+ }
+ }
+ } else {
+ log_warnx("invalid listen protocol \"%s\" for "
+ "transport-group \"%s\"", key.c_str(), pg_name);
+ return false;
+ }
+ }
+ return true;
+}
+
+static bool
+uclparse_transport_group(const char *name, const ucl::Ucl &top)
+{
+ if (!transport_group_start(name))
+ return false;
+
+ scope_exit finisher(portal_group_finish);
+ for (const auto &obj : top) {
+ std::string key = obj.key();
+
+ if (key == "discovery-auth-group") {
+ if (obj.type() != UCL_STRING) {
+ log_warnx("\"discovery-auth-group\" property "
+ "of transport-group \"%s\" is not a string",
+ name);
+ return false;
+ }
+
+ if (!portal_group_set_discovery_auth_group(
+ obj.string_value().c_str()))
+ return false;
+ }
+
+ if (key == "discovery-filter") {
+ if (obj.type() != UCL_STRING) {
+ log_warnx("\"discovery-filter\" property of "
+ "transport-group \"%s\" is not a string",
+ name);
+ return false;
+ }
+
+ if (!portal_group_set_filter(
+ obj.string_value().c_str()))
+ return false;
+ }
+
+ if (key == "listen") {
+ if (obj.type() != UCL_OBJECT) {
+ log_warnx("\"listen\" property of "
+ "transport-group \"%s\" is not an object",
+ name);
+ return false;
+ }
+ if (!uclparse_transport_listen_obj(name, obj))
+ return false;
+ }
+
+ if (key == "options") {
+ if (obj.type() != UCL_OBJECT) {
+ log_warnx("\"options\" property of transport group "
+ "\"%s\" is not an object", name);
+ return false;
+ }
+
+ for (const auto &tmp : obj) {
+ if (!portal_group_add_option(
+ tmp.key().c_str(),
+ tmp.forced_string_value().c_str()))
+ return false;
+ }
+ }
+
+ if (key == "dscp") {
+ if (!uclparse_dscp("transport", name, obj))
+ return false;
+ }
+
+ if (key == "pcp") {
+ if (!uclparse_pcp("transport", name, obj))
+ return false;
+ }
+ }
+
+ return true;
+}
+
+static bool
+uclparse_controller(const char *name, const ucl::Ucl &top)
+{
+ if (!controller_start(name))
+ return false;
+
+ scope_exit finisher(target_finish);
+ for (const auto &obj : top) {
+ std::string key = obj.key();
+
+ if (key == "auth-group") {
+ if (obj.type() != UCL_STRING) {
+ log_warnx("\"auth-group\" property of "
+ "controller \"%s\" is not a string", name);
+ return false;
+ }
+
+ if (!target_set_auth_group(obj.string_value().c_str()))
+ return false;
+ }
+
+ if (key == "auth-type") {
+ if (obj.type() != UCL_STRING) {
+ log_warnx("\"auth-type\" property of "
+ "controller \"%s\" is not a string", name);
+ return false;
+ }
+
+ if (!target_set_auth_type(obj.string_value().c_str()))
+ return false;
+ }
+
+ if (key == "host-address") {
+ if (obj.type() == UCL_STRING) {
+ if (!controller_add_host_address(
+ obj.string_value().c_str()))
+ return false;
+ } else if (obj.type() == UCL_ARRAY) {
+ for (const auto &tmp : obj) {
+ if (!controller_add_host_address(
+ tmp.string_value().c_str()))
+ return false;
+ }
+ } else {
+ log_warnx("\"host-address\" property of "
+ "controller \"%s\" is not an array or "
+ "string", name);
+ return false;
+ }
+ }
+
+ if (key == "host-nqn") {
+ if (obj.type() == UCL_STRING) {
+ if (!controller_add_host_nqn(
+ obj.string_value().c_str()))
+ return false;
+ } else if (obj.type() == UCL_ARRAY) {
+ for (const auto &tmp : obj) {
+ if (!controller_add_host_nqn(
+ tmp.string_value().c_str()))
+ return false;
+ }
+ } else {
+ log_warnx("\"host-nqn\" property of "
+ "controller \"%s\" is not an array or "
+ "string", name);
+ return false;
+ }
+ }
+
+ if (key == "transport-group") {
+ if (obj.type() == UCL_ARRAY) {
+ for (const auto &tmp : obj) {
+ if (!uclparse_controller_transport_group(name,
+ tmp))
+ return false;
+ }
+ } else {
+ if (!uclparse_controller_transport_group(name,
+ obj))
+ return false;
+ }
+ }
+
+ if (key == "namespace") {
+ for (const auto &tmp : obj) {
+ if (!uclparse_controller_namespace(name, tmp))
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+static bool
uclparse_target(const char *name, const ucl::Ucl &top)
{
if (!target_start(name))
diff --git a/usr.sbin/rpcbind/check_bound.c b/usr.sbin/rpcbind/check_bound.c
index 446dceb3502f..820f76d37346 100644
--- a/usr.sbin/rpcbind/check_bound.c
+++ b/usr.sbin/rpcbind/check_bound.c
@@ -42,13 +42,16 @@
#include <sys/types.h>
#include <sys/socket.h>
+
#include <rpc/rpc.h>
#include <rpc/svc_dg.h>
+
#include <netconfig.h>
-#include <syslog.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#include <syslog.h>
#include <unistd.h>
-#include <stdlib.h>
#include "rpcbind.h"
@@ -61,9 +64,9 @@ struct fdlist {
static struct fdlist *fdhead; /* Link list of the check fd's */
static struct fdlist *fdtail;
-static char *nullstring = "";
+static char nullstring[] = "";
-static bool_t check_bound(struct fdlist *, char *uaddr);
+static bool_t check_bound(struct fdlist *, const char *uaddr);
/*
* Returns 1 if the given address is bound for the given addr & transport
@@ -71,7 +74,7 @@ static bool_t check_bound(struct fdlist *, char *uaddr);
* Returns 0 for success.
*/
static bool_t
-check_bound(struct fdlist *fdl, char *uaddr)
+check_bound(struct fdlist *fdl, const char *uaddr)
{
int fd;
struct netbuf *na;
@@ -101,7 +104,7 @@ check_bound(struct fdlist *fdl, char *uaddr)
}
int
-add_bndlist(struct netconfig *nconf, struct netbuf *baddr __unused)
+add_bndlist(const struct netconfig *nconf, struct netbuf *baddr __unused)
{
struct fdlist *fdl;
struct netconfig *newnconf;
@@ -109,7 +112,7 @@ add_bndlist(struct netconfig *nconf, struct netbuf *baddr __unused)
newnconf = getnetconfigent(nconf->nc_netid);
if (newnconf == NULL)
return (-1);
- fdl = malloc(sizeof (struct fdlist));
+ fdl = malloc(sizeof(*fdl));
if (fdl == NULL) {
freenetconfigent(newnconf);
syslog(LOG_ERR, "no memory!");
@@ -131,7 +134,7 @@ add_bndlist(struct netconfig *nconf, struct netbuf *baddr __unused)
}
bool_t
-is_bound(char *netid, char *uaddr)
+is_bound(const char *netid, const char *uaddr)
{
struct fdlist *fdl;
@@ -189,7 +192,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, char *uaddr, char *saddr)
return (NULL);
}
-#ifdef ND_DEBUG
+#ifdef RPCBIND_DEBUG
if (debugging) {
if (saddr == NULL) {
fprintf(stderr, "mergeaddr: client uaddr = %s\n",
@@ -205,7 +208,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, char *uaddr, char *saddr)
* This is all we should need for IP 4 and 6
*/
m_uaddr = addrmerge(svc_getrpccaller(xprt), s_uaddr, c_uaddr, netid);
-#ifdef ND_DEBUG
+#ifdef RPCBIND_DEBUG
if (debugging)
fprintf(stderr, "mergeaddr: uaddr = %s, merged uaddr = %s\n",
uaddr, m_uaddr);
diff --git a/usr.sbin/rpcbind/pmap_svc.c b/usr.sbin/rpcbind/pmap_svc.c
index cea1606258ae..4dcbb0f6ddd2 100644
--- a/usr.sbin/rpcbind/pmap_svc.c
+++ b/usr.sbin/rpcbind/pmap_svc.c
@@ -35,7 +35,7 @@
/*
* pmap_svc.c
- * The server procedure for the version 2 portmaper.
+ * The server procedure for the version 2 portmapper.
* All the portmapper related interface from the portmap side.
*/
@@ -47,12 +47,12 @@
#include <rpc/pmap_prot.h>
#include <rpc/rpcb_prot.h>
#ifdef RPCBIND_DEBUG
+#include <stdio.h>
#include <stdlib.h>
#endif
#include "rpcbind.h"
-static struct pmaplist *find_service_pmap(rpcprog_t, rpcvers_t,
- rpcprot_t);
+static struct pmaplist *find_service_pmap(rpcprog_t, rpcvers_t, rpcprot_t);
static bool_t pmapproc_change(struct svc_req *, SVCXPRT *, u_long);
static bool_t pmapproc_getport(struct svc_req *, SVCXPRT *);
static bool_t pmapproc_dump(struct svc_req *, SVCXPRT *);
@@ -168,6 +168,11 @@ pmapproc_change(struct svc_req *rqstp __unused, SVCXPRT *xprt, unsigned long op)
uid_t uid;
char uidbuf[32];
+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+ svcerr_decode(xprt);
+ return (FALSE);
+ }
+
#ifdef RPCBIND_DEBUG
if (debugging)
fprintf(stderr, "%s request for (%lu, %lu) : ",
@@ -175,11 +180,6 @@ pmapproc_change(struct svc_req *rqstp __unused, SVCXPRT *xprt, unsigned long op)
reg.pm_prog, reg.pm_vers);
#endif
- if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
- svcerr_decode(xprt);
- return (FALSE);
- }
-
if (!check_access(xprt, op, &reg, PMAPVERS)) {
svcerr_weakauth(xprt);
return FALSE;
@@ -192,12 +192,12 @@ pmapproc_change(struct svc_req *rqstp __unused, SVCXPRT *xprt, unsigned long op)
* and looping.
*/
if (__rpc_get_local_uid(xprt, &uid) < 0)
- rpcbreg.r_owner = "unknown";
+ rpcbreg.r_owner = __UNCONST(rpcbind_unknown);
else if (uid == 0)
- rpcbreg.r_owner = "superuser";
+ rpcbreg.r_owner = __UNCONST(rpcbind_superuser);
else {
/* r_owner will be strdup-ed later */
- snprintf(uidbuf, sizeof uidbuf, "%d", uid);
+ snprintf(uidbuf, sizeof(uidbuf), "%d", uid);
rpcbreg.r_owner = uidbuf;
}
@@ -207,14 +207,14 @@ pmapproc_change(struct svc_req *rqstp __unused, SVCXPRT *xprt, unsigned long op)
if (op == PMAPPROC_SET) {
char buf[32];
- snprintf(buf, sizeof buf, "0.0.0.0.%d.%d",
+ snprintf(buf, sizeof(buf), "0.0.0.0.%d.%d",
(int)((reg.pm_port >> 8) & 0xff),
(int)(reg.pm_port & 0xff));
rpcbreg.r_addr = buf;
if (reg.pm_prot == IPPROTO_UDP) {
- rpcbreg.r_netid = udptrans;
+ rpcbreg.r_netid = __UNCONST(udptrans);
} else if (reg.pm_prot == IPPROTO_TCP) {
- rpcbreg.r_netid = tcptrans;
+ rpcbreg.r_netid = __UNCONST(tcptrans);
} else {
ans = FALSE;
goto done_change;
@@ -224,9 +224,9 @@ pmapproc_change(struct svc_req *rqstp __unused, SVCXPRT *xprt, unsigned long op)
bool_t ans1, ans2;
rpcbreg.r_addr = NULL;
- rpcbreg.r_netid = tcptrans;
+ rpcbreg.r_netid = __UNCONST(tcptrans);
ans1 = map_unset(&rpcbreg, rpcbreg.r_owner);
- rpcbreg.r_netid = udptrans;
+ rpcbreg.r_netid = __UNCONST(udptrans);
ans2 = map_unset(&rpcbreg, rpcbreg.r_owner);
ans = ans1 || ans2;
} else {
@@ -285,9 +285,9 @@ pmapproc_getport(struct svc_req *rqstp __unused, SVCXPRT *xprt)
#endif
fnd = find_service_pmap(reg.pm_prog, reg.pm_vers, reg.pm_prot);
if (fnd) {
- char serveuaddr[32], *ua;
+ char serveuaddr[32];
int h1, h2, h3, h4, p1, p2;
- char *netid;
+ const char *netid, *ua;
if (reg.pm_prot == IPPROTO_UDP) {
ua = udp_uaddr;
@@ -303,7 +303,7 @@ pmapproc_getport(struct svc_req *rqstp __unused, SVCXPRT *xprt)
&h4, &p1, &p2) == 6) {
p1 = (fnd->pml_map.pm_port >> 8) & 0xff;
p2 = (fnd->pml_map.pm_port) & 0xff;
- snprintf(serveuaddr, sizeof serveuaddr,
+ snprintf(serveuaddr, sizeof(serveuaddr),
"%d.%d.%d.%d.%d.%d", h1, h2, h3, h4, p1, p2);
if (is_bound(netid, serveuaddr)) {
port = fnd->pml_map.pm_port;
diff --git a/usr.sbin/rpcbind/rpcb_stat.c b/usr.sbin/rpcbind/rpcb_stat.c
index 9c03ce368293..9500bb7b7cbe 100644
--- a/usr.sbin/rpcbind/rpcb_stat.c
+++ b/usr.sbin/rpcbind/rpcb_stat.c
@@ -37,15 +37,18 @@
* Copyright (c) 1990 by Sun Microsystems, Inc.
*/
-#include <netconfig.h>
+#include <sys/stat.h>
+
#include <rpc/rpc.h>
#include <rpc/rpcb_prot.h>
-#include <sys/stat.h>
#ifdef PORTMAP
#include <rpc/pmap_prot.h>
#endif
+
+#include <netconfig.h>
#include <stdlib.h>
#include <string.h>
+
#include "rpcbind.h"
static rpcb_stat_byvers inf;
@@ -96,8 +99,8 @@ rpcbs_unset(rpcvers_t rtype, bool_t success)
}
void
-rpcbs_getaddr(rpcvers_t rtype, rpcprog_t prog, rpcvers_t vers, char *netid,
- char *uaddr)
+rpcbs_getaddr(rpcvers_t rtype, rpcprog_t prog, rpcvers_t vers,
+ const char *netid, const char *uaddr)
{
rpcbs_addrlist *al;
struct netconfig *nconf;
@@ -121,7 +124,7 @@ rpcbs_getaddr(rpcvers_t rtype, rpcprog_t prog, rpcvers_t vers, char *netid,
if (nconf == NULL) {
return;
}
- al = (rpcbs_addrlist *) malloc(sizeof (rpcbs_addrlist));
+ al = malloc(sizeof(*al));
if (al == NULL) {
return;
}
@@ -170,7 +173,7 @@ rpcbs_rmtcall(rpcvers_t rtype, rpcproc_t rpcbproc, rpcprog_t prog,
if (nconf == NULL) {
return;
}
- rl = (rpcbs_rmtcalllist *) malloc(sizeof (rpcbs_rmtcalllist));
+ rl = malloc(sizeof(*rl));
if (rl == NULL) {
return;
}
diff --git a/usr.sbin/rpcbind/rpcb_svc.c b/usr.sbin/rpcbind/rpcb_svc.c
index 94323ab992aa..5a23abe3dbc6 100644
--- a/usr.sbin/rpcbind/rpcb_svc.c
+++ b/usr.sbin/rpcbind/rpcb_svc.c
@@ -46,6 +46,7 @@
#include <netconfig.h>
#include <stdio.h>
#ifdef RPCBIND_DEBUG
+#include <stdio.h>
#include <stdlib.h>
#endif
#include <string.h>
@@ -53,9 +54,9 @@
#include "rpcbind.h"
static void *rpcbproc_getaddr_3_local(void *, struct svc_req *, SVCXPRT *,
- rpcvers_t);
+ rpcvers_t);
static void *rpcbproc_dump_3_local(void *, struct svc_req *, SVCXPRT *,
- rpcvers_t);
+ rpcvers_t);
/*
* Called by svc_getreqset. There is a separate server handle for
@@ -89,7 +90,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp)
#endif
/* This call just logs, no actual checks */
check_access(transp, rqstp->rq_proc, NULL, RPCBVERS);
- (void) svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL);
+ (void) svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
return;
case RPCBPROC_SET:
@@ -204,7 +205,7 @@ done:
/* ARGSUSED */
static void *
rpcbproc_getaddr_3_local(void *arg, struct svc_req *rqstp __unused,
- SVCXPRT *transp __unused, rpcvers_t versnum __unused)
+ SVCXPRT *transp __unused, rpcvers_t versnum __unused)
{
RPCB *regp = (RPCB *)arg;
#ifdef RPCBIND_DEBUG
@@ -212,7 +213,7 @@ rpcbproc_getaddr_3_local(void *arg, struct svc_req *rqstp __unused,
char *uaddr;
uaddr = taddr2uaddr(rpcbind_get_conf(transp->xp_netid),
- svc_getrpccaller(transp));
+ svc_getrpccaller(transp));
fprintf(stderr, "RPCB_GETADDR req for (%lu, %lu, %s) from %s: ",
(unsigned long)regp->r_prog, (unsigned long)regp->r_vers,
regp->r_netid, uaddr);
@@ -226,7 +227,7 @@ rpcbproc_getaddr_3_local(void *arg, struct svc_req *rqstp __unused,
/* ARGSUSED */
static void *
rpcbproc_dump_3_local(void *arg __unused, struct svc_req *rqstp __unused,
- SVCXPRT *transp __unused, rpcvers_t versnum __unused)
+ SVCXPRT *transp __unused, rpcvers_t versnum __unused)
{
return ((void *)&list_rbl);
}
diff --git a/usr.sbin/rpcbind/rpcb_svc_4.c b/usr.sbin/rpcbind/rpcb_svc_4.c
index 77240e4d3ef5..817312709cf0 100644
--- a/usr.sbin/rpcbind/rpcb_svc_4.c
+++ b/usr.sbin/rpcbind/rpcb_svc_4.c
@@ -51,12 +51,14 @@
#include "rpcbind.h"
static void *rpcbproc_getaddr_4_local(void *, struct svc_req *, SVCXPRT *,
- rpcvers_t);
-static void *rpcbproc_getversaddr_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
-static void *rpcbproc_getaddrlist_4_local
- (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+ rpcvers_t);
+static void *rpcbproc_getversaddr_4_local(void *, struct svc_req *, SVCXPRT *,
+ rpcvers_t);
+static void *rpcbproc_getaddrlist_4_local(void *, struct svc_req *, SVCXPRT *,
+ rpcvers_t);
static void free_rpcb_entry_list(rpcb_entry_list_ptr *);
-static void *rpcbproc_dump_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+static void *rpcbproc_dump_4_local(void *, struct svc_req *, SVCXPRT *,
+ rpcvers_t);
/*
* Called by svc_getreqset. There is a separate server handle for
@@ -88,8 +90,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp)
fprintf(stderr, "RPCBPROC_NULL\n");
#endif
check_access(transp, rqstp->rq_proc, NULL, RPCBVERS4);
- (void) svc_sendreply(transp, (xdrproc_t) xdr_void,
- (char *)NULL);
+ (void) svc_sendreply(transp, (xdrproc_t) xdr_void, NULL);
return;
case RPCBPROC_SET:
@@ -257,7 +258,7 @@ done:
/* ARGSUSED */
static void *
rpcbproc_getaddr_4_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp,
- rpcvers_t rpcbversnum __unused)
+ rpcvers_t rpcbversnum __unused)
{
RPCB *regp = (RPCB *)arg;
#ifdef RPCBIND_DEBUG
@@ -315,7 +316,7 @@ rpcbproc_getversaddr_4_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp,
/* ARGSUSED */
static void *
rpcbproc_getaddrlist_4_local(void *arg, struct svc_req *rqstp __unused,
- SVCXPRT *transp, rpcvers_t versnum __unused)
+ SVCXPRT *transp, rpcvers_t versnum __unused)
{
RPCB *regp = (RPCB *)arg;
static rpcb_entry_list_ptr rlist;
@@ -384,7 +385,7 @@ rpcbproc_getaddrlist_4_local(void *arg, struct svc_req *rqstp __unused,
/*
* Add it to rlist.
*/
- rp = malloc(sizeof (rpcb_entry_list));
+ rp = malloc(sizeof(*rp));
if (rp == NULL)
goto fail;
a = &rp->rpcb_entry_map;
@@ -397,7 +398,7 @@ rpcbproc_getaddrlist_4_local(void *arg, struct svc_req *rqstp __unused,
if (rlist == NULL) {
rlist = rp;
tail = rp;
- } else {
+ } else if (tail != NULL) {
tail->rpcb_entry_next = rp;
tail = rp;
}
@@ -417,9 +418,10 @@ rpcbproc_getaddrlist_4_local(void *arg, struct svc_req *rqstp __unused,
* Perhaps wrong, but better than it not getting counted at all.
*/
rpcbs_getaddr(RPCBVERS4 - 2, prog, vers, transp->xp_netid, maddr);
- return (void *)&rlist;
+ return (&rlist);
-fail: free_rpcb_entry_list(&rlist);
+fail:
+ free_rpcb_entry_list(&rlist);
return (NULL);
}
@@ -444,7 +446,7 @@ free_rpcb_entry_list(rpcb_entry_list_ptr *rlistp)
/* ARGSUSED */
static void *
rpcbproc_dump_4_local(void *arg __unused, struct svc_req *req __unused,
- SVCXPRT *xprt __unused, rpcvers_t versnum __unused)
+ SVCXPRT *xprt __unused, rpcvers_t versnum __unused)
{
return ((void *)&list_rbl);
}
diff --git a/usr.sbin/rpcbind/rpcb_svc_com.c b/usr.sbin/rpcbind/rpcb_svc_com.c
index 15ecda213abc..a82cf44bfa3c 100644
--- a/usr.sbin/rpcbind/rpcb_svc_com.c
+++ b/usr.sbin/rpcbind/rpcb_svc_com.c
@@ -110,7 +110,7 @@ static int check_rmtcalls(struct pollfd *, int);
static void xprt_set_caller(SVCXPRT *, struct finfo *);
static void send_svcsyserr(SVCXPRT *, struct finfo *);
static void handle_reply(int, SVCXPRT *);
-static void find_versions(rpcprog_t, char *, rpcvers_t *, rpcvers_t *);
+static void find_versions(rpcprog_t, const char *, rpcvers_t *, rpcvers_t *);
static rpcblist_ptr find_service(rpcprog_t, rpcvers_t, char *);
static char *getowner(SVCXPRT *, char *, size_t);
static int add_pmaplist(RPCB *);
@@ -122,17 +122,17 @@ static int del_pmaplist(RPCB *);
/* ARGSUSED */
void *
rpcbproc_set_com(void *arg, struct svc_req *rqstp __unused, SVCXPRT *transp,
- rpcvers_t rpcbversnum)
+ rpcvers_t rpcbversnum)
{
- RPCB *regp = (RPCB *)arg;
+ RPCB *regp = arg;
static bool_t ans;
char owner[64];
#ifdef RPCBIND_DEBUG
if (debugging)
- fprintf(stderr, "RPCB_SET request for (%lu, %lu, %s, %s) : ",
- (unsigned long)regp->r_prog, (unsigned long)regp->r_vers,
- regp->r_netid, regp->r_addr);
+ fprintf(stderr, "%s: RPCB_SET request for (%lu, %lu, %s, %s): ",
+ __func__, (unsigned long)regp->r_prog,
+ (unsigned long)regp->r_vers, regp->r_netid, regp->r_addr);
#endif
ans = map_set(regp, getowner(transp, owner, sizeof owner));
#ifdef RPCBIND_DEBUG
@@ -145,7 +145,7 @@ rpcbproc_set_com(void *arg, struct svc_req *rqstp __unused, SVCXPRT *transp,
}
bool_t
-map_set(RPCB *regp, char *owner)
+map_set(RPCB *regp, const char *owner)
{
RPCB reg, *a;
rpcblist_ptr rbl, fnd;
@@ -170,7 +170,7 @@ map_set(RPCB *regp, char *owner)
/*
* add to the end of the list
*/
- rbl = malloc(sizeof (RPCBLIST));
+ rbl = malloc(sizeof(*rbl));
if (rbl == NULL)
return (FALSE);
a = &(rbl->rpcb_map);
@@ -186,7 +186,7 @@ map_set(RPCB *regp, char *owner)
free(rbl);
return (FALSE);
}
- rbl->rpcb_next = (rpcblist_ptr)NULL;
+ rbl->rpcb_next = NULL;
if (list_rbl == NULL) {
list_rbl = rbl;
} else {
@@ -196,7 +196,7 @@ map_set(RPCB *regp, char *owner)
fnd->rpcb_next = rbl;
}
#ifdef PORTMAP
- (void) add_pmaplist(regp);
+ (void)add_pmaplist(regp);
#endif
return (TRUE);
}
@@ -207,17 +207,17 @@ map_set(RPCB *regp, char *owner)
/* ARGSUSED */
void *
rpcbproc_unset_com(void *arg, struct svc_req *rqstp __unused, SVCXPRT *transp,
- rpcvers_t rpcbversnum)
+ rpcvers_t rpcbversnum)
{
- RPCB *regp = (RPCB *)arg;
+ RPCB *regp = arg;
static bool_t ans;
char owner[64];
#ifdef RPCBIND_DEBUG
if (debugging)
- fprintf(stderr, "RPCB_UNSET request for (%lu, %lu, %s) : ",
- (unsigned long)regp->r_prog, (unsigned long)regp->r_vers,
- regp->r_netid);
+ fprintf(stderr, "%s: RPCB_UNSET request for (%lu, %lu, %s): ",
+ __func__, (unsigned long)regp->r_prog,
+ (unsigned long)regp->r_vers, regp->r_netid);
#endif
ans = map_unset(regp, getowner(transp, owner, sizeof owner));
#ifdef RPCBIND_DEBUG
@@ -230,7 +230,7 @@ rpcbproc_unset_com(void *arg, struct svc_req *rqstp __unused, SVCXPRT *transp,
}
bool_t
-map_unset(RPCB *regp, char *owner)
+map_unset(RPCB *regp, const char *owner)
{
int ans = 0;
rpcblist_ptr rbl, prev, tmp;
@@ -252,7 +252,7 @@ map_unset(RPCB *regp, char *owner)
* Check whether appropriate uid. Unset only
* if superuser or the owner itself.
*/
- if (strcmp(owner, "superuser") &&
+ if (strcmp(owner, rpcbind_superuser) &&
strcmp(rbl->rpcb_map.r_owner, owner))
return (0);
/* found it; rbl moves forward, prev stays */
@@ -270,21 +270,21 @@ map_unset(RPCB *regp, char *owner)
}
#ifdef PORTMAP
if (ans)
- (void) del_pmaplist(regp);
+ (void)del_pmaplist(regp);
#endif
/*
* We return 1 either when the entry was not there or it
* was able to unset it. It can come to this point only if
- * atleast one of the conditions is true.
+ * at least one of the conditions is true.
*/
return (1);
}
void
-delete_prog(unsigned int prog)
+delete_prog(rpcprog_t prog)
{
RPCB reg;
- register rpcblist_ptr rbl;
+ rpcblist_ptr rbl;
for (rbl = list_rbl; rbl != NULL; rbl = rbl->rpcb_next) {
if ((rbl->rpcb_map.r_prog != prog))
@@ -294,14 +294,18 @@ delete_prog(unsigned int prog)
reg.r_prog = rbl->rpcb_map.r_prog;
reg.r_vers = rbl->rpcb_map.r_vers;
reg.r_netid = strdup(rbl->rpcb_map.r_netid);
- (void) map_unset(&reg, "superuser");
- free(reg.r_netid);
+ if (reg.r_netid == NULL)
+ syslog(LOG_ERR, "%s: %m", __func__);
+ else {
+ (void)map_unset(&reg, rpcbind_superuser);
+ free(reg.r_netid);
+ }
}
}
void *
rpcbproc_getaddr_com(RPCB *regp, struct svc_req *rqstp __unused,
- SVCXPRT *transp, rpcvers_t rpcbversnum, rpcvers_t verstype)
+ SVCXPRT *transp, rpcvers_t rpcbversnum, rpcvers_t verstype)
{
static char *uaddr;
char *saddr = NULL;
@@ -333,23 +337,23 @@ rpcbproc_getaddr_com(RPCB *regp, struct svc_req *rqstp __unused,
}
#ifdef RPCBIND_DEBUG
if (debugging)
- fprintf(stderr, "getaddr: %s\n", uaddr);
+ fprintf(stderr, "%s: %s\n", __func__, uaddr);
#endif
/* XXX: should have used some defined constant here */
rpcbs_getaddr(rpcbversnum - 2, regp->r_prog, regp->r_vers,
transp->xp_netid, uaddr);
- return (void *)&uaddr;
+ return (&uaddr);
}
/* ARGSUSED */
void *
rpcbproc_gettime_com(void *arg __unused, struct svc_req *rqstp __unused,
- SVCXPRT *transp __unused, rpcvers_t rpcbversnum __unused)
+ SVCXPRT *transp __unused, rpcvers_t rpcbversnum __unused)
{
static time_t curtime;
- (void) time(&curtime);
- return (void *)&curtime;
+ (void)time(&curtime);
+ return (&curtime);
}
/*
@@ -359,9 +363,9 @@ rpcbproc_gettime_com(void *arg __unused, struct svc_req *rqstp __unused,
/* ARGSUSED */
void *
rpcbproc_uaddr2taddr_com(void *arg, struct svc_req *rqstp __unused,
- SVCXPRT *transp, rpcvers_t rpcbversnum __unused)
+ SVCXPRT *transp, rpcvers_t rpcbversnum __unused)
{
- char **uaddrp = (char **)arg;
+ char **uaddrp = arg;
struct netconfig *nconf;
static struct netbuf nbuf;
static struct netbuf *taddr;
@@ -370,10 +374,10 @@ rpcbproc_uaddr2taddr_com(void *arg, struct svc_req *rqstp __unused,
taddr = NULL;
if (((nconf = rpcbind_get_conf(transp->xp_netid)) == NULL) ||
((taddr = uaddr2taddr(nconf, *uaddrp)) == NULL)) {
- (void) memset((char *)&nbuf, 0, sizeof (struct netbuf));
- return (void *)&nbuf;
+ memset(&nbuf, 0, sizeof(nbuf));
+ return (&nbuf);
}
- return (void *)taddr;
+ return (taddr);
}
/*
@@ -383,9 +387,9 @@ rpcbproc_uaddr2taddr_com(void *arg, struct svc_req *rqstp __unused,
/* ARGSUSED */
void *
rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp __unused,
- SVCXPRT *transp, rpcvers_t rpcbversnum __unused)
+ SVCXPRT *transp, rpcvers_t rpcbversnum __unused)
{
- struct netbuf *taddr = (struct netbuf *)arg;
+ struct netbuf *taddr = arg;
static char *uaddr;
struct netconfig *nconf;
@@ -393,7 +397,7 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp __unused,
int fd;
if ((fd = open("/dev/null", O_RDONLY)) == -1) {
- uaddr = (char *)strerror(errno);
+ uaddr = strerror(errno);
return (&uaddr);
}
#endif /* CHEW_FDS */
@@ -480,7 +484,7 @@ static struct rmtcallfd_list *rmthead;
static struct rmtcallfd_list *rmttail;
int
-create_rmtcall_fd(struct netconfig *nconf)
+create_rmtcall_fd(const struct netconfig *nconf)
{
int fd;
struct rmtcallfd_list *rmt;
@@ -488,21 +492,20 @@ create_rmtcall_fd(struct netconfig *nconf)
if ((fd = __rpc_nconf2fd(nconf)) == -1) {
if (debugging)
- fprintf(stderr,
- "create_rmtcall_fd: couldn't open \"%s\" (errno %d)\n",
- nconf->nc_device, errno);
+ fprintf(stderr, "%s: couldn't open \"%s\": %m\n",
+ __func__, nconf->nc_device);
return (-1);
}
- xprt = svc_tli_create(fd, 0, (struct t_bind *) 0, 0, 0);
+ xprt = svc_tli_create(fd, 0, NULL, 0, 0);
if (xprt == NULL) {
if (debugging)
- fprintf(stderr,
- "create_rmtcall_fd: svc_tli_create failed\n");
+ fprintf(stderr, "%s: svc_tli_create failed\n",
+ __func__);
return (-1);
}
- rmt = malloc(sizeof (struct rmtcallfd_list));
+ rmt = malloc(sizeof(*rmt));
if (rmt == NULL) {
- syslog(LOG_ERR, "create_rmtcall_fd: no memory!");
+ syslog(LOG_ERR, "%s: %m", __func__);
return (-1);
}
rmt->xprt = xprt;
@@ -591,16 +594,16 @@ find_rmtcallxprt_by_fd(int fd)
void
rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
- rpcproc_t reply_type, rpcvers_t versnum)
+ rpcproc_t reply_type, rpcvers_t versnum)
{
- register rpcblist_ptr rbl;
+ rpcblist_ptr rbl;
struct netconfig *nconf;
struct netbuf *caller;
struct r_rmtcall_args a;
char *buf_alloc = NULL, *outbufp;
char *outbuf_alloc = NULL;
char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX];
- struct netbuf *na = (struct netbuf *) NULL;
+ struct netbuf *na = NULL;
struct rpc_msg call_msg;
int outlen;
u_int sendsz;
@@ -638,8 +641,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
#endif /* notyet */
if (buf_alloc == NULL) {
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: No Memory!\n");
+ fprintf(stderr, "%s: %m\n", __func__);
if (reply_type == RPCBPROC_INDIRECT)
svcerr_systemerr(transp);
return;
@@ -650,12 +652,11 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
}
call_msg.rm_xid = 0; /* For error checking purposes */
- if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
+ if (!svc_getargs(transp, (xdrproc_t)xdr_rmtcall_args, (char *) &a)) {
if (reply_type == RPCBPROC_INDIRECT)
svcerr_decode(transp);
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: svc_getargs failed\n");
+ fprintf(stderr, "%s: svc_getargs failed\n", __func__);
goto error;
}
@@ -668,14 +669,15 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
#ifdef RPCBIND_DEBUG
if (debugging) {
uaddr = taddr2uaddr(rpcbind_get_conf(transp->xp_netid), caller);
- fprintf(stderr, "%s %s req for (%lu, %lu, %lu, %s) from %s : ",
- versnum == PMAPVERS ? "pmap_rmtcall" :
- versnum == RPCBVERS ? "rpcb_rmtcall" :
- versnum == RPCBVERS4 ? "rpcb_indirect" : "unknown",
- reply_type == RPCBPROC_INDIRECT ? "indirect" : "callit",
- (unsigned long)a.rmt_prog, (unsigned long)a.rmt_vers,
- (unsigned long)a.rmt_proc, transp->xp_netid,
- uaddr ? uaddr : "unknown");
+ fprintf(stderr,
+ "%s: %s %s req for (%lu, %lu, %lu, %s) from %s: ",
+ __func__, versnum == PMAPVERS ? "pmap_rmtcall" :
+ versnum == RPCBVERS ? "rpcb_rmtcall" :
+ versnum == RPCBVERS4 ? "rpcb_indirect" : rpcbind_unknown,
+ reply_type == RPCBPROC_INDIRECT ? "indirect" : "callit",
+ (unsigned long)a.rmt_prog, (unsigned long)a.rmt_vers,
+ (unsigned long)a.rmt_proc, transp->xp_netid,
+ uaddr ? uaddr : rpcbind_unknown);
free(uaddr);
}
#endif
@@ -685,7 +687,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers,
a.rmt_proc, transp->xp_netid, rbl);
- if (rbl == (rpcblist_ptr)NULL) {
+ if (rbl == NULL) {
#ifdef RPCBIND_DEBUG
if (debugging)
fprintf(stderr, "not found\n");
@@ -726,19 +728,18 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
free(uaddr);
}
nconf = rpcbind_get_conf(transp->xp_netid);
- if (nconf == (struct netconfig *)NULL) {
+ if (nconf == NULL) {
if (reply_type == RPCBPROC_INDIRECT)
svcerr_systemerr(transp);
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: rpcbind_get_conf failed\n");
+ fprintf(stderr, "%s: rpcbind_get_conf failed\n",
+ __func__);
goto error;
}
localsa = local_sa(((struct sockaddr *)caller->buf)->sa_family);
if (localsa == NULL) {
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: no local address\n");
+ fprintf(stderr, "%s: no local address\n", __func__);
goto error;
}
tbuf.len = tbuf.maxlen = localsa->sa_len;
@@ -749,7 +750,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
nconf->nc_netid);
#ifdef RPCBIND_DEBUG
if (debugging)
- fprintf(stderr, "merged uaddr %s\n", m_uaddr);
+ fprintf(stderr, "%s: merged uaddr %s\n", __func__, m_uaddr);
#endif
if ((fd = find_rmtcallfd_by_netid(nconf->nc_netid)) == -1) {
if (reply_type == RPCBPROC_INDIRECT)
@@ -769,22 +770,20 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
* beat on it any more.
*/
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: duplicate request\n");
+ fprintf(stderr, "%s: duplicate request\n", __func__);
goto error;
case -1:
/* forward_register failed. Perhaps no memory. */
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: forward_register failed\n");
+ fprintf(stderr, "%s: forward_register failed\n",
+ __func__);
goto error;
}
#ifdef DEBUG_RMTCALL
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: original XID %x, new XID %x\n",
- *xidp, call_msg.rm_xid);
+ fprintf(stderr, "%s: original XID %x, new XID %x\n", __func__,
+ *xidp, call_msg.rm_xid);
#endif
call_msg.rm_direction = CALL;
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
@@ -797,11 +796,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
outbuf_alloc = malloc(sendsz);
#endif /* notyet */
if (outbuf_alloc == NULL) {
+ if (debugging)
+ fprintf(stderr, "%s: %m\n", __func__);
if (reply_type == RPCBPROC_INDIRECT)
svcerr_systemerr(transp);
- if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: No memory!\n");
goto error;
}
xdrmem_create(&outxdr, outbuf_alloc, sendsz, XDR_ENCODE);
@@ -812,16 +810,14 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
if (reply_type == RPCBPROC_INDIRECT)
svcerr_systemerr(transp);
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: xdr_callhdr failed\n");
+ fprintf(stderr, "%s: xdr_callhdr failed\n", __func__);
goto error;
}
if (!xdr_u_int32_t(&outxdr, &(a.rmt_proc))) {
if (reply_type == RPCBPROC_INDIRECT)
svcerr_systemerr(transp);
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: xdr_u_long failed\n");
+ fprintf(stderr, "%s: xdr_u_long failed\n", __func__);
goto error;
}
@@ -839,8 +835,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
} else {
/* we do not support any other authentication scheme */
if (debugging)
- fprintf(stderr,
-"rpcbproc_callit_com: oa_flavor != AUTH_NONE and oa_flavor != AUTH_SYS\n");
+ fprintf(stderr, "%s: oa_flavor != AUTH_NONE and "
+ "oa_flavor != AUTH_SYS\n", __func__);
if (reply_type == RPCBPROC_INDIRECT)
svcerr_weakauth(transp); /* XXX too strong.. */
goto error;
@@ -850,7 +846,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
svcerr_systemerr(transp);
if (debugging)
fprintf(stderr,
- "rpcbproc_callit_com: authwhatever_create returned NULL\n");
+ "%s: authwhatever_create returned NULL\n",
+ __func__);
goto error;
}
if (!AUTH_MARSHALL(auth, &outxdr)) {
@@ -858,8 +855,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
svcerr_systemerr(transp);
AUTH_DESTROY(auth);
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: AUTH_MARSHALL failed\n");
+ fprintf(stderr, "%s: AUTH_MARSHALL failed\n",
+ __func__);
goto error;
}
AUTH_DESTROY(auth);
@@ -867,8 +864,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
if (reply_type == RPCBPROC_INDIRECT)
svcerr_systemerr(transp);
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: xdr_opaque_parms failed\n");
+ fprintf(stderr, "%s: xdr_opaque_parms failed\n",
+ __func__);
goto error;
}
outlen = (int) XDR_GETPOS(&outxdr);
@@ -887,8 +884,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
if (sendto(fd, outbufp, outlen, 0, (struct sockaddr *)na->buf, na->len)
!= outlen) {
if (debugging)
- fprintf(stderr,
- "rpcbproc_callit_com: sendto failed: errno %d\n", errno);
+ fprintf(stderr, "%s: sendto failed: %m\n", __func__);
if (reply_type == RPCBPROC_INDIRECT)
svcerr_systemerr(transp);
goto error;
@@ -897,7 +893,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
error:
if (call_msg.rm_xid != 0)
- (void) free_slot_by_xid(call_msg.rm_xid);
+ (void)free_slot_by_xid(call_msg.rm_xid);
out:
free(local_uaddr);
free(buf_alloc);
@@ -913,14 +909,12 @@ out:
*/
static int
forward_register(u_int32_t caller_xid, struct netbuf *caller_addr,
- int forward_fd, char *uaddr, rpcproc_t reply_type,
- rpcvers_t versnum, u_int32_t *callxidp)
+ int forward_fd, char *uaddr, rpcproc_t reply_type,
+ rpcvers_t versnum, u_int32_t *callxidp)
{
- int i;
- int j = 0;
- time_t min_time, time_now;
- static u_int32_t lastxid;
- int entry = -1;
+ static u_int32_t lastxid;
+ time_t min_time, time_now;
+ int i, j = 0, entry = -1;
min_time = FINFO[0].time;
time_now = time((time_t *)0);
@@ -945,7 +939,7 @@ forward_register(u_int32_t caller_xid, struct netbuf *caller_addr,
} else {
/* Should we wait any longer */
if ((time_now - FINFO[i].time) > MAXTIME_OFF)
- (void) free_slot_by_index(i);
+ (void)free_slot_by_index(i);
}
}
if (entry == -1) {
@@ -961,7 +955,7 @@ forward_register(u_int32_t caller_xid, struct netbuf *caller_addr,
/* use this empty slot */
j = entry;
} else {
- (void) free_slot_by_index(j);
+ (void)free_slot_by_index(j);
}
if ((FINFO[j].caller_addr = netbufdup(caller_addr)) == NULL) {
return (-1);
@@ -990,7 +984,7 @@ forward_register(u_int32_t caller_xid, struct netbuf *caller_addr,
static struct finfo *
forward_find(u_int32_t reply_xid)
{
- int i;
+ int i;
i = reply_xid % (u_int32_t)NFORWARD;
if ((FINFO[i].flag & FINFO_ACTIVE) &&
@@ -1012,7 +1006,7 @@ free_slot_by_xid(u_int32_t xid)
static int
free_slot_by_index(int index)
{
- struct finfo *fi;
+ struct finfo *fi;
fi = &FINFO[index];
if (fi->flag & FINFO_ACTIVE) {
@@ -1084,15 +1078,14 @@ extern bool_t __svc_clean_idle(fd_set *, int, bool_t);
void
my_svc_run(void)
{
- size_t nfds;
struct pollfd pollfds[FD_SETSIZE + 1];
- int poll_ret, check_ret;
- int n;
+ fd_set cleanfds;
+ struct pollfd *p;
+ size_t nfds;
#ifdef SVC_RUN_DEBUG
- int i;
+ size_t i;
#endif
- register struct pollfd *p;
- fd_set cleanfds;
+ int n, poll_ret, check_ret;
for (;;) {
p = pollfds;
@@ -1110,7 +1103,8 @@ my_svc_run(void)
poll_ret = 0;
#ifdef SVC_RUN_DEBUG
if (debugging) {
- fprintf(stderr, "polling for read on fd < ");
+ fprintf(stderr, "%s: polling for read on fd < ",
+ __func__);
for (i = 0, p = pollfds; i < nfds; i++, p++)
if (p->events)
fprintf(stderr, "%d ", p->fd);
@@ -1137,6 +1131,13 @@ my_svc_run(void)
* that it was set by the signal handlers (or any
* other outside event) and not caused by poll().
*/
+#ifdef SVC_RUN_DEBUG
+ if (debugging) {
+ fprintf(stderr, "%s: poll returned %d: %m\n",
+ __func__, poll_ret);
+ }
+#endif
+ /* FALLTHROUGH */
case 0:
cleanfds = svc_fdset;
__svc_clean_idle(&cleanfds, 30, FALSE);
@@ -1144,10 +1145,12 @@ my_svc_run(void)
default:
#ifdef SVC_RUN_DEBUG
if (debugging) {
- fprintf(stderr, "poll returned read fds < ");
+ fprintf(stderr, "%s: poll returned read fds < ",
+ __func__);
for (i = 0, p = pollfds; i < nfds; i++, p++)
if (p->revents)
- fprintf(stderr, "%d ", p->fd);
+ fprintf(stderr, "%d (%#x)",
+ p->fd, p->revents);
fprintf(stderr, ">\n");
}
#endif
@@ -1165,7 +1168,8 @@ my_svc_run(void)
}
#ifdef SVC_RUN_DEBUG
if (debugging) {
- fprintf(stderr, "svc_maxfd now %u\n", svc_maxfd);
+ fprintf(stderr, "%s: svc_maxfd now %u\n", __func__,
+ svc_maxfd);
}
#endif
}
@@ -1187,9 +1191,9 @@ check_rmtcalls(struct pollfd *pfds, int nfds)
ncallbacks_found++;
#ifdef DEBUG_RMTCALL
if (debugging)
- fprintf(stderr,
-"my_svc_run: polled on forwarding fd %d, netid %s - calling handle_reply\n",
- pfds[j].fd, xprt->xp_netid);
+ fprintf(stderr, "%s: polled on forwarding "
+ "fd %d, netid %s - calling handle_reply\n",
+ __func__, pfds[j].fd, xprt->xp_netid);
#endif
handle_reply(pfds[j].fd, xprt);
pfds[j].revents = 0;
@@ -1251,27 +1255,26 @@ handle_reply(int fd, SVCXPRT *xprt)
} while (inlen < 0 && errno == EINTR);
if (inlen < 0) {
if (debugging)
- fprintf(stderr,
- "handle_reply: recvfrom returned %d, errno %d\n", inlen, errno);
+ fprintf(stderr, "%s: recvfrom returned %d: %m\n",
+ __func__, inlen);
goto done;
}
reply_msg.acpted_rply.ar_verf = _null_auth;
reply_msg.acpted_rply.ar_results.where = 0;
- reply_msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_void;
+ reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;
xdrmem_create(&reply_xdrs, buffer, (u_int)inlen, XDR_DECODE);
if (!xdr_replymsg(&reply_xdrs, &reply_msg)) {
if (debugging)
- (void) fprintf(stderr,
- "handle_reply: xdr_replymsg failed\n");
+ fprintf(stderr, "%s: xdr_replymsg failed\n", __func__);
goto done;
}
fi = forward_find(reply_msg.rm_xid);
#ifdef SVC_RUN_DEBUG
if (debugging) {
- fprintf(stderr, "handle_reply: reply xid: %d fi addr: %p\n",
- reply_msg.rm_xid, fi);
+ fprintf(stderr, "%s: reply xid: %d fi addr: %p\n",
+ __func__, reply_msg.rm_xid, fi);
}
#endif
if (fi == NULL) {
@@ -1280,8 +1283,8 @@ handle_reply(int fd, SVCXPRT *xprt)
_seterr_reply(&reply_msg, &reply_error);
if (reply_error.re_status != RPC_SUCCESS) {
if (debugging)
- (void) fprintf(stderr, "handle_reply: %s\n",
- clnt_sperrno(reply_error.re_status));
+ fprintf(stderr, "%s: %s\n", __func__,
+ clnt_sperrno(reply_error.re_status));
send_svcsyserr(xprt, fi);
goto done;
}
@@ -1297,31 +1300,32 @@ handle_reply(int fd, SVCXPRT *xprt)
uaddr = taddr2uaddr(rpcbind_get_conf("udp"),
svc_getrpccaller(xprt));
if (debugging) {
- fprintf(stderr, "handle_reply: forwarding address %s to %s\n",
- a.rmt_uaddr, uaddr ? uaddr : "unknown");
+ fprintf(stderr, "%s: forwarding address %s to %s\n",
+ __func__, a.rmt_uaddr, uaddr ? uaddr : rpcbind_unknown);
}
free(uaddr);
#endif
- svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
+ svc_sendreply(xprt, (xdrproc_t)xdr_rmtcall_result, &a);
done:
free(buffer);
if (reply_msg.rm_xid == 0) {
#ifdef SVC_RUN_DEBUG
if (debugging) {
- fprintf(stderr, "handle_reply: NULL xid on exit!\n");
+ fprintf(stderr, "%s: NULL xid on exit!\n", __func__);
}
#endif
} else
- (void) free_slot_by_xid(reply_msg.rm_xid);
+ (void)free_slot_by_xid(reply_msg.rm_xid);
}
static void
-find_versions(rpcprog_t prog, char *netid, rpcvers_t *lowvp, rpcvers_t *highvp)
+find_versions(rpcprog_t prog, const char *netid, rpcvers_t *lowvp,
+ rpcvers_t *highvp)
{
- register rpcblist_ptr rbl;
- unsigned int lowv = 0;
- unsigned int highv = 0;
+ rpcblist_ptr rbl;
+ rpcvers_t lowv = 0;
+ rpcvers_t highv = 0;
for (rbl = list_rbl; rbl != NULL; rbl = rbl->rpcb_next) {
if ((rbl->rpcb_map.r_prog != prog) ||
@@ -1355,8 +1359,8 @@ find_versions(rpcprog_t prog, char *netid, rpcvers_t *lowvp, rpcvers_t *highvp)
static rpcblist_ptr
find_service(rpcprog_t prog, rpcvers_t vers, char *netid)
{
- register rpcblist_ptr hit = NULL;
- register rpcblist_ptr rbl;
+ rpcblist_ptr hit = NULL;
+ rpcblist_ptr rbl;
for (rbl = list_rbl; rbl != NULL; rbl = rbl->rpcb_next) {
if ((rbl->rpcb_map.r_prog != prog) ||
@@ -1380,9 +1384,9 @@ getowner(SVCXPRT *transp, char *owner, size_t ownersize)
uid_t uid;
if (__rpc_get_local_uid(transp, &uid) < 0)
- strlcpy(owner, "unknown", ownersize);
+ strlcpy(owner, rpcbind_unknown, ownersize);
else if (uid == 0)
- strlcpy(owner, "superuser", ownersize);
+ strlcpy(owner, rpcbind_superuser, ownersize);
else
snprintf(owner, ownersize, "%d", uid);
@@ -1420,9 +1424,9 @@ add_pmaplist(RPCB *arg)
/*
* add to END of list
*/
- pml = malloc(sizeof (struct pmaplist));
+ pml = malloc(sizeof(*pml));
if (pml == NULL) {
- (void) syslog(LOG_ERR, "rpcbind: no memory!\n");
+ syslog(LOG_ERR, "%s: %m", __func__);
return (1);
}
pml->pml_map = pmap;
@@ -1434,7 +1438,7 @@ add_pmaplist(RPCB *arg)
/* Attach to the end of the list */
for (fnd = list_pml; fnd->pml_next; fnd = fnd->pml_next)
- ;
+ continue;
fnd->pml_next = pml;
}
return (0);
diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c
index 182dbff7dbed..faa24a4415e2 100644
--- a/usr.sbin/rpcbind/rpcbind.c
+++ b/usr.sbin/rpcbind/rpcbind.c
@@ -111,36 +111,37 @@ static int terminate_wfd;
#ifdef WARMSTART
/* Local Variable */
-static int warmstart = 0; /* Grab an old copy of registrations. */
+static int warmstart = 0; /* Grab an old copy of registrations */
#endif
#ifdef PORTMAP
struct pmaplist *list_pml; /* A list of version 2 rpcbind services */
-char *udptrans; /* Name of UDP transport */
-char *tcptrans; /* Name of TCP transport */
-char *udp_uaddr; /* Universal UDP address */
-char *tcp_uaddr; /* Universal TCP address */
+const char *udptrans; /* Name of UDP transport */
+const char *tcptrans; /* Name of TCP transport */
+const char *udp_uaddr; /* Universal UDP address */
+const char *tcp_uaddr; /* Universal TCP address */
#endif
-static char servname[] = "rpcbind";
-static char superuser[] = "superuser";
-static char nlname[] = "netlink";
+static const char servname[] = "rpcbind";
+const char rpcbind_superuser[] = "superuser";
+const char rpcbind_unknown[] = "unknown";
+static const char nlname[] = "netlink";
-static struct netconfig netlink_nconf = {
- .nc_netid = nlname,
+static const struct netconfig netlink_nconf = {
+ .nc_netid = __UNCONST(nlname),
.nc_semantics = NC_TPI_CLTS,
};
-static struct t_bind netlink_taddr = {
+static const struct t_bind netlink_taddr = {
.addr = {
.maxlen = sizeof(nlname),
.len = sizeof(nlname),
- .buf = nlname,
+ .buf = __UNCONST(nlname),
},
};
-static int init_transport(struct netconfig *);
-static void rbllist_add(rpcprog_t, rpcvers_t, struct netconfig *,
- struct netbuf *);
+static int init_transport(const struct netconfig *);
+static void rbllist_add(rpcprog_t, rpcvers_t, const struct netconfig *,
+ struct netbuf *);
static void cleanup_pidfile(void);
static void terminate(int);
static void parseargs(int, char *[]);
@@ -192,7 +193,7 @@ main(int argc, char *argv[])
fprintf(stderr, "Sorry. You are not superuser\n");
exit(1);
}
- nc_handle = setnetconfig(); /* open netconfig file */
+ nc_handle = setnetconfig(); /* open netconfig file */
if (nc_handle == NULL) {
syslog(LOG_ERR, "could not read /etc/netconfig");
exit(1);
@@ -216,7 +217,7 @@ main(int argc, char *argv[])
while ((nconf = getnetconfig(nc_handle))) {
if (nconf->nc_flag & NC_VISIBLE) {
- if (ipv6_only == 1 && strcmp(nconf->nc_protofmly,
+ if (ipv6_only == 1 && strcmp(nconf->nc_protofmly,
"inet") == 0) {
/* DO NOTHING */
} else
@@ -296,7 +297,7 @@ main(int argc, char *argv[])
* Returns 0 if succeeds, else fails
*/
static int
-init_transport(struct netconfig *nconf)
+init_transport(const struct netconfig *nconf)
{
int fd = -1;
struct t_bind taddr;
@@ -308,8 +309,8 @@ init_transport(struct netconfig *nconf)
int addrlen;
int nhostsbak;
int bound;
- struct sockaddr *sa;
u_int32_t host_addr[4]; /* IPv4 or IPv6 */
+ struct sockaddr *sa;
struct sockaddr_un sun;
mode_t oldmask;
bool local, netlink;
@@ -321,17 +322,17 @@ init_transport(struct netconfig *nconf)
if ((nconf->nc_semantics != NC_TPI_CLTS) &&
(nconf->nc_semantics != NC_TPI_COTS) &&
(nconf->nc_semantics != NC_TPI_COTS_ORD))
- return (1); /* not my type */
-#ifdef ND_DEBUG
+ return (1); /* not my type */
+#ifdef RPCBIND_DEBUG
if (debugging) {
- int i;
- char **s;
-
- (void)fprintf(stderr, "%s: %ld lookup routines :\n",
- nconf->nc_netid, nconf->nc_nlookups);
- for (i = 0, s = nconf->nc_lookups; i < nconf->nc_nlookups;
- i++, s++)
- fprintf(stderr, "[%d] - %s\n", i, *s);
+ unsigned int i;
+ char **s;
+
+ (void)fprintf(stderr, "%s: %ld lookup routines :\n",
+ nconf->nc_netid, nconf->nc_nlookups);
+ for (i = 0, s = nconf->nc_lookups; i < nconf->nc_nlookups;
+ i++, s++)
+ (void)fprintf(stderr, "[%d] - %s\n", i, *s);
}
#endif
@@ -339,224 +340,223 @@ init_transport(struct netconfig *nconf)
* XXX - using RPC library internal functions.
*/
if (local) {
- /*
- * For other transports we call this later, for each socket we
- * like to bind.
- */
- if ((fd = __rpc_nconf2fd(nconf)) < 0) {
- int non_fatal = 0;
- if (errno == EAFNOSUPPORT)
- non_fatal = 1;
- syslog(non_fatal?LOG_DEBUG:LOG_ERR, "cannot create socket for %s",
- nconf->nc_netid);
- return (1);
- }
+ /*
+ * For other transports we call this later, for each socket we
+ * like to bind.
+ */
+ if ((fd = __rpc_nconf2fd(nconf)) < 0) {
+ syslog(errno == EAFNOSUPPORT ? LOG_DEBUG : LOG_ERR,
+ "cannot create socket for %s",
+ nconf->nc_netid);
+ return (1);
+ }
}
if (!__rpc_nconf2sockinfo(nconf, &si)) {
- syslog(LOG_ERR, "cannot get information for %s",
- nconf->nc_netid);
- return (1);
+ syslog(LOG_ERR, "cannot get information for %s",
+ nconf->nc_netid);
+ return (1);
}
if (local) {
- memset(&sun, 0, sizeof sun);
- sun.sun_family = AF_LOCAL;
- unlink(_PATH_RPCBINDSOCK);
- strcpy(sun.sun_path, _PATH_RPCBINDSOCK);
- sun.sun_len = SUN_LEN(&sun);
- addrlen = sizeof (struct sockaddr_un);
- sa = (struct sockaddr *)&sun;
+ memset(&sun, 0, sizeof sun);
+ sun.sun_family = AF_LOCAL;
+ unlink(_PATH_RPCBINDSOCK);
+ strcpy(sun.sun_path, _PATH_RPCBINDSOCK);
+ sun.sun_len = SUN_LEN(&sun);
+ addrlen = sizeof (struct sockaddr_un);
+ sa = (struct sockaddr *)&sun;
} else if (!netlink) {
- /* Get rpcbind's address on this transport */
-
- memset(&hints, 0, sizeof hints);
- hints.ai_flags = AI_PASSIVE;
- hints.ai_family = si.si_af;
- hints.ai_socktype = si.si_socktype;
- hints.ai_protocol = si.si_proto;
+ /* Get rpcbind's address on this transport */
+ memset(&hints, 0, sizeof hints);
+ hints.ai_flags = AI_PASSIVE;
+ hints.ai_family = si.si_af;
+ hints.ai_socktype = si.si_socktype;
+ hints.ai_protocol = si.si_proto;
}
if (!local && !netlink) {
- /*
- * If no hosts were specified, just bind to INADDR_ANY.
- * Otherwise make sure 127.0.0.1 is added to the list.
- */
- nhostsbak = nhosts + 1;
- hosts = realloc(hosts, nhostsbak * sizeof(char *));
- if (nhostsbak == 1)
- hosts[0] = "*";
- else {
- if (hints.ai_family == AF_INET && nobind_localhost == 0) {
- hosts[nhostsbak - 1] = "127.0.0.1";
- } else if (hints.ai_family == AF_INET6 && nobind_localhost == 0) {
- hosts[nhostsbak - 1] = "::1";
- } else
- return 1;
- }
-
- /*
- * Bind to specific IPs if asked to
- */
- bound = 0;
- while (nhostsbak > 0) {
- --nhostsbak;
/*
- * XXX - using RPC library internal functions.
+ * If no hosts were specified, just bind to INADDR_ANY.
+ * Otherwise make sure 127.0.0.1 is added to the list.
*/
- if ((fd = __rpc_nconf2fd(nconf)) < 0) {
- int non_fatal = 0;
- if (errno == EAFNOSUPPORT &&
- nconf->nc_semantics != NC_TPI_CLTS)
- non_fatal = 1;
- syslog(non_fatal ? LOG_DEBUG : LOG_ERR,
- "cannot create socket for %s", nconf->nc_netid);
- return (1);
+ nhostsbak = nhosts + 1;
+ hosts = realloc(hosts, nhostsbak * sizeof(char *));
+ if (nhostsbak == 1)
+ hosts[0] = "*";
+ else {
+ if (hints.ai_family == AF_INET &&
+ !nobind_localhost) {
+ hosts[nhostsbak - 1] = "127.0.0.1";
+ } else if (hints.ai_family == AF_INET6 &&
+ !nobind_localhost) {
+ hosts[nhostsbak - 1] = "::1";
+ } else
+ return 1;
}
- switch (hints.ai_family) {
- case AF_INET:
- if (inet_pton(AF_INET, hosts[nhostsbak],
- host_addr) == 1) {
- hints.ai_flags &= AI_NUMERICHOST;
- } else {
+
+ /*
+ * Bind to specific IPs if asked to
+ */
+ bound = 0;
+ while (nhostsbak > 0) {
+ --nhostsbak;
/*
- * Skip if we have an AF_INET6 address.
+ * XXX - using RPC library internal functions.
*/
- if (inet_pton(AF_INET6,
- hosts[nhostsbak], host_addr) == 1) {
- close(fd);
- continue;
+ if ((fd = __rpc_nconf2fd(nconf)) < 0) {
+ int non_fatal = 0;
+ if (errno == EAFNOSUPPORT &&
+ nconf->nc_semantics != NC_TPI_CLTS)
+ non_fatal = 1;
+ syslog(non_fatal ? LOG_DEBUG : LOG_ERR,
+ "cannot create socket for %s", nconf->nc_netid);
+ return (1);
}
- }
- break;
- case AF_INET6:
- if (inet_pton(AF_INET6, hosts[nhostsbak],
- host_addr) == 1) {
- hints.ai_flags &= AI_NUMERICHOST;
- } else {
+ switch (hints.ai_family) {
+ case AF_INET:
+ if (inet_pton(AF_INET, hosts[nhostsbak],
+ host_addr) == 1) {
+ hints.ai_flags &= AI_NUMERICHOST;
+ } else {
+ /*
+ * Skip if we have an AF_INET6 address.
+ */
+ if (inet_pton(AF_INET6,
+ hosts[nhostsbak], host_addr) == 1) {
+ close(fd);
+ continue;
+ }
+ }
+ break;
+ case AF_INET6:
+ if (inet_pton(AF_INET6, hosts[nhostsbak],
+ host_addr) == 1) {
+ hints.ai_flags &= AI_NUMERICHOST;
+ } else {
+ /*
+ * Skip if we have an AF_INET address.
+ */
+ if (inet_pton(AF_INET, hosts[nhostsbak],
+ host_addr) == 1) {
+ close(fd);
+ continue;
+ }
+ }
+ if (setsockopt(fd, IPPROTO_IPV6,
+ IPV6_V6ONLY, &on, sizeof on) < 0) {
+ syslog(LOG_ERR,
+ "can't set v6-only binding for "
+ "ipv6 socket: %m");
+ continue;
+ }
+ break;
+ default:
+ break;
+ }
+
/*
- * Skip if we have an AF_INET address.
+ * If no hosts were specified, just bind to INADDR_ANY
*/
- if (inet_pton(AF_INET, hosts[nhostsbak],
- host_addr) == 1) {
- close(fd);
+ if (strcmp("*", hosts[nhostsbak]) == 0)
+ hosts[nhostsbak] = NULL;
+ if ((aicode = getaddrinfo(hosts[nhostsbak], servname, &hints,
+ &res)) != 0) {
+ syslog(LOG_ERR, "cannot get local address for %s: %s",
+ nconf->nc_netid, gai_strerror(aicode));
continue;
}
- }
- if (setsockopt(fd, IPPROTO_IPV6,
- IPV6_V6ONLY, &on, sizeof on) < 0) {
- syslog(LOG_ERR,
- "can't set v6-only binding for "
- "ipv6 socket: %m");
- continue;
- }
- break;
- default:
- break;
- }
+ addrlen = res->ai_addrlen;
+ sa = (struct sockaddr *)res->ai_addr;
+ oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH);
+ if (bind(fd, sa, addrlen) != 0) {
+ syslog(LOG_ERR, "cannot bind %s on %s: %m",
+ (hosts[nhostsbak] == NULL) ? "*" :
+ hosts[nhostsbak], nconf->nc_netid);
+ if (res != NULL)
+ freeaddrinfo(res);
+ continue;
+ } else
+ bound = 1;
+ (void)umask(oldmask);
+
+ /* Copy the address */
+ taddr.addr.len = taddr.addr.maxlen = addrlen;
+ taddr.addr.buf = malloc(addrlen);
+ if (taddr.addr.buf == NULL) {
+ syslog(LOG_ERR,
+ "cannot allocate memory for %s address",
+ nconf->nc_netid);
+ if (res != NULL)
+ freeaddrinfo(res);
+ return 1;
+ }
+ memcpy(taddr.addr.buf, sa, addrlen);
+#ifdef RPCBIND_DEBUG
+ if (debugging) {
+ /*
+ * for debugging print out our universal
+ * address
+ */
+ char *uaddr;
+ struct netbuf nb;
+
+ nb.buf = sa;
+ nb.len = nb.maxlen = sa->sa_len;
+ uaddr = taddr2uaddr(nconf, &nb);
+ (void)fprintf(stderr,
+ "rpcbind : my address is %s\n", uaddr);
+ (void)free(uaddr);
+ }
+#endif
- /*
- * If no hosts were specified, just bind to INADDR_ANY
- */
- if (strcmp("*", hosts[nhostsbak]) == 0)
- hosts[nhostsbak] = NULL;
- if ((aicode = getaddrinfo(hosts[nhostsbak], servname, &hints,
- &res)) != 0) {
- syslog(LOG_ERR, "cannot get local address for %s: %s",
- nconf->nc_netid, gai_strerror(aicode));
- continue;
+ if (nconf->nc_semantics != NC_TPI_CLTS)
+ listen(fd, SOMAXCONN);
+
+ my_xprt = (SVCXPRT *)svc_tli_create(fd, nconf, &taddr,
+ RPC_MAXDATASIZE, RPC_MAXDATASIZE);
}
- addrlen = res->ai_addrlen;
- sa = (struct sockaddr *)res->ai_addr;
+ } else if (local) {
oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH);
- if (bind(fd, sa, addrlen) != 0) {
- syslog(LOG_ERR, "cannot bind %s on %s: %m",
- (hosts[nhostsbak] == NULL) ? "*" :
- hosts[nhostsbak], nconf->nc_netid);
- if (res != NULL)
- freeaddrinfo(res);
- continue;
- } else
- bound = 1;
- (void)umask(oldmask);
+ if (bind(fd, sa, addrlen) < 0) {
+ syslog(LOG_ERR, "cannot bind %s: %m", nconf->nc_netid);
+ if (res != NULL)
+ freeaddrinfo(res);
+ return 1;
+ }
+ (void) umask(oldmask);
/* Copy the address */
taddr.addr.len = taddr.addr.maxlen = addrlen;
taddr.addr.buf = malloc(addrlen);
if (taddr.addr.buf == NULL) {
- syslog(LOG_ERR,
- "cannot allocate memory for %s address",
- nconf->nc_netid);
- if (res != NULL)
- freeaddrinfo(res);
- return 1;
+ syslog(LOG_ERR, "cannot allocate memory for %s address",
+ nconf->nc_netid);
+ if (res != NULL)
+ freeaddrinfo(res);
+ return 1;
}
memcpy(taddr.addr.buf, sa, addrlen);
-#ifdef ND_DEBUG
+#ifdef RPCBIND_DEBUG
if (debugging) {
- /*
- * for debugging print out our universal
- * address
- */
- char *uaddr;
- struct netbuf nb;
-
- nb.buf = sa;
- nb.len = nb.maxlen = sa->sa_len;
- uaddr = taddr2uaddr(nconf, &nb);
- (void)fprintf(stderr,
- "rpcbind : my address is %s\n", uaddr);
- (void)free(uaddr);
- }
+ /* for debugging print out our universal address */
+ char *uaddr;
+ struct netbuf nb;
+
+ nb.buf = sa;
+ nb.len = nb.maxlen = sa->sa_len;
+ uaddr = taddr2uaddr(nconf, &nb);
+ (void)fprintf(stderr, "rpcbind : my address is %s\n",
+ uaddr);
+ (void)free(uaddr);
+ }
#endif
if (nconf->nc_semantics != NC_TPI_CLTS)
- listen(fd, SOMAXCONN);
+ listen(fd, SOMAXCONN);
my_xprt = (SVCXPRT *)svc_tli_create(fd, nconf, &taddr,
RPC_MAXDATASIZE, RPC_MAXDATASIZE);
- }
- } else if (local) {
- oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH);
- if (bind(fd, sa, addrlen) < 0) {
- syslog(LOG_ERR, "cannot bind %s: %m", nconf->nc_netid);
- if (res != NULL)
- freeaddrinfo(res);
- return 1;
- }
- (void) umask(oldmask);
-
- /* Copy the address */
- taddr.addr.len = taddr.addr.maxlen = addrlen;
- taddr.addr.buf = malloc(addrlen);
- if (taddr.addr.buf == NULL) {
- syslog(LOG_ERR, "cannot allocate memory for %s address",
- nconf->nc_netid);
- if (res != NULL)
- freeaddrinfo(res);
- return 1;
- }
- memcpy(taddr.addr.buf, sa, addrlen);
-#ifdef ND_DEBUG
- if (debugging) {
- /* for debugging print out our universal address */
- char *uaddr;
- struct netbuf nb;
-
- nb.buf = sa;
- nb.len = nb.maxlen = sa->sa_len;
- uaddr = taddr2uaddr(nconf, &nb);
- (void) fprintf(stderr, "rpcbind : my address is %s\n",
- uaddr);
- (void) free(uaddr);
- }
-#endif
-
- if (nconf->nc_semantics != NC_TPI_CLTS)
- listen(fd, SOMAXCONN);
-
- my_xprt = (SVCXPRT *)svc_tli_create(fd, nconf, &taddr,
- RPC_MAXDATASIZE, RPC_MAXDATASIZE);
} else {
assert(netlink);
taddr = netlink_taddr;
@@ -581,7 +581,7 @@ init_transport(struct netconfig *nconf)
if (!svc_register(my_xprt, PMAPPROG, PMAPVERS,
pmap_service, 0)) {
syslog(LOG_ERR, "could not register on %s",
- nconf->nc_netid);
+ nconf->nc_netid);
goto error;
}
pml = malloc(sizeof (struct pmaplist));
@@ -597,7 +597,7 @@ init_transport(struct netconfig *nconf)
free(pml);
pml = NULL;
syslog(LOG_ERR,
- "cannot have more than one TCP transport");
+ "cannot have more than one TCP transport");
goto error;
}
tcptrans = strdup(nconf->nc_netid);
@@ -609,7 +609,7 @@ init_transport(struct netconfig *nconf)
} else if (strcmp(nconf->nc_proto, NC_UDP) == 0) {
if (udptrans[0]) {
syslog(LOG_ERR,
- "cannot have more than one UDP transport");
+ "cannot have more than one UDP transport");
goto error;
}
udptrans = strdup(nconf->nc_netid);
@@ -626,9 +626,9 @@ init_transport(struct netconfig *nconf)
list_pml = pml;
/* Add version 3 information */
- pml = malloc(sizeof (struct pmaplist));
+ pml = malloc(sizeof(*pml));
if (pml == NULL) {
- syslog(LOG_ERR, "no memory!");
+ syslog(LOG_ERR, "%m");
exit(1);
}
pml->pml_map = list_pml->pml_map;
@@ -637,9 +637,9 @@ init_transport(struct netconfig *nconf)
list_pml = pml;
/* Add version 4 information */
- pml = malloc (sizeof (struct pmaplist));
+ pml = malloc(sizeof(*pml));
if (pml == NULL) {
- syslog(LOG_ERR, "no memory!");
+ syslog(LOG_ERR, "%m");
exit(1);
}
pml->pml_map = list_pml->pml_map;
@@ -655,7 +655,7 @@ init_transport(struct netconfig *nconf)
/* version 3 registration */
if (!svc_reg(my_xprt, RPCBPROG, RPCBVERS, rpcb_service_3, NULL)) {
syslog(LOG_ERR, "could not register %s version 3",
- nconf->nc_netid);
+ nconf->nc_netid);
goto error;
}
rbllist_add(RPCBPROG, RPCBVERS, nconf, &taddr.addr);
@@ -663,24 +663,24 @@ init_transport(struct netconfig *nconf)
/* version 4 registration */
if (!svc_reg(my_xprt, RPCBPROG, RPCBVERS4, rpcb_service_4, NULL)) {
syslog(LOG_ERR, "could not register %s version 4",
- nconf->nc_netid);
+ nconf->nc_netid);
goto error;
}
rbllist_add(RPCBPROG, RPCBVERS4, nconf, &taddr.addr);
/* decide if bound checking works for this transport */
status = add_bndlist(nconf, &taddr.addr);
-#ifdef BIND_DEBUG
+#ifdef RPCBIND_DEBUG
if (debugging) {
if (status < 0) {
fprintf(stderr, "Error in finding bind status for %s\n",
- nconf->nc_netid);
+ nconf->nc_netid);
} else if (status == 0) {
fprintf(stderr, "check binding for %s\n",
- nconf->nc_netid);
+ nconf->nc_netid);
} else if (status > 0) {
fprintf(stderr, "No check binding for %s\n",
- nconf->nc_netid);
+ nconf->nc_netid);
}
}
#endif
@@ -690,15 +690,15 @@ init_transport(struct netconfig *nconf)
if (!netlink && nconf->nc_semantics == NC_TPI_CLTS) {
status = create_rmtcall_fd(nconf);
-#ifdef BIND_DEBUG
+#ifdef RPCBIND_DEBUG
if (debugging) {
if (status < 0) {
fprintf(stderr,
"Could not create rmtcall fd for %s\n",
- nconf->nc_netid);
+ nconf->nc_netid);
} else {
fprintf(stderr, "rmtcall fd for %s is %d\n",
- nconf->nc_netid, status);
+ nconf->nc_netid, status);
}
}
#endif
@@ -761,13 +761,13 @@ listen_addr(const struct sockaddr *sa)
continue;
switch (sa->sa_family) {
case AF_INET:
- if (memcmp(&SA2SINADDR(sa), &SA2SINADDR(bound_sa[i]),
+ if (memcmp(&SA2SINADDR(sa), &SA2SINADDR(bound_sa[i]),
sizeof(struct in_addr)) == 0)
return (1);
break;
#ifdef INET6
case AF_INET6:
- if (memcmp(&SA2SIN6ADDR(sa), &SA2SIN6ADDR(bound_sa[i]),
+ if (memcmp(&SA2SIN6ADDR(sa), &SA2SIN6ADDR(bound_sa[i]),
sizeof(struct in6_addr)) == 0)
return (1);
break;
@@ -780,8 +780,8 @@ listen_addr(const struct sockaddr *sa)
}
static void
-rbllist_add(rpcprog_t prog, rpcvers_t vers, struct netconfig *nconf,
- struct netbuf *addr)
+rbllist_add(rpcprog_t prog, rpcvers_t vers, const struct netconfig *nconf,
+ struct netbuf *addr)
{
rpcblist_ptr rbl;
@@ -795,7 +795,7 @@ rbllist_add(rpcprog_t prog, rpcvers_t vers, struct netconfig *nconf,
rbl->rpcb_map.r_vers = vers;
rbl->rpcb_map.r_netid = strdup(nconf->nc_netid);
rbl->rpcb_map.r_addr = taddr2uaddr(nconf, addr);
- rbl->rpcb_map.r_owner = strdup(superuser);
+ rbl->rpcb_map.r_owner = strdup(rpcbind_superuser);
rbl->rpcb_next = list_rbl; /* Attach to global list */
list_rbl = rbl;
}
@@ -928,9 +928,9 @@ void
reap(int dummy __unused)
{
int save_errno = errno;
-
+
while (wait3(NULL, WNOHANG, NULL) > 0)
- ;
+ ;
errno = save_errno;
}
diff --git a/usr.sbin/rpcbind/rpcbind.h b/usr.sbin/rpcbind/rpcbind.h
index 28addac494ce..dd49b27efe0d 100644
--- a/usr.sbin/rpcbind/rpcbind.h
+++ b/usr.sbin/rpcbind/rpcbind.h
@@ -80,14 +80,17 @@ extern int rpcbindlockfd;
#ifdef PORTMAP
extern struct pmaplist *list_pml; /* A list of version 2 rpcbind services */
-extern char *udptrans; /* Name of UDP transport */
-extern char *tcptrans; /* Name of TCP transport */
-extern char *udp_uaddr; /* Universal UDP address */
-extern char *tcp_uaddr; /* Universal TCP address */
+extern const char *udptrans; /* Name of UDP transport */
+extern const char *tcptrans; /* Name of TCP transport */
+extern const char *udp_uaddr; /* Universal UDP address */
+extern const char *tcp_uaddr; /* Universal TCP address */
#endif
-int add_bndlist(struct netconfig *, struct netbuf *);
-bool_t is_bound(char *, char *);
+extern const char rpcbind_superuser[];
+extern const char rpcbind_unknown[];
+
+int add_bndlist(const struct netconfig *, struct netbuf *);
+bool_t is_bound(const char *, const char *);
char *mergeaddr(SVCXPRT *, char *, char *, char *);
struct netconfig *rpcbind_get_conf(const char *);
@@ -95,9 +98,10 @@ void rpcbs_init(void);
void rpcbs_procinfo(rpcvers_t, rpcproc_t);
void rpcbs_set(rpcvers_t, bool_t);
void rpcbs_unset(rpcvers_t, bool_t);
-void rpcbs_getaddr(rpcvers_t, rpcprog_t, rpcvers_t, char *, char *);
+void rpcbs_getaddr(rpcvers_t, rpcprog_t, rpcvers_t, const char *,
+ const char *);
void rpcbs_rmtcall(rpcvers_t, rpcproc_t, rpcprog_t, rpcvers_t, rpcproc_t,
- char *, rpcblist_ptr);
+ char *, rpcblist_ptr);
void *rpcbproc_getstat(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
void rpcb_service_3(struct svc_req *, SVCXPRT *);
@@ -106,20 +110,16 @@ void rpcb_service_4(struct svc_req *, SVCXPRT *);
/* Common functions shared between versions */
void *rpcbproc_set_com(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
void *rpcbproc_unset_com(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
-bool_t map_set(RPCB *, char *);
-bool_t map_unset(RPCB *, char *);
+bool_t map_set(RPCB *, const char *);
+bool_t map_unset(RPCB *, const char *);
void delete_prog(unsigned int);
void *rpcbproc_getaddr_com(RPCB *, struct svc_req *, SVCXPRT *, rpcvers_t,
- rpcvers_t);
-void *rpcbproc_gettime_com(void *, struct svc_req *, SVCXPRT *,
- rpcvers_t);
-void *rpcbproc_uaddr2taddr_com(void *, struct svc_req *,
- SVCXPRT *, rpcvers_t);
-void *rpcbproc_taddr2uaddr_com(void *, struct svc_req *, SVCXPRT *,
- rpcvers_t);
-int create_rmtcall_fd(struct netconfig *);
-void rpcbproc_callit_com(struct svc_req *, SVCXPRT *, rpcvers_t,
- rpcvers_t);
+ rpcvers_t);
+void *rpcbproc_gettime_com(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+void *rpcbproc_uaddr2taddr_com(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+void *rpcbproc_taddr2uaddr_com(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+int create_rmtcall_fd(const struct netconfig *);
+void rpcbproc_callit_com(struct svc_req *, SVCXPRT *, rpcvers_t, rpcvers_t);
void my_svc_run(void);
void rpcbind_abort(void);
@@ -156,4 +156,6 @@ struct sockaddr *local_sa(int);
#define SA2SIN6ADDR(sa) (SA2SIN6(sa)->sin6_addr)
#endif
+#define __UNCONST(a) __DECONST(void *, (a))
+
#endif /* rpcbind_h */
diff --git a/usr.sbin/rpcbind/warmstart.c b/usr.sbin/rpcbind/warmstart.c
index 075aebf421f1..e3c075f64a08 100644
--- a/usr.sbin/rpcbind/warmstart.c
+++ b/usr.sbin/rpcbind/warmstart.c
@@ -87,7 +87,7 @@ write_struct(char *filename, xdrproc_t structproc, void *list)
return (FALSE);
}
}
- (void) umask(omask);
+ (void)umask(omask);
xdrstdio_create(&xdrs, fp, XDR_ENCODE);
if (structproc(&xdrs, list) == FALSE) {
@@ -143,9 +143,9 @@ error: fprintf(stderr, "rpcbind: will start from scratch\n");
void
write_warmstart(void)
{
- (void) write_struct(RPCBFILE, (xdrproc_t)xdr_rpcblist_ptr, &list_rbl);
+ (void)write_struct(RPCBFILE, (xdrproc_t)xdr_rpcblist_ptr, &list_rbl);
#ifdef PORTMAP
- (void) write_struct(PMAPFILE, (xdrproc_t)xdr_pmaplist_ptr, &list_pml);
+ (void)write_struct(PMAPFILE, (xdrproc_t)xdr_pmaplist_ptr, &list_pml);
#endif
}
@@ -166,13 +166,13 @@ read_warmstart(void)
ok2 = read_struct(PMAPFILE, (xdrproc_t)xdr_pmaplist_ptr, &tmp_pmapl);
#endif
if (ok2 == FALSE) {
- xdr_free((xdrproc_t) xdr_rpcblist_ptr, (char *)&tmp_rpcbl);
+ xdr_free((xdrproc_t)xdr_rpcblist_ptr, &tmp_rpcbl);
return;
}
- xdr_free((xdrproc_t) xdr_rpcblist_ptr, (char *)&list_rbl);
+ xdr_free((xdrproc_t)xdr_rpcblist_ptr, &list_rbl);
list_rbl = tmp_rpcbl;
#ifdef PORTMAP
- xdr_free((xdrproc_t) xdr_pmaplist_ptr, (char *)&list_pml);
+ xdr_free((xdrproc_t)xdr_pmaplist_ptr, &list_pml);
list_pml = tmp_pmapl;
#endif
}
diff --git a/usr.sbin/uathload/uathload.8 b/usr.sbin/uathload/uathload.8
index 41cb2b4c1da7..7889245058e9 100644
--- a/usr.sbin/uathload/uathload.8
+++ b/usr.sbin/uathload/uathload.8
@@ -23,12 +23,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 11, 2010
+.Dd July 15, 2025
.Dt UATHLOAD 8
.Os
.Sh NAME
.Nm uathload
-.Nd "firmware loader for Atheros USB wireless driver"
+.Nd load firmware for Atheros USB wireless devices
.Sh SYNOPSIS
.Nm
.Op Fl v