aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* systemd: add weekly and monthly scrub timersGeorgy Yakovlev2021-12-166-1/+64
| | | | | | | | | | | | | | | | Timers can be enabled as follows: systemctl enable [email protected] --now systemctl enable [email protected] --now Each timer will pull in zfs-scrub@${poolname}.service, which is not schedule-specific. Added PERIODIC SCRUB section to zpool-scrub.8. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Georgy Yakovlev <[email protected]> Closes #12193
* t/z_diff/socket, zfs: main: fix unused argument warnings, ARGSUSED tagsнаб2021-12-132-9/+5
| | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
* libzfs: diff: simplify superfluous stdioнаб2021-12-131-13/+9
| | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
* libzfs: diff: print_what() can return the symbol => get_what()наб2021-12-131-37/+18
| | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
* libzfs: diff: stream_bytes: use fputc, %hho formats charsнаб2021-12-131-2/+2
| | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
* libzfs: zpool_set_vdev_prop: remove unused vpropнаб2021-12-131-3/+0
| | | | | | | | | Found by clang 14 with -Wunused-but-set-variable Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
* linux: libspl: getmntany: remove unused argumentнаб2021-12-131-2/+2
| | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
* zfs, libzfs: diff: accept -h/ZFS_DIFF_NO_MANGLE, disabling path escapingнаб2021-12-139-10/+74
| | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12829
* Add init script to load keysogelpre2021-12-127-9/+155
| | | | | | | | | | Add new init scripts which allow automatic loading of keys if keylocation property is set to a URI. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Benedikt Neuffer <[email protected]> Closes #11659 Closes #11662
* zfs-dkms rpm: Fix scriptlets dependenciesTill Maas2021-12-121-0/+4
| | | | | | | | | | To ensure that the necessary packages are available during the %post and %preun scriptlets, require them properly. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Till Maas <[email protected]> Closes #12822 Closes #12832
* FreeBSD: Add vop_standard_writecount_nomsyncRyan Moeller2021-12-122-0/+18
| | | | | | | | | | https://cgit.freebsd.org/src/commit?id=3ffcfa599e29686cf2b3c1a6087408c37acaed78 Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #12828
* zfs: Fix a deadlock between page busy and the teardown lockMark Johnston2021-12-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #12828
* FreeBSD: Catch up with more VFS changesRyan Moeller2021-12-121-0/+18
| | | | | | | | | | | | Unused thread argument was removed from NDINIT* https://cgit.freebsd.org/src/commit?id=7e1d3eefd410ca0fbae5a217422821244c3eeee4 Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #12828
* FreeBSD supports edonr follow upнаб2021-12-081-1/+2
| | | | | | | | | | | | This chases 269b5dadcfd1d5732cf763dddcd46009a332eae4 (#12735), which touched the actual code but didn't fix the comment Additionally, ignore the name. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12823
* Linux 5.15 compat: META (#12824)Brian Behlendorf2021-12-071-1/+1
| | | | | | | The final 5.15 kernel is available and has been tested. Signed-off-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Tony Hutter <[email protected]>
* contrib/bash_completion.d: fix error spew from __zfs_match_snapshot()наб2021-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given: /sbin/zfs list filling/a-zvol<TAB> -o space,refratio The rest of the cmdline gets vored by: /sbin/zfs list filling/a-zvolcannot open 'filling/a-zvol': operation not applicable to datasets of this type With -x (fragment): + COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur")) +++ __zfs_match_snapshot +++ local base_dataset=filling/dziadtop-nowe-duchy +++ [[ filling/dziadtop-nowe-duchy != filling/dziadtop-nowe-duchy ]] +++ [[ filling/dziadtop-nowe-duchy != '' ]] +++ __zfs_list_datasets filling/dziadtop-nowe-duchy +++ /sbin/zfs list -H -o name -s name -t filesystem -r filling/dziadtop-nowe-duchy +++ tail -n +2 cannot open 'filling/dziadtop-nowe-duchy': operation not applicable to datasets of this type +++ echo filling/dziadtop-nowe-duchy +++ echo filling/dziadtop-nowe-duchy@ ++ compgen -W 'filling/dziadtop-nowe-duchy This properly completes with: $ /sbin/zfs list filling/a-zvol<TAB> -o space,refratio filling/a-zvol filling/a-zvol@ $ /sbin/zfs list filling/a-zvol<cursor> -o space,refratio Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12820
* Linux 5.16: Resolve ZSTD_isError symbol collision in Linux kernelColeman Kane2021-12-072-2/+1
| | | | | | | | | | | | | Newer zstd code introduced in the main kernel tree now creates a symbol collision with ZSTD_isError in our ZSTD code. This change relabels our implementation with a ZFS-specific symbol name, and undoes some macro-based micro-optimizations that conflict with the attempt to rename our internal-use version. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #12819
* Linux 5.16: The blk-cgroup.h header is where struct blkcg_gq is definedColeman Kane2021-12-072-0/+30
| | | | | | | | | | | | | The definition of struct blkcg_gq was moved into blk-cgroup.h, which is a header that's been in Linux since 2015. This is used by vdev_blkg_tryget() in module/os/linux/zfs/vdev_disk.c. Since the kernel for CentOS 7 and similar-generation releases doesn't have this header, its inclusion is guarded by a configure test. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #12819
* Linux 5.16: bio_set_dev is no longer a helper macroColeman Kane2021-12-072-0/+52
| | | | | | | | | | | | | | | | | | This change adds a confiugre check to determine if bio_set_dev is a helper macro or not. If not, then the attempt to override its internal call to bio_associate_blkg(), with a macro definition to our own version, is no longer possible, as the compiler won't use it when compiling the new inline function replacement implemented in the header. This change also creates a new vdev_bio_set_dev() function that performs the same work, and also performs the work implemented in vdev_bio_associate_blkg(), as it is the only thing calling that function in our code. Our custom vdev_bio_associate_blkg() is now only compiled if the bio_set_dev() is a macro in the Linux headers. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #12819
* Linux 5.16: type member of iov_iter renamed iter_typeColeman Kane2021-12-072-0/+28
| | | | | | | | | | | | | The iov_iter->type member was renamed iov_iter->iter_type. However, while looking into this, realized that in 2018 a iov_iter_type(*iov) accessor function was introduced. So if that is present, use it, otherwise fall back to trying the existing behavior of directly accessing type from iov_iter. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #12819
* Linux 5.16: block_device_operations->submit_bio now returns voidColeman Kane2021-12-072-2/+37
| | | | | | | | | | The return type for the submit_bio member of struct block_device_operations was changed to no longer return a value. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #12819
* ZFS send/recv with ashift 9->12 leads to data corruptionPaul Dagnelie2021-12-072-7/+17
| | | | | | | | | Improve the ability of zfs send to determine if a block is compressed or not by using information contained in the blkptr. Reviewed-by: Rich Ercolani <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #12770
* Update "tests/README.md"Arshad Hussain2021-12-071-4/+109
| | | | | | | | | | | | This patch adds detail section on adding and running test-case. It also changes markdown number list to more readeable headers Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Arshad Hussain <[email protected]> Closes #12737
* Add `const` to nvlist functions to properly expose their real behaviorPaul Dagnelie2021-12-0628-621/+728
| | | | | | | | Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #12728
* ZTS: import_rewind_device_replaced reliably failsBrian Behlendorf2021-12-061-2/+2
| | | | | | | | | | | | | | The import_rewind_device_replaced.ksh test was never entirely reliable because it depends on MOS data not being overwritten. The MOS data is not protected by the snapshot so occasional failures were always expected. However, this test is now failing reliably on all platforms indicating something has changed in the code since the test was marked "maybe". Convert the test to a "known" failure until the root cause is identified and resolved. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #12821
* Corrected a case where we could read uninited ABD memoryRich Ercolani2021-12-031-11/+14
| | | | | | | | | | | | For my sins, I started running valgrind over ztest to try and fix that pesky intermittent "zloop dies with malloc errors" problem. This one seemed exciting enough to merit cutting a PR for before the rest get polished. Suggested-by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #12214
* Strip colons from all test result filenamesJohn Wren Kennedy2021-12-012-2/+2
| | | | | | | | | | | | The upload artifact functionality in github can't handle colons in filenames. The current code handles this for files under the most recent set of results. With the ability to rerun failed tests, now there can be multiple sets of results, and they all need to be processed in the same way. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: John Kennedy <[email protected]> Closes #12815
* Linux 5.13 compat: retry zvol_open() when contendedBrian Behlendorf2021-12-015-38/+90
| | | | | | | | | | | | | | | | | | | | | | | Due to a possible lock inversion the zvol open call path on Linux needs to be able to retry in the case where the spa_namespace_lock cannot be acquired. For Linux 5.12 an older kernel this was accomplished by returning -ERESTARTSYS from zvol_open() to request that blkdev_get() drop the bdev->bd_mutex lock, reaquire it, then call the open callback again. However, as of the 5.13 kernel this behavior was removed. Therefore, for 5.12 and older kernels we preserved the existing retry logic, but for 5.13 and newer kernels we retry internally in zvol_open(). This should always succeed except in the case where a pool's vdev are layed on zvols, in which case it may fail. To handle this case vdev_disk_open() has been updated to retry when opening a device when -ERESTARTSYS is returned. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #12301 Closes #12759
* Temporarily remove tests from sanity runfileJohn Wren Kennedy2021-12-011-8/+7
| | | | | | | | | | | With the addition of functionality to rerun failing tests, some tests that fail only sometimes still fail often enough to degrade the reliability of the sanity runs. Remove them from the runfile until they reliably pass. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: John Kennedy <[email protected]> Closes #12814
* Add zfs-test facility to automatically rerun failing testsPaul Dagnelie2021-12-015-29/+144
| | | | | | | | | | | | This was a project proposed as part of the Quality theme for the hackthon for the 2021 OpenZFS Developer Summit. The idea is to improve the usability of the automated tests that get run when a PR is created by having failing tests automatically rerun in order to make flaky tests less impactful. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #12740
* get_key_material: fix styleAttila Fülöp2021-11-301-2/+4
| | | | | | | Reviewed-by: Felix Dörre <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes #12765
* get_key_material: skip passphrase validation when loading keysHarald van Dijk2021-11-301-4/+9
| | | | | | | | | | | | | | The restriction that an encryption key must be at least MIN_PASSPHRASE_LEN characters long make sense when changing the encryption key, but not when loading: as this restriction is not enforced in the libraries, it is possible to bypass zfs change-key's restrictions and end up with a key that becomes impossible to load with zfs load-key, for example through pam_zfs_key. Reviewed-by: Felix Dörre <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Harald van Dijk <[email protected]> Closes #12765
* pam_zfs_key: tests: check if zfs load-key works on short passphrasesAttila Fülöp2021-11-303-1/+86
| | | | | | | | | | | | | | | The pam_zfs_key pam module does not enforce a minimum password length while changing the user password and thus the users home dataset passphrase. To not end up with a dateset `zfs load-key` can't load the key for, `zfs load-key` should not enforce a minimum passphrase length. This adds a test for that. Reviewed-by: Felix Dörre <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes #12765 Closes #12651 Closes #12656
* pam_zfs_key: tests: clean up the generated pam service config fileAttila Fülöp2021-11-304-9/+17
| | | | | | | | | | | | | Remove the generated pam service config file `/etc/pam.d/pam_zfs_key_test` on test cleanup, since the tests shouldn't alter system state. While here, move the pam service config file name into a variable. Reviewed-by: Felix Dörre <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes #12765
* Remove REMAKE_INITRDjokersus2021-11-301-1/+0
| | | | | | | | | The option has been deprecated in dkms and will break packaging in future versions. See https://github.com/dell/dkms/commit/7114c62 Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Amanakis <[email protected]> Signed-off-by: jokersus <[email protected]> Closes #12781
* Default to zfs_dmu_offset_next_sync=1Brian Behlendorf2021-11-302-8/+12
| | | | | | | | | | | | Strict hole reporting was previously disabled by default as a performance optimization. However, this has lead to confusion over the expected behavior and a variety of workarounds being adopted by consumers of ZFS. Change the default behavior to always report holes and force the TXG sync. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #12746
* Stop segfaulting on unmount error caseRich Ercolani2021-11-301-3/+7
| | | | | | | | | | | | After interrupting ZTS runs that errored out, I found that "zpool export testpool2" was segfaulting. This seems unnecessary. Reviewed-by: szubersk <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #12804
* Code cleanupsPawel Jakub Dawidek2021-11-305-18/+19
| | | | | | | | | | | | | | | - Allocate ve_search on the stack, so we avoid allocating memory for every I/O even if the VDEV cache is disabled. - Reduce lock scope. - Avoid locking in vdev_cache_read() when the VDEV cache is disabled. - Sort file names properly. - Correct comment. Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pawel Jakub Dawidek <[email protected]> Closes #12749
* Replace wrong occurrences of `affect` by `effect` in the man pagesmaxz2021-11-302-2/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Amanakis <[email protected]> Signed-off-by: Max Zettlmeißl <[email protected]> Closes #12784
* Allow printing special vdev metaslab groupsRich Ercolani2021-11-302-8/+8
| | | | | | | | | Sometimes, we'd like to know info about the metaslab groups on special vdevs too. So let's make -MM do something useful. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Allan Jude <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #12750
* Pass `--enable=all` to shellcheck within contrib/Damian Szuberski2021-11-3022-50/+65
| | | | | | | | | | | | | | | - Remove `SHELLCHECK_IGNORE` in favor of inline suppressions and more general `SHELLCHECK_OPTS`. - Exclude `SC2250` (turned on by `--enable=all`) globally - Pass `--enable=all` to shellcheck for scripts in contrib/: it's very important to catch errors early in areas that are not easily testable. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12760
* etc/systemd/zfs-mount-generator: serialise, handle keylocation=http[s]://наб2021-11-302-275/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/systemd/zfs-mount-generator: serialise The wins for a relatively normal workload are rather slim: real 0.02119s/0.00985s=2.15029x user 0.02130s/0.00346s=6.15560x sys 0.03858s/0.00643s=6.00062x wall-total 0.014518s/0.005925s=2.45009x wall-init 0.014518s/0.002457s=5.90684x wall-real 0.014518s/0.003467s=4.18668x But this is a big win on machines with a lot of datasets and expensive forks. For example, the gain on a VM on my work laptop with 900+ legacy-mount Docker datasets, the original gains from the C rewrite were only five-fold: real 0.516s/0.102s=5.05882x user 0.237s/0.143s=1.65734x sys 0.287s/0.100s=2.87x And this serial variant gains this back there as well: real 0.102s/0.008s=12.75x user 0.143s/0.007s=20.42857 sys 0.100s/0.001s=100x wall-total 0.09717s/0.00319s=30.40255x wall-init 0.00203s/0.00200s=1.015941x wall-real 0.09513s/0.00118s=80.02043x For a total of real 0.516s/0.008s=64.5x user 0.237s/0.007s=33.85714x sys 0.287s/0.001s=287x Suggested-by: Richard Laager <[email protected]> * etc/systemd/zfs-mount-generator: pull in network for keylocation=https Also simplify RequiresMountsFor= handling Ref: #11956 Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12138
* Vdev Properties FeatureAllan Jude2021-11-3033-240/+2743
| | | | | | | | | | | | | | | | | | | | | | | | Add properties, similar to pool properties, to each vdev. This makes use of the existing per-vdev ZAP that was added as part of device evacuation/removal. A large number of read-only properties are exposed, many of the members of struct vdev_t, that provide useful statistics. Adds support for read-only "removing" vdev property. Adds the "allocating" property that defaults to "on" and can be set to "off" to prevent future allocations from that top-level vdev. Supports user-defined vdev properties. Includes support for properties.vdev in SYSFS. Co-authored-by: Allan Jude <[email protected]> Co-authored-by: Mark Maybee <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Mark Maybee <[email protected]> Signed-off-by: Allan Jude <[email protected]> Closes #11711
* Fix typo in zpool.8pstef2021-11-291-1/+1
| | | | | | | | Update zpool.8 to avoid parseltongue. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Piotr P. Stefaniak <[email protected]> Closes #12763
* Linux 5.16 compat: asm/fpu/xcr.h is new location for xgetbv/xsetbvColeman Kane2021-11-292-0/+18
| | | | | | | | | | | Linux 5.16 moved these functions into this new header in commit 1b4fb8545f2b00f2844c4b7619d64d98440a477c. This change adds code to look for the presence of this header, and include it so that the code using xgetbv & xsetbv will compile again. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #12800
* Linux 5.16: wait_on_page_bit() no longer available to modulesColeman Kane2021-11-293-0/+32
| | | | | | | | | | | | | Instead, linux/pagemap.h offers a number of folio-specific functions to be called instead. In this case, module/os/linux/zfs/zfs_vnops_os.c wants to call wait_on_page_bit(pp, PG_writeback). This gets replaced with folio_wait_bit(folio_page(pp), PG_writeback). This change modifies the code to conditionally compile that if configure identifies th presence of the folio_wait_bit() function. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #12800
* Fix several bugs in the FreeBSD rename VOP implementationMark Johnston2021-11-191-136/+134
| | | | | | | | | | | | | | | | | | - To avoid a use-after-free, zfsvfs->z_log needs to be loaded after the teardown lock is acquired with ZFS_ENTER(). - Avoid leaking vnode locks in zfs_rename_relock() and zfs_rename_() when the ZFS_ENTER() macros forces an early return. Refactor the rename implementation so that ZFS_ENTER() can be used safely. As a bonus, this lets us use the ZFS_VERIFY_ZP() macro instead of open-coding its implementation. Reported-by: Peter Holm <[email protected]> Tested-by: Peter Holm <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Sponsored-by: The FreeBSD Foundation Closes #12717
* Add notes to system_taskqPaul Dagnelie2021-11-192-1/+10
| | | | | | | Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #12771
* Enable edonr in FreeBSDRich Ercolani2021-11-1613-57/+14
| | | | | | | | | | | The code is integrated, builds fine, runs fine, there's not really any reason not to. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #12735
* FreeBSD: fix world build after de198f2d9Martin Matuška2021-11-151-0/+2
| | | | | | | | | | The inline function vn_flush_cached_data() in vnode.h must not be compiled when building BASE. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Allan Jude <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes #12743