- 14 Mar, 2022 1 commit
-
-
Andrew Walker authored
DO NOT USE IN PRODUCTION
-
- 09 Mar, 2022 1 commit
-
-
Tony Hutter authored
META file and changelog updated. Signed-off-by:
Tony Hutter <hutter2@llnl.gov>
-
- 08 Mar, 2022 1 commit
-
-
Brian Behlendorf authored
When unlinking multiple files from a pool at 100% capacity, it was possible for ENOSPC to be returned after the first unlink. e.g. rm -f /mnt/fs/test1.0.0 /mnt/fs/test1.1.0 /mnt/fs/test1.2.0 rm: cannot remove '/mnt/fs/test1.1.0': No space left on device rm: cannot remove '/mnt/fs/test1.2.0': No space left on device After waiting for the pending deferred frees from the first unlink to be processed the remaining files can then be unlinked. This is caused by the quota limit in dsl_dir_tempreserve_impl() being temporarily decreased to the allocatable pool capacity less any deferred free space. This is resolved using the existing mechanism of returning ERESTART when over quota as long as we know enough space will shortly be available after processing the pending deferred frees. Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13172
-
- 07 Mar, 2022 1 commit
-
-
Brian Behlendorf authored
In the CI environment it's possible for events to be slightly delayed resulting in 4, instead of 5, events appearing in the log file. This isn't a problem and should be considered a success to avoid false positive test results. Reviewed-by:
George Melikov <mail@gmelikov.ru> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #12625
-
- 04 Mar, 2022 2 commits
-
-
Mark Johnston authored
When rolling back a dataset, ZFS has to purge file data resident in the system page cache. To do this, it loops over all vnodes for the mountpoint and calls vn_pages_remove() to purge pages associated with the vnode's VM object. Each page is thus exclusively busied while the dataset's teardown write lock is held. When handling a page fault on a mapped ZFS file, FreeBSD's page fault handler busies newly allocated pages and then uses VOP_GETPAGES to fill them. The ZFS getpages VOP acquires the teardown read lock with vnode pages already busied. This represents a lock order reversal which can lead to deadlock. To break the deadlock, observe that zfs_rezget() need only purge those pages marked valid, and that pages busied by the page fault handler are, by definition, invalid. Furthermore, ZFS pages always transition from invalid to valid with the teardown lock held, and ZFS never creates partially valid pages. Thus, zfs_rezget() can use the new vn_pages_remove_valid() to skip over pages busied by the fault handler. PR: 258208 Tested by: pho Reviewed by: avg, sef, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32931 Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #12828
-
Alexander Motin authored
While switching abd_zero_buf allocation KPI I've missed the fact that kmem_zalloc() zeroed the allocation, while kmem_cache_alloc() does not. Add explicit bzero() after it. I don't think it should have caused real problems, but leaking one memory page content all over the pool is not good. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Brian Atkinson <batkinson@lanl.gov> Reviewed-by:
Ryan Moeller <ryan@ixsystems.com> Signed-off-by:
Alexander Motin <mav@FreeBSD.org> Closes #12569
-
- 02 Mar, 2022 2 commits
-
-
Brian Behlendorf authored
Related to commit 90b77a03 . Retry the `zpool export` if the pool is "busy" indicating there is a process accessing the mount point. This can happen after an import, allowing it to be retried will avoid spurious test failures. Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13169
-
Brian Behlendorf authored
As explained by the disclaimer in the test case, "This test can fail since nothing guarantees that old MOS blocks aren't overwritten." This behavior is expected and correct, but results in a flaky test case which is problematic for the CI. The best we can do to resolve this is to retry the sub-test which failed when the MOS blocks have clearly been overwritten. When testing failures were rare enough that a single retry should normally be sufficient. However, we allow up to five for good measure. Reviewed by: George Melikov <mail@gmelikov.ru> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13119
-
- 01 Mar, 2022 3 commits
-
-
Brian Behlendorf authored
As previously noted in #12272 the receive-o-x_props_override.ksh test reliably fails on FreeBSD. Since we don't expect this test to pass move the exception from the "maybe" to "known" section. This way we don't retry the FAILED test when it is not expected to pass. Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13167
-
Brian Behlendorf authored
On FreeBSD pools are not allowed to be created using vdevs which are backed by ZFS volumes. This configuration is not recommended for any supported platform, nevertheless the largest_pool_001_pos.ksh test case makes use of it as a convenience. This causes the test case to fail reliably on FreeBSD. The layout is still tolerated on Linux so only perform this test on Linux. Reviewed-by:
Igor Kozhukhov <igor@dilos.org> Reviewed by: George Melikov <mail@gmelikov.ru> Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13166
-
Paul Dagnelie authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Amanakis <gamanakis@gmail.com> Signed-off-by:
Paul Dagnelie <pcd@delphix.com> Closes #13154
-
- 16 Feb, 2022 2 commits
-
-
наб authored
Turns out, when your test-suite fails on FreeBSD the rerun logic would fail as follows: Results Summary PASS 1358 FAIL 7 SKIP 47 Running Time: 04:00:02 Percent passed: 96.2% Log directory: /var/tmp/test_results/20220225T092538 mktemp: illegal option -- p usage: mktemp [-d] [-q] [-t prefix] [-u] template ... mktemp [-d] [-q] [-u] -t prefix mktemp: illegal option -- p usage: mktemp [-d] [-q] [-t prefix] [-u] template ... mktemp [-d] [-q] [-u] -t prefix /usr/local/share/zfs/zfs-tests.sh: cannot create : No such file or directory ... This change resolves a flaw from the original commit, 2320e6eb ("Add zfs-test facility to automatically rerun failing tests") Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13156
-
Paul Dagnelie authored
We move the spinlock unlock before the thread creation. This should be safe because the thread creation code doesn't actually manipulate any taskq data structures; that's done by the thread once it's created. We also remove the assertion that the maxthreads is the current threads plus one; that assertion could fail if multiple hotplug events come in quick succession, and the first new taskq thread hasn't had a chance to start processing yet. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> eviewed-by:
Tony Nguyen <tony.nguyen@delphix.com> Signed-off-by:
Paul Dagnelie <pcd@delphix.com> Closes #12714
-
- 24 Feb, 2022 5 commits
-
-
Damian Szuberski authored
Fix `zfs-dkms` installation on Debian-derived distributions by aligning the directory detection logic to #13096. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
szubersk <szuberskidamian@gmail.com> Closes #11449 Closes #13141
-
Attila Fülöp authored
Linux 5.11 changed kernel_fpu_begin() to an inlined function and moved the functionality to kernel_fpu_begin_mask(). This breaks the existing detection mechanism since it checks if kernel_fpu_begin is an exported kernel symbol, which isn't the case for an inlined function. To avoid assumptions about internal implementation, replace ZFS_LINUX_TEST_RESULT_SYMBOL in favor of ZFS_LINUX_TEST_RESULT which already makes sure kernel_fpu_{begin,end}() is usable by us. Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Attila Fülöp <attila@fueloep.org> Closes #13147
-
Damian Szuberski authored
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
szubersk <szuberskidamian@gmail.com> Closes #9935 Closes #13096
-
George Amanakis authored
Raw sending from pool1/encrypted with ashift=9 to pool2/encrypted with ashift=12 results to failure when mounting pool2/encrypted (Input/Output error). Notably, the opposite, raw sending from a greater ashift to a lower one does not fail. This happens because zio_compress_write() falsely checks only ZIO_FLAG_RAW_COMPRESS and not ZIO_FLAG_RAW_ENCRYPT which is also set in encrypted raw send streams. In this case it rounds up the psize and if not equal to the zio->io_size it modifies the block by zeroing out the extra bytes. Because this happens in a SA attr. registration object (type=46), the decryption fails upon mounting the filesystem, and zpool status falsely reports an error. Fix this by checking both ZIO_FLAG_RAW_COMPRESS and ZIO_FLAG_RAW_ENCRYPT before deciding whether to zero-pad a block. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
George Amanakis <gamanakis@gmail.com> Closes #13067 Closes #13074
-
George Amanakis authored
There are two codepaths than can dirty final TXGs: 1) If calling spa_export_common()->spa_unload()-> spa_unload_log_sm_flush_all() after the spa_final_txg is set, then spa_sync()->spa_flush_metaslabs() may end up dirtying the final TXGs. Then we have the following panic: Call Trace: <TASK> dump_stack_lvl+0x46/0x62 spl_panic+0xea/0x102 [spl] dbuf_dirty+0xcd6/0x11b0 [zfs] zap_lockdir_impl+0x321/0x590 [zfs] zap_lockdir+0xed/0x150 [zfs] zap_update+0x69/0x250 [zfs] feature_sync+0x5f/0x190 [zfs] space_map_alloc+0x83/0xc0 [zfs] spa_generate_syncing_log_sm+0x10b/0x2f0 [zfs] spa_flush_metaslabs+0xb2/0x350 [zfs] spa_sync_iterate_to_convergence+0x15a/0x320 [zfs] spa_sync+0x2e0/0x840 [zfs] txg_sync_thread+0x2b1/0x3f0 [zfs] thread_generic_wrapper+0x62/0xa0 [spl] kthread+0x127/0x150 ret_from_fork+0x22/0x30 </TASK> 2) Calling vdev_*_stop_all() for a second time in spa_unload() after spa_export_common() unnecessarily delays the final TXGs beyond what spa_final_txg is set at. Fix this by performing the check and call for spa_unload_log_sm_flush_all() before the spa_final_txg is set in spa_export_common(). Also check if the spa_final_txg has already been set in spa_unload() and skip those calls in this case. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
George Amanakis <gamanakis@gmail.com> External-issue: https://www.illumos.org/issues/9081 Closes #13048 Closes #13098
-
- 17 Feb, 2022 22 commits
-
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Amanakis <gamanakis@gmail.com> Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13101
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Amanakis <gamanakis@gmail.com> Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13101
-
Tomohiro Kusumi authored
All of these externs are already #included as static inline functions via corresponding headers. Reviewed-by:
Igor Kozhukhov <igor@dilos.org> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> Closes #13073
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12844
-
Brian Behlendorf authored
Related to commit 90b77a03 . Retry the `zpool export` if the pool is "busy" indicating there is a process accessing the mount point. This can happen after an import and allowing it to be retried will avoid spurious test failures. Reviewed by: George Melikov <mail@gmelikov.ru> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13092
-
Brian Behlendorf authored
The dRAID section of the zpool_expand_001_pos test would reliably fail because the calculated expansion size assumed the dRAID top-level vdev was created with a distributed spare. Create the vdev as expected to resolve the test failure. This test case flaw was accidentally caused by changing the default number of dRAID distributed spares from one to zero while dRAID was being developed. Additionally, remove zpool_expand_005_pos from the list of possible faulty tests. It appears to be passing consistently in my testing. Reviewed by: George Melikov <mail@gmelikov.ru> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13091
-
Brian Behlendorf authored
Observed when building on CentOS 8 Stream. Remove the `out` label at the end of the function and instead return. linux/simd_x86.h: In function 'kfpu_begin': linux/simd_x86.h:337:1: error: label at end of compound statement Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Attila Fülöp <attila@fueloep.org> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13089
-
наб authored
Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13082
-
наб authored
Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13082
-
наб authored
It's noted very scarcely in the code as it stands, indeed the only actual comment on this is /* * We have finished background destroying, but there is still * some space left in the dp_free_dir. Transfer this leaked * space to the dp_leak_dir. */ Introduced in fbeddd60 ("Illumos 4390 - I/O errors can corrupt space map when deleting fs/vol"), which explains, alongside the references, that this can only happen with a corrupted pool Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Melikov <mail@gmelikov.ru> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13081
-
Zhu Chuang authored
Should be `-o keyformat=passphrase` instead of `-o -keyformat=passphrase` Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Chuang Zhu <chuang@melty.land> Closes #13072
-
Brian Behlendorf authored
Changing volmode may need to remove minors, which could be open, so call udev_wait() before we "zfs set volmode=<value>". This ensures no udev process has the zvol open (i.e. blkid) and the kernel zvol_remove_minor_impl() function won't skip removing the in use device. Reviewed-by:
John Kennedy <john.kennedy@delphix.com> Reviewed-by:
George Melikov <mail@gmelikov.ru> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #13075
-
drowfx authored
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Signed-off-by:
Matthias Blankertz <matthias@blankertz.org> Closes #12994 Closes #13044
-
Attila Fülöp authored
dmu_recv_begin_check() unconditionally sets the DS_HOLD_FLAG_DECRYPT flag before calling dsl_dataset_hold_flags(). If the key on the receiving side isn't loaded or the send stream contains embedded blocks, the receive check fails for a stream which is perfectly valid and could be received without any problem. This seems like a remnant of the initial design, where unencrypted datasets below encrypted ones weren't allowed. Add a condition to set `DS_HOLD_FLAG_DECRYPT` only for encrypted datasets, modify an existing test to detect this regression and add a test for raw replication streams. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Amanakis <gamanakis@gmail.com> Co-authored-by:
George Amanakis <gamanakis@gmail.com> Signed-off-by:
Attila Fülöp <attila@fueloep.org> Closes #13033 Closes #13076
-
Damian Szuberski authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Authored-by:
Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by:
Peter Levine <plevine457@gmail.com> Closes #13046
-
Peter Levine authored
Currently, $(CC), $(LD), and $(LLVM) variables aren't passed to kbuild while building modules. This causes modules to build with the default GNU GCC toolchain and prevents experimenting with other toolchains such as CLANG/LLVM. It can also lead to build failure if the CFLAGS/LDFLAGS passed are incompatible with gcc/ld. Pass $KERNEL_CC, $KERNEL_LD, and $KERNEL_LLVM as $(CC), $(LD), and $(LLVM), respectively, to kbuild for each that is defined in the environment. This should take care of the majority of alternative toolchain use cases. Reviewed-by:
Damian Szuberski <szuberskidamian@gmail.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Peter Levine <plevine457@gmail.com> Closes #13046
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12979
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Issue #12899
-
Attila Fülöp authored
Linux 5.16 moved XSTATE_XSAVE and XSTATE_XRESTORE out of our reach, so add our own XSAVE{,OPT,S} code and use it for Linux 5.16. Please note that this differs from previous behavior in that it won't handle exceptions created by XSAVE an XRSTOR. This is sensible for three reasons. - Exceptions during XSAVE and XRSTOR can only occur if the feature is not supported or enabled or the memory operand isn't aligned on a 64 byte boundary. If this happens something else went terribly wrong, and it may be better to stop execution. - Previously we just printed a warning and didn't handle the fault, this is arguable for the above reason. - All other *SAVE instruction also don't handle exceptions, so this at least aligns behavior. Finally add a test to catch such a regression in the future. Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Attila Fülöp <attila@fueloep.org> Closes #13042 Closes #13059
-
Damian Szuberski authored
Using `zfs_mount_at()` gives opportunity to properly propagate mountopts from what's stored in a pool to the `mount(2)` syscall invocation. It fixes cases when mount options are set to incorrect values and rectification is impossible (e. g. Linux initrd boot sequence in #7947). Moved debug information printing after all variables are initialized - printed text reflects what is passed to `mount(2)`. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
szubersk <szuberskidamian@gmail.com> Issue #7947 Closes #13021
-
Christian Schwarz authored
The following commit moved the users of `deferred` into function dsl_pool_unreserved_space: commit d2734cce Author: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com> Date: Fri Dec 16 14:11:29 2016 -0800 OpenZFS 9166 - zfs storage pool checkpoint Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Reviewed-by:
George Melikov <mail@gmelikov.ru> Signed-off-by:
Christian Schwarz <christian.schwarz@nutanix.com> Closes #13056
-
наб authored
@LIBFETCH_SONAME@ is no longer quoted. The C define still is. Ref: 153f7c9f Ref: https://github.com/openzfs/zfs/pull/12835#discussion_r776833743 Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12922
-