aboutsummaryrefslogtreecommitdiff
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* 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
* MFOpenZFS: Add support for boot environment data to be stored in the labelToomas Soome2020-08-055-6/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are building new bootonce mechanism (previously zfs bootnext) and it is based on this OpenZFS change. Since this patch is nicely self contained, I am commiting it as is, and we can stack our changes. Original patch description follows: Modern bootloaders leverage data stored in the root filesystem to enable some of their powerful features. GRUB specifically has a grubenv file which can store large amounts of configuration data that can be read and written at boot time and during normal operation. This allows sysadmins to configure useful features like automated failover after failed boot attempts. Unfortunately, due to the Copy-on-Write nature of ZFS, the standard behavior of these tools cannot handle writing to ZFS files safely at boot time. We need an alternative way to store data that allows the bootloader to make changes to the data. This work is very similar to work that was done on Illumos to enable similar functionality in the FreeBSD bootloader. This patch is different in that the data being stored is a raw grubenv file; this file can store arbitrary variables and values, and the scripting provided by grub is powerful enough that special structures are not required to implement advanced behavior. We repurpose the second padding area in each label to store the grubenv file, protected by an embedded checksum. We add two ioctls to get and set this data, and libzfs_core and libzfs functions to access them more easily. There are no direct command line interfaces to these functions; these will be added directly to the bootloader utilities. Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Closes #10009 Obtained from: OpenZFS Sponsored by: Netflix, Klara Inc. Notes: svn path=/head/; revision=363911
* - Cleanups related to sparc64 removal.Yoshihiro Takahashi2020-07-283-12/+2
| | | | | | | | | | - Remove remains of sparc64 files. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D25831 Notes: svn path=/head/; revision=363644
* MFOpenZFS: Fix zpool history unbounded memory usageMark Johnston2020-07-233-26/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In original implementation, zpool history will read the whole history before printing anything, causing memory usage goes unbounded. We fix this by breaking it into read-print iterations. Reviewed-by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Matt Ahrens <matt@delphix.com> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chunwei Chen <david.chen@nutanix.com> Closes #9516 Note, this change changes the libzfs.so ABI by modifying the prototype of zpool_get_history(). Since libzfs is effectively private to the base system it is anticipated that this will not be a problem. PR: 247557 Obtained from: OpenZFS Reported and tested by: Sam Vaughan <samjvaughan@gmail.com> Discussed with: freqlabs MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25745 openzfs/zfs@7125a109dcc55628336ff3f58e59e503f4d7694d Notes: svn path=/head/; revision=363447
* zpool(8): Fix a few typos regarding 'inverval' -> 'interval'Gordon Bergling2020-07-201-3/+3
| | | | | | | | | | | PR: 248068 Submitted by: PauAmma <pauamma at gundo dot com> Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D25719 Notes: svn path=/head/; revision=363362
* zpool-features(7): Note that the boot loader has support for large_blocksAllan Jude2020-07-151-4/+3
| | | | | | | | | | | | | | Since r304321 (-current: Aug 18, 2016) and r328866 (stable/11: Feb 5, 2018) the FreeBSD loader has supported reading from datasets with the large_blocks feature active. PR: 247992 Reported by: Anton Saietskii <vsasjason@gmail.com> MFC after: 2 weeks Sponsored by: Klara Inc. Notes: svn path=/head/; revision=363224
* Fix a Wvoid-pointer-to-enum-cast warning missed in r359978.Brooks Davis2020-07-061-1/+1
| | | | | | | | | | | | | | | This pattern is used in callbacks with void * data arguments and seems both relatively uncommon and relatively harmless. Silence the warning by casting through uintptr_t. This warning is on by default in Clang 11. MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24425 Notes: svn path=/head/; revision=362979
* MFOpenZFS: Add basic zfs ioc input nvpair validationToomas Soome2020-06-234-13/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want newer versions of libzfs_core to run against an existing zfs kernel module (i.e. a deferred reboot or module reload after an update). Programmatically document, via a zfs_ioc_key_t, the valid arguments for the ioc commands that rely on nvpair input arguments (i.e. non legacy commands from libzfs_core). Automatically verify the expected pairs before dispatching a command. This initial phase focuses on the non-legacy ioctls. A follow-on change can address the legacy ioctl input from the zfs_cmd_t. The zfs_ioc_key_t for zfs_keys_channel_program looks like: static const zfs_ioc_key_t zfs_keys_channel_program[] = { {"program", DATA_TYPE_STRING, 0}, {"arg", DATA_TYPE_UNKNOWN, 0}, {"sync", DATA_TYPE_BOOLEAN_VALUE, ZK_OPTIONAL}, {"instrlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, {"memlimit", DATA_TYPE_UINT64, ZK_OPTIONAL}, }; Introduce four input errors to identify specific input failures (in addition to generic argument value errors like EINVAL, ERANGE, EBADF, and E2BIG). ZFS_ERR_IOC_CMD_UNAVAIL the ioctl number is not supported by kernel ZFS_ERR_IOC_ARG_UNAVAIL an input argument is not supported by kernel ZFS_ERR_IOC_ARG_REQUIRED a required input argument is missing ZFS_ERR_IOC_ARG_BADTYPE an input argument has an invalid type Reviewed by: allanjude Obtained from: OpenZFS Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25393 Notes: svn path=/head/; revision=362531
* ZFS: Allow setting checksum=skein on boot poolsAllan Jude2020-06-192-3/+6
| | | | | | | | | PR: 245889 Reported by: delphij Sponsored by: Klara Inc. Notes: svn path=/head/; revision=362396
* Add HISTORY sections to ZFS and dtrace manpageGordon Bergling2020-06-146-5/+35
| | | | | | | | | | Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D23833 Notes: svn path=/head/; revision=362170
* Restore the binary compatibility for link_map l_addr.Konstantin Belousov2020-05-211-1/+7
| | | | | | | | | | | | | | | | | Keep link_map l_addr binary layout compatible, rename l_addr to l_base where rtld returns map base. Provide relocbase in newly added l_addr. This effectively reverts the patch to the initial version of D24918. Reported by: antoine (portmgr) Reviewed by: jhb, markj Tested by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24946 Notes: svn path=/head/; revision=361349
* zfs allow/unallow should work with numeric uid/gidAndriy Gapon2020-05-121-5/+13
| | | | | | | | | | | | | | | | And that should work even (especially) if there is no matching user or group name. This change allows to see and modify delegations for deleted groups and users. The change is originally by Xin Li. illumos report: https://www.illumos.org/issues/6037 OpenZFS (ZoL) PR: https://github.com/openzfs/zfs/pull/10280 Obtained from: delphij MFC after: 2 weeks Notes: svn path=/head/; revision=360956
* dtrace tests: Support globbing for excludesBryan Drewery2020-04-292-3/+20
| | | | | | | | | | | Downstream this makes skipping tests like common/ip/tst.*sctp*.ksh simpler. Reviewed by: vangyzen, cem, markj Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D24608 Notes: svn path=/head/; revision=360476
* Revert r360445Bryan Drewery2020-04-282-8/+10
| | | | | | | | I did not intend to commit this yet as more work is needed for non-amd64 kernels. Notes: svn path=/head/; revision=360448
* ctfmerge: Assert that there is enough room for types.Bryan Drewery2020-04-282-10/+8
| | | | | | | | Sponsord by: Dell EMC Differential Revision: https://reviews.freebsd.org/D24537 Notes: svn path=/head/; revision=360445
* zfs-program.8: fix orphan .XrAlan Somers2020-04-181-2/+2
| | | | | | | | | | Reported by: phk Reviewed by: avg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24488 Notes: svn path=/head/; revision=360080
* zfsd.8: fix orphan .XrAlan Somers2020-04-181-6/+3
| | | | | | | | | | Though ZFS is a kernel module, it has no man page in section 4. Reported by: phk MFC after: 2 weeks Notes: svn path=/head/; revision=360077
* zfs: Add option for forcible unmounting dataset while receiving snapshot.Mariusz Zaborski2020-04-114-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently when the dataset is in use we can't receive snapshots. zfs send test/1@asd | zfs recv -FM test/2 cannot unmount '/test/2': Device busy This commits add option 'M' which attempts to forcibly unmount the dataset. Thanks to this we can enforce receiving snapshots in a single step. Note that this functionality is not supported on Linux because the VFS will prevent active mounted filesystems from being unmounted, even with the force option. This is the intended VFS behavior. Discussed-with: Pawel Jakub Dawidek <pjd@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Allan Jude <allanjude@freebsd.org> Differential Revision: https://reviews.freebsd.org/D22306 openzfs/zfs@a57d3d45d6efdff935421e2ef3f97e3dc089d93d Notes: svn path=/head/; revision=359808
* zfs: fix -fno-common issuesKyle Evans2020-03-283-2/+4
| | | | | | | | | | | A similar (or identical?) fix has already landed in OpenZFS. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Notes: svn path=/head/; revision=359397
* MFOpenZFS: ZVOLs should not be allowed to have childrenRyan Moeller2020-03-254-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | zfs create, receive and rename can bypass this hierarchy rule. Update both userland and kernel module to prevent this issue and use pyzfs unit tests to exercise the ioctls directly. Note: this commit slightly changes zfs_ioc_create() ABI. This allow to differentiate a generic error (EINVAL) from the specific case where we tried to create a dataset below a ZVOL (ZFS_ERR_WRONG_PARENT). Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tom Caputi <tcaputi@datto.com> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Approved by: mav (mentor) MFC after: 2 weeks Sponsored by: iXsystems, Inc. openzfs/zfs@d8d418ff0cc90776182534bce10b01e9487b63e4 Notes: svn path=/head/; revision=359303
* MFOpenZFS: make zil max block size tunableAlexander Motin2020-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've observed that on some highly fragmented pools, most metaslab allocations are small (~2-8KB), but there are some large, 128K allocations. The large allocations are for ZIL blocks. If there is a lot of fragmentation, the large allocations can be hard to satisfy. The most common impact of this is that we need to check (and thus load) lots of metaslabs from the ZIL allocation code path, causing sync writes to wait for metaslabs to load, which can take a second or more. In the worst case, we may not be able to satisfy the allocation, in which case the ZIL will resort to txg_wait_synced() to ensure the change is on disk. To provide a workaround for this, this change adds a tunable that can reduce the size of ZIL blocks. External-issue: DLPX-61719 Reviewed-by: George Wilson <george.wilson@delphix.com> Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matthew Ahrens <mahrens@delphix.com> Closes #8865 openzfs/zfs@b8738257c2607c73c731ce8e0fd73282b266d6ef MFC after: 2 weeks Notes: svn path=/head/; revision=359112
* Do not load dtraceall.ko if dtrace.ko is already loaded.Mark Johnston2020-02-281-1/+1
| | | | | | | | | | | | This was the intent of the existing code, but instead it would unconditionally load dtraceall.ko because of a stale errno value. Reported by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=358435
* sack_newdata and snd_recover hold the same value. Therefore, use onlyMichael Tuexen2020-02-131-1/+1
| | | | | | | | | | a single instance: use snd_recover also where sack_newdata was used. Submitted by: Richard Scheffenegger Differential Revision: https://reviews.freebsd.org/D18811 Notes: svn path=/head/; revision=357858