summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant includesPawel Jakub Dawidek2020-06-081-49/+3
| | | | | | | | | | By removing excessive includes it takes us a small step close to compiling this file in userland. 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 #10415
* Don't erase final byte of envblockPaul Dagnelie2020-06-081-1/+1
| | | | | | | | | | | | | When we copy the envblock's contents out, we currently treat it as a normal C string. However, this functionality is supposed to more closely emulate interacting with a file. As a consequence, we were incorrectly truncating the contents of the envblock by replacing the final byte of the buffer with a null character. Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #10405
* Replace sprintf()->snprintf() and strcpy()->strlcpy()Jorgen Lundman2020-06-0722-60/+79
| | | | | | | | | | | | | | | The strcpy() and sprintf() functions are deprecated on some platforms. Care is needed to ensure correct size is used. If some platforms miss snprintf, we can add a #define to sprintf, likewise strlcpy(). The biggest change is adding a size parameter to zfs_id_to_fuidstr(). The various *_impl_get() functions are only used on linux and have not yet been updated. Reviewed by: Sean Eric Fagan <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Jorgen Lundman <[email protected]> Closes #10400
* Improve compatibility with C++ consumersRyan Moeller2020-06-0616-50/+64
| | | | | | | | | C++ is a little picky about not using keywords for names, or string constness. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10409
* ztest: Fix spa_open() ENOENT failuresBrian Behlendorf2020-06-061-142/+154
| | | | | | | | | | | | | | The pool may not be imported when the previous pass is terminated. In which case, spa_open() will return ENOENT to indicate the pool is not currently imported. Refactor to code slightly to handle this case by importing the pool and then retrying the spa_open(). The ztest_import() function was moved before ztest_run() and the import logic split in to a small internal helper function. The ztest_freeze() function was also moved but no changes were made. Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10407
* mkfile: include missing headersalaviss2020-06-051-0/+2
| | | | | | | | Without these headers, compilation fails on musl libc with offset_t being undeclared and MIN being implictly declared. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Hiếu Lê <[email protected]> Closes #10406
* zfsvfs_setup(): zap_stats_t may have undefined content when accessed (#10398)Brian Behlendorf2020-06-051-3/+3
|\ | | | | | | | | Signed-off-by: Allan Jude <[email protected]> Co-authored-by: Allan Jude <[email protected]>
| * zfsvfs_setup(): zap_stats_t may have undefined content when accessedAllan Jude2020-06-031-3/+3
| | | | | | | | Signed-off-by: Allan Jude <[email protected]>
* | Connect dataset_kstats for FreeBSDAllan Jude2020-06-058-20/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand the FreeBSD spl for kstats to support all current types Move the dataset_kstats_t back to zvol_state_t from zfs_state_os_t now that it is common once again ``` kstat.zfs/mypool.dataset.objset-0x10b.nunlinked: 0 kstat.zfs/mypool.dataset.objset-0x10b.nunlinks: 0 kstat.zfs/mypool.dataset.objset-0x10b.nread: 150528 kstat.zfs/mypool.dataset.objset-0x10b.reads: 48 kstat.zfs/mypool.dataset.objset-0x10b.nwritten: 134217728 kstat.zfs/mypool.dataset.objset-0x10b.writes: 1024 kstat.zfs/mypool.dataset.objset-0x10b.dataset_name: mypool/datasetname ``` Reviewed-by: Ryan Moeller <[email protected]> Reviewed by: Sean Eric Fagan <[email protected]> Reviewed-by: Serapheim Dimitropoulos <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Allan Jude <[email protected]> Closes #10386
* | Fix double mutex_init bug in send codePaul Dagnelie2020-06-031-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible to cause a kernel panic in the send code by initializing an already-initialized mutex, if a record was created with type DATA, destroyed with a different type (bypassing the mutex_destroy call) and then re-allocated as a DATA record again. We tweak the logic to not change the type of a record once it has been created, avoiding the issue. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #10374
* | Update wiki links with new addressGeorge Melikov2020-06-034-33/+28
|/ | | | | | | Use direct links to new documentation resource. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Melikov <[email protected]> Closes #10395
* FreeBSD: Simplify zvol and fix lockingRyan Moeller2020-06-031-66/+25
| | | | | | | | | | | | | | | zvol_geom_bio_strategy should handle its own use of the zvol suspend reader lock and ensure the zilog exists when needed. A few other places using the zvol zilog should use the suspend reader lock as well. Simplify consumers of zvol_geom_bio_strategy, fix the locking, and while in here, use the boolean_t constants with doread. Reviewed-by: Matt Macy <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10381
* Periodically update ARC kstatsRyan Moeller2020-06-031-2/+2
| | | | | | | | | | | | | | FreeBSD needs arc_adjust_zthr to run periodically for kstats to be updated. A comment in the code suggests this may have been the original intent in illumos as well: https://github.com/openzfs/zfs/blob/c946d5a91329b075fb9bda1ac703a2e85139cf1c/module/zfs/arc.c#L4697-L4700 Create the thread with a 1 second timer. Reviewed-by: Matt Macy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10371
* Restore avl_update() calls and related functionsJorgen Lundman2020-06-032-0/+72
| | | | | | | | | The macOS kmem implementation uses avl_update() and related functions. These same function exist in the Solaris AVL code but were removed because they were unused. Restore them. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Jorgen Lundman <[email protected]> Closes #10390
* Fix crypto build on FreeBSD HEADMatthew Macy2020-05-301-3/+1
| | | | | | | | Update API usage to reflect recent change. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #10384
* Add bootfs.snapshot and bootfs.rollback kernel parametersgregory-lee-bartholomew2020-05-296-2/+66
| | | | | | | | | | | | Unlike other filesystems, snapshots and rollbacks of bootfs need to be done from a rescue environment. This patch makes it possible to snap- shot or rollback the bootfs simply by specifying bootfs.snapshot or bootfs.rollback on the kernel command line. The operation will be performed by dracut just before bootfs is mounted. Reviewed-by: Antonio Russo <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Gregory Bartholomew <[email protected]> Closes #10198
* ztest: Fix ztest_run_zdb() failureBrian Behlendorf2020-05-291-2/+2
| | | | | | | | | | | | | | | | | | | It's possible for ztest to be killed while the pool is exported which results in an empty cache file. This is a valid state to test, but the validation check performed by ztest_run_zdb() depends on the pool being in the cache file. If it's not the following error is printed. zdb -bccsv -G -d -Y -U /tmp/zloop-run/zpool.cache ztest zdb: can't open '/tmp/zloop-run': No such file or directory Resolve these failures by removing the dependency on the cache file. Functionally, we only care that the pool can be imported and that the zdb verification passes. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10385
* Update zfs-functions.inallen-42020-05-291-2/+4
| | | | | | | | | | | | | | | | The init.d zfs-share script does not perform the intended action without having a variable set for ZFS_SHARE and ZFS_UNSHARE Assign default values to ZFS_SHARE and ZFS_UNSHARE. Export the environment variables after sourcing the configuration file. Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Georgy Yakovlev <[email protected]> Signed-off-by: Allen Holl <[email protected]> Closes #10341 Closes #10382
* Always use "%lld" for formatting time_tsнаб2020-05-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the following test program: #include <time.h> #include <stdio.h> #include <stdint.h> int main() { printf("time_t: %d\n", sizeof(time_t)); printf("long: %d\n", sizeof(long)); printf("long long: %d\n", sizeof(long long)); } These are output on various x86 architectures: x32$ time_t: 8 x32$ long: 4 x32$ long long: 8 amd64$ time_t: 8 amd64$ long: 8 amd64$ long long: 8 i386$ time_t: 4 i386$ long: 4 i386$ long long: 8 Therefore code using "%l[du]" to format time_ts produced warnings on x32 Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #10357 Closes #844
* Correctly handle the x32 ABIнаб2020-05-282-2/+10
| | | | | | | | | | __x86_64__ && _ILP32 => don't forcibly define _LP64 Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #10357 Closes #844
* Rework error handling in zpool_trim()John Gallagher2020-05-271-43/+78
| | | | | | | | | | | | | | | | | When a manual trim is run against an entire pool, errors about particular devices which don't support trim are suppressed. This changes zpool_trim() in libzfs so that it doesn't return an error when the only errors are suppressed ones. An exception is made when none of the devices support trim, in which case an error is reported and a non-zero status is returned. This also fixes how the --wait flag works in the presence of suppressed errors. In particular, suppressed errors no longer cause zpool_trim() to skip the wait. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: John Gallagher <[email protected]> Closes #10263 Closes #10372
* etc/zfs/Makefile.am: set initconfdirGeorgy Yakovlev2020-05-271-0/+1
| | | | | | | | | | The initconfdir variable is not defined in etc/zfs/Makefile, so the sed code does not perform the correct replacement. Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Georgy Yakovlev <[email protected]> Issue #10375 Closes #10376
* ZTS: Retry export/destroy when busy in zpool_import_012Ryan Moeller2020-05-271-2/+2
| | | | | | | | | | | | | It can take a moment for the NFS server to give up the mountpoint after unsharing a filesystem. Use log_must_busy to retry export/destroy a few times after switching off sharenfs. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10380
* Memory leak in dsl_destroy_snapshots_nvl error caseJorgen Lundman2020-05-261-0/+2
| | | | | | | | The dsl_destroy_snapshots_nvl() function has an early error out, and temporary nvlists were not freed. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Jorgen Lundman <[email protected]> Closes #10366
* Revert "Let zfs mount all tolerate in-progress mounts"Brian Behlendorf2020-05-261-18/+1
| | | | | | | | | | | | | | | This reverts commit a9cd8bf which introduced a segfault when running `zfs mount -a` multiple times when there are mountpoints which are not empty. This segfault is now seen frequently by the CI after the mount code was updated to directly call mount(2). The original reason this logic was added is described in #8881. Since then the systemd `zfs-share.target` has been updated to run "After" the `zfs-mount.server` which should avoid this issue. Reviewed-by: Don Brady <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9560 Closes #10364
* Fix dead links http://list.zfsonlinux.orgMarcel Schilling2020-05-261-5/+6
| | | | | | | | | | | | Originally, I wanted to point to directly to https://zfsonlinux.topicbox.com/groups/zfs-discuss as the text refers to that specific mailing list, but George Melikov requested to change it to the general to give users the overview. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Marcel Schilling <[email protected]> Closes #10367 Closes #10369
* ZTS: Fix zfs_mount.kshlib cleanupBrian Behlendorf2020-05-231-1/+1
| | | | | | | | | | Update cleanup_filesystem to use destroy_dataset when performing cleanup. This ensures the destroy is retried if the pool is busy preventing occasional failures. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10358
* Gang ABD TypeBrian Atkinson2020-05-207-106/+629
| | | | | | | | | | | | | | | Adding the gang ABD type, which allows for linear and scatter ABDs to be chained together into a single ABD. This can be used to avoid doing memory copies to/from ABDs. An example of this can be found in vdev_queue.c in the vdev_queue_aggregate() function. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Brian <[email protected]> Co-authored-by: Mark Maybee <[email protected]> Signed-off-by: Brian Atkinson <[email protected]> Closes #10069
* mount: use the mount syscall directlyfelixdoerre2020-05-209-277/+335
| | | | | | | | | | | | | | | | | | | | Allow zfs datasets to be mounted on Linux without relying on the invocation of an external processes. This is the same behavior which is implemented for FreeBSD. Use of the libmount library was originally considered because it provides functionality to properly lock and update the /etc/mtab file. However, these days /etc/mtab is typically a symlink to /proc/self/mounts so there's nothing to updated. Therefore, we call mount(2) directly and avoid any additional dependencies. If required the legacy behavior can be enabled by setting the ZFS_MOUNT_HELPER environment variable. This may be needed in environments where SELinux in enabled and the zfs binary does not have mount permission. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Felix Dörre <[email protected]> #10294
* Use boot_ncpus in place of max_ncpus in taskq_createDeHackEd2020-05-203-6/+6
| | | | | | | | | | | | | Due to hotplug support or BIOS bugs sometimes max_ncpus can be an absurdly high value. I have a system with 32 cores/threads but reports max_ncpus == 440. This many threads potentially cripples the system during arc_prune floods for example. boot_ncpus is the number of working CPUs when called so use that instead. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: DHE <[email protected]> Closes #10282
* Small program that converts a dataset id and an object id to a pathPaul Dagnelie2020-05-2016-7/+349
| | | | | | | | | Small program that converts a dataset id and an object id to a path Reviewed-by: Prakash Surya <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #10204
* freebsd: Correct the order of arguments to copyin() for Q_SETQUOTARyan Moeller2020-05-191-1/+1
| | | | | | | | | | | | Sponsored by: DARPA External-issue: https://reviews.freebsd.org/D24656 FreeBSD-commit: freebsd/freebsd@a431c095d32df45a31faad8382b9bc712480e27e Authored by: jhb <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: Ryan Moeller <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10344
* Fix gcc 10.1 stringop-truncation errorGeorge Amanakis2020-05-191-3/+3
| | | | | | | | | As we do not expect the destination of these strncpy calls to be NULL terminated, substitute them with memcpy. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Amanakis <[email protected]> Closes #10346
* freebsd: return EISDIR for read(2) on directoriesKyle Evans2020-05-161-0/+6
| | | | | | | | | | | | | This is arguably a change for internal consistency within OpenZFS, as the Linux implementation will reject read(2) on directories with EISDIR. It's not unreasonable for read(2) to do something here on FreeBSD, but we don't currently copy out anything useful anyways so start rejecting it with the appropriate error. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Kyle Evans <[email protected]> Closes #10338
* Fix ZVOL_DIRRyan Moeller2020-05-162-3/+1
| | | | | | | | | | We only use ZVOL_DIR on FreeBSD, and on FreeBSD it isn't correct. Move the definition to the file where it is needed, and define it as /dev/zvol/. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10337
* RPM: Remove old versions of DKMS on upgradeColMelvin2020-05-141-1/+1
| | | | | | | | | | | | Due to a mismatch between the text and a regex looking for that text, the `%preuninstall` script would never run the `dkms remove` command necessary to avoid corrupting the DKMS data configuration. Increase regex specificity to avoid this issue. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chris Lindee <[email protected]> Closes: #9891 Closes #10327
* Fix error handling in receive_writer_thread()Matthew Ahrens2020-05-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | If `receive_writer_thread()` gets an error from `receive_process_record()`, it should be saved in `rwa->err` so that we will stop processing records, and the main thread will notice that the receive has failed. When an error is first encountered, this happens correctly. However, if there are more records to dequeue, the next time through the loop we will reset `rwa->err` to zero, allowing us to try to process the following record (2 after the failed record). Depending on what types of records remain, we may incorrectly complete the receive "successfully", but without actually having processed all the records. The fix is to only set `rwa->err` if we got a *non-zero* error. This bug was introduced by #10099 "Improve zfs receive performance by batching writes". Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #10320
* Fix VN_OPEN_INVFS typoyparitcher2020-05-141-1/+1
| | | | | | | | | The VN_OPEN_INVFS literal is in the wrong field. Reviewed-by: Matt Macy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: yparitcher <[email protected]> Closes #10322
* Fix abd_enter/exit_critical wrappersBrian Behlendorf2020-05-144-28/+15
| | | | | | | | | | | | | | | | Commit fc551d7 introduced the wrappers abd_enter_critical() and abd_exit_critical() to mark critical sections. On Linux these are implemented with the local_irq_save() and local_irq_restore() macros which set the 'flags' argument when saving. By wrapping them with a function the local variable is no longer set by the macro and is no longer properly restored. Convert abd_enter_critical() and abd_exit_critical() to macros to resolve this issue and ensure the flags are properly restored. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10332
* Upstream: add missing thread_exit()Jorgen Lundman2020-05-145-22/+9
| | | | | | | | Undo FreeBSD wrapper for thread_create() added to call thread_exit. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Jorgen Lundman <[email protected]> Closes #10314
* remove unneeded member drc_err of dmu_recv_cookie_tMatthew Ahrens2020-05-142-8/+5
| | | | | | | | The member drc_err of dmu_recv_cookie_t is used only locally in receive_read, so we can replace it with a local variable. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #10319
* flake8 E741 variable name warningBrian Behlendorf2020-05-141-3/+3
| | | | | | | | | | | | | | | Update the zts-report.py script to conform to the flake8 E741 rule. "Variables named I, O, and l can be very hard to read. This is because the letter I and the letter l are easily confused, and the letter O and the number 0 can be easily confused." - https://www.flake8rules.com/rules/E741.html Reviewed-by: George Melikov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10323
* ZTS: zpool_split_indirect deletes zfstest log fileJohn Wren Kennedy2020-05-141-1/+2
| | | | | | | | | | | | | The cleanup routine for this test attempts to remove some temporary files with `rm -f $VDEV_*`, but VDEV_ is undefined. As a result, all files in the current working directory (/var/tmp/test_results/current) get removed instead. This includes the complete log file of all tests. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: George Amanakis <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: John Kennedy <[email protected]> Closes #10324
* Resilver restarts unnecessarily when it encounters errorsJohn Poduska2020-05-136-4/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a resilver finishes, vdev_dtl_reassess is called to hopefully excise DTL_MISSING (amongst other things). If there are errors during the resilver, they are tracked in DTL_SCRUB, as spelled out in the block comment in vdev.c. DTL_SCRUB is in-core only, so it can only be used if the pool was online for the whole resilver. This state is tracked with the spa_scrub_started flag, which only gets set when the scan is initialized. Unfortunately, this flag gets cleared right before vdev_dtl_reassess gets called, so if there are any errors during the scan, DTL_MISSING will never get excised and the resilver will just continually restart. This fix simply moves clearing that flag until after the call to vdev_dtl_reasses. In addition, if a pool is imported and already has scn_errors > 0, this change will restart the resilver immediately instead of doing the rest of the scan and then restarting it from the beginning. On the other hand, if scn_errors == 0 at import, then no errors have been encountered so far, so the spa_scrub_started flag can be safely set. A test has been added to verify that resilver does not restart when relevant DTL's are available. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Zuchowski <[email protected]> Signed-off-by: John Poduska <[email protected]> Closes #10291
* Fix outdated comment headerAJ Jordan2020-05-111-8/+13
| | | | | | | Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: AJ Jordan <[email protected]> Closes #10288
* Fix up arcstat(1) to match our versionAJ Jordan2020-05-112-19/+46
| | | | | | | | | | | | | Turns out the illumos manpage, which is what this originates from, was written for the original Perl version of the utility which is not the version in the OpenZFS tree. *That* version originates from a Python rewrite that was done for FreeNAS. So fix up the manpage to match what we actually ship (and fix a few typos in the process). Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: AJ Jordan <[email protected]> Closes #10288
* Import the arcstat(1m) manpage from illumosAJ Jordan2020-05-111-0/+455
| | | | | | | | | | | And move it from section 1m to section 1 for consistency. Imported from illumos commit f34d737f. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: AJ Jordan <[email protected]> Closes #10288
* Fix inconsistent capitalization in `arcstat -v`AJ Jordan2020-05-111-11/+11
| | | | | | | Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: AJ Jordan <[email protected]> Closes #10288
* Change zfsunlock for better busybox compatibilityRichard Laager2020-05-101-1/+1
| | | | | | | | | | | | | | It turns out that there are two versions of Busybox, at least on Ubuntu 18.04. If you have the busybox-static package installed, you get a busybox that supports `ps a` and `head`. If you only have busybox-initramfs, you don't. Either way, you have `awk`. This change should also make this compatible with GNU ps, if you somehow end up with that in the initramfs environment. Reviewed-by: Tom Caputi <[email protected]> Reviewed-by: Andrey Prokopenko <[email protected]> Signed-off-by: Richard Laager <[email protected]> Closes #10307
* Combine OS-independent ABD Code into Common Source FileBrian Atkinson2020-05-1012-2071/+1602
| | | | | | | | | | | | | | | | | Reorganizing ABD code base so OS-independent ABD code has been placed into a common abd.c file. OS-dependent ABD code has been left in each OS's ABD source files, and these source files have been renamed to abd_os. The OS-independent ABD code is now under: module/zfs/abd.c With the OS-dependent code in: module/os/linux/zfs/abd_os.c module/os/freebsd/zfs/abd_os.c Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Brian Atkinson <[email protected]> Closes #10293