aboutsummaryrefslogtreecommitdiff
path: root/cddl/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* manuals: Fix "skipping end of block" .El errorsGraham Percival2024-10-071-1/+0
| | | | | | | | | | | | | These were reported by `mandoc -T lint ...` as errors; this commit only handles unnecessary .El commands. The rendered output (in ascii and html) is not affected by this commit. Signed-off-by: Graham Percival <gperciva@tarsnap.com> Reviewed by: mhorne MFC after: 3 days Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1447
* zfsd: replace vdevs with the AUX faulted stateAlan Somers2024-10-031-1/+1
| | | | | | | | | | | | Without this patch, vdevs faulted via AUX state would not be replaced once the appropriate drive is replaced. ZFS does not internally use that state, but a drive can be manually forced into such a state with a command like zinject. Submitted by: Goran Mekić <meka@tilda.center> Sponsored by: ConnectWise MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46866
* dtrace tests: Add a test case which validates FBT probe argumentsMark Johnston2024-09-191-0/+2
| | | | | | Reviewed by: avg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46674
* zfs: merge openzfs/zfs@b10992582Martin Matuska2024-09-093-0/+3
| | | | | | | | | | | | | | | | | Notable upstream pull request merges: #15892 -multiple Fast Dedup: Introduce the FDT on-disk format and feature flag #15893 -multiple Fast Dedup: “flat” DDT entry format #15895 -multiple Fast Dedup: FDT-log feature #16239 6be8bf555 zpool: Provide GUID to zpool-reguid(8) with -g #16277 -multiple Fast Dedup: prune unique entries #16316 5807de90a Fix null ptr deref when renaming a zvol with snaps and snapdev=visible #16343 77a797a38 Enable L2 cache of all (MRU+MFU) metadata but MFU data only #16446 83f359245 FreeBSD: fix build without kernel option MAC #16449 963e6c9f3 Fix incorrect error report on vdev attach/replace #16505 b10992582 spa_prop_get: require caller to supply output nvlist Obtained from: OpenZFS OpenZFS commit: b109925820fb79db3e37670c159977f03edd950f
* zfsd tests: Update the mock zpool_handleMark Johnston2024-08-291-0/+3
| | | | | | | | The zfsd tests rely on this having the same layout as the real zpool_handle, which changed in the last OpenZFS import. Fixes: 62e7d3c89ebd ("ddt: add support for prefetching tables into the ARC") Reported by: Jenkins
* zdb: Chase a missing library dependencyMark Johnston2024-07-181-1/+1
| | | | Fixes: 75e1fea68aaa ("zfs: merge openzfs/zfs@1147a2797")
* Remove residual blank line at start of MakefileWarner Losh2024-07-1518-18/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* dtrace tests: Regenerate makefiles after commit d0b2dbfa0ecfMark Johnston2024-06-0189-89/+0
|
* dtrace tests: Fix loading of the test kernel moduleMark Johnston2024-06-011-1/+1
| | | | | | | | The old way is racy and can cause two instances, running in parallel, to attempt to load dtrace_test, and only one will succeed. This caused errors when running dtrace tests in parallel. MFC after: 1 week
* zfsd: fix unit tests after 89f4f91dbfdcabe65bc7476bc5f13dfb837870feAlan Somers2024-04-132-1/+4
| | | | | | | | | Reported by: markj MFC after: 1 week MFC with: 89f4f91dbfdcabe65bc7476bc5f13dfb837870fe Sponsored by: Axcient Reviewed by: Alek Pinchuk <pinchuk.alek@gmail.com> Differential Revision: https://reviews.freebsd.org/D44744
* zfsd: Use vdev prop values for fault/degrade thresholdsAlan Somers2024-03-053-43/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | ZED uses vdev props for setting disk fault/degrade thresholds, this patch enables zfsd to use the same vdev props for these same tasks. OpenZFS on Linux is using vdev props for ZED disk fault/degrade thresholds. Originally the thresholds supported were for io and checksum events and recently this was updated to process slow io events as well, see https://github.com/openzfs/zfs/commit/cbe882298e4ddc3917dfaf239eca475fe06d62d4 This patch enables us to use the same vdev props in zfsd as ZED uses. After this patch is merged both OSs will use the same vdev props to set retirement thresholds. It's probably important to note that the threshold defaults are different between OS. I've kept the existing defaults inside zfsd and DID NOT match them to what ZED does. Differential Revision: https://reviews.freebsd.org/D44043 MFC after: 2 weeks Relnotes: yes Reviewed by: asomers, allanjude Sponsored by: Axcient Submitted by: Alek Pinchuk <apinchuk@axcient.com>
* zfs: merge openzfs/zfs@229b9f4edMartin Matuska2024-02-081-1/+1
| | | | | | | | | | Notable upstream pull request merges: #15769 082338875 Add 'zpool status -e' flag to see unhealthy vdevs #15804 a0d3fe72b libzdb: Initial breakout of libzdb #15847 229b9f4ed LUA: Backport CVE-2020-24370's patch Obtained from: OpenZFS OpenZFS commit: 229b9f4ed05e6d14fb4d73fa04a71e99b01bb534
* dtrace tests: Diff expected and actual output upon a miscompareMark Johnston2024-01-101-0/+4
| | | | | | This makes quick diagnosis of test failures easier. MFC after: 1 week
* dtrace tests: Require perlMark Johnston2024-01-101-1/+1
| | | | | | | A number of tests use it, so just require it globally as we do with other tools. MFC after: 1 week
* dtrace tests: Run ksh with -pMark Johnston2024-01-101-2/+2
| | | | | | | | In particular, avoid loading the user's .profile file, since that can have undesirable side effects. Most tests were already careful to do this. MFC after: 1 week
* dtrace: Add the 'oformat' libdtrace optionDomagoj Stolfa2024-01-104-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This option can be used to specify a format to use in DTrace output. The following formats are supported: - json - xml - html - none (default DTrace output) This is implemented using libxo and integrated into libdtrace. Client code only works with the following API: - dtrace_oformat_setup(dtrace_hdl_t *) -- to be called when output is starting. - dtrace_oformat_teardown(dtrace_hdl_t *) -- to be called when output is finished - dtrace_oformat(dtrace_hdl_t *) -- check if oformat is enabled. - dtrace_set_outfp(FILE *) -- sets the output file for oformat. - Ensure that oformat is correctly checked in the drop handler and record processing callbacks. This commit also adds tests which check if the generated output is valid (JSON, XML) and extends the dtrace(1) describing the structured output. Reviewed by: markj Discussed with: phil MFC after: 2 months Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D41745
* libc: expose execvpe for Linux compatBrooks Davis2023-12-111-1/+1
| | | | | | | | | | | | | | We already implemented execvpe internally with an _ prefix in libc so go ahead and expose it for compatibility with Linux. This reverts c605eea952146348e5e1ad5cab6c127d7a1bd164. Bump __FreeBSD_version for the addition and add definitions to supress compat shims in libzfs (zfs changes were merged from upstream). PR: 275370 (request and exp-run (thanks antoine!)) Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42846
* zfsd: fault disks that generate too many I/O delay eventsAlan Somers2023-11-293-4/+88
| | | | | | | | | | | | If ZFS reports that a disk had at least 8 I/O operations over 60s that were each delayed by at least 30s (implying a queue depth > 4 or I/O aggregation, obviously), fault that disk. Disks that respond this slowly can degrade the entire system's performance. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D42825
* Trim various $FreeBSD$John Baldwin2023-10-101-1/+0
| | | | | | Approved by: markj (cddl/contrib changes) Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41961
* Fix zfsd with the device_removal pool feature.Alan Somers2023-09-122-4/+38
| | | | | | | | | | | | | | | | | | Previously zfsd would crash in the presence of a pool with a top-level-vdev that had previously been removed. The crash happened because the configuration nvlist of such a TLV contains an empty ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty list, which has undefined behavior. The crash only happened in stable/14 and later, probably do to differences in libcxx, but the change should be MFCed anyway. PR: 273663 Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> MFC after: 1 week Sponsored by: Axcient Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D41818
* dtrace: Remove $FreeBSD$ from genmakefiles.sh.Domagoj Stolfa2023-08-251-2/+0
| | | | | | | $FreeBSD$ is gone in head, so this should be removed as well. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41595
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-16223-224/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-167-18/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1614-28/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* dtrace: Add WITH_DTRACE_ASANDomagoj Stolfa2023-08-023-0/+19
| | | | | See commit 4ae6991228105eb34989c870194ae7b0a1e23be4. This version of the commit avoids inadvertently changing SHLIBDIR for libdtrace.so.
* dtrace: Revert the addition of WITH_DTRACE_ASANMark Johnston2023-08-013-19/+0
| | | | | The follow-up fix triggers a lib32 build failure, revert everything until the problem is addressed.
* dtrace: Add WITH_DTRACE_ASANDomagoj Stolfa2023-07-273-0/+19
| | | | | | | | | | | | | | | | This option is a blanket for all the DTrace-related software. The option when enabled passes in -fsanitize=address -fsanitize=undeifned, enabling ASAN and UBSAN in the following components: - libdtrace - dtrace(1) - lockstat(1) - plockstat(1) The option defaults to "no" and is intended as a developer aid. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41157
* Fix zfsd unittests after 92642bba4dbAlan Somers2023-07-141-3/+3
| | | | | | | | | At the time we ensured that the more important functional tests were working, but neglected to update the unit tests. MFC after: 2 weeks MFC with: 92642bba4db4bf1719758ac7233468bc09a0bd59 Sponsored by: Axcient
* zfsd: listen for sysevent.fs.zfs instead of misc.fs.zfsAlan Somers2023-07-103-9/+9
| | | | | | | | | | | At some point the names of these devd events changed. Probably it happened when importing OpenZFS. Before that, FreeBSD's sysevent_alloc method didn't create a "class" nvpair in the event, which led to log_sysevent using the event's ev_subclass field as its type. MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D39437
* dtrace: move kinst tests to commonChristos Margiolis2023-07-043-2/+2
| | | | | | | Reviewed by: markj Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40414
* zfsd: Fix typo in commentElyes Haouas2023-06-021-1/+1
| | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/653
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-196-52/+7
|
* zfsd: add support for hotplugging sparesAlan Somers2023-04-064-8/+69
| | | | | | | | | | | | | | If you remove an unused spare and then reinsert it, zfsd will now online it in all pools. Do not MFC without 2a58b312b62 (but it's ok to MFC that one without this one). Submitted by: Ameer Hamza <ahamza@ixsystems.com> (zfsd), Me (tests) MFC after: 2 weeks MFC with: 2a58b312b62f908ec92311d1bd8536dbaeb8e55b Sponsored by: iX Systems, Axcient Pull Request: https://github.com/freebsd/freebsd-src/pull/697
* zfs: merge openzfs/zfs@431083f75Martin Matuska2023-04-034-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #12194 Fix short-lived txg caused by autotrim #13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() #13392 Implementation of block cloning for ZFS #13741 SHA2 reworking and API for iterating over multiple implementations #14282 Sync thread should avoid holding the spa config write lock when possible #14283 txg_sync should handle write errors in ZIL #14359 More adaptive ARC eviction #14469 Fix NULL pointer dereference in zio_ready() #14479 zfs redact fails when dnodesize=auto #14496 improve error message of zfs redact #14500 Skip memory allocation when compressing holes #14501 FreeBSD: don't verify recycled vnode for zfs control directory #14502 partially revert PR 14304 (eee9362a7) #14509 Fix per-jail zfs.mount_snapshot setting #14514 Fix data race between zil_commit() and zil_suspend() #14516 System-wide speculative prefetch limit #14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode() #14519 Do not hold spa_config in ZIL while blocked on IO #14523 Move dmu_buf_rele() after dsl_dataset_sync_done() #14524 Ignore too large stack in case of dsl_deadlist_merge #14526 Use .section .rodata instead of .rodata on FreeBSD #14528 ICP: AES-GCM: Refactor gcm_clear_ctx() #14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx() #14532 Handle unexpected errors in zil_lwb_commit() without ASSERT() #14544 icp: Prevent compilers from optimizing away memset() in gcm_clear_ctx() #14546 Revert zfeature_active() to static #14556 Remove bad kmem_free() oversight from previous zfsdev_state_list patch #14563 Optimize the is_l2cacheable functions #14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier #14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL #14567 spl: Add cmn_err_once() to log a message only on the first call #14568 Fix incremental receive silently failing for recursive sends #14569 Restore ASMABI and other Unify work #14576 Fix detection of IBM Power8 machines (ISA 2.07) #14577 Better handling for future crypto parameters #14600 zcommon: Refactor FPU state handling in fletcher4 #14603 Fix prefetching of indirect blocks while destroying #14633 Fixes in persistent error log #14639 FreeBSD: Remove extra arc_reduce_target_size() call #14641 Additional limits on hole reporting #14649 Drop lying to the compiler in the fletcher4 code #14652 panic loop when removing slog device #14653 Update vdev state for spare vdev #14655 Fix cloning into already dirty dbufs #14678 Revert "Do not hold spa_config in ZIL while blocked on IO" Obtained from: OpenZFS OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252
* Retire WITHOUT_CXX optionEd Maste2023-01-271-2/+1
| | | | | | | | | | | | Several important base system components are written in C++, and the WITHOUT_CXX option produced a system that was not fully functional. Just accept this, and remove the option to build without C++ support. This reverts commit adc3c128c6603054586a993d117e5dd808deac17. Reviewed by: brooks, kevans, jhb (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33108
* dwatch: install hard links with same mode as targetEd Maste2022-11-231-0/+1
| | | | | | | | | | Previoulsy when using NO_ROOT we recorded METALOG entries for dwatch hard links with different file modes than their link targets, which is not permitted. Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37477
* pkgbase: Put zfs utilities and lib in their own packageEmmanuel Vadot2022-10-263-0/+3
| | | | | | | | | It is useful to have zfs utilities and lib in a separate package as it allow users to create image that can support ZFS (i.e. not with WITHOUT_ZFS in src.conf set) without bloating the default image with all zfs tools (for example for jails). Differential Revision: https://reviews.freebsd.org/D36225
* zfsd(8): Fix a typo in an error messageGordon Bergling2022-10-251-1/+1
| | | | | | - s/faild/failed/ MFC after: 1 week
* kinst: Add a rudimentary regression test caseMark Johnston2022-10-112-1/+21
| | | | | | | The test instruments a number of large, frequently called kernel functions while generating load in the background. MFC after: 3 months
* In man page cross refs to sudo, indicate it comes from ports/security/sudo.Jens Schweikhardt2022-08-141-1/+1
|
* cddl/*: add a WITH(OUT)_DTRACE optionBrooks Davis2022-07-061-12/+8
| | | | | | | | | | | | | | | | | | Add an option to enable/disable DTrace without disabling ZFS. New architectures such as CHERI may support ZFS before they support DTrace and the old model of WITHOUT_CDDL disabling both wasn't helpful. For compatiblity, the CDDL option remains and WITHOUT_CDDL implies WITHOUT_DTRACE. WITHOUT_DTRACE also implies WITHOUT_CTF. As part of this change, largely convert cddl/*/Makefile to using the more compact SUBDIR.${MK_<FOO>}+= form rather than using intermediate variables. Reviewed by: markj Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D35718
* dtrace: Remove local mips supportBrooks Davis2022-07-011-5/+0
| | | | | | | | Remove the stub pid probe and all the build glue. Reviewed by: imp, jhb Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D35541
* zfs: merge openzfs/zfs@b9d98453fMartin Matuska2022-06-031-1/+1
| | | | | | | | | | | | | | | | | Notable upstream pull request merges: #12321 Fix inflated quiesce time caused by lwb_tx during zil_commit() #13244 zstd early abort #13360 Verify BPs as part of spa_load_verify_cb() #13452 More speculative prefetcher improvements #13466 Expose zpool guids through kstats #13476 Refactor Log Size Limit #13484 FreeBSD: libspl: Add locking around statfs globals #13498 Cancel in-progress rebuilds when we finish removal #13499 zed: Take no action on scrub/resilver checksum errors #13513 Remove wrong assertion in log spacemap Obtained from: OpenZFS OpenZFS commit: b9d98453f9387c413f91d1d9cdb0cba8e04dbd95
* zfs: merge openzfs/zfs@c0cf6ed67Martin Matuska2022-05-181-1/+1
| | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #10662 zvol_wait: Ignore locked zvols #12789 Improve log spacemap load time #12812 Improved zpool status output, list all affected datasets #13277 FreeBSD: Use NDFREE_PNBUF if available #13302 Make zfs_max_recordsize default to 16M #13311 Fix error handling in FreeBSD's get/putpages VOPs #13345 FreeBSD: Fix translation from ABD to physical pages #13373 zfs: holds: dequadratify #13375 Corrected edge case in uncompressed ARC->L2ARC handling #13388 Improve mg_aliquot math #13405 Reduce dbuf_find() lock contention #13406 FreeBSD: use zero_region instead of allocating a dedicated page Obtained from: OpenZFS OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8
* DTrace test: skip flakey common.misc.t_dtrace_contrib.tst_dynopt_d in CILi-Wen Hsu2022-03-241-0/+3
| | | | | PR: 237641 Sponsored by: The FreeBSD Foundation
* DTrace test: Add a new keyword SKIPCI to gentest.shLi-Wen Hsu2022-03-242-4/+8
| | | | | | | | | This is for marking a test case is flakey and should not be executed in the CI environment. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34635
* cddl: fix missing ZFS library dependenciesGreg V2021-11-151-1/+1
| | | | | | | | | | | In 9fae47666 zfsd got a libspl dependency to avoid undefined references. However that workaround did not help external consumers of libzfs_core. Fix all missing dependencies lld 13 and the rtld complain about. Reviewed by: freqlabs, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32521
* pkgbase: Create a FreeBSD-dwatch packageEmmanuel Vadot2021-09-073-0/+4
| | | | | | | While dwatch is useful some users might not want it by default. Create a package for it. Differential Revision: https://reviews.freebsd.org/D31796
* Explicitly link zfsd with libspl to avoid undefined referencesDimitry Andric2021-08-281-1/+1
| | | | | | | | | | | | | | Because lld 13.0.0 is more strict about undefined references when linking to shared libraries, it produces the following errors for zfsd: ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libzfs_core.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined] ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libnvpair.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined] ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libavl.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined] *** [zfsd.full] Error code 1 Fix this by adding libspl (where libspl_assertf lives) to zfsd's LIBADD. MFC after: 3 days