- 21 Oct, 2020 1 commit
-
-
Matthew Macy authored
The zfs_fsync, zfs_read, and zfs_write function are almost identical between Linux and FreeBSD. With a little refactoring they can be moved to the common code which is what is done by this commit. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Matt Macy <mmacy@FreeBSD.org> Closes #11078
-
- 20 Oct, 2020 4 commits
-
-
Adam D. Moss authored
The current l2_misses accounting behavior treats all reads to pools without a configured l2arc as an l2arc miss, IFF there is at least one other pool on the system which does have an l2arc configured. This makes it extremely hard to tune for an improved l2arc hit/miss ratio because this ratio will be modulated by reads from pools which do not (and should not) have l2arc devices; its upper limit will depend on the ratio of reads from l2arc'd pools and non-l2arc'd pools. This PR prevents ARC reads affecting l2arc stats (n.b. l2_misses is the only relevant one) where the target spa doesn't have an l2arc. Includes new test - l2arc_l2miss_pos.ksh Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Amanakis <gamanakis@gmail.com> Signed-off-by:
Adam Moss <c@yotes.com> Closes #10921
-
Kyle Evans authored
This was removed in a reorganization of directories preparing for the merge of FreeBSD support, 006e9a40 by mmacy. While llvm is perfectly happy with the nonexistent -I directory, the gcc6 and gcc9 we can elect to use as cross-toolchains both trip over it. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Kyle Evans <kevans@FreeBSD.org> Closes #11077
-
Matthew Macy authored
zfs_onexit_os.c was not deleted when it was removed from the build Reviewed-by:
Matt Ahrens <matt@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Matt Macy <mmacy@FreeBSD.org> Closes #11079
-
Ryan Moeller authored
Convert from bash to sh, avoid Perl regexes and \s, prune unused functions. Reviewed-by:
Mateusz Piotrowski <0mp@FreeBSD.org> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #11070
-
- 19 Oct, 2020 1 commit
-
-
Don Brady authored
ZED will log zevents summaries to the syslog, however the log entries tend to drop event details that can be useful for diagnosis. This is especially true for ereport events, like io, checksum, and delay. Update the all-syslog.sh script to log additional event information. Add an optional config option, ZED_SYSLOG_DISPLAY_GUIDS, to zed.rc for choosing GUIDs over names for pool and vdev. Change the default ZED_SYSLOG_SUBCLASS_EXCLUDE to exclude history_event events. These events tend to be frequent, convey no meaningful info, and are already logged in the zpool history. Reviewed-by:
John Kennedy <john.kennedy@delphix.com> Reviewed-by:
Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Don Brady <don.brady@delphix.com> Closes #10967
-
- 16 Oct, 2020 1 commit
-
-
Ryan Moeller authored
This was requested but forgotten in #10786. Reviewed-by:
Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #11071
-
- 15 Oct, 2020 3 commits
-
-
Mateusz Guzik authored
Otherwise lookup can fail with EOPNOTSUPP or panic. Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Reviewed-by:
Matt Macy <mmacy@FreeBSD.org> Signed-off-by:
Mateusz Guzik <mjguzik@gmail.com> Closes #11066
-
Mateusz Guzik authored
Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Reviewed-by:
Matt Macy <mmacy@FreeBSD.org> Signed-off-by:
Mateusz Guzik <mjguzik@gmail.com> Closes #11066
-
Don Brady authored
The removal of a vdev in the normal class would fail if there was a special or deup vdev that had a different ashift than the vdevs in the normal class. Moved the initialization of spa_min_ashift / spa_max_ashift from vdev_open so that it occurs after the vdev allocation bias was initialized (i.e. after vdev_load). Caveat -- In order to remove a special/dedup vdev it must have the same ashift as the normal pool vdevs. This could perhaps be lifted in the future (i.e. for the case where there is ample space in any surviving special class vdevs) Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Don Brady <don.brady@delphix.com> Closes #9363 Closes #9364 Closes #11053
-
- 14 Oct, 2020 7 commits
-
-
Christian Schwarz authored
This is a follow up fix for commit 0fdd6106 . The VERIFY is only true when we haven't hit an error code path. See added test case for a reproducer. Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Christian Schwarz <me@cschwarz.com> Closes #11048
-
Paul Dagnelie authored
After a side-effectful call like add or remove, references to range segs stored in btrees can no longer be used safely. We move the remove call to just before the reinsertion call so that the seg remains valid for as long as we need it. Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Paul Dagnelie <pcd@delphix.com> Closes #11044 Closes #11056
-
Mateusz Guzik authored
The 32-bit counter eventually wraps to 0 which is a sentinel for invalid id. Make it 64-bit on LP64 platforms and 0-check otherwise. Note: Linux counterpart uses id stored per queue instead of a global. I did not check going that way is feasible with the goal being the minimal fix doing the job. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Mateusz Guzik <mjguzik@gmail.com> Closes #11059
-
Ryan Moeller authored
The acltype property is currently hidden on FreeBSD and does not reflect the NFSv4 style ZFS ACLs used on the platform. This makes it difficult to observe that a pool imported from FreeBSD on Linux has a different type of ACL that is being ignored, and vice versa. Add an nfsv4 acltype and expose the property on FreeBSD. Make the default acltype nfsv4 on FreeBSD. Setting acltype to an unhanded style is treated the same as setting it to off. The ACLs will not be removed, but they will be ignored. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #10520
-
Warner Losh authored
In FreeBSD, there are three compile environments that are supported: user land, the kernel and the bootloader / standalone. Adjust the headers to compile in the standalone environment. Limit kernel-only items from view when _STANDALONE is defined. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Warner Losh <imp@FreeBSD.org> Closes #10998
-
Matthew Macy authored
Currently streams are only freed when: - They have no referencing zfetch and and their I/O references go to zero. - They are more than 2s old and a new I/O request comes in on the same zfetch. This means that we will leak unreferenced streams when their zfetch structure is freed. This change checks the reference count on a stream at zfetch free time. If it is zero we free it immediately. If it has remaining references we allow the prefetch callback to free it at I/O completion time. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Adam Moss <c@yotes.com> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Matt Macy <mmacy@FreeBSD.org> Closes #11052
-
Warner Losh authored
The zstd code assumes that if you are on aarch64, you have NEON instructions. This is not necessarily true. In a boot loader, where you might not have the VFP properly initialized, these instructions may not be available. It's also an error to include arm_neon.h when the NEON insturctions aren't enabled. Change the guards for using the NEON instructions from __aarch64__ to __ARM_NEON which is the standard symbol for knowing if they are available. __ARM_NEON is the proper symbol, defined in ARM C Language Extensions Release 2.1 (https://developer.arm.com/documentation/ihi0053/d/). Some sources suggest __ARM_NEON__, but that's the obsolete spelling from prior versions of the standard. Updated based on zstd pull request https://github.com/facebook/zstd/pull/2356 Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Warner Losh <imp@bsdimp.com> Closes #11055
-
- 13 Oct, 2020 7 commits
-
-
Adam D. Moss authored
If modules fail to unload because of outstanding users, don't consider this a success. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Adam Moss <c@yotes.com> Closes #11042
-
Christian Schwarz authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Adam Moss <c@yotes.com> Signed-off-by:
Christian Schwarz <me@cschwarz.com> Closes #11047
-
Mateusz Guzik authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Reviewed-by:
Matt Macy <mmacy@FreeBSD.org> Signed-off-by:
Mateusz Guzik <mjguzik@gmail.com> Closes #11045
-
Mathieu Velten authored
Missing struct initialization in a config test results in the interface being incorrectly detected. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Adam Moss <c@yotes.com> Signed-off-by:
Mathieu Velten <matmaul@gmail.com> Closes #10713 Closes #11049
-
Kjeld Schouten-Lebbing authored
This increases the Linux kernel version to 5.9 from 5.8 as most compatibility fixes should already be included. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Pavel Snajdr <snajpa@snajpa.net> Signed-off-by:
Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Closes #11050
-
Ryan Moeller authored
It is a common mistake to have failed to autoload the module due to permission issues when running a ZFS command as a user. "Operation not permitted" is an unhelpfully vague error message. Use a thread-local message buffer to format a nicer error message. We can infer that loading the kernel module failed if the module is not loaded. This can be extended with heuristics for other errors in the future. While looking at this stuff, remove an unused thread-local message buffer found in libspl and remove some inaccurate verbiage from the comment on libzfs_load_module. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11033
-
Ryan Moeller authored
FreeBSD had this value tunable before the switch to the new OpenZFS. The tunable name has changed, breaking legacy compat. Restore legacy compat for this tunable, properly expose the tunable with the new name on all platforms, and document it in zfs-module-parameters(5). While here, clean up the documentation for zfetch_max_distance a bit. Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11038
-
- 09 Oct, 2020 5 commits
-
-
Christian Schwarz authored
Code cleanup, a follow up commit to 4d55ea81 . Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Co-authored-by:
Ryan Moeller <ryan@freqlabs.com> Signed-off-by:
Christian Schwarz <me@cschwarz.com> Closes #11020
-
Richard Elling authored
A zpool_influxdb command is introduced to ease the collection of zpool statistics into the InfluxDB time-series database. Examples are given on how to integrate with the telegraf statistics aggregator, a companion to influxdb. Finally, a grafana dashboard template is included to show how pool latency distributions can be visualized in a ZFS + telegraf + influxdb + grafana environment. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Richard Elling <Richard.Elling@RichardElling.com> Closes #10786
-
Ryan Moeller authored
The value of zp is used without having been initialized under some conditions. Initialize the pointer to NULL. Add a regression test case using chown in acl/posix. However, this is not enough because the setup sets xattr=sa, which means zfs_setattr_dir will not be called. Create a second group of acl tests in acl/posix-sa duplicating the acl/posix tests with symlinks, and remove xattr=sa from the original acl/posix tests. This provides more coverage for the default xattr=on code. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #10043 Closes #11025
-
Brian Behlendorf authored
This change updates the documentation to refer to the project as OpenZFS instead ZFS on Linux. Web links have been updated to refer to https://github.com/openzfs/zfs . The extraneous zfsonlinux.org web links in the ZED and SPL sources have been dropped. Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Richard Laager <rlaager@wiktel.com> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #11007
-
Jacob Adams authored
A missing semicolon between kmoddir variable declaration and the uninstall for loop caused modules_uninstall-Linux to fail with: Syntax error: "do" unexpected Reviewed-by:
Kjeld Schouten <kjeld@schouten-lebbing.nl> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Jacob Adams <jacob@tookmund.com> Closes #11032
-
- 08 Oct, 2020 6 commits
-
-
Ryan Moeller authored
Don't direct stdout and stderr of dd to $TEST_BASE_DIR/null, direct it to /dev/null. Reviewed-by:
Kjeld Schouten <kjeld@schouten-lebbing.nl> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
George Melikov <mail@gmelikov.ru> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11026
-
Chuck Tuffli authored
When running libzpool with the Undefined Behavior Sanitizer (ubsan) enabled, a zpool create causes a run-time error: module/zfs/vdev_label.c:600:14: runtime error: shift exponent 64 is too large for 64-bit type 'long long unsigned int'` in vdev_config_generate() Fix is to convert vdev_removal_max_span to its base-2 logarithm, using highbit64(), and then compare the "shifts". Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Chuck Tuffli <ctuffli@gmail.com> Closes #9744 Closes #11024
-
Christian Schwarz authored
fixup of 196bee4c On gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1), the code removed caused `-Wmaybe-uninitialized` errors. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Christian Schwarz <me@cschwarz.com> Closes #11021
-
Ryan Moeller authored
With procfs_list kstats implemented for FreeBSD, dbufs are now exposed as kstat.zfs.misc.dbufs. On FreeBSD, dbufstats can use the sysctl instead of procfs when no input file has been given. Enable the dbufstats tests on FreeBSD. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #11008
-
Ryan Moeller authored
Code cleanup. Sort includes, remove duplicates, and drop some extra blank lines in kmod_core.c. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #11000
-
George Melikov authored
OpenZFS is a cross-OS project now. Reviewed-by:
Ryan Moeller <ryan@ixsystems.com> Reviewed-by:
Kjeld Schouten <kjeld@schouten-lebbing.nl> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
George Melikov <mail@gmelikov.ru> Closes #11022
-
- 05 Oct, 2020 2 commits
-
-
George Amanakis authored
Instead of relying on arbitrary timers after pool export/import or cache device off/online rely on arcstats. This makes the L2ARC tests more robust. Also cleanup some functions related to persistent L2ARC. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Adam Moss <c@yotes.com> Signed-off-by:
George Amanakis <gamanakis@gmail.com> Closes #10983
-
Toomas Soome authored
The zdb is interpreting byte array as textual string in dump_zap, but there are also binary arrays and we should not output binary data on terminal. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Igor Kozhukhov <igor@dilos.org> Signed-off-by:
Toomas Soome <tsoome@me.com> External-issue: https://www.illumos.org/issues/12012 External-issue: https://www.illumos.org/issues/11713 Closes #11006
-
- 03 Oct, 2020 3 commits
-
-
Ryan Moeller authored
We were missing an include for kernel FPU functions, breaking the build on FreeBSD 12.1-RELEASE. This was apparently being pulled in from elsewhere on stable/12 and head. Sorted the other includes in these files while here. Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11005
-
Alan Somers authored
When resuming an interrupted ZFS send stream that creates a new dataset with the same name as an existing dataset, if the existing dataset is accessed after the failed receive, then after the subsequent successful receive it will return EIO. This happens because nothing mounts the new dataset, leaving the old, no longer valid dataset still mounted. This commit fixes zfs receive to always unmount and remount the destination, regardless of whether the stream is a new stream or a resumed stream. Sponsored by: Axcient Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Alan Somers <asomers@gmail.com> External-issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249579 Closes #10995 Closes #10999
-
Ryan Moeller authored
In C, const indicates to the reader that mutation will not occur. It can also serve as a hint about ownership. Add const in a few places where it makes sense. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <freqlabs@FreeBSD.org> Closes #10997
-