- 15 Jun, 2021 5 commits
-
-
наб authored
Turns out $ZPOOL_IMPORT_OPTS expands in a shell-like fashion, yielding 'import' '-aN' '-o' 'cachefile=none' for an unset variable, and 'import' '-aN' '-o' 'cachefile=none' 'word1' 'word2' for a white-spaced one, but ${ZPOOL_IMPORT_OPTS} expands like "${Z_I_O}" would in a shell, yielding 'import' '-aN' '-o' 'cachefile=none' '' (empty) and 'import' '-aN' '-o' 'cachefile=none' 'word1 word2' (spaced) Fixes eec5ba11 "dracut: 90zfs: respect zfs_force=1 on systemd systems" 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: #12231
-
Matthew Ahrens authored
vdev_draid_min_asize() returns the minimum size of a child vdev. This is used when determining if a disk is big enough to replace a child. It's also used by zdb to determine how big of a child to make to test replacement. vdev_draid_min_asize() says that the child’s asize has to be at least 1/Nth of the entire draid’s asize, which is the same logic as raidz. However, this contradicts the code in vdev_draid_open(), which calculates the draid’s asize based on a reduced child size: An additional 32MB of scratch space is reserved at the end of each child for use by the dRAID expansion feature So the problem is that you can replace a draid disk with one that’s vdev_draid_min_asize(), but it actually needs to be larger to accommodate the additional 32MB. The replacement is allowed and everything works at first (since the reserved space is at the end, and we don’t try to use it yet), but when you try to close and reopen the pool, vdev_draid_open() calculates a smaller asize for the draid, because of the smaller leaf, which is not allowed. I think the confusion is that vdev_draid_min_asize() is correctly returning the amount of required *allocatable* space in a leaf, but the actual *size* of the leaf needs to be at least 32MB more than that. ztest_vdev_attach_detach() assumes that it can attach that size of device, and it actually can (the kernel/libzpool accepts it), but it then later causes zdb to not be able to open the pool. This commit changes vdev_draid_min_asize() to return the required size of the leaf, not the size that draid will make available to the metaslab allocator. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Mark Maybee <mark.maybee@delphix.com> Signed-off-by:
Matthew Ahrens <mahrens@delphix.com> Closes #11459 Closes #12221
-
Paul Zuchowski authored
In zfs_znode_alloc we always hash inodes. If the znode is unlinked, we do not need to hash it. This fixes the problem where zfs_suspend_fs is doing zrele (iput) in an async fashion, and zfs_resume_fs unlinked drain processing will try to hash an inode that could still be hashed, resulting in a panic. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Alan Somers <asomers@gmail.com> Signed-off-by:
Paul Zuchowski <pzuchowski@datto.com> Closes #9741 Closes #11223 Closes #11648 Closes #12210
-
Rich Ercolani authored
Having an old enough version of "file" and no "uncompress" program installed can cause rpmbuild as root to crash and mangle rpmdb. So let's add a build dependency for RPM-based systems. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Signed-off-by:
Rich Ercolani <rincebrain@gmail.com> Closes: #12071 Closes: #12168
-
Brian Behlendorf authored
Commit 86b5f4c1 added a new zfs_clone_livelist_dedup.ksh test case but didn't include it in the Makefile.am. This results in the test not being included in the dist tarball so it's never run by the CI. Reviewed-by:
John Kennedy <john.kennedy@delphix.com> Reviewed-by:
Serapheim Dimitropoulos <serapheim@delphix.com> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes: #12224
-
- 10 Jun, 2021 11 commits
-
-
Brian Behlendorf authored
Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov>
-
Alexander Motin authored
This commit partially reverts changes to multilists in PR 7968 (multi-threaded spa-sync()) and adds some cache line alignments to separate read-only multilists and heavily modified refcount's to different cache lines. Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Alexander Motin <mav@FreeBSD.org> Sponsored-by: iXsystems, Inc. Closes #12158
-
наб authored
On systemd systems provide an environment generator in order to respect the zfs_force=1 kernel command line option. 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 #11403 Closes #12195
-
Alexander Motin authored
This mostly reverts "3537 want pool io kstats" commit of 8 years ago. From one side this code using pool-wide locks became pretty bad for performance, creating significant lock contention in I/O pipeline. From another, there are more efficient ways now to obtain detailed statistics, while this statistics is illumos-specific and much less usable on Linux and FreeBSD, reported only via procfs/sysctls. This commit does not remove KSTAT_TYPE_IO implementation, that may be removed later together with already unused KSTAT_TYPE_INTR and KSTAT_TYPE_TIMER. Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Alexander Motin <mav@FreeBSD.org> Sponsored-By: iXsystems, Inc. Closes #12212
-
Rich Ercolani authored
Starting in Linux 5.10, trying to write to /dev/{null,zero} errors out. Prefer to inform people when this happens rather than hoping they guess what's wrong. Reviewed-by:
Antonio Russo <aerusso@aerusso.net> Reviewed-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
John Kennedy <john.kennedy@delphix.com> Signed-off-by:
Rich Ercolani <rincebrain@gmail.com> Closes: #11991
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12116
-
наб authored
Reviewed-by:
Richard Laager <rlaager@wiktel.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12212
-
наб authored
Most notably this fixes the vdev_id(8) non-.Xrs in vdev_id.conf.5 Reviewed-by:
Richard Laager <rlaager@wiktel.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12212
-
наб authored
The pages moved as follows: zpool-features.{5 => 7} spl{-module-parameters.5 => .4} zfs{-module-parameters.5 => .4} zfs-events.5 => into zpool-events.8 zfsconcepts.{8 => 7} zfsprops.{8 => 7} zpoolconcepts.{8 => 7} zpoolprops.{8 => 7} Reviewed-by:
Richard Laager <rlaager@wiktel.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Co-authored-by:
Daniel Ebdrup Jensen <debdrup@FreeBSD.org> Closes #12149 Closes #12212
-
наб authored
The prevailing style is to use either nothing, or the originating organisational umbrella (here: OpenZFS), and these aren't Linux manpages This also deduplicates the substitution code, and makes adding/removing sexions simpler in future Reviewed-by:
Richard Laager <rlaager@wiktel.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12212
-
Brian Behlendorf authored
The first warning of a misspelling is a false positive, so we annotate the script accordingly. As for the x-prefix warnings update the check to use the conventional '[ -z <string> ]' syntax. all-syslog.sh:46:47: warning: Possible misspelling: ZEVENT_ZIO_OBJECT may not be assigned, but ZEVENT_ZIO_OBJSET is. [SC2153] make_gitrev.sh:53:6: note: Avoid x-prefix in comparisons as it no longer serves a purpose [SC2268] man-dates.sh:10:7: note: Avoid x-prefix in comparisons as it no longer serves a purpose [SC2268] Reviewed-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by:
John Kennedy <john.kennedy@delphix.com> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #12208
-
- 09 Jun, 2021 24 commits
-
-
наб authored
This: (a) improves the error log message, (b) locks per pool instead of globally, (c) locks the actual output file instead of /var/lock/zfs-list, which would otherwise linger there forever (well, still will, but you can remove it and it won't come back), and (d) preserves attributes of the output file instead of reverting them to 0:0 644 It is imperative that the previous commit ("zed-functions.sh: zed_lock(): don't truncate lock") be included in any series that contains this one Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12042
-
наб authored
By locking the log file itself, we can omit arduous rebinding and explicit umask setting, but, perhaps more importantly, avoid permanently littering /var/lock/ with zed.debug.log.lock we will never delete It is imperative that the previous commit ("zed-functions.sh: zed_lock(): don't truncate lock") be included in any series that contains this one Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12042
-
наб authored
By appending instead of truncating, we can lock on any file (with write permissions) instead of only dedicated lock files, since the locking process itself no longer alters the file in any way Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12042
-
Alan Somers authored
`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
-
наб authored
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
-
Rich Ercolani authored
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
-
Serapheim Dimitropoulos authored
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
-
Alexander Motin authored
- 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
-
наб authored
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
-
наб authored
Chases 7c64ee9e ("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
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12108
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11800 Closes #12108
-
наб authored
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
-
Rich Ercolani authored
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
-
jharmening authored
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
-
Ryan Moeller authored
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
-
наб authored
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
-
наб authored
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
-
Brian Behlendorf authored
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
-
Colm authored
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
-
наб authored
zfs_arc_overflow_shift was never a parameter: ca0bf58d ("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 e53d678d ("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 c3bd3fb4 ("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
-
наб authored
Both were removed in 4fbdb10c ("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
-
Rich Ercolani authored
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
-
Rich Ercolani authored
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
-