- 31 Mar, 2022 1 commit
-
-
Andrew Walker authored
We should be able to bypass in favor of simple vaccess() check.
-
- 29 Mar, 2022 1 commit
-
-
Ryan Moeller authored
NAS-115362 / 13.0 / Merge ZFS 2.1.4 release
-
- 28 Mar, 2022 1 commit
-
-
Umer Saleem authored
Signed-off-by:
Umer Saleem <usaleem@ixsystems.com>
-
- 27 Mar, 2022 1 commit
-
-
Andrew authored
Add ACL_IS_TRIVIAL and ACL_IS_DIR flags as ACL-wide flags in the system.nfs4_acl_xdr generated on getxattr requests. This are non-RFC flags that are useful for userspace applications (especially the ACL_IS_TRIVIAL flag as it can be used to avoid relatively expensive ACL-related operations). Also add system.nfs4_acl_xdr to xattr results if ACL is not trivial. This duplicates POSIX ACL behavior where whether an ACL is set on a path can be determined via listxattr(). Since the ACL is not actually removed, we check whether the ZFS_ACL_TRIVIAL is set. If the flag is not set, then we omit the xattr name from the list. This allows users to determine whether ACL is trivial from listxattr(). Signed-off-by:
Andrew Walker <awalker@ixsystems.com>
-
- 21 Mar, 2022 2 commits
-
-
Tony Hutter authored
META file and changelog updated. Signed-off-by:
Tony Hutter <hutter2@llnl.gov>
-
Waqar Ahmed authored
-
- 18 Mar, 2022 2 commits
-
-
Tony Hutter authored
A prior commit included a udev check for MPATH_DEVICE_READY to determine if a path was multipath when doing an autoreplace: f2f6c18f zed: Misc multipath autoreplace fixes However, MPATH_DEVICE_READY is not provided by the older version of udev that's on Centos 7 (it is on Centos 8). This patch instead looks for 'mpath-' in the UUID, which works on both Centos 7 and 8. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Tony Hutter <hutter2@llnl.gov> Closes #13222
-
Tony Hutter authored
We recently had a case where our operators replaced a bad multipathed disk, only to see it fail to autoreplace. The zed logs showed that the multipath replacement disk did not pass the 'is_dm' test in zfs_process_add() even though it should have. is_dm is set if there exists a sysfs entry for to the underlying /dev/sd* paths for the multipath disk. It's possible this path didn't exist due to a race condition where the sysfs paths weren't created at the time the udev event came in to zed, but this was never verified. This patch updates the check to look for udev properties that indicate if the new autoreplace disk is an empty multipath disk, rather than looking for the underlying sysfs entries. It also adds in additional logging, and fixes a bug where zed allowed you to use an already zfs-formatted disk from another pool as a multipath auto-replacement disk. Furthermore, while testing this patch, I also ran across a case where a force-faulted disk did not have a ZPOOL_CONFIG_PHYS_PATH entry in its config. This prevented it from being autoreplaced. I added additional logic to derive the PHYS_PATH from the PATH if the PATH was a /dev/disk/by-vdev/ path. For example, if PATH was /dev/disk/by-vdev/L28, then PHYS_PATH would be L28. This is safe since by-vdev paths represent physical locations and do not change between boots. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Tony Hutter <hutter2@llnl.gov> Closes #13023
-
- 21 Mar, 2022 1 commit
-
-
Brian Behlendorf authored
This PR changes ZFS ACL checks to evaluate fsuid / fsgid rather than euid / egid to avoid accidentally granting elevated permissions to NFS clients. Reviewed-by:
Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by:
Andrew Walker <awalker@ixsystems.com> Co-authored-by:
Ryan Moeller <freqlabs@FreeBSD.org> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #13221
-
- 19 Mar, 2022 3 commits
-
-
Brian Behlendorf authored
Commit 3b52ccd7 introduced a flaw where FSR and FSAVE are not restored when using a Linux 5.16 kernel. These instructions are only used when XSAVE is not supported by the processor meaning only some systems will encounter this issue. 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 #13210 Closes #13236
-
Kyle Evans authored
At shutdown time, we drain all of the zevents and set the ZEVENT_SHUTDOWN flag. On FreeBSD, we may end up calling zfs_zevent_destroy() after the zevent_lock has been destroyed while the sysevent thread is winding down; we observe ESHUTDOWN, then back out. Events have already been drained, so just inline the kmem_free call in sysevent_worker() to avoid the race, and document the assumption that zfs_zevent_destroy doesn't do anything else useful at that point. This fixes a panic that can occur at module unload time. Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Kyle Evans <kevans@FreeBSD.org> Closes #13220
-
Mateusz Guzik authored
Reviewed-by:
Ryan Moeller <freqlabs@FreeBSD.org> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Mateusz Guzik <mjguzik@gmail.com> Closes #13219
-
- 17 Mar, 2022 2 commits
-
-
наб authored
The get_key_material_https() function error code path had a bogus free() call, either resulting in double-free or free() of undefined pointer. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ahelenia Ziemia<C5><84>ska <nabijaczleweli@nabijaczleweli.xyz> Co-authored-by:
Harry Sintonen <sintonen@iki.fi> Signed-off-by:
Harry Sintonen <sintonen@iki.fi> Closes #13198
-
Ryan Moeller authored
This is a direct commit to zfs-2.1-release to fix release builds that error out on an unused variable. The issue is avoided on master by a huge series of commits that change how the ASSERT macros work, but that is not feasible to backport. Reviewed-by:
Tony Hutter <hutter2@llnl.gov> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Igor Kozhukhov <igor@dilos.org> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #13194 Closes #13196
-
- 11 Mar, 2022 1 commit
-
-
Ryan Moeller authored
-
- 10 Mar, 2022 2 commits
-
-
Ryan Moeller authored
Signed-off-by:
Ryan Moeller <ryan@iXsystems.com>
-
Ryan Moeller authored
Signed-off-by:
Ryan Moeller <ryan@iXsystems.com>
-
- 09 Mar, 2022 3 commits
-
-
Ryan Moeller authored
Expose additional file level attributes
-
Tony Hutter authored
META file and changelog updated. Signed-off-by:
Tony Hutter <hutter2@llnl.gov>
-
Umer Saleem authored
ZFS allows to update and retrieve additional file level attributes for FreeBSD. This commit allows additional file level attributes to be updated and retrieved for Linux. These include the flags stored in the upper half of z_pflags only. Two new IOCTLs have been added for this purpose. ZFS_IOC_GETDOSFLAGS can be used to retrieve the attributes, while ZFS_IOC_SETDOSFLAGS can be used to update the attributes. Attributes that are allowed to be updated include ZFS_IMMUTABLE, ZFS_APPENDONLY, ZFS_NOUNLINK, ZFS_ARCHIVE, ZFS_NODUMP, ZFS_SYSTEM, ZFS_HIDDEN, ZFS_READONLY, ZFS_REPARSE, ZFS_OFFLINE and ZFS_SPARSE. Flags can be or'd together while calling ZFS_IOC_SETDOSFLAGS. Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Umer Saleem <usaleem@ixsystems.com> Closes #13118
-
- 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
-
- 25 Feb, 2022 2 commits
-
-
Ryan Moeller authored
FreeBSD: Fix zfsd auto online
-
Ryan Moeller authored
The path passed may in fact be a guid, so we want to use the fullpath we looked up from the pool config instead. But, this causes tests to fail on Linux so we only do it for FreeBSD. Signed-off-by:
Ryan Moeller <ryan@iXsystems.com>
-
- 22 Feb, 2022 9 commits
-
-
Ryan Moeller authored
libzfs sendrecv/mount bug fixes
-
Alexander Motin authored
NAS-113231 / Add more control/visibility to spa_load_verify().
-
Alexander Motin authored
Use error thresholds from policy to control whether to scrub data and/or metadata. If threshold is set to UINT64_MAX, then caller probably does not care about result and we may skip that part. By default import neither set the data error threshold nor read the error counter, so skip the data scrub for faster import. Metadata are still scrubbed and fail if even single error found. While there just for symmetry return number of metadata errors in case threshold is not set to zero and we haven't reached it. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Pavel Zakharov <pavel.zakharov@delphix.com> Signed-off-by:
Alexander Motin <mav@FreeBSD.org> Closes #13022 (cherry picked from commit f2c5bc15)
-
наб authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12968
-
Allan Jude authored
The fnvlist versions of the functions are fatal if they fail, saving each call from having to include checking the result. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Igor Kozhukhov <igor@dilos.org> Signed-off-by:
Allan Jude <allan@klarasystems.com> (cherry picked from commit 65ad5d11)
-
Ryan Moeller authored
avl_add does avl_find internally, then avl_insert. We're already doing the avl_find, so using avl_insert directly avoids repeating the search. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #12967
-
Ryan Moeller authored
There is no need to allocate a holds nvlist. lzc_get_holds does that for us. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #12967
-
Ryan Moeller authored
In zfs_send_progress, initialize \*bytes_written and \*blocks_visited in case we have to return early due to ioctl failure. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #12967
-
Alexander Motin authored
libzfs: Fail making a dataset handle gracefully
-