git: c03c5b1c8091 - main - zfs: merge openzfs/zfs@a86e08941 (master) into main
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Mar 2022 18:57:48 UTC
The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=c03c5b1c80914ec656fbee84539355d1fad68bf9 commit c03c5b1c80914ec656fbee84539355d1fad68bf9 Merge: 5678114cd8b3 a86e08941567 Author: Martin Matuska <mm@FreeBSD.org> AuthorDate: 2022-03-08 17:52:10 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2022-03-08 17:53:02 +0000 zfs: merge openzfs/zfs@a86e08941 (master) into main Notable upstream pull request merges: #9078: log xattr=sa create/remove/update to ZIL #11919: Cross-platform xattr user namespace compatibility #13014: Report dnodes with faulty bonuslen #13016: FreeBSD: Fix zvol_cdev_open locking #13019: spl: Don't check FreeBSD rwlocks for double initialization #13027: Fix clearing set-uid and set-gid bits on a file when replying a write #13031: Add enumerated vdev names to 'zpool iostat -v' and 'zpool list -v' #13074: Enable encrypted raw sending to pools with greater ashift #13076: Receive checks should allow unencrypted child datasets #13098: Avoid dirtying the final TXGs when exporting a pool #13172: Fix ENOSPC when unlinking multiple files from full pool Obtained from: OpenZFS OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3 cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h | 4 +- cddl/lib/libicp/Makefile | 3 - cddl/lib/libicp_rescue/Makefile | 3 - cddl/lib/libzpool/Makefile | 74 +- stand/libsa/zfs/Makefile.inc | 61 +- .../contrib/opensolaris/uts/common/sys/cmn_err.h | 4 +- .../.github/workflows/build-dependencies.txt | 49 + .../openzfs/.github/workflows/checkstyle.yaml | 32 +- .../workflows/scripts/reclaim_disk_space.sh | 20 + .../.github/workflows/zfs-tests-functional.yml | 43 +- .../openzfs/.github/workflows/zfs-tests-sanity.yml | 47 +- sys/contrib/openzfs/.github/workflows/zloop.yml | 17 +- sys/contrib/openzfs/Makefile.am | 33 +- sys/contrib/openzfs/cmd/Makefile.am | 1 - sys/contrib/openzfs/cmd/fsck_zfs/Makefile.am | 1 - sys/contrib/openzfs/cmd/mount_zfs/mount_zfs.c | 49 +- sys/contrib/openzfs/cmd/raidz_test/raidz_test.c | 11 +- sys/contrib/openzfs/cmd/raidz_test/raidz_test.h | 16 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 76 +- sys/contrib/openzfs/cmd/zdb/zdb_il.c | 25 + sys/contrib/openzfs/cmd/zed/Makefile.am | 1 - sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 179 +- sys/contrib/openzfs/cmd/zed/zed.d/Makefile.am | 3 +- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 2 +- sys/contrib/openzfs/cmd/zed/zed_disk_event.c | 10 + sys/contrib/openzfs/cmd/zfs/zfs_iter.c | 8 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 43 +- sys/contrib/openzfs/cmd/zgenhostid/zgenhostid.c | 2 +- sys/contrib/openzfs/cmd/zhack/zhack.c | 4 +- sys/contrib/openzfs/cmd/zpool/Makefile.am | 1 - sys/contrib/openzfs/cmd/zpool/zpool_main.c | 82 +- .../openzfs/cmd/zpool_influxdb/zpool_influxdb.c | 6 +- sys/contrib/openzfs/cmd/zstream/zstream_dump.c | 13 + sys/contrib/openzfs/cmd/ztest/ztest.c | 24 +- sys/contrib/openzfs/cmd/zvol_id/zvol_id_main.c | 15 + sys/contrib/openzfs/cmd/zvol_wait/Makefile.am | 1 - sys/contrib/openzfs/config/Abigail.am | 25 +- sys/contrib/openzfs/config/Rules.am | 12 +- sys/contrib/openzfs/config/Shellcheck.am | 10 +- sys/contrib/openzfs/config/Substfiles.am | 4 +- .../openzfs/config/always-compiler-options.m4 | 102 +- sys/contrib/openzfs/config/kernel-add-disk.m4 | 26 + sys/contrib/openzfs/config/kernel-blk-queue.m4 | 16 +- .../config/kernel-block-device-operations.m4 | 17 +- sys/contrib/openzfs/config/kernel-fallocate.m4 | 17 + sys/contrib/openzfs/config/kernel-fpu.m4 | 49 +- sys/contrib/openzfs/config/kernel-get-disk-ro.m4 | 4 +- sys/contrib/openzfs/config/kernel-kmem.m4 | 1 + sys/contrib/openzfs/config/kernel-kthread.m4 | 68 + sys/contrib/openzfs/config/kernel-pde-data.m4 | 16 +- sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 22 +- sys/contrib/openzfs/config/kernel.m4 | 117 +- sys/contrib/openzfs/config/toolchain-simd.m4 | 66 + sys/contrib/openzfs/config/zfs-build.m4 | 8 +- sys/contrib/openzfs/configure.ac | 6 +- sys/contrib/openzfs/contrib/Makefile.am | 1 - .../openzfs/contrib/bash_completion.d/Makefile.am | 1 - sys/contrib/openzfs/contrib/bpftrace/Makefile.am | 1 - .../dracut/02zfsexpandknowledge/Makefile.am | 1 - .../dracut/02zfsexpandknowledge/module-setup.sh.in | 6 + .../openzfs/contrib/dracut/90zfs/Makefile.am | 1 - .../openzfs/contrib/dracut/90zfs/export-zfs.sh.in | 18 +- .../contrib/dracut/90zfs/module-setup.sh.in | 161 +- .../openzfs/contrib/dracut/90zfs/mount-zfs.sh.in | 2 +- .../openzfs/contrib/dracut/90zfs/zfs-lib.sh.in | 16 - .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- .../dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +- sys/contrib/openzfs/contrib/dracut/Makefile.am | 2 +- .../openzfs/contrib/dracut/README.dracut.markdown | 225 - sys/contrib/openzfs/contrib/dracut/README.md | 48 + sys/contrib/openzfs/contrib/initramfs/Makefile.am | 4 +- .../{README.initramfs.markdown => README.md} | 0 .../openzfs/contrib/initramfs/hooks/Makefile.am | 1 - .../openzfs/contrib/initramfs/scripts/Makefile.am | 1 - .../initramfs/scripts/local-top/Makefile.am | 1 - .../openzfs/contrib/pam_zfs_key/pam_zfs_key.c | 1 + .../pyzfs/libzfs_core/test/test_libzfs_core.py | 3 +- sys/contrib/openzfs/etc/Makefile.am | 1 - sys/contrib/openzfs/etc/default/Makefile.am | 3 +- sys/contrib/openzfs/etc/init.d/Makefile.am | 3 +- .../etc/systemd/system/zfs-import-cache.service.in | 1 + .../etc/systemd/system/zfs-import-scan.service.in | 1 + .../etc/systemd/system/zfs-mount.service.in | 1 + .../etc/systemd/system/zfs-scrub@.service.in | 3 +- .../etc/systemd/system/zfs-share.service.in | 1 + .../etc/systemd/system/zfs-volume-wait.service.in | 1 + .../openzfs/etc/systemd/system/zfs-zed.service.in | 1 + sys/contrib/openzfs/etc/zfs/Makefile.am | 3 +- sys/contrib/openzfs/include/libuutil.h | 16 +- sys/contrib/openzfs/include/libzfs.h | 4 +- sys/contrib/openzfs/include/libzfs_core.h | 1 + .../openzfs/include/os/freebsd/linux/compiler.h | 2 +- .../openzfs/include/os/freebsd/spl/sys/ccompat.h | 7 +- .../openzfs/include/os/freebsd/spl/sys/ctype.h | 12 +- .../openzfs/include/os/freebsd/spl/sys/debug.h | 75 +- .../openzfs/include/os/freebsd/spl/sys/mod_os.h | 35 +- .../openzfs/include/os/freebsd/spl/sys/rwlock.h | 11 +- .../openzfs/include/os/freebsd/spl/sys/sdt.h | 2 +- .../openzfs/include/os/freebsd/spl/sys/types.h | 2 +- .../include/os/freebsd/zfs/sys/freebsd_crypto.h | 7 +- .../openzfs/include/os/freebsd/zfs/sys/sha2.h | 3 - .../os/linux/kernel/linux/compiler_compat.h | 6 +- .../include/os/linux/kernel/linux/mod_compat.h | 33 +- .../include/os/linux/kernel/linux/simd_x86.h | 124 +- sys/contrib/openzfs/include/os/linux/spl/sys/acl.h | 10 +- .../openzfs/include/os/linux/spl/sys/debug.h | 81 +- .../openzfs/include/os/linux/spl/sys/isa_defs.h | 23 +- .../openzfs/include/os/linux/spl/sys/mutex.h | 3 +- .../openzfs/include/os/linux/spl/sys/rwlock.h | 12 +- .../openzfs/include/os/linux/spl/sys/thread.h | 8 +- .../openzfs/include/os/linux/spl/sys/trace_taskq.h | 26 +- sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 4 + .../openzfs/include/os/linux/zfs/sys/sha2.h | 3 - .../openzfs/include/os/linux/zfs/sys/trace_acl.h | 6 +- .../openzfs/include/os/linux/zfs/sys/trace_arc.h | 39 +- .../include/os/linux/zfs/sys/trace_dbgmsg.h | 6 +- .../openzfs/include/os/linux/zfs/sys/trace_dbuf.h | 18 +- .../openzfs/include/os/linux/zfs/sys/trace_dmu.h | 14 +- .../openzfs/include/os/linux/zfs/sys/trace_dnode.h | 6 +- .../include/os/linux/zfs/sys/trace_multilist.h | 6 +- .../openzfs/include/os/linux/zfs/sys/trace_txg.h | 6 +- .../openzfs/include/os/linux/zfs/sys/trace_vdev.h | 14 +- .../openzfs/include/os/linux/zfs/sys/trace_zil.h | 12 +- .../include/os/linux/zfs/sys/trace_zrlock.h | 6 +- sys/contrib/openzfs/include/sys/arc_impl.h | 13 +- sys/contrib/openzfs/include/sys/crypto/api.h | 367 +- sys/contrib/openzfs/include/sys/crypto/common.h | 408 +- sys/contrib/openzfs/include/sys/dsl_dataset.h | 3 +- sys/contrib/openzfs/include/sys/dsl_pool.h | 1 + sys/contrib/openzfs/include/sys/fs/zfs.h | 73 +- sys/contrib/openzfs/include/sys/lua/lauxlib.h | 3 - sys/contrib/openzfs/include/sys/lua/lua.h | 2 - sys/contrib/openzfs/include/sys/lua/luaconf.h | 2 - sys/contrib/openzfs/include/sys/lua/lualib.h | 2 - sys/contrib/openzfs/include/sys/spa.h | 5 + sys/contrib/openzfs/include/sys/vdev_impl.h | 4 +- sys/contrib/openzfs/include/sys/zfs_context.h | 9 +- sys/contrib/openzfs/include/sys/zfs_sa.h | 2 +- sys/contrib/openzfs/include/sys/zfs_znode.h | 4 +- sys/contrib/openzfs/include/sys/zil.h | 13 +- sys/contrib/openzfs/include/sys/zio.h | 2 +- sys/contrib/openzfs/include/sys/zvol_impl.h | 20 +- sys/contrib/openzfs/include/zfeature_common.h | 1 + sys/contrib/openzfs/include/zfs_fletcher.h | 16 + sys/contrib/openzfs/include/zfs_prop.h | 14 +- sys/contrib/openzfs/lib/libicp/Makefile.am | 3 - sys/contrib/openzfs/lib/libnvpair/Makefile.am | 4 + sys/contrib/openzfs/lib/libnvpair/libnvpair.abi | 7 +- sys/contrib/openzfs/lib/libshare/os/freebsd/nfs.c | 1 + sys/contrib/openzfs/lib/libshare/os/freebsd/smb.c | 5 + sys/contrib/openzfs/lib/libspl/assert.c | 8 +- sys/contrib/openzfs/lib/libspl/atomic.c | 166 +- sys/contrib/openzfs/lib/libspl/include/Makefile.am | 2 +- sys/contrib/openzfs/lib/libspl/include/assert.h | 35 +- .../openzfs/lib/libspl/include/ia32/Makefile.am | 1 - .../lib/libspl/include/ia32/sys/Makefile.am | 3 - .../lib/libspl/include/ia32/sys/asm_linkage.h | 302 - .../openzfs/lib/libspl/include/sys/feature_tests.h | 7 +- .../openzfs/lib/libspl/include/sys/isa_defs.h | 25 +- sys/contrib/openzfs/lib/libspl/include/sys/sha2.h | 3 - sys/contrib/openzfs/lib/libspl/include/sys/simd.h | 1 + sys/contrib/openzfs/lib/libspl/os/linux/zone.c | 2 +- sys/contrib/openzfs/lib/libtpool/Makefile.am | 2 + sys/contrib/openzfs/lib/libtpool/thread_pool.c | 3 +- sys/contrib/openzfs/lib/libuutil/libuutil.abi | 7 +- sys/contrib/openzfs/lib/libuutil/uu_pname.c | 9 +- sys/contrib/openzfs/lib/libzfs/Makefile.am | 2 - sys/contrib/openzfs/lib/libzfs/libzfs.abi | 95 +- sys/contrib/openzfs/lib/libzfs/libzfs_changelist.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c | 9 +- sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 26 +- sys/contrib/openzfs/lib/libzfs/libzfs_impl.h | 12 +- sys/contrib/openzfs/lib/libzfs/libzfs_mount.c | 36 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 11 +- sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 708 +- sys/contrib/openzfs/lib/libzfs/libzfs_util.c | 16 +- .../openzfs/lib/libzfs/os/freebsd/libzfs_compat.c | 20 +- .../openzfs/lib/libzfs/os/freebsd/libzfs_zmount.c | 6 +- .../lib/libzfs/os/linux/libzfs_sendrecv_os.c | 52 - .../openzfs/lib/libzfs_core/libzfs_core.abi | 197 +- sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c | 208 +- .../openzfs/lib/libzfsbootenv/lzbe_device.c | 2 +- sys/contrib/openzfs/lib/libzpool/Makefile.am | 3 - sys/contrib/openzfs/lib/libzpool/kernel.c | 45 +- sys/contrib/openzfs/lib/libzpool/taskq.c | 2 +- sys/contrib/openzfs/lib/libzstd/Makefile.am | 27 +- sys/contrib/openzfs/lib/libzutil/Makefile.am | 2 - .../lib/libzutil/os/linux/zutil_device_path_os.c | 29 +- .../lib/libzutil/os/linux/zutil_import_os.c | 3 + sys/contrib/openzfs/lib/libzutil/zutil_import.c | 4 +- sys/contrib/openzfs/man/man1/raidz_test.1 | 2 +- sys/contrib/openzfs/man/man4/zfs.4 | 53 +- sys/contrib/openzfs/man/man7/zfsconcepts.7 | 4 +- sys/contrib/openzfs/man/man7/zfsprops.7 | 34 +- sys/contrib/openzfs/man/man7/zpool-features.7 | 34 +- sys/contrib/openzfs/man/man7/zpoolprops.7 | 6 +- sys/contrib/openzfs/man/man8/zdb.8 | 24 +- sys/contrib/openzfs/man/man8/zfs-project.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-receive.8 | 4 +- sys/contrib/openzfs/man/man8/zinject.8 | 8 +- sys/contrib/openzfs/man/man8/zpool-import.8 | 7 +- sys/contrib/openzfs/man/man8/zpool-labelclear.8 | 3 +- sys/contrib/openzfs/man/man8/zpool-remove.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-status.8 | 10 +- sys/contrib/openzfs/man/man8/zpool.8 | 6 +- sys/contrib/openzfs/module/Makefile.bsd | 51 +- sys/contrib/openzfs/module/Makefile.in | 13 +- sys/contrib/openzfs/module/avl/avl.c | 4 - sys/contrib/openzfs/module/icp/Makefile.in | 3 - sys/contrib/openzfs/module/icp/algs/modes/cbc.c | 17 +- sys/contrib/openzfs/module/icp/algs/modes/gcm.c | 35 +- sys/contrib/openzfs/module/icp/api/kcf_cipher.c | 793 +- sys/contrib/openzfs/module/icp/api/kcf_ctxops.c | 8 +- sys/contrib/openzfs/module/icp/api/kcf_digest.c | 491 - sys/contrib/openzfs/module/icp/api/kcf_mac.c | 416 +- sys/contrib/openzfs/module/icp/api/kcf_miscapi.c | 127 - sys/contrib/openzfs/module/icp/core/kcf_callprov.c | 1445 +- .../openzfs/module/icp/core/kcf_mech_tabs.c | 538 +- sys/contrib/openzfs/module/icp/core/kcf_prov_lib.c | 68 +- .../openzfs/module/icp/core/kcf_prov_tabs.c | 379 +- sys/contrib/openzfs/module/icp/core/kcf_sched.c | 1627 +- sys/contrib/openzfs/module/icp/illumos-crypto.c | 5 - .../openzfs/module/icp/include/aes/aes_impl.h | 7 - .../openzfs/module/icp/include/modes/modes.h | 6 - .../openzfs/module/icp/include/sys/bitmap.h | 183 - .../module/icp/include/sys/crypto/elfsign.h | 137 - .../openzfs/module/icp/include/sys/crypto/impl.h | 1057 +- .../module/icp/include/sys/crypto/ops_impl.h | 630 - .../module/icp/include/sys/crypto/sched_impl.h | 422 +- .../openzfs/module/icp/include/sys/crypto/spi.h | 572 +- .../module/icp/include/sys/ia32/asm_linkage.h | 146 +- .../openzfs/module/icp/include/sys/modhash.h | 147 - .../openzfs/module/icp/include/sys/modhash_impl.h | 108 - sys/contrib/openzfs/module/icp/io/aes.c | 256 +- sys/contrib/openzfs/module/icp/io/sha2_mod.c | 197 +- sys/contrib/openzfs/module/icp/io/skein_mod.c | 145 +- sys/contrib/openzfs/module/icp/os/modhash.c | 927 - sys/contrib/openzfs/module/icp/spi/kcf_spi.c | 743 +- sys/contrib/openzfs/module/lua/lapi.c | 2 - sys/contrib/openzfs/module/lua/lapi.h | 2 - sys/contrib/openzfs/module/lua/lauxlib.c | 2 - sys/contrib/openzfs/module/lua/lbaselib.c | 2 - sys/contrib/openzfs/module/lua/lcode.c | 2 - sys/contrib/openzfs/module/lua/lcode.h | 2 - sys/contrib/openzfs/module/lua/lcorolib.c | 2 - sys/contrib/openzfs/module/lua/lctype.c | 2 - sys/contrib/openzfs/module/lua/lctype.h | 2 - sys/contrib/openzfs/module/lua/ldebug.c | 2 - sys/contrib/openzfs/module/lua/ldebug.h | 2 - sys/contrib/openzfs/module/lua/ldo.c | 4 +- sys/contrib/openzfs/module/lua/ldo.h | 2 - sys/contrib/openzfs/module/lua/lfunc.c | 2 - sys/contrib/openzfs/module/lua/lfunc.h | 2 - sys/contrib/openzfs/module/lua/lgc.c | 4 +- sys/contrib/openzfs/module/lua/lgc.h | 2 - sys/contrib/openzfs/module/lua/llex.c | 4 +- sys/contrib/openzfs/module/lua/llex.h | 2 - sys/contrib/openzfs/module/lua/llimits.h | 2 - sys/contrib/openzfs/module/lua/lmem.c | 2 - sys/contrib/openzfs/module/lua/lmem.h | 2 - sys/contrib/openzfs/module/lua/lobject.c | 2 - sys/contrib/openzfs/module/lua/lobject.h | 2 - sys/contrib/openzfs/module/lua/lopcodes.c | 2 - sys/contrib/openzfs/module/lua/lopcodes.h | 2 - sys/contrib/openzfs/module/lua/lparser.c | 2 - sys/contrib/openzfs/module/lua/lparser.h | 2 - sys/contrib/openzfs/module/lua/lstate.c | 2 - sys/contrib/openzfs/module/lua/lstate.h | 2 - sys/contrib/openzfs/module/lua/lstring.c | 2 - sys/contrib/openzfs/module/lua/lstring.h | 2 - sys/contrib/openzfs/module/lua/lstrlib.c | 4 +- sys/contrib/openzfs/module/lua/ltable.c | 4 +- sys/contrib/openzfs/module/lua/ltable.h | 2 - sys/contrib/openzfs/module/lua/ltablib.c | 2 - sys/contrib/openzfs/module/lua/ltm.c | 2 - sys/contrib/openzfs/module/lua/ltm.h | 2 - sys/contrib/openzfs/module/lua/lvm.c | 3 - sys/contrib/openzfs/module/lua/lvm.h | 2 - sys/contrib/openzfs/module/lua/lzio.c | 2 - sys/contrib/openzfs/module/lua/lzio.h | 2 - sys/contrib/openzfs/module/os/freebsd/spl/callb.c | 2 +- .../openzfs/module/os/freebsd/spl/spl_zlib.c | 6 +- sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c | 4 +- .../openzfs/module/os/freebsd/zfs/crypto_os.c | 12 +- sys/contrib/openzfs/module/os/freebsd/zfs/hkdf.c | 2 - sys/contrib/openzfs/module/os/freebsd/zfs/spa_os.c | 24 + .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 280 +- .../openzfs/module/os/freebsd/zfs/vdev_geom.c | 11 +- .../openzfs/module/os/freebsd/zfs/zfs_acl.c | 12 +- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 5 +- .../openzfs/module/os/freebsd/zfs/zfs_debug.c | 6 +- .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 19 +- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 318 +- .../openzfs/module/os/freebsd/zfs/zfs_znode.c | 2 +- .../openzfs/module/os/freebsd/zfs/zio_crypt.c | 10 +- .../openzfs/module/os/freebsd/zfs/zvol_os.c | 49 +- sys/contrib/openzfs/module/os/linux/spl/spl-err.c | 6 +- .../openzfs/module/os/linux/spl/spl-generic.c | 18 +- .../openzfs/module/os/linux/spl/spl-kmem-cache.c | 1 - sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c | 2 +- .../openzfs/module/os/linux/spl/spl-kstat.c | 2 +- sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 3 +- .../openzfs/module/os/linux/spl/spl-procfs-list.c | 2 +- .../openzfs/module/os/linux/spl/spl-thread.c | 7 +- sys/contrib/openzfs/module/os/linux/zfs/arc_os.c | 2 - .../openzfs/module/os/linux/zfs/spa_misc_os.c | 24 + .../openzfs/module/os/linux/zfs/vdev_disk.c | 2 +- sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c | 12 +- .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 5 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 39 +- .../openzfs/module/os/linux/zfs/zfs_znode.c | 8 +- .../openzfs/module/os/linux/zfs/zio_crypt.c | 49 +- .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 31 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 139 +- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 159 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 48 +- .../openzfs/module/zcommon/zfeature_common.c | 12 + sys/contrib/openzfs/module/zcommon/zfs_fletcher.c | 8 +- .../module/zcommon/zfs_fletcher_aarch64_neon.c | 2 + .../openzfs/module/zcommon/zfs_fletcher_avx512.c | 2 + .../openzfs/module/zcommon/zfs_fletcher_intel.c | 2 + .../openzfs/module/zcommon/zfs_fletcher_sse.c | 2 + .../module/zcommon/zfs_fletcher_superscalar.c | 4 + .../module/zcommon/zfs_fletcher_superscalar4.c | 4 + sys/contrib/openzfs/module/zcommon/zfs_prop.c | 98 +- sys/contrib/openzfs/module/zcommon/zpool_prop.c | 126 +- sys/contrib/openzfs/module/zcommon/zprop_common.c | 35 +- sys/contrib/openzfs/module/zfs/abd.c | 8 +- sys/contrib/openzfs/module/zfs/arc.c | 17 +- sys/contrib/openzfs/module/zfs/btree.c | 5 +- sys/contrib/openzfs/module/zfs/dbuf.c | 24 +- sys/contrib/openzfs/module/zfs/dbuf_stats.c | 2 - sys/contrib/openzfs/module/zfs/ddt.c | 2 - sys/contrib/openzfs/module/zfs/dmu.c | 3 +- sys/contrib/openzfs/module/zfs/dmu_recv.c | 18 +- sys/contrib/openzfs/module/zfs/dmu_redact.c | 4 +- sys/contrib/openzfs/module/zfs/dmu_send.c | 12 +- sys/contrib/openzfs/module/zfs/dmu_traverse.c | 3 +- sys/contrib/openzfs/module/zfs/dmu_tx.c | 1 - sys/contrib/openzfs/module/zfs/dmu_zfetch.c | 2 - sys/contrib/openzfs/module/zfs/dnode_sync.c | 2 + sys/contrib/openzfs/module/zfs/dsl_crypt.c | 1 - sys/contrib/openzfs/module/zfs/dsl_dataset.c | 305 +- sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 2 - sys/contrib/openzfs/module/zfs/dsl_dir.c | 23 +- sys/contrib/openzfs/module/zfs/dsl_pool.c | 10 +- sys/contrib/openzfs/module/zfs/dsl_prop.c | 2 +- sys/contrib/openzfs/module/zfs/dsl_scan.c | 18 +- sys/contrib/openzfs/module/zfs/edonr_zfs.c | 4 +- sys/contrib/openzfs/module/zfs/hkdf.c | 14 +- sys/contrib/openzfs/module/zfs/metaslab.c | 9 +- sys/contrib/openzfs/module/zfs/mmp.c | 6 +- sys/contrib/openzfs/module/zfs/multilist.c | 2 - sys/contrib/openzfs/module/zfs/skein_zfs.c | 1 - sys/contrib/openzfs/module/zfs/spa.c | 116 +- sys/contrib/openzfs/module/zfs/spa_config.c | 2 - sys/contrib/openzfs/module/zfs/spa_history.c | 1 - sys/contrib/openzfs/module/zfs/spa_log_spacemap.c | 44 +- sys/contrib/openzfs/module/zfs/spa_stats.c | 10 +- sys/contrib/openzfs/module/zfs/txg.c | 10 +- sys/contrib/openzfs/module/zfs/vdev.c | 10 +- sys/contrib/openzfs/module/zfs/vdev_cache.c | 6 +- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 19 +- sys/contrib/openzfs/module/zfs/vdev_initialize.c | 4 +- sys/contrib/openzfs/module/zfs/vdev_label.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_mirror.c | 21 +- sys/contrib/openzfs/module/zfs/vdev_queue.c | 14 +- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 2 - .../openzfs/module/zfs/vdev_raidz_math_scalar.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 6 +- sys/contrib/openzfs/module/zfs/vdev_removal.c | 6 +- sys/contrib/openzfs/module/zfs/vdev_trim.c | 18 +- sys/contrib/openzfs/module/zfs/zap.c | 5 +- sys/contrib/openzfs/module/zfs/zap_leaf.c | 2 - sys/contrib/openzfs/module/zfs/zap_micro.c | 2 - sys/contrib/openzfs/module/zfs/zcp.c | 2 - sys/contrib/openzfs/module/zfs/zcp_get.c | 30 +- sys/contrib/openzfs/module/zfs/zfs_byteswap.c | 13 +- sys/contrib/openzfs/module/zfs/zfs_ioctl.c | 194 +- sys/contrib/openzfs/module/zfs/zfs_log.c | 36 +- sys/contrib/openzfs/module/zfs/zfs_replay.c | 93 +- sys/contrib/openzfs/module/zfs/zfs_sa.c | 29 +- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 114 +- sys/contrib/openzfs/module/zfs/zil.c | 76 +- sys/contrib/openzfs/module/zfs/zio.c | 10 +- sys/contrib/openzfs/module/zfs/zio_inject.c | 5 +- sys/contrib/openzfs/module/zfs/zthr.c | 2 +- sys/contrib/openzfs/module/zfs/zvol.c | 55 +- sys/contrib/openzfs/module/zstd/Makefile.in | 39 +- sys/contrib/openzfs/module/zstd/README.md | 36 +- sys/contrib/openzfs/module/zstd/include/string.h | 1 + .../module/zstd/include/zstd_compat_wrapper.h | 14 + .../openzfs/module/zstd/lib/common/bitstream.h | 454 + .../openzfs/module/zstd/lib/common/compiler.h | 175 + sys/contrib/openzfs/module/zstd/lib/common/cpu.h | 215 + sys/contrib/openzfs/module/zstd/lib/common/debug.h | 114 + .../module/zstd/lib/common/entropy_common.c | 216 + .../openzfs/module/zstd/lib/common/error_private.c | 55 + .../openzfs/module/zstd/lib/common/error_private.h | 80 + sys/contrib/openzfs/module/zstd/lib/common/fse.h | 688 + .../module/zstd/lib/common/fse_decompress.c | 286 + sys/contrib/openzfs/module/zstd/lib/common/huf.h | 340 + sys/contrib/openzfs/module/zstd/lib/common/mem.h | 450 + sys/contrib/openzfs/module/zstd/lib/common/pool.c | 344 + sys/contrib/openzfs/module/zstd/lib/common/pool.h | 84 + .../openzfs/module/zstd/lib/common/xxhash.c | 864 + .../openzfs/module/zstd/lib/common/xxhash.h | 285 + .../openzfs/module/zstd/lib/common/zstd_common.c | 83 + .../module/zstd/lib/{ => common}/zstd_errors.h | 0 .../openzfs/module/zstd/lib/common/zstd_internal.h | 446 + .../module/zstd/lib/compress/fse_compress.c | 698 + .../openzfs/module/zstd/lib/compress/hist.c | 183 + .../openzfs/module/zstd/lib/compress/hist.h | 75 + .../module/zstd/lib/compress/huf_compress.c | 798 + .../module/zstd/lib/compress/zstd_compress.c | 4278 +++ .../zstd/lib/compress/zstd_compress_internal.h | 1125 + .../zstd/lib/compress/zstd_compress_literals.c | 158 + .../zstd/lib/compress/zstd_compress_literals.h | 29 + .../zstd/lib/compress/zstd_compress_sequences.c | 419 + .../zstd/lib/compress/zstd_compress_sequences.h | 54 + .../zstd/lib/compress/zstd_compress_superblock.c | 845 + .../zstd/lib/compress/zstd_compress_superblock.h | 32 + .../openzfs/module/zstd/lib/compress/zstd_cwksp.h | 525 + .../module/zstd/lib/compress/zstd_double_fast.c | 521 + .../module/zstd/lib/compress/zstd_double_fast.h | 38 + .../openzfs/module/zstd/lib/compress/zstd_fast.c | 496 + .../openzfs/module/zstd/lib/compress/zstd_fast.h | 37 + .../openzfs/module/zstd/lib/compress/zstd_lazy.c | 1138 + .../openzfs/module/zstd/lib/compress/zstd_lazy.h | 67 + .../openzfs/module/zstd/lib/compress/zstd_ldm.c | 619 + .../openzfs/module/zstd/lib/compress/zstd_ldm.h | 110 + .../openzfs/module/zstd/lib/compress/zstd_opt.c | 1200 + .../openzfs/module/zstd/lib/compress/zstd_opt.h | 56 + .../module/zstd/lib/decompress/huf_decompress.c | 1248 + .../module/zstd/lib/decompress/zstd_ddict.c | 244 + .../module/zstd/lib/decompress/zstd_ddict.h | 44 + .../module/zstd/lib/decompress/zstd_decompress.c | 1885 ++ .../zstd/lib/decompress/zstd_decompress_block.c | 1432 + .../zstd/lib/decompress/zstd_decompress_block.h | 59 + .../zstd/lib/decompress/zstd_decompress_internal.h | 189 + sys/contrib/openzfs/module/zstd/lib/zstd.c | 27824 ------------------- sys/contrib/openzfs/module/zstd/lib/zstd.h | 37 +- sys/contrib/openzfs/module/zstd/zfs_zstd.c | 8 +- sys/contrib/openzfs/rpm/generic/zfs-kmod.spec.in | 5 +- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 17 +- sys/contrib/openzfs/rpm/redhat/zfs-kmod.spec.in | 5 +- sys/contrib/openzfs/scripts/Makefile.am | 4 +- sys/contrib/openzfs/scripts/cstyle.pl | 5 +- sys/contrib/openzfs/scripts/dkms.mkconf | 22 +- sys/contrib/openzfs/scripts/zfs-tests-color.sh | 27 + sys/contrib/openzfs/scripts/zfs-tests.sh | 56 +- sys/contrib/openzfs/scripts/zloop.sh | 3 +- sys/contrib/openzfs/tests/runfiles/common.run | 22 +- sys/contrib/openzfs/tests/runfiles/freebsd.run | 4 - sys/contrib/openzfs/tests/runfiles/linux.run | 16 + sys/contrib/openzfs/tests/runfiles/sanity.run | 2 +- .../tests/test-runner/bin/test-runner.py.in | 54 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 10 +- .../openzfs/tests/test-runner/man/test-runner.1 | 2 + .../openzfs/tests/zfs-tests/cmd/Makefile.am | 2 + .../openzfs/tests/zfs-tests/cmd/draid/draid.c | 2 +- .../openzfs/tests/zfs-tests/cmd/mkbusy/mkbusy.c | 6 +- .../openzfs/tests/zfs-tests/cmd/mkfile/mkfile.c | 2 +- .../zfs-tests/cmd/read_dos_attributes/.gitignore | 1 + .../zfs-tests/cmd/read_dos_attributes/Makefile.am | 6 + .../cmd/read_dos_attributes/read_dos_attributes.c | 167 + .../zfs-tests/cmd/write_dos_attributes/.gitignore | 1 + .../zfs-tests/cmd/write_dos_attributes/Makefile.am | 6 + .../write_dos_attributes/write_dos_attributes.c | 201 + .../openzfs/tests/zfs-tests/include/commands.cfg | 7 +- .../openzfs/tests/zfs-tests/include/default.cfg.in | 15 + .../openzfs/tests/zfs-tests/include/libtest.shlib | 144 +- .../openzfs/tests/zfs-tests/include/tunables.cfg | 2 + .../tests/zfs-tests/tests/functional/Makefile.am | 2 + .../zfs-tests/tests/functional/acl/off/Makefile.am | 2 - .../zfs-tests/tests/functional/acl/off/dosmode.ksh | 97 +- .../functional/acl/off/dosmode_readonly_write.c | 11 + .../functional/alloc_class/alloc_class_012_pos.ksh | 3 +- .../functional/alloc_class/alloc_class_013_pos.ksh | 4 +- .../cli_root/zdb/zdb_object_range_pos.ksh | 4 +- .../functional/cli_root/zdb/zdb_objset_id.ksh | 30 +- .../tests/functional/cli_root/zfs/zfs_002_pos.ksh | 1 - .../cli_root/zfs_copies/zfs_copies_002_pos.ksh | 2 +- .../functional/cli_root/zfs_destroy/setup.ksh | 4 +- .../zfs_clone_livelist_condense_and_disable.ksh | 6 + .../zfs_clone_livelist_condense_races.ksh | 6 + .../zfs_destroy/zfs_clone_livelist_dedup.ksh | 7 + .../zfs_destroy/zfs_destroy_clone_livelist.ksh | 6 + .../zfs_destroy_dev_removal_condense.ksh | 2 +- .../functional/cli_root/zfs_receive/Makefile.am | 3 +- .../zfs_receive/receive-o-x_props_aliases.ksh | 2 +- .../zfs_receive/receive-o-x_props_override.ksh | 2 +- .../zfs_receive/zfs_receive_-wR-encrypted-mix.ksh | 75 + .../cli_root/zfs_receive/zfs_receive_010_pos.ksh | 4 +- .../zfs_receive/zfs_receive_to_encrypted.ksh | 18 +- .../tests/functional/cli_root/zfs_rename/setup.ksh | 3 +- .../functional/cli_root/zfs_send/zfs_send-b.ksh | 10 +- .../cli_root/zfs_send/zfs_send_003_pos.ksh | 2 +- .../cli_root/zfs_send/zfs_send_004_neg.ksh | 2 +- .../cli_root/zfs_send/zfs_send_005_pos.ksh | 2 +- .../cli_root/zfs_send/zfs_send_007_pos.ksh | 2 +- .../cli_root/zfs_send/zfs_send_encrypted.ksh | 10 +- .../zfs_send/zfs_send_encrypted_unloaded.ksh | 2 +- .../functional/cli_root/zfs_send/zfs_send_raw.ksh | 14 +- .../cli_root/zfs_send/zfs_send_skip_missing.ksh | 5 +- .../cli_root/zfs_snapshot/zfs_snapshot_009_pos.ksh | 7 +- .../functional/cli_root/zpool/zpool_002_pos.ksh | 1 - .../functional/cli_root/zpool/zpool_003_pos.ksh | 1 - .../functional/cli_root/zpool_add/zpool_add.kshlib | 19 +- .../cli_root/zpool_create/zpool_create.shlib | 17 +- .../cli_root/zpool_events/zpool_events_clear.ksh | 3 +- .../cli_root/zpool_expand/zpool_expand_001_pos.ksh | 4 +- .../functional/cli_root/zpool_get/zpool_get.cfg | 1 + .../zpool_import/import_devices_missing.ksh | 4 +- .../zpool_import/import_rewind_config_changed.ksh | 58 +- .../cli_root/zpool_import/zpool_import_errata4.ksh | 2 +- .../cli_root/zpool_trim/zpool_trim_partial.ksh | 2 +- .../zpool_trim/zpool_trim_start_and_cancel_pos.ksh | 2 +- .../tests/functional/deadman/deadman_ratelimit.ksh | 2 +- .../tests/functional/dos_attributes/Makefile.am | 8 + .../tests/functional/dos_attributes/cleanup.ksh | 34 + .../dos_attributes/read_dos_attrs_001.ksh | 60 + .../tests/functional/dos_attributes/setup.ksh | 35 + .../dos_attributes/write_dos_attrs_001.ksh | 61 + .../zfs-tests/tests/functional/events/cleanup.ksh | 2 + .../tests/functional/events/events_002_pos.ksh | 2 +- .../tests/functional/events/zed_fd_spill.ksh | 8 +- .../tests/functional/fault/decrypt_fault.ksh | 1 + .../features/large_dnode/large_dnode_005_pos.ksh | 2 +- .../tests/functional/history/history_006_neg.ksh | 4 +- .../functional/inheritance/inherit_001_pos.ksh | 4 +- .../tests/functional/mv_files/mv_files_001_pos.ksh | 1 - .../tests/functional/mv_files/mv_files_002_pos.ksh | 1 - .../functional/mv_files/mv_files_common.kshlib | 55 +- .../zfs-tests/tests/functional/mv_files/setup.ksh | 24 +- .../tests/functional/no_space/Makefile.am | 3 +- .../tests/functional/no_space/enospc_002_pos.ksh | 3 - .../tests/functional/no_space/enospc_rm.ksh | 60 + .../tests/functional/online_offline/setup.ksh | 2 - .../zfs-tests/tests/functional/pam/pam_basic.ksh | 4 + .../tests/functional/pam/pam_nounmount.ksh | 4 + .../tests/functional/pam/pam_short_password.ksh | 4 + .../pool_checkpoint/checkpoint_ro_rewind.ksh | 4 +- .../projectquota/projecttree_002_pos.ksh | 3 +- .../tests/functional/projectquota/setup.ksh | 2 + .../tests/functional/pyzfs/pyzfs_unittest.ksh.in | 4 + .../zfs-tests/tests/functional/quota/setup.ksh | 4 +- .../redacted_send/redacted_incrementals.ksh | 14 +- .../redacted_send/redacted_largeblocks.ksh | 2 +- .../functional/redacted_send/redacted_negative.ksh | 8 +- .../functional/redacted_send/redacted_resume.ksh | 2 +- .../tests/functional/redundancy/redundancy.kshlib | 4 +- .../functional/redundancy/redundancy_draid.ksh | 2 +- .../redundancy/redundancy_draid_damaged.ksh | 6 +- .../functional/redundancy/redundancy_raidz.ksh | 2 +- .../zfs-tests/tests/functional/refquota/setup.ksh | 4 +- .../tests/functional/refreserv/refreserv_raidz.ksh | 2 +- .../zfs-tests/tests/functional/refreserv/setup.ksh | 4 +- .../functional/removal/removal_with_errors.ksh | 1 + .../functional/removal/removal_with_export.ksh | 1 + .../tests/functional/removal/removal_with_send.ksh | 2 +- .../tests/functional/replacement/setup.ksh | 2 - .../tests/functional/reservation/setup.ksh | 1 + .../zfs-tests/tests/functional/rsend/Makefile.am | 2 + .../tests/functional/rsend/recv_dedup.ksh | 3 +- .../zfs-tests/tests/functional/rsend/rsend.kshlib | 6 +- .../tests/functional/rsend/rsend_009_pos.ksh | 4 +- .../tests/functional/rsend/rsend_016_neg.ksh | 11 +- .../tests/functional/rsend/send_invalid.ksh | 2 +- .../functional/rsend/send_partial_dataset.ksh | 4 +- .../tests/functional/rsend/send_raw_ashift.ksh | 193 + .../functional/rsend/send_raw_spill_block.ksh | 161 + .../zfs-tests/tests/functional/simd/Makefile.am | 2 + .../tests/functional/simd/simd_supported.ksh | 58 + .../zfs-tests/tests/functional/slog/Makefile.am | 3 +- .../tests/functional/slog/slog_016_pos.ksh | 157 + .../tests/functional/slog/slog_replay_fs_001.ksh | 6 +- .../tests/functional/slog/slog_replay_fs_002.ksh | 6 +- .../tests/functional/snapshot/snapshot_002_pos.ksh | 39 +- .../tests/functional/snapshot/snapshot_006_pos.ksh | 39 +- .../tests/functional/snapshot/snapshot_014_pos.ksh | 3 + .../zfs-tests/tests/functional/suid/Makefile.am | 1 + .../tests/functional/suid/suid_write_to_file.c | 150 +- .../tests/functional/suid/suid_write_to_none.ksh | 2 +- .../tests/functional/suid/suid_write_to_sgid.ksh | 2 +- .../tests/functional/suid/suid_write_to_suid.ksh | 2 +- .../functional/suid/suid_write_to_suid_sgid.ksh | 2 +- .../functional/suid/suid_write_zil_replay.ksh | 99 + .../tests/functional/tmpfile/tmpfile_002_pos.c | 6 +- .../zfs-tests/tests/functional/userquota/setup.ksh | 4 +- .../userquota/userspace_send_encrypted.ksh | 2 +- .../functional/vdev_zaps/vdev_zaps_004_pos.ksh | 1 + .../tests/functional/write_dirs/setup.ksh | 4 +- .../zfs-tests/tests/functional/xattr/Makefile.am | 3 +- .../zfs-tests/tests/functional/xattr/setup.ksh | 4 +- .../tests/functional/xattr/xattr_compat.ksh | 92 + .../zvol/zvol_misc/zvol_misc_volmode.ksh | 49 +- sys/modules/zfs/Makefile | 100 +- 598 files changed, 31738 insertions(+), 43822 deletions(-) diff --cc cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h index 974d22459991,000000000000..612c9f25a5a0 mode 100644,000000..100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h @@@ -1,448 -1,0 +1,448 @@@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _CTFTOOLS_H +#define _CTFTOOLS_H + +/* + * Functions and data structures used in the manipulation of stabs and CTF data + */ + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <libelf.h> +#include <gelf.h> +#include <pthread.h> + +#include <sys/ccompile.h> +#include <sys/endian.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#include "list.h" +#include "hash.h" + +#ifndef DEBUG_LEVEL +#define DEBUG_LEVEL 0 +#endif + +#ifndef DEBUG_STREAM +#define DEBUG_STREAM stderr +#endif + +#ifndef MAX +#define MAX(a, b) ((a) < (b) ? (b) : (a)) +#endif + +#ifndef MIN +#define MIN(a, b) ((a) > (b) ? (b) : (a)) +#endif + +/* Sanity check for cross-build bootstrap tools */ +#if !defined(BYTE_ORDER) +#error "Missing BYTE_ORDER defines" +#elif !defined(_LITTLE_ENDIAN) +#error "Missing _LITTLE_ENDIAN defines" +#elif !defined(_BIG_ENDIAN) +#error "Missing _BIG_ENDIAN defines" +#endif + +#define TRUE 1 +#define FALSE 0 + +#define CTF_ELF_SCN_NAME ".SUNW_ctf" + +#define CTF_LABEL_LASTIDX -1 + +#define CTF_DEFAULT_LABEL "*** No Label Provided ***" + +/* + * Default hash sizes + */ +#define TDATA_LAYOUT_HASH_SIZE 8191 /* A tdesc hash based on layout */ +#define TDATA_ID_HASH_SIZE 997 /* A tdesc hash based on type id */ +#define IIDESC_HASH_SIZE 8191 /* Hash of iidesc's */ + +/* + * The default function argument array size. We'll realloc the array larger + * if we need to, but we want a default value that will allow us to avoid + * reallocation in the common case. + */ +#define FUNCARG_DEF 5 + +extern const char *progname; +extern int debug_level; +extern char *curhdr; + +/* + * This is a partial copy of the stab.h that DevPro includes with their + * compiler. + */ +typedef struct stab { + uint32_t n_strx; + uint8_t n_type; + int8_t n_other; + int16_t n_desc; + uint32_t n_value; +} stab_t; + +#define N_GSYM 0x20 /* global symbol: name,,0,type,0 */ +#define N_FUN 0x24 /* procedure: name,,0,linenumber,0 */ +#define N_STSYM 0x26 /* static symbol: name,,0,type,0 or section relative */ +#define N_LCSYM 0x28 /* .lcomm symbol: name,,0,type,0 or section relative */ +#define N_ROSYM 0x2c /* ro_data: name,,0,type,0 or section relative */ +#define N_OPT 0x3c /* compiler options */ +#define N_RSYM 0x40 /* register sym: name,,0,type,register */ +#define N_SO 0x64 /* source file name: name,,0,0,0 */ +#define N_LSYM 0x80 /* local sym: name,,0,type,offset */ +#define N_SOL 0x84 /* #included file name: name,,0,0,0 */ +#define N_PSYM 0xa0 /* parameter: name,,0,type,offset */ +#define N_LBRAC 0xc0 /* left bracket: 0,,0,nesting level,function relative */ +#define N_RBRAC 0xe0 /* right bracket: 0,,0,nesting level,func relative */ +#define N_BINCL 0x82 /* header file: name,,0,0,0 */ +#define N_EINCL 0xa2 /* end of include file */ + +/* + * Nodes in the type tree + * + * Each node consists of a single tdesc_t, with one of several auxiliary + * structures linked in via the `data' union. + */ + +/* The type of tdesc_t node */ +typedef enum stabtype { + STABTYPE_FIRST, /* do not use */ + INTRINSIC, + POINTER, + ARRAY, + FUNCTION, + STRUCT, + UNION, + ENUM, + FORWARD, + TYPEDEF, + TYPEDEF_UNRES, + VOLATILE, + CONST, + RESTRICT, + STABTYPE_LAST /* do not use */ +} stabtype_t; + +typedef struct tdesc tdesc_t; + +/* Auxiliary structure for array tdesc_t */ +typedef struct ardef { + tdesc_t *ad_contents; + tdesc_t *ad_idxtype; + uint_t ad_nelems; +} ardef_t; + +/* Auxiliary structure for structure/union tdesc_t */ +typedef struct mlist { + int ml_offset; /* Offset from start of structure (in bits) */ + int ml_size; /* Member size (in bits) */ + char *ml_name; /* Member name */ + struct tdesc *ml_type; /* Member type */ + struct mlist *ml_next; /* Next member */ +} mlist_t; + +/* Auxiliary structure for enum tdesc_t */ +typedef struct elist { + char *el_name; + int el_number; + struct elist *el_next; +} elist_t; + +/* Auxiliary structure for intrinsics (integers and reals) */ +typedef enum { + INTR_INT, + INTR_REAL +} intrtype_t; + +typedef struct intr { + intrtype_t intr_type; + int intr_signed; + union { + char _iformat; + int _fformat; + } _u; + int intr_offset; + int intr_nbits; +} intr_t; + +#define intr_iformat _u._iformat +#define intr_fformat _u._fformat + +typedef struct fnarg { + char *fna_name; + struct tdesc *fna_type; +} fnarg_t; + +#define FN_F_GLOBAL 0x1 +#define FN_F_VARARGS 0x2 + +typedef struct fndef { + struct tdesc *fn_ret; + uint_t fn_nargs; + tdesc_t **fn_args; + uint_t fn_vargs; +} fndef_t; + +typedef int32_t tid_t; + +/* + * The tdesc_t (Type DESCription) is the basic node type used in the stabs data + * structure. Each data node gets a tdesc structure. Each node is linked into + * a directed graph (think of it as a tree with multiple roots and multiple + * leaves), with the root nodes at the top, and intrinsics at the bottom. The + * root nodes, which are pointed to by iidesc nodes, correspond to the types, + * globals, and statics defined by the stabs. + */ +struct tdesc { + char *t_name; + tdesc_t *t_next; /* Name hash next pointer */ + + tid_t t_id; + tdesc_t *t_hash; /* ID hash next pointer */ + + stabtype_t t_type; + int t_size; /* Size in bytes of object represented by this node */ + + union { + intr_t *intr; /* int, real */ + tdesc_t *tdesc; /* ptr, typedef, vol, const, restr */ + ardef_t *ardef; /* array */ + mlist_t *members; /* struct, union */ + elist_t *emem; /* enum */ + fndef_t *fndef; /* function - first is return type */ + } t_data; + + int t_flags; + int t_vgen; /* Visitation generation (see traverse.c) */ + int t_emark; /* Equality mark (see equiv_cb() in merge.c) */ +}; + +#define t_intr t_data.intr +#define t_tdesc t_data.tdesc +#define t_ardef t_data.ardef +#define t_members t_data.members +#define t_emem t_data.emem +#define t_fndef t_data.fndef + +#define TDESC_F_ISROOT 0x1 /* Has an iidesc_t (see below) */ +#define TDESC_F_GLOBAL 0x2 +#define TDESC_F_RESOLVED 0x4 + +/* + * iidesc_t (Interesting Item DESCription) nodes point to tdesc_t nodes that + * correspond to "interesting" stabs. A stab is interesting if it defines a + * global or static variable, a global or static function, or a data type. + */ +typedef enum iitype { + II_NOT = 0, + II_GFUN, /* Global function */ + II_SFUN, /* Static function */ + II_GVAR, /* Global variable */ + II_SVAR, /* Static variable */ + II_PSYM, /* Function argument */ + II_SOU, /* Struct or union */ + II_TYPE /* Type (typedef) */ +} iitype_t; + +typedef struct iidesc { + iitype_t ii_type; + char *ii_name; + tdesc_t *ii_dtype; + char *ii_owner; /* File that defined this node */ + int ii_flags; + + /* Function arguments (if any) */ + int ii_nargs; + tdesc_t **ii_args; + int ii_vargs; /* Function uses varargs */ +} iidesc_t; + +#define IIDESC_F_USED 0x1 /* Write this iidesc out */ + +/* + * labelent_t nodes identify labels and corresponding type ranges associated + * with them. The label in a given labelent_t is associated with types with + * ids <= le_idx. + */ +typedef struct labelent { + char *le_name; + int le_idx; +} labelent_t; + +/* + * The tdata_t (Type DATA) structure contains or references all type data for + * a given file or, during merging, several files. + */ +typedef struct tdata { + int td_curemark; /* Equality mark (see merge.c) */ + int td_curvgen; /* Visitation generation (see traverse.c) */ + int td_nextid; /* The ID for the next tdesc_t created */ + hash_t *td_iihash; /* The iidesc_t nodes for this file */ + + hash_t *td_layouthash; /* The tdesc nodes, hashed by structure */ + hash_t *td_idhash; /* The tdesc nodes, hashed by type id */ + list_t *td_fwdlist; /* All forward declaration tdesc nodes */ + + char *td_parlabel; /* Top label uniq'd against in parent */ + char *td_parname; /* Basename of parent */ + list_t *td_labels; /* Labels and their type ranges */ + + pthread_mutex_t td_mergelock; + + int td_ref; +} tdata_t; + +/* + * By design, the iidesc hash is heterogeneous. The CTF emitter, on the + * other hand, needs to be able to access the elements of the list by type, + * and in a specific sorted order. An iiburst holds these elements in that + * order. (A burster is a machine that separates carbon-copy forms) + */ +typedef struct iiburst { + int iib_nfuncs; + int iib_curfunc; + iidesc_t **iib_funcs; + + int iib_nobjts; + int iib_curobjt; + iidesc_t **iib_objts; + + list_t *iib_types; + int iib_maxtypeid; + + tdata_t *iib_td; + struct tdtrav_data *iib_tdtd; /* tdtrav_data_t */ +} iiburst_t; + +typedef struct ctf_buf ctf_buf_t; + +typedef struct symit_data symit_data_t; + *** 1717 LINES SKIPPED ***