- 29 Jan, 2024 14 commits
-
-
Rob Norris authored
struct mnt_idmap no longer has a struct user_namespace within it. Work around this by creating a temporary with the copy of the map we need taken from the idmap. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by:
Youzhong Yang <yyang@mathworks.com> Signed-off-by:
Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15805
-
Rob Norris authored
The name inode_permission is now defined in the kernel. Rename ours to test_permission, in line with most of our other tests. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15805
-
Rob Norris authored
MAX_ORDER has been renamed to MAX_PAGE_ORDER. Rather than just redefining it, instead define our own name and set it consistently from the start. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15805
-
Rob Norris authored
Linux has removed strlcpy in favour of strscpy. This implements a fallback implementation of strlcpy for this case. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15805
-
Rob Norris authored
blkdev_get_by_path() and blkdev_put() have been replaced by bdev_open_by_path() and bdev_release(), which return a "handle" object with the bdev object itself inside. This adds detection for the new functions, and macros to handle the old and new forms consistently. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15805
-
Rob Norris authored
The kernel is now being compiled with -Wmissing-prototypes. Most of our test stub functions had no prototype, and failed to compile. Since they don't need to be visible anywhere else, just make them all static. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15805
-
Brian Behlendorf authored
Update the META file to reflect compatibility with the 6.7 kernel. Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #15833
-
Paul Dagnelie authored
During device removal stress tests, we noticed that we were tripping the assertion that mg_initialized was true. After investigation, it was determined that the mg in question was the embedded log metaslab group for a newly added vdev; the normal mg had been initialized (by metaslab_sync_reassess, via vdev_sync_done). However, because the spa config alloc lock is not held as writer across both calls to metaslab_sync_reassess, it is possible for an allocation to happen between the two metaslab_groups being initialized. Because the metaslab code doesn't check the group in question, just the vdev's main mg, it is possible to get past the initial check in vdev_allocatable and later fail due to the assertion. We simply remove the assertions. We could also consider locking the ALLOC lock around the reassess calls in vdev_sync_done, but that risks deadlocks. We could check the actual target mg in vdev_allocatable, but that risks racing with a passivation that comes in after that check but before the assertion. We still won't be able to actually allocate from the metaslab group if no metaslabs are ready, so this change shouldn't break anything. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Wilson <george.wilson@delphix.com> Signed-off-by:
Paul Dagnelie <pcd@delphix.com> Closes #15818
-
Richard Kojedzinszky authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by:
Richard Kojedzinszky <richard@kojedz.in> Closes #15793
-
Richard Kojedzinszky authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by:
Richard Kojedzinszky <richard@kojedz.in> Closes #15793
-
rilysh authored
Since we're looking for a single new-line character in the haystack, it's better (and slightly more efficient) to use strchr() instead of strstr(). Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Richard Yao <richard.yao@alumni.stonybrook.edu> Signed-off-by:
rilysh <nightquick@proton.me> Closes #15798
-
Chris Davidson authored
zpool-iostat.8: Updated time(2) -> time(1) to align to manual page zpool-list.8: Updated time(2) -> time(1) to align to manual page zpool-status.8: Updated time(2) -> time(1) to align to manual page zpool-wait.8: Update time(2) -> time(1) to align to manual page Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Christopher Davidson <christopher.davidson@gmail.com> Closes #15823
-
Brian Behlendorf authored
The zdb_args_pos test may take slightly longer than 600 seconds to run on some of the CI builders. To prevent this from causing failures allow up to 1200 seconds for tests in this group. Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #15826
-
Andrew Innes authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by:
Andrew Innes <andrew.c12@gmail.com> Closes #15828
-
- 26 Jan, 2024 6 commits
-
-
MigeljanImeri authored
Removed the list_size struct member as it was only used in a single assertion, as mentioned in PR #15478. Reviewed-by:
Brian Atkinson <batkinson@lanl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
MigeljanImeri <imerimigel@gmail.com> Closes #15812
-
Rob N authored
list, status and iostat all display the -T timestamp before the header, but wait showed it after. Make it be like the others. Reported-by:
Kyle Evans <kevans@FreeBSD.org> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rob Norris <robn@despairlabs.com> Closes #15825
-
Ameer Hamza authored
If devid or physpath for a vdev changes between imports, ensure it is updated to the new value. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
Ameer Hamza <ahamza@ixsystems.com> Closes #15816
-
Tino Reichardt authored
GitHub Actions is transitioning from Node 16 to Node 20. So we need to update these: - actions/checkout@v3 -> v4 - actions/download-artifact@v3 -> v4 - actions/upload-artifact@v3 -> v4 and some minor changes Update also the documentation of the testings workflow. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Andrew Innes <andrew.c12@gmail.com> Signed-off-by:
Tino Reichardt <milky-zfs@mcmilk.de> Closes #15820
-
Richard Yao authored
The LLVM/Clang developers pointed out that using the CPP to detect use of functions that our QA policies prohibit risks invoking undefined behavior. To resolve this, we configure CodeQL to detect forbidden function usage. Note that cpp in the context of CodeQL refers to C/C++, rather than the C PreProcessor, which C++ also uses. It really should have been written cxx, but that ship sailed a long time ago. This misuse of the term cpp is retained in the CodeQL configuration for consistency with upstream CodeQL. As a side benefit, verbose make no longer is a wall of text showing a bunch of CPP macros, which can make debugging slightly easier. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #15819 Closes #14134
-
Tino Reichardt authored
The Github Action Runner got some new hardware metrics. We should use the provided and empty disk which is pre-mounted at /mnt now. Disk1: 89GiB -> rootfs + bootfs with ~80MB/s -> don't care Disk2: 64GiB -> /mnt with 420MB/s -> new testing ssd This commit will mount the new disk to /var/tmp and provide hopefully some speedups within our testings. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Andrew Innes <andrew.c12@gmail.com> Signed-off-by:
Tino Reichardt <milky-zfs@mcmilk.de> Closes #15811
-
- 23 Jan, 2024 2 commits
-
-
Pawel Jakub Dawidek authored
Descriptor leak can be easily reproduced by doing: # zpool import tank # sysctl kern.openfiles # zpool export tank; zpool import tank # sysctl kern.openfiles We were leaking four file descriptors on every import. Similar leak most likely existed when using file-based VDEVs. External-issue: https://reviews.freebsd.org/D43529 Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Pawel Jakub Dawidek <pawel@dawidek.net> Closes #15630
-
Brian Behlendorf authored
If block cloning is disabled by default then enable it when running the bclone tests. Follow up to #15529. Reviewed-by:
Brian Atkinson <batkinson@lanl.gov> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #15796
-
- 19 Jan, 2024 1 commit
-
-
Val Packett authored
musl libc has deprecated LFS64 aliases, so bootstrapping FreeBSD tools under musl distros has been failing with stat64 errors. Apply the aliases under non-glibc Linux to fix this problem. Reviewed-by:
Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Val Packett <val@packett.cool> Closes #15780
-
- 17 Jan, 2024 4 commits
-
-
Tino Reichardt authored
Compiling on arm64 freebsd-13.2 and arm64 almalinux-8 brings currently this error: ``` CC tests/zfs-tests/cmd/clonefile.o tests/zfs-tests/cmd/clonefile.c:166:43: error: result of comparison of \ constant -1 with expression of type 'char' is always true \ [-Werror,-Wtautological-constant-out-of-range-compare] while ((c = getopt(argc, argv, "crfdq")) != -1) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~ 1 error generated. gmake[2]: *** [Makefile:8675: tests/zfs-tests/cmd/clonefile.o] Error 1 ``` Fix: use correct variable type `int`. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Rob Norris <robn@despairlabs.com> Signed-off-by:
Tino Reichardt <milky-zfs@mcmilk.de> Closes #15783
-
Tino Reichardt authored
Credential Implementation -> Condition Variables Implementation Reviewed-by:
Brian Atkinson <batkinson@lanl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Tino Reichardt <milky-zfs@mcmilk.de> Closes #15782
-
Kevin Jin authored
Switch from cv_wait() to cv_wait_idle() in vdev_autotrim_wait_kick(), which should mitigate the high load average while waiting. Reviewed-by:
Brian Atkinson <batkinson@lanl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
jxdking <lostking2008@hotmail.com> Closes #15781
-
Pawel Jakub Dawidek authored
If the destination file is mmaped and the mmaped region was already read, so it is cached, we need to update mmaped pages after successful clone using update_pages(). Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Pointed out by: Ka Ho Ng <khng@freebsd.org> Signed-off-by:
Pawel Jakub Dawidek <pawel@dawidek.net> Closes #15772
-
- 16 Jan, 2024 8 commits
-
-
Rob N authored
In db4fc559 I messed up and changed this bit of code to set the inode atime to an uninitialised value, when actually it was just supposed to loading the atime from the inode to be stored in the SA. This changes it to what it should have been. Ensure times change by the right amount Previously, we only checked if the times changed at all, which missed a bug where the atime was being set to an undefined value. Now ensure the times change by two seconds (or thereabouts), ensuring we catch cases where we set the time to something bonkers Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15762 Closes #15773
-
Lalufu authored
When building (s)rpm files through the Makefile, a directory structure is created in /tmp to hold the various files. In case the user running the command has overridden some of the RPM path settings through their user profile (for example in `~/.rpmmacros`), these paths do not line up with the configuration, and the build fails. Make sure all paths used are properly defined. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ralf Ertzinger <ralf@skytale.net> Closes #15756
-
youzhongyang authored
On Linux x86_64, kmem cache can have size up to 4M, however increasing spl_kmem_cache_slab_limit can lead to crash due to the size check inconsistency. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Youzhong Yang <yyang@mathworks.com> Closes #15757
-
Ameer Hamza authored
If the AUX vdev is added using UUID, importing the pool falls back AUX vdev to open it with disk name instead of UUID due to the absence of path information for AUX vdevs. Since AUX label now have path information, this PR adds path handling for it in `label_path`. Reviewed-by:
Umer Saleem <usaleem@ixsystems.com> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
Ameer Hamza <ahamza@ixsystems.com> Closes #15737
-
Ameer Hamza authored
Pool import logic uses vdev paths, so it makes sense to add path information on AUX vdev as well. Reviewed-by:
Umer Saleem <usaleem@ixsystems.com> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
Ameer Hamza <ahamza@ixsystems.com> Closes #15737
-
Ameer Hamza authored
When spare or l2cache (aux) vdev is added during pool creation, spa->spa_uberblock is not dumped until that point. Subsequently, the aux label is never synchronized after its initial creation, resulting in the uberblock label remaining undumped. The uberblock is crucial for lib_blkid in identifying the ZFS partition type. To address this issue, we now ensure sync of the uberblock label once if it's not dumped initially. Reviewed-by:
Umer Saleem <usaleem@ixsystems.com> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
Ameer Hamza <ahamza@ixsystems.com> Closes #15737
-
Rich Ercolani authored
zdb -R has a minor flaw in which it will not always print the full output of a decompressed block. Oops. While I was in there, I also reworked the logic so it won't try ZLE unless everything else fails, which will hopefully avoid the problem ZDB_NO_ZLE was intended to mitigate of reporting a lot of false positives of ZLE compressed blocks... Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rich Ercolani <rincebrain@gmail.com> Closes #15723
-
Umer Saleem authored
For block cloning, if we mmap the cloned file and write from the map into the file, it triggers a panic in dbuf_redirty() on Linux. The same scenario causes data corruption on FreeBSD. Both these issues are fixed under PR#15656 and PR#15665. It would be good to add a test for this scenario in ZTS. The test program and issue was produced by @robn. Reviewed-by:
Pawel Jakub Dawidek <pawel@dawidek.net> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Reviewed-by:
Ameer Hamza <ahamza@ixsystems.com> Signed-off-by:
Umer Saleem <usaleem@ixsystems.com> Closes #15717
-
- 12 Jan, 2024 5 commits
-
-
Brian Behlendorf authored
Drop the no_memory() call from zpool_in_use() when reading the label fails and instead return the error to the caller. This prevents a misleading "internal error: out of memory" error when the label can't be read. This will result in is_spare() returning B_FALSE instead of aborting, which is already safely handled. Furthermore, on Linux it's possible for EREMOTEIO to returned by an NVMe device if the device has been low-level formatted and not rescanned. In this case we want to fallback to the legacy scanning method and read any of the labels we can. Reviewed-by:
Brian Atkinson <batkinson@lanl.gov> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Issue #13538 Closes #15747
-
Benjamin Sherman authored
This change provides rpm spec macros to sign the zfs and spl kmods as the final step after the %install scriptlet. This is needed since the find-debuginfo.sh script strips out debug symbols plus signatures. Kernel module signing only occurs when the required files are present as typically required in the Linux source tree: - certs/signing_key.pem - certs/signing_key.x509 The method for overriding the default __spec_install_post macro is inspired by (and largely copied from) the Fedora kernel.spec. Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by:
Benjamin Sherman <benjamin@holyarmy.org> Closes #15744
-
Mark Johnston authored
For FreeBSD sysctls, we don't want the extra newline, since the sysctl(8) utility will format strings appropriately. Reviewed-by:
Rob Norris <robn@despairlabs.com> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Reported-by:
Peter Holm <pho@FreeBSD.org> Signed-off-by:
Mark Johnston <markj@FreeBSD.org> Closes #15719
-
Mark Johnston authored
sbuf_cpy() resets the sbuf state, which is wrong for sbufs allocated by sbuf_new_for_sysctl(). In particular, this code triggers an assertion failure in sbuf_clear(). Simplify by just using sysctl_handle_string() for both reading and setting the tunable. Fixes: 6930ecbb ("spa: make read/write queues configurable") Reviewed-by:
Rob Norris <robn@despairlabs.com> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Reported-by:
Peter Holm <pho@FreeBSD.org> Signed-off-by:
Mark Johnston <markj@FreeBSD.org> Closes #15719
-
Rich Ercolani authored
Profiling zdb -vvvvv on datasets with a lot of zstd blocks, we find ourselves spending quite a lot of time on malloc/free, because we allocate a 16M abd each call, and never free it, so we're leaking 16M per call as well. This seems sub-optimal. So let's just keep the buffer around and reuse it. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Rob Norris <robn@despairlabs.com> Signed-off-by:
Rich Ercolani <rincebrain@gmail.com> Closes #15721
-