aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tip: Fix pointer-vs-integer confusionJessica Clarke2021-06-082-4/+16
| | | | | | | | | | | | | | | | | | Currently IREMOTE assumes that every value is (initially) a pointer to a long. This is true for NUMBERs, but false for STRINGs, which are instead pointers to pointers, though on ILP32 and LP64 systems these happen to have the same representation, but this is still a strict aliasing violation, and of course breaks on systems where the representations are not the same, such as CHERI. We do not currently have any BOOLs (short, curiously) or CHARs used with IREMOTE, though the code should not be relying on that. This removes the unused setaddress macro, and the now-unused address macro due to the above issue. Reviewed by: imp, kib Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D30697
* tip: Cast via intptr_t not long when casting between pointer and intJessica Clarke2021-06-081-8/+8
| | | | | | | | | | | | Whilst all FreeBSD architectures have the same representation for intptr_t and long (even if the former is int on ILP32 architectures), this is more general and correct, and on CHERI they are not the same so warnings are generated by default for integer-to-pointer casts that aren't via (u)intptr_t. Reviewed by: imp, kib Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D30696
* tests/netgraph: Attribute errors to the callerLutz Donnerhacke2021-06-082-27/+64
| | | | | | | | | Errors raised in the common util functions should raise the location of their caller to be useful and include the errno description. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30671
* Add ofw interface support to PCIMarcin Wojtas2021-06-082-0/+94
| | | | | | | | | | | | | | | | Some arm64 SoCs have nodes in their fdts that describe devices connected to the internal PCI bus. One such SoC is Freescale LS1028A. In order to access information stored in them we need to add ofw bus support to pci. Pass devinfo request up to our parent, which is responsible for parsing all the information. It allows to use ofw interface on PCI devices that support it. This method is similar to sys/dev/acpica/acpi_pci.c. Submitted by: Kornel Duleba <mindal@semihalf.com> Reviewed by: andrew Obtained from: Semihalf Sponsored by: Alstom Group Differential Revision: https://reviews.freebsd.org/D30181
* pci_host_generic_fdt.c: Add support for mapping dts nodes to PCI devicesMarcin Wojtas2021-06-082-0/+82
| | | | | | | | | | | | | | | Some arm64 SoCs have nodes in their fdts that describe devices connected to the internal PCI bus. One such SoC is Freescale LS1028A. It expects the nodes to be mapped to devices enumerated using the standard PCI method. Mapping is done by reading device and function ids from "reg" property. Information is dts is used to describe MDIO/PHY connected to a given interface. Submitted by: Kornel Duleba <mindal@semihalf.com> Reviewed by: andrew Obtained from: Semihalf Sponsored by: Alstom Group Differential Revision: https://reviews.freebsd.org/D30180
* Remove ThunderX PCIe FDT quirks from pci_host_generic_fdt.cMarcin Wojtas2021-06-082-184/+158
| | | | | | | | | | | ThunderX is the only board known to use them. Move them to the ThunderX PCIe driver. Submitted by: Kornel Duleba <mindal@semihalf.com> Reviewed by: andrew Obtained from: Semihalf Sponsored by: Alstom Group Differential Revision: https://reviews.freebsd.org/D30179
* updating: add note about vendor/openzfs branch renameWarner Losh2021-06-081-0/+9
| | | | | | | | | | Add a pointer to https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html to explain how to pull a new tree due to the vendor/openzfs branch being renamed. Reviewed by: lwhsu@ Sponsored by: Netflix
* zfs: merge openzfs/zfs@75b4cbf62 (master) into mainMartin Matuska2021-06-08523-28077/+31208
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * libzfs: On FreeBSD, use MNT_NOWAIT with getfsstatAlan Somers2021-06-085-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `getfsstat(2)` is used to retrieve the list of mounted file systems, which libzfs uses when fetching properties like mountpoint, atime, setuid, etc. The `mode` parameter may be `MNT_NOWAIT`, which uses information in the VFS's cache, or `MNT_WAIT`, which effectively does a `statfs` on every single mounted file system in order to fetch the most up-to-date information. As far as I can tell, the only fields that libzfs cares about are the filesystem's name, mountpoint, fstypename, and mount flags. Those things are always updated on mount and unmount, so they will always be accurate in the VFS's mount cache except in two circumstances: 1) When a file system is busy unmounting 2) When a ZFS file system changes the value of a mount-overridable property like atime or setuid, but doesn't remount the file system. Right now that only happens when the property is changed by an unprivileged user who has delegated authority to change the property but not to mount the dataset. But perhaps libzfs could choose to do it for other reasons in the future. Switching to `MNT_NOWAIT` will greatly improve speed with no downside, as long as we explicitly update the mount cache whenever we change a mount-overridable property. For comparison, Illumos gets this information using the native `getmntany` and `getmntent` functions, which also use cached information. The illumos function that would refresh the cache, `resetmnttab`, is never called by libzfs. And on GNU/Linux, `getmntany` and `getmntent` don't even communicate with the kernel directly. They simply parse the file they are given, which is usually /etc/mtab or /proc/mounts. Perhaps the implementation of /proc/mounts is synchronous, ala MNT_WAIT; I don't know. Sponsored-by: Axcient Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alan Somers <asomers@gmail.com> Closes: #12091
| * tests/file_check: remove unused variableнаб2021-06-081-3/+0
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12187
| * module/zfs: vdev_removal: spa_vdev_remove_thread: remove unused variableнаб2021-06-081-4/+0
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12187
| * module/zfs: vdev_indirect: vdev_indirect_repair: remove unused variableнаб2021-06-081-5/+0
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12187
| * module/zfs: dbuf: dbuf_read_impl: remove unused variableнаб2021-06-081-2/+0
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12187
| * module/zfs: arc: arc_hdr_realloc_crypt: remove unused variablesнаб2021-06-081-5/+0
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12187
| * libzfs: zfs_send: remove unused variableнаб2021-06-081-12/+0
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12187
| * zdb: zdb_decompress_block: don't needlessly set bufнаб2021-06-081-1/+0
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12187
| * libzutil: zpool_find_config: remove unused variableнаб2021-06-081-4/+1
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12187
| * Modernise/fix/rewrite unlinted manpagesнаб2021-06-0711-5530/+3144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zpool-destroy.8: flatten, fix description zfs-wait.8: flatten, fix description, use list for events zpool-reguid.8: flatten, fix description zpool-history.8: flatten, fix description zpool-export.8: flatten, fix description, remove -f "unmount" reference AFAICT no such command exists even in Illumos (as of today, anyway), and we definitely don't call it zpool-labelclear.8: flatten, fix description zpool-features.5: modernise spl-module-parameters.5: modernise zfs-mount-generator.8: rewrite zfs-module-parameters.5: modernise Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12169
| * Force --enable-debug on FreeBSD if INVARIANTS is setRich Ercolani2021-06-071-0/+17
| | | | | | | | | | | | | | | | | | | | | | There's already logic to force INVARIANTS on for building if it's present in the running kernel; however, not having DEBUG enabled when DEBUG and INVARIANTS are can cause strange panics. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12185 Closes #12163
| * Livelist logic should handle dedup blkptrsSerapheim Dimitropoulos2021-06-074-64/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the logic to handle the dedup-case of consecutive FREEs in the livelist code. The logic still ensures that all the FREE entries are matched up with a respective ALLOC by keeping a refcount for each FREE blkptr that we encounter and ensuring that this refcount gets to zero by the time we are done processing the livelist. zdb -y no longer panics when encountering double frees Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Don Brady <don.brady@delphix.com> Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com> Closes #11480 Closes #12177
| * More aggsum optimizationsAlexander Motin2021-06-075-63/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoid atomic_add() when updating as_lower_bound/as_upper_bound. Previous code was excessively strong on 64bit systems while not strong enough on 32bit ones. Instead introduce and use real atomic_load() and atomic_store() operations, just an assignments on 64bit machines, but using proper atomics on 32bit ones to avoid torn reads/writes. - Reduce number of buckets on large systems. Extra buckets not as much improve add speed, as hurt reads. Unlike wmsum for aggsum reads are still important. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored-By: iXsystems, Inc. Closes #12145
| * libzfs: write_inuse_diffs_one: format strerror() with "%s"наб2021-06-041-2/+3
| | | | | | | | | | | | | | | | | | Fixes 50353dbd ("Let zfs diff be more permissive") which accidentally introduced a build warning. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12197
| * i-t: don't try to import from empty cacheнаб2021-06-041-1/+2
| | | | | | | | | | | | | | | | | | Chases 7c64ee9e7731b7ad39e300b4a422892dbe8d4b23 ("zfs-import-{cache,scan}: change condition to FileNotEmpty") Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12108
| * dracut: 90zfs: zfs-load-key: wait for key to appear for up to 10 secondsнаб2021-06-041-10/+26
| | | | | | | | | | | | | | | | | | Also reduce password retries to 3 to match i-t Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12065 Closes #12108
| * Use %%/* instead of awk -F/ {print $1} to strip datasetsнаб2021-06-043-3/+3
| | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12108
| * dracut: 90zfs: zfs-load-key: don't load unencrypted bootfs' keylocationнаб2021-06-041-3/+2
| | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11800 Closes #12108
| * dracut: 90zfs: module-setup: try /lib*/libgcc_s.so*, relax /u/l/gcc pathнаб2021-06-041-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for i686 glibc), which is in the search path Also relax the /usr/lib path to catch systems similar to SUSE (/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without the top-level lib64 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11750 Closes #12108
| * Let zfs diff be more permissiveRich Ercolani2021-06-041-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current world, `zfs diff` will die on certain kinds of errors that come up on ordinary, not-mangled filesystems - like EINVAL, which can come from a file with multiple hardlinks having the one whose name is referenced deleted. Since it should always be safe to continue, let's relax about all error codes - still print something for most, but don't immediately abort when we encounter them. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12072
| * FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI jharmening2021-06-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VFS_QUOTACTL(9) has been updated to allow each filesystem to indicate whether it has changed the busy state of the mount. The filesystem may still assume that its .vfs_quotactl entrypoint is always called with the mount busied, but only needs to unbusy the mount (and clear *mp_busy) if it does something that actually requires the mount to be unbusied. It no longer needs to blindly copy-paste the UFS protocol for calling vfs_unbusy(9) for the Q_QUOTAOFF and Q_QUOTAON commands. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Jason Harmening <jason.harmening@gmail.com> Closes #12052
| * Fix error check in nvlist_print_json_stringRyan Moeller2021-06-041-8/+7
| | | | | | | | | | | | | | | | | | | | | | Move check for errors from mbrtowc() into the loop. The error values are not actually negative, so we don't break out of the loop when they are encountered. Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #12175 Closes #12176
| * Lint most manpagesнаб2021-06-0458-2700/+2718
| | | | | | | | | | | | | | | | | | Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12129
| * mancheck: accept lints, accept lint overridesнаб2021-06-043-7/+46
| | | | | | | | | | | | | | | | | | Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12129
| * Linux: Set spl_kmem_cache_slab_limit when page size !4KBrian Behlendorf2021-06-031-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For small objects the kernel's slab implementation is very fast and space efficient. However, as the allocation size increases to require multiple pages performance suffers. The SPL kmem cache allocator was designed to better handle these large allocation sizes. Therefore, on Linux the kmem_cache_* compatibility wrappers prefer to use the kernel's slab allocator for small objects and the custom SPL kmem cache allocator for larger objects. This logic was effectively disabled for all architectures using a non-4K page size which caused all kmem caches to only use the SPL implementation. Functionally this is fine, but the SPL code which calculates the target number of objects per-slab does not take in to account that __vmalloc() always returns page-aligned memory. This can result in a massive amount of wasted space when allocating tiny objects on a platform using large pages (64k). To resolve this issue we set the spl_kmem_cache_slab_limit cutoff to 16K for all architectures. This particular change does not attempt to update the logic used to calculate the optimal number of pages per slab. This remains an issue which should be addressed in a future change. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #12152 Closes #11429 Closes #11574 Closes #12150
| * libzfs: convert to -fvisibility=hiddenнаб2021-06-0319-5996/+5491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also mark all printf-like funxions in libzfs_impl.h as printf-like and add --no-show-locs to storeabi, in hopes diffs will make more sense in future This removes these symbols from libzfs: D nfs_only T SHA256Init T SHA2Final T SHA2Init T SHA2Update T SHA384Init T SHA512Init D share_all_proto D smb_only T zfs_is_shared_proto W zpool_mount_datasets W zpool_unmount_datasets Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12048
| * libefi: efi_get_devname: don't allocate procfs pathнаб2021-06-031-10/+3
| | | | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12048
| * libzfs: don't distribute libzfs_impl.hнаб2021-06-0312-10/+9
| | | | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12048
| * libspl: staticify buf and pagesize, rename aok to libspl_assert_okнаб2021-06-039-4551/+7792
| | | | | | | | | | | | | | | | Exporting names this short can easily cause nasty collisions with user code. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12050
| * A couple of small style cleanupsColm2021-06-031-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In `zpool_load_compat()`: * initialize `l_features[]` with a loop rather than a static initializer. * don't redefine system constants; use private names instead Rationale here: When an array is initialized using a static {foo}, only the specified members are initialized to the provided values, the rest are initialized to zero. While B_FALSE is of course zero, it feels unsafe to rely on this being true forever, so I'm inclined to sacrifice a few microseconds of runtime here and initialize using a loop. When looking for the correct combination of system constants to use (in open() and mmap()), I prefer to use private constants rather than redefining system ones; due to the small chance that the system ones might be referenced later in the file. So rather than defining O_PATH and MAP_POPULATE, I use distinct constant names. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Colm Buckley <colm@tuatha.org> Closes #12156
| * zfs-module-parameters.5: remove nonexistent parametersнаб2021-06-021-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zfs_arc_overflow_shift was never a parameter: ca0bf58d65f77e944b9905571df9a2eae647aeca ("Illumos 5497 - lock contention on arcs_mtx") is the only result in git log -Soverflow_shift, and it wasn't exposed then, nor is it now zfs_read_chunk_size was renamed to zfs_vnops_read_chunk_size in e53d678d4ad596a310d51dab107bb6fa97e2b226 ("Share zfs_fsync, zfs_read, zfs_write, et al between Linux and FreeBSD") zio_decompress_fail_fraction was never a parameter: it was added in c3bd3fb4ac49705819666055ff1206a9fa3d1b9e ("OpenZFS 9403 - assertion failed in arc_buf_destroy()") as a developer aid for setting in zdb, but it's a dangerous test tunable and has no place in public documentation, (not to mention that it obviously doesn't work): > Although this did uncover a few low priority issues, this unfortuantely also causes ztest to ASSERT in many locations where the code is working correctly since it is designed to fail on IO errors. Developers can manually set this variable with the '-o' option to find and debug issues. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12157
| * spl-module-parameters.5: remove spl_kmem_cache_{expire,obj_per_slab_min}наб2021-06-022-44/+1
| | | | | | | | | | | | | | | | | | | | Both were removed in 4fbdb10c7b94439694ad18409662210099e09cb4 ("remove kmem_cache module parameter KMC_EXPIRE_AGE") Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12157
| * Quick fixes for two ZTS failuresRich Ercolani2021-06-012-0/+2
| | | | | | | | | | | | | | | | | | | | On FreeBSD 14, these two tests started erroring out like the objects they're attempting to examine don't exist. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12165
| * Added another missed case to arc_summary3Rich Ercolani2021-06-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | It turns out that sometimes, evidently only when run inside the ZTS handler, arc_summary3 | head > /dev/null will die with ENOTCONN, and ruin the test run. Added handling for that. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12160
| * libzfs_core: Fix some style violationsRyan Moeller2021-06-011-2/+5
| | | | | | | | | | | | | | | | | | | | Made function names start on a new line. Added a blank line between functions. This helps when grepping for functions. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #12137
| * FreeBSD boot code reminder after zpool upgradegrembo2021-06-014-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There used to be a warning after upgrading a zpool in FreeBSD, so users won't forget to update the boot loader that pool is booted from. This change brings this warning back, but only if the bootfs property is set on the pool, which should be sufficient for the vast majority of FreeBSD installations. People running something custom are most likely aware of what to do after an upgrade in their specific environment. Functionality is implemented in an OS specific helper function. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Co-authored-by: Michael Gmelin <grembo@FreeBSD.org> Signed-off-by: Michael Gmelin <grembo@FreeBSD.org> Closes #12099 Closes #12104
| * Remove iov_iter_advance() for iter_writeRich Ercolani2021-06-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. This will result in the following warning being printed to the console as of the 5.12 kernel. Attempted to advance past end of bvec iter This change should have been included with #11378 when a similar change was made on the read side. Suggested-by: @siebenmann Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Issue #11378 Closes #12041 Closes #12155
| * Turn checkbashisms into a make targetнаб2021-06-017-36/+27
| | | | | | | | | | | | | | | | | | make_gitrev.sh actually breaks checkbashisms' parser, which /insists/ that the end-of-line " is actually a string start Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12101
| * Turn shellcheck into a normal make target. Fix new files it caughtнаб2021-06-0140-108/+214
| | | | | | | | | | | | | | | | | | | | | | This checks every file it checked (and a few more), but explicitly instead of "if it works it works" best-effort (which wasn't that good anyway) Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #10512 Closes #12101
| * udev/rules.d: .gitignore: glob all rulesнаб2021-06-011-4/+1
| | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12101
| * i-t: don't suggest zpool-import with altroot to /rootнаб2021-05-301-1/+1
| | | | | | | | | | | | | | | | This *will fail* when remounted by the real root Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12148
| * i-t: let rootdelay= set $ZFS_INITRD_PRE_MOUNTROOT_SLEEPнаб2021-05-301-0/+2
| | | | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Ref: https://github.com/openzfs/zfs/issues/11420#issuecomment-850338673 Closes #11663 Closes #12148