aboutsummaryrefslogtreecommitdiff
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* zfs: unbreak build broken in 160388166Martin Matuska2021-06-087-63/+13
|
* zfs: merge openzfs/zfs@75b4cbf62 (master) into mainMartin Matuska2021-06-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #11710 Allow zfs to send replication streams with missing snapshots #11751 Avoid taking global lock to destroy zfsdev state #11786 Ratelimit deadman zevents as with delay zevents #11803 ZFS traverse_visitbp optimization to limit prefetch #11813 Allow pool names that look like Solaris disk names #11822 Atomically check and set dropped zevent count #11822 Don't scale zfs_zevent_len_max by CPU count #11833 Refactor zfsdev state init/destroy to share common code #11837 zfs get -p only outputs 3 columns if "clones" property is empty #11843 libzutil: zfs_isnumber(): return false if input empty #11849 Use dsl_scan_setup_check() to setup a scrub #11861 Improvements to the 'compatibility' property #11862 cmd/zfs receive: allow dry-run (-n) to check property args #11864 receive: don't fail inheriting (-x) properties on wrong dataset type #11877 Combine zio caches if possible #11881 FreeBSD: use vnlru_free_vfsops if available #11883 FreeBSD: add support for lockless symlink lookup #11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr #11896 Fix crash in zio_done error reporting #11905 zfs-send(8): Restore sorting of flags #11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir #11930 vdev_mirror: don't scrub/resilver devices that can't be read #11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines #11955 zfs get: don't lookup mount options when using "-s local" #11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl #11959 vdev_id: variable not getting expanded under map_slot() #11966 Scale worker threads and taskqs with number of CPUs #11994 Clean up use of zfs_log_create in zfs_dir #11997 FreeBSD: Don't force xattr mount option #11997 FreeBSD: Implement xattr=sa #11997 FreeBSD: Use SET_ERROR to trace xattr name errors #11998 Simplify/fix dnode_move() for dn_zfetch #12003 FreeBSD: Initialize/destroy zp->z_lock #12010 Fix dRAID self-healing short columns #12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots" #12040 Reinstate the old zpool read label logic as a fallback #12046 Improve scrub maxinflight_bytes math #12049 FreeBSD: avoid memory allocation in arc_prune_async #12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI #12061 Fix dRAID sequential resilver silent damage handling #12072 Let zfs diff be more permissive #12077 FreeBSD: Retry OCF ENOMEM errors. #12088 Propagate vdev state due to invalid label corruption #12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat #12097 FreeBSD: Update dataset_kstats for zvols in dev mode #12104 FreeBSD boot code reminder after zpool upgrade #12114 Introduce write-mostly sums Obtained from: OpenZFS OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3
* Delete obsolete Solaris compat filesAlan Somers2021-05-248-1487/+0
| | | | | | | | | These files have been unused ever since the OpenSolaris import Sponsored by: Axcient MFC after: 2 weeks Reviewed By: freqlabs Differential Revision: https://reviews.freebsd.org/D30371
* dtrace tests: Fix tst.system.d after ping/ping6 unificationMark Johnston2021-04-231-3/+3
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* dtrace: Document the libdir, nolibs and syslibdir optionsDomagoj Stolfa2021-04-021-1/+9
| | | | | MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29541
* libctf: Adjust logic to match upstream after 410556f1fMark Johnston2021-03-281-3/+3
| | | | | | | No functional change intended. Suggested by: jrtc27 MFC after: 1 week
* libctf: Fix an out-of-bounds read in ctf_lookup_by_name()Domagoj Stolfa2021-03-271-2/+3
| | | | | | | | | | | | | | | | When prefixes such as struct, union, etc. are compared with the current type (e.g. struct foo), a comparison is made with the prefix. The code currently assumes that every type is a valid C type with a prefix, however at times, garbage ends up in this function causing an unpredictable crash with DTrace due to the isspace(*p) call or subsequent calls. An example that I've seen of this is the letter 's' being passed in, comparing true with struct as the comparison size was (q - p) == 1, but then we increment p with the length of "struct", resulting in an out of bounds read. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29435
* pkgbase: Move libicp in utilitiesEmmanuel Vadot2021-03-162-2/+2
| | | | | | | | | libicp is used by zdb zhack zinject zstream ztest libzpool.so.2 which are all in FreeBSD-utilities. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D29164 MFC after: 2 weeks
* openzfs: attach pam_zfs_key to buildGreg V2021-03-022-1/+34
| | | | | | | | | | | | | | | This PAM module allows unlocking encrypted user home datasets when logging in (and changing passphrase when changing the account password), see https://github.com/openzfs/zfs/pull/9903 Also supposed to unload the key when the last session for the user is done, but there are EBUSY issues: https://github.com/openzfs/zfs/issues/11222#issuecomment-731897858 Submitted by: Greg V <greg_unrelenting.technology> Reviewed by: mm MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28018
* Install links for zpool feature compat aliasesRyan Moeller2021-02-251-0/+21
| | | | | | | | | | The alias links were missed when this feature was introduced to the FreeBSD build system in 10f57cb98fd61b2669640a84aa73ad118601f281. Reviewed by: mm MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D28925
* zfs: merge OpenZFS master-9312e0fd1Martin Matuska2021-02-221-0/+1
| | | | | | | | | | | Notable upstream changes: 778869fa1 Fix reporting of mount progress e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD 03e02e5b5 Fix checksum errors not being counted on repeated repair 64e0fe14f Restore FreeBSD resource usage accounting 11f2e9a49 Fix panic if scrubbing after removing a slog device MFC after: 2 weeks
* libdtrace: Trivial style fixes to force dt_lex.c to be regeneratedMark Johnston2021-02-201-9/+10
| | | | | | | | | After commit 8ba333e02e ("libdtrace: Stop relying on lex compatibility"), there have been several reports of incremental buildworlds failing since make does not know that dt_lex.c needs to be regenerated, and I want to avoid this when merging to stable/13. MFC with: 8ba333e02e
* zfs: bump version and install new share filesMartin Matuska2021-02-186-2/+55
| | | | | | | | - bump version to 2.0.0-FreeBSD_gbf156c966 - install definition files for the new "-o compatibility" option to "zpool create" MFC after: 2 weeks
* libdtrace: Stop relying on lex compatibilityMark Johnston2021-02-172-3/+1
| | | | | | | | | | It does not appear to be required, and as of commit 6b7e592c215f ("lex: Do not let input() return 0 when end-of-file is reached") it causes input to return 0 instead of EOF when end-of-input is reached. PR: 253440 MFC after: 3 days Sponsored by: The FreeBSD Foundation
* zfs: merge OpenZFS master-436ab35a5Martin Matuska2021-02-162-2/+0
| | | | | | | | | | | - speed up writing to ZFS pools without ZIL devices (aa755b3) - speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a) ... MFC after: 2 weeks Reviewed by: mjg (partial) Tested by: pho Differential Revision: https://reviews.freebsd.org/D28677
* build: remove LIBPTHREAD/LIBTHR build optionsKyle Evans2021-01-223-6/+0
| | | | | | | | | | | | | | | | | | WITHOUT_LIBTHR has been broken for a little over five years now, since the xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building a useful system without threading support is becoming increasingly more difficult. Additionally, in the five plus years that it's been broken more reverse dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among others) that make it more and more difficult to reconcile the effort needed to fix these options. Remove the broken options. PR: 252760 Reviewed by: brooks, emaste, kib Differential Revision: https://reviews.freebsd.org/D28263
* dtrace tests: fix prototypes for gcc buildRyan Libby2021-01-114-6/+9
| | | | | | | | | - quiet -Wstrict-prototypes - provide prototypes for weak aliases Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28036
* libdtrace: Format USDT symbols correctly based on symbol bindingMark Johnston2021-01-101-4/+10
| | | | | | | | | | | Before we did not handle weak symbols correctly, sometimes resulting in link errors from dtrace -G when processing object files where functions with weak aliases contain USDT probes. Reported by: rlibby Tested by: rlibby MFC after: 1 week Sponsored by: The FreeBSD Foundation
* OpenZFS: Fix issues caused by reversed commits + rebaseMatt Macy2021-01-081-0/+2
|
* Install dtrace.h and dependenciesAlex Richardson2021-01-071-0/+7
| | | | | | | | | | | | | This makes the minimum amount of changes to allow inclusion of dtrace.h without all the solaris compatibility headers. Installing dtrace.h allows compiling consumers of libdtrace (e.g. https://github.com/tmetsch/python-dtrace) without requiring a copy of the source tree. For python-dtrace I worked around this in https://github.com/tmetsch/python-dtrace/commit/58019c9a12022203a9ffda286dd8b41f1a5ace42 but being able to build the library without installed sources would be extremely useful. Reviewed By: gnn Differential Revision: https://reviews.freebsd.org/D27884
* dtrace: honor LC_NUMERIC for %'d and alike, and LC_TIME for %TAndriy Gapon2020-12-031-0/+9
| | | | | | | | | | | | | Note that the public documentation on dtrace.org fails to mention %T and incorrectly documents %Y. The latter actually uses format "%Y %b %e %T" where %b is always in C locale. Discussed with: markj MFC after: 1 month Sponsored by: Panzura Notes: svn path=/head/; revision=368300
* When copying types from one CTF container to another, ensure that weJonathan T. Looney2020-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | encode 0-length (i.e. "") structure and union member names as offset 0. This ensures that we don't confuse other parts of the CTF code which expect this encoding. This resolves a Dtrace error resolving members of anonymous structs/unions within the (struct mbuf) type which some users were seeing after r366908. While here, update the code in ctf_add_generic() to encode 0-length type names as offset 0. Reviewed by: markj MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27246 Notes: svn path=/head/; revision=367905
* When copying types from one CTF container to another, ensure that weJonathan T. Looney2020-11-171-1/+22
| | | | | | | | | | | | | | | | | | | | always copy intrinsic data types before copying bitfields which are based on those types. This ensures the type ordering in the destination CTF container matches the assumption made elsewhere in the CTF code that instrinsic data types will always appear before bitfields based on those types. This resolves the following error message some users have seen after r366908: "/usr/lib/dtrace/ipfw.d", line 121: failed to copy type of 'ip6p': Conflicting type is already defined Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27213 Notes: svn path=/head/; revision=367763
* Add missing includes of src.opts.mkBrooks Davis2020-11-161-0/+2
| | | | | | | | | | Without this "SUBDIR.${MK_TESTS}=tests" would always expand to "SUBDIR.=tests" resulting in the tests not being built. Sponsored by: DARPA Notes: svn path=/head/; revision=367728
* Do a sweep and remove most WARNS=6 settingsKyle Evans2020-10-011-2/+0
| | | | | | | | | | | | | | | Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas and introduced a WARNS=7 and wanted to try lifting the default to that. Drop most of them; there is one in the blake2 kernel module, but I suspect it should be dropped -- the default WARNS in the rest of the build doesn't currently apply to kernel modules, and I haven't put too much thought into whether it makes sense to make it so. Notes: svn path=/head/; revision=366304
* loader: zfs should support bootonce an nextbootToomas Soome2020-09-213-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag. By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE. By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active. bootonce dataset name is recorded in boot pool labels, bootenv area. in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot. bootonce and nextboot features are usable in both UEFI and BIOS boot. To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools). At this time, only lua loader is updated. Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512 Notes: svn path=/head/; revision=365938
* Address compiler warnings in C code used by the DTrace test suite.Mark Johnston2020-09-1933-112/+105
| | | | | | | | Reported by: Jenkins MFC after: 1 week Notes: svn path=/head/; revision=365907
* Fix dtrace tools bootstrap on non-FreeBSD after OpenZFS importAlex Richardson2020-09-191-2/+4
| | | | | | | | | | | | This required surprisingly few build system changes and only two changes to the openZFS compat headers which have been upstreamed as https://github.com/openzfs/zfs/pull/10863 Reviewed By: #zfs, freqlabs Differential Revision: https://reviews.freebsd.org/D26193 Notes: svn path=/head/; revision=365901
* MFV 2.0-rc2Matt Macy2020-09-181-0/+1
| | | | | | | | - Fixes divide by zero for unusual hz - remove cryptodev dependency Notes: svn path=/head/; revision=365894
* Use MACHINE_CPUARCH when checking for arm64Andrew Turner2020-09-142-2/+2
| | | | | | | | | | | | | | | Use MACHINE_CPUARCH with arm64 (aarch64) when we build code that could run on any 64-bit Arm instruction set. This will simplify checks in downstream consumers targeting prototype instruction sets. The only place we check for MACHINE_ARCH == aarch64 is when building the device tree blobs. As these are targeting current generation ISAs. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26370 Notes: svn path=/head/; revision=365726
* Remove -I flag for include path that doesn't existAlex Richardson2020-09-1010-10/+0
| | | | | | | | | | Found this while trying to get macOS bootstrap to work again after OpenZFS merge. Reviewed By: #zfs, freqlabs Differential Revision: https://reviews.freebsd.org/D26192 Notes: svn path=/head/; revision=365580
* Use MLINKS where appropriate for zfs/zpool subcommand pagesRyan Moeller2020-09-022-14/+16
| | | | | | | | Reported by: Julian H. Stacey Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=365250
* Ensure zstreamdump subdir can be visitedRyan Moeller2020-09-011-0/+1
| | | | | | | | Reported by: Thomas Laus Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=365057
* Correct the D definition for EINTEGRITY.Mark Johnston2020-09-011-1/+1
| | | | | | | | | MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Notes: svn path=/head/; revision=365047
* libzfs: Add missing crypto dependencyRyan Moeller2020-08-271-1/+15
| | | | | | | | | | libzfs_crypto.c uses PKCS5_PBKDF2_HMAC_SHA1 from libcrypto. Reported by: John Kennedy Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364861
* Move zstd sources from libzfs to libzpoolRyan Moeller2020-08-262-6/+8
| | | | | | | | | | | | | | zstd is kernel code that was not supposed to be in libzfs. libzpool provides userland shims for kernel code and is where the zstd code needs to be included. Reported by: John Kennedy Discussed with: mmacy Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364830
* Tidy up libzpool MakefileRyan Moeller2020-08-261-21/+20
| | | | | | | Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364829
* Install zfs-events.5Ryan Moeller2020-08-261-0/+1
| | | | | | | Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364821
* [PowerPC] Apply the ppc32 GOT overflow fix to powerpcspeBrandon Bergren2020-08-251-1/+1
| | | | | | | | | | powerpcspe is also a 32 bit ppc platform, and also needs to be -fPIC to avoid overflowing the GOT. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=364780
* Fix libzfs build failures for someMatt Macy2020-08-251-1/+0
| | | | | | | | In some environments adding zstd/include to the include path would cause zstd's stdlib.h to hide the system one. Notes: svn path=/head/; revision=364751
* Merge OpenZFS support in to HEAD.Matt Macy2020-08-25118-75626/+1079
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort. I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak. Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream. Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression. Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872 Notes: svn path=/head/; revision=364746
* Fix a typo in r364438 affecting 32-bit platforms.Mark Johnston2020-08-221-4/+4
| | | | | | | | Reported by: antoine MFC with: r364438 Notes: svn path=/head/; revision=364483
* Fix a typo in r364438.Mark Johnston2020-08-201-1/+1
| | | | | | | | Reported by: Jenkins MFC with: r364438 Notes: svn path=/head/; revision=364440
* Enable creation of static userspace probes in incremental builds.Mark Johnston2020-08-204-69/+89
| | | | | | | | | | | | | | | | | | To define USDT probes, dtrace -G makes use of relocations for undefined symbols: the target address is overwritten with NOPs and the location is recorded in the DOF section of the output object file. To avoid link errors, the original relocation is destroyed. However, this means that the same input object file cannot be processed multiple times, as happens during incremental rebuilds. Instead, only set the relocation type to NONE, so that all information required to reconstruct USDT probes is preserved. Reported by: bdrewery MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=364438
* Remove non-FreeBSD ifdefs from dt_link.c.Mark Johnston2020-08-201-250/+19
| | | | | | | | | | | | This file is too complicated as it is and has diverged a fair bit from illumos due to toolchain differences, so just drop unused code (including SPARC support). MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=364437
* zfs: fix EIO accessing dataset after resuming interrupted receiveAlan Somers2020-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | ZFS unmounts a dataset while receiving into it and remounts it afterwards. But if ZFS is resuming an incomplete receive, it screws up and ends up with a dataset that is mounted, but returns EIO for every access. This commit fixes that condition. While the vulnerable code also exists in OpenZFS, the problem is not reproducible there. Apparently OpenZFS doesn't unmount the destination dataset during receive, like FreeBSD does. PR: 248606 Reviewed by: mmacy MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D26034 Notes: svn path=/head/; revision=364412
* Fix libdtrace build with zsh as /bin/shAlex Richardson2020-08-114-54/+46
| | | | | | | | | | | | When zsh runs in POSIX sh mode it does not support the -e flag to echo. Use printf instead of echo to avoid the "-e" characters being printed. Obtained from: CheriBSD Reviewed By: markj Differential Revision: https://reviews.freebsd.org/D26026 Notes: svn path=/head/; revision=364124
* Fix -DBUILD_WITH_STRICT_TMPPATH dtrace buildsAlex Richardson2020-08-114-0/+4
| | | | | | | | | | | | | | | | | | | Some of the scripts used for libdtrace invoke nawk instead of awk (for example cddl/contrib/opensolaris/lib/libdtrace/common/mknames.sh). When bootstrapping all tools, we get the nawk -> awk link while building usr.bin/awk, but when linking/copying the dependencies from the host we were only adding awk but not nawk. This was silently generating invalid files when building libdtrace with BUILD_WITH_STRICT_TMPPATH=1 since those scripts invoke nawk instead of awk. In addition to adding the missing link this commit also adds set -e to those scripts to catch errors like this in the future. Reviewed By: markj, emaste Differential Revision: https://reviews.freebsd.org/D26025 Notes: svn path=/head/; revision=364123
* Fix cddl tools bootstrapping on macOS and LinuxAlex Richardson2020-08-072-0/+11
| | | | | | | | Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D25979 Notes: svn path=/head/; revision=364022
* ctfmerge: Fix missing pthread_cond_init()Alex Richardson2020-08-061-0/+1
| | | | | | | | | | | | | This does not appear to matter on FreeBSD or Linux, but when building an amd64 kernel on macOS I was seeing infinite loops in ctfmerge. It turns out the loop in wip_save_work() was looping forever due to pthread_cond_wait() always returning -EINVAL. Reviewed By: markj, brooks Differential Revision: https://reviews.freebsd.org/D25973 Notes: svn path=/head/; revision=363991