]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agomodule/*.ko: prune .data, global .rodata
наб [Fri, 14 Jan 2022 23:37:55 +0000 (00:37 +0100)]
module/*.ko: prune .data, global .rodata

Evaluated every variable that lives in .data (and globals in .rodata)
in the kernel modules, and constified/eliminated/localised them
appropriately. This means that all read-only data is now actually
read-only data, and, if possible, at file scope. A lot of previously-
global-symbols became inlinable (and inlined!) constants. Probably
not in a big Wowee Performance Moment, but hey.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12899

2 years agoClarify `failmode=wait` documentation
Brian Behlendorf [Fri, 14 Jan 2022 23:30:07 +0000 (15:30 -0800)]
Clarify `failmode=wait` documentation

Nowhere in the description of the failmode property does it
clearly state how to bring a suspended pool back online.
Add a few words to property description and the zpool-clear(8)
man page.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12907
Closes #9395

2 years agoFreeBSD: Touch up comments in zvol_os
Ryan Moeller [Thu, 23 Dec 2021 19:04:07 +0000 (19:04 +0000)]
FreeBSD: Touch up comments in zvol_os

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #12934

2 years agoFreeBSD: Fix zvol_*_open() locking
Ryan Moeller [Thu, 23 Dec 2021 19:03:23 +0000 (19:03 +0000)]
FreeBSD: Fix zvol_*_open() locking

These are the changes for FreeBSD corresponding to the changes made for
Linux in #12863, see that PR for details.

Changes from #12863 are applied for zvol_geom_open and zvol_cdev_open
on FreeBSD.  This also adds a check for the zvol dying which we had
in zvol_geom_open but was missing in zvol_cdev_open.  The check causes
the open to fail early with ENXIO when we are in the middle of changing
volmode.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #12934

2 years agoFreeBSD: Fix leaked strings in libspl mnttab
Ryan Moeller [Fri, 14 Jan 2022 20:38:32 +0000 (15:38 -0500)]
FreeBSD: Fix leaked strings in libspl mnttab

The FreeBSD implementations of various libspl functions for getting
mounted device information were found to leak several strings which
were being allocated in statfs2mnttab but never freed.

The Solaris getmntany(3C) and related interfaces are expected to return
strings residing in static buffers that need to be copied rather than
freed by the caller.

Use static thread-local storage to stash the mnttab structure strings
from FreeBSD's statfs info rather than strings allocated on the heap by
strdup(3).

While here, remove some stray commented out lines.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #12961

2 years agoman: zfs.4: miscellaneous cleanup
наб [Thu, 13 Jan 2022 19:09:03 +0000 (20:09 +0100)]
man: zfs.4: miscellaneous cleanup

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12941

2 years agolinux: libzfs: mount: fix uninitialised flags
наб [Thu, 13 Jan 2022 19:07:54 +0000 (20:07 +0100)]
linux: libzfs: mount: fix uninitialised flags

They're later |=d with constants, but never reset

Caught by valgrind while investigating
https://github.com/openzfs/zfs/pull/12928#issuecomment-1007496550

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12954

2 years agoAdd ShellCheck's `--enable=all` inside `scripts/`
Damian Szuberski [Thu, 13 Jan 2022 18:09:19 +0000 (19:09 +0100)]
Add ShellCheck's `--enable=all` inside `scripts/`

Strengthen static code analysis for shell scripts.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #12914

2 years agoRemoved Python 2 and Python 3.5- support
Damian Szuberski [Thu, 13 Jan 2022 16:51:12 +0000 (17:51 +0100)]
Removed Python 2 and Python 3.5- support

Deprecation of Python versions below 3.6 gives opportunity to unify the
build and install requirements for OpenZFS packages. The minimal
supported Python version is 3.6 as this is the most recent Python
package CentOS/RHEL 7 users can get.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #12925

2 years agoRemove VERIFY() in vdev_props_set_sync()
Mark Maybee [Thu, 13 Jan 2022 00:15:30 +0000 (17:15 -0700)]
Remove VERIFY() in vdev_props_set_sync()

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mark Maybee <mark.maybee@delphix.com>
Closes #12951

2 years agolz4: Cherrypick fix for CVE-2021-3520
Rich Ercolani [Thu, 13 Jan 2022 00:14:36 +0000 (19:14 -0500)]
lz4: Cherrypick fix for CVE-2021-3520

There should be no risk of us accidentally hitting this since
we'd need maliciously malformed data to wind up in the pipeline,
or a very unfortunate random bit flip at exactly the right moment.
Still since we can handle it we should.

Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Adam Moss <c@yotes.com>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12947

2 years agoUpdated the lz4 decompressor
Rich Ercolani [Fri, 7 Jan 2022 18:36:49 +0000 (13:36 -0500)]
Updated the lz4 decompressor

As an experiment, I stole the lz4 decompressor from
upstream lz4 (1.9.3), and landed it.

Feedback suggested that keeping the vendor lz4 code isolated and
unlinted was probably reasonable, so I lobbed it into its own file.

It also seemed reasonable to put the mostly-untouched* code into
lz4.c proper, and relegate the integrated and ZFS-specific code to
lz4_zfs.c.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12805

2 years agoREADME: Update OpenZFS website url
Ryan Hirasaki [Fri, 7 Jan 2022 00:25:01 +0000 (18:25 -0600)]
README: Update OpenZFS website url

This change is to first replace the OpenZFS website in the README to
point to openzfs.org as this is what open-zfs.org redirects to.
Along with replacing the URL, the protocol is also upgraded
from http to https.

These changes should prevent web browsers such as Firefox from
complaining about visiting a http site, if the proper security
settings are enabled, when it will still end up on a https page
after the redirect.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Hirasaki <ryanhirasaki@gmail.com>
Closes #12939

2 years agoRemove sha1 hashing from OpenZFS, it's not used anywhere.
Tino Reichardt [Mon, 3 Jan 2022 16:43:11 +0000 (17:43 +0100)]
Remove sha1 hashing from OpenZFS, it's not used anywhere.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Attila Fülöp <attila@fueloep.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12895
Closes #12902

2 years agomodule: icp: remove solaris crypto and cryptoadm ioctl definitions
наб [Wed, 22 Dec 2021 22:58:32 +0000 (23:58 +0100)]
module: icp: remove solaris crypto and cryptoadm ioctl definitions

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Attila Fülöp <attila@fueloep.org>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12895
Closes #12902

2 years agomodule: icp: rip out the Solaris loadable module architecture
наб [Wed, 22 Dec 2021 14:27:43 +0000 (15:27 +0100)]
module: icp: rip out the Solaris loadable module architecture

After progressively folding away null cases, it turns out there's
/literally/ nothing there, even if some things are part of the
Solaris SPARC DDI/DKI or the seventeen module types (some doubled for
32-bit userland), or the entire modctl syscall definition.
Nothing.

Initialisation is handled in illumos-crypto.c,
which calls all the initialisers directly

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Attila Fülöp <attila@fueloep.org>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12895
Closes #12902

2 years agoAdd ShellCheck's `--enable=all` inside `cmd/`
Damian Szuberski [Fri, 7 Jan 2022 00:07:54 +0000 (01:07 +0100)]
Add ShellCheck's `--enable=all` inside `cmd/`

The only exception is `cmd/vdev_id/vdev_id` which might be a subject of
refactoring (see #12084)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #12912

2 years agol2arc_write_buffers: remove redundant asserts
Christian Schwarz [Thu, 6 Jan 2022 22:39:22 +0000 (23:39 +0100)]
l2arc_write_buffers: remove redundant asserts

Probably introduced inadvertently in b525630 (Native Encryption).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Amanakis <gamanakis@gmail.com>
Signed-off-by: Christian Schwarz <christian.schwarz@nutanix.com>
Closes #12935

2 years agoAdd ShellCheck's `--enable=all` inside `etc/`
Damian Szuberski [Thu, 6 Jan 2022 22:36:04 +0000 (23:36 +0100)]
Add ShellCheck's `--enable=all` inside `etc/`

Strengthen static code analysis for shell scripts.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #12913

2 years agomodule: Makefile: flatten subdir loop, use $PWD instead of `pwd`
наб [Thu, 23 Dec 2021 20:57:44 +0000 (21:57 +0100)]
module: Makefile: flatten subdir loop, use $PWD instead of `pwd`

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Issue #12899

2 years agoFreeBSD: remove unused variable
наб [Thu, 23 Dec 2021 20:47:43 +0000 (21:47 +0100)]
FreeBSD: remove unused variable

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Issue #12899

2 years agoconfig: check for parallel(1), use it for cstyle
наб [Thu, 23 Dec 2021 20:26:19 +0000 (21:26 +0100)]
config: check for parallel(1), use it for cstyle

Before:
$ time make cstyle
real    0m23.118s
user    0m23.002s
sys     0m0.114s

After:
$ time make cstyle
real    0m4.577s
user    0m31.487s
sys     0m0.699s

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Issue #12899

2 years agolibfetch: unquote @LIBFETCH_SONAME@ subst
наб [Thu, 6 Jan 2022 19:26:40 +0000 (20:26 +0100)]
libfetch: unquote @LIBFETCH_SONAME@ subst

@LIBFETCH_SONAME@ is no longer quoted. The C define still is.

Ref: 153f7c9f72082d7ef5ee27fcbec1bcb94ba88151
Ref: https://github.com/openzfs/zfs/pull/12835#discussion_r776833743
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12922

2 years agozvol: remove unused variable
наб [Mon, 27 Dec 2021 18:33:58 +0000 (19:33 +0100)]
zvol: remove unused variable

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12917

2 years agofm: remove unused variables
наб [Mon, 27 Dec 2021 18:33:38 +0000 (19:33 +0100)]
fm: remove unused variables

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12917

2 years agozvol: remove unused variable
наб [Mon, 27 Dec 2021 18:33:16 +0000 (19:33 +0100)]
zvol: remove unused variable

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12917

2 years agoFreeBSD: vfsops: use setgen for error case
наб [Thu, 6 Jan 2022 19:15:08 +0000 (20:15 +0100)]
FreeBSD: vfsops: use setgen for error case

Fix from https://github.com/openzfs/zfs/pull/12844#discussion_r774179413

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12905

2 years agoRevert "zfs list: Allow more fields in ZFS_ITER_SIMPLE mode"
Paul Dagnelie [Thu, 6 Jan 2022 19:12:53 +0000 (11:12 -0800)]
Revert "zfs list: Allow more fields in ZFS_ITER_SIMPLE mode"

This reverts commit f6a0dac84af2fba9c306a3a307ea7aafcbe32d2b.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #12938

2 years agoman: speling
chrisrd [Thu, 6 Jan 2022 19:00:01 +0000 (06:00 +1100)]
man: speling

Fix spelling.

Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlop <chris@onthe.net.au>
Closes #12911

2 years agoZTS: normalize on use of `sync_pool` and `sync_all_pools`
Allan Jude [Thu, 6 Jan 2022 18:57:09 +0000 (13:57 -0500)]
ZTS: normalize on use of `sync_pool` and `sync_all_pools`

- Replaces use of manual `zpool sync`
- Don't use `log_must sync_pool` as `sync_pool` uses it internally
- Replace many (but not all) uses of `sync` with `sync_pool`

This makes the tests more consistent, and makes searching easier.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #12894

2 years agoLong opts for zdb
Manoj Joseph [Thu, 6 Jan 2022 18:54:32 +0000 (10:54 -0800)]
Long opts for zdb

This change introduces long options for zdb. It updates the usage
message as well to include the long options.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Manoj Joseph <manoj.joseph@delphix.com>
Closes #12818

2 years agozfs_prune: reset sc.nr_to_scan
chrisrd [Wed, 5 Jan 2022 01:07:33 +0000 (12:07 +1100)]
zfs_prune: reset sc.nr_to_scan

sc.nr_to_scan is an input to super_cache_clean (via
shrinker->scan_objects), used to set the number of objects to scan
in the various caches. However super_cache_scan also modifies
sc.nr_to_scan, so when used in a loop we need to reset
sc.nr_to_scan back to our desired nr_to_scan for the next
iteration.

Issue discovered and solution suggested by
Tenzin Lhakhang @tlhakhan.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlop <chris@onthe.net.au>
Issue #12433
Closes #12908

2 years agoVerify dRAID empty sectors
Brian Behlendorf [Wed, 5 Jan 2022 00:46:32 +0000 (16:46 -0800)]
Verify dRAID empty sectors

Verify that all empty sectors are zero filled before using them to
calculate parity.  Failure to do so can result in incorrect parity
columns being generated and written to disk if the contents of an
empty sector are non-zero.  This was possible because the checksum
only protects the data portions of the buffer, not the empty sector
padding.

This issue has been addressed by updating raidz_parity_verify() to
check that all dRAID empty sectors are zero filled.  Any sectors
which are non-zero will be fixed, repair IO issued, and a checksum
error logged.  They can then be safely used to verify the parity.

This specific type of damage is unlikely to occur since it requires
a disk to have silently returned bad data, for an empty sector, while
performing a scrub.  However, if a pool were to have been damaged
in this way, scrubbing the pool with this change applied will repair
both the empty sector and parity columns as long as the data checksum
is valid.  Checksum errors will be reported in the `zpool status`
output for any repairs which are made.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12857

2 years agoFreeBSD: fix unpropagated error
наб [Thu, 23 Dec 2021 19:39:29 +0000 (20:39 +0100)]
FreeBSD: fix unpropagated error

When performing I/O on FreeBSD using a file based vdev ensure all
errors encountered when reading/writing are propagated through the
zio pipeline.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12904

2 years agomodule: icp: fix unused, remove argsused
наб [Sun, 12 Dec 2021 16:34:25 +0000 (17:34 +0100)]
module: icp: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: fix unused, remove argsused
наб [Sun, 12 Dec 2021 15:06:44 +0000 (16:06 +0100)]
module: zfs: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: freebsd: fix unused, remove argsused
наб [Wed, 22 Dec 2021 17:35:13 +0000 (18:35 +0100)]
module: zfs: freebsd: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: linux: fix unused, remove argsused
наб [Sun, 12 Dec 2021 15:04:06 +0000 (16:04 +0100)]
module: zfs: linux: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zcommon: zprop: fix unused, remove argsused
наб [Sun, 12 Dec 2021 15:02:06 +0000 (16:02 +0100)]
module: zcommon: zprop: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: avl: fix unused, remove argsused
наб [Sun, 12 Dec 2021 14:23:11 +0000 (15:23 +0100)]
module: avl: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibzfs: fix unused, remove argsused
наб [Sun, 12 Dec 2021 14:38:17 +0000 (15:38 +0100)]
libzfs: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibnvpair: fix unused, remove argsused
наб [Sun, 12 Dec 2021 14:16:19 +0000 (15:16 +0100)]
libnvpair: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibzutil: import: fix unused, remove argsused
наб [Sun, 12 Dec 2021 14:34:00 +0000 (15:34 +0100)]
libzutil: import: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibzpool: fix unused, remove argsused
наб [Sun, 12 Dec 2021 15:01:06 +0000 (16:01 +0100)]
libzpool: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibshare: nfs: fix unused, remove argsused
наб [Sun, 12 Dec 2021 14:26:39 +0000 (15:26 +0100)]
libshare: nfs: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibzfs_core: fix unused, remove argsused
наб [Sun, 12 Dec 2021 14:37:18 +0000 (15:37 +0100)]
libzfs_core: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibefi: efi_type: fix unused, remove argsused
наб [Sun, 12 Dec 2021 14:14:37 +0000 (15:14 +0100)]
libefi: efi_type: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agoinclude: dmu.h: fix unused, remove argsused
наб [Sun, 12 Dec 2021 17:42:13 +0000 (18:42 +0100)]
include: dmu.h: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: vdev: shim out vdev_indirect_mapping_verify()
наб [Tue, 21 Dec 2021 17:44:53 +0000 (18:44 +0100)]
module: zfs: vdev: shim out vdev_indirect_mapping_verify()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: vdev: shim out vdev_indirect_births_verify()
наб [Tue, 21 Dec 2021 17:44:41 +0000 (18:44 +0100)]
module: zfs: vdev: shim out vdev_indirect_births_verify()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: spa: shim out vdev_count_verify_zaps()
наб [Tue, 21 Dec 2021 17:44:20 +0000 (18:44 +0100)]
module: zfs: spa: shim out vdev_count_verify_zaps()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: multilist: shim out multilist_d2l()
наб [Tue, 21 Dec 2021 17:44:04 +0000 (18:44 +0100)]
module: zfs: multilist: shim out multilist_d2l()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: dsl: pool: shim out dsl_early_sync_task_verify()
наб [Tue, 21 Dec 2021 17:43:49 +0000 (18:43 +0100)]
module: zfs: dsl: pool: shim out dsl_early_sync_task_verify()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agomodule: zfs: dnode: use debug-only in debug mode only
наб [Tue, 21 Dec 2021 17:38:30 +0000 (18:38 +0100)]
module: zfs: dnode: use debug-only in debug mode only

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agoinclude: sys/arc.h: shim out arc_referenced()
наб [Tue, 21 Dec 2021 17:37:52 +0000 (18:37 +0100)]
include: sys/arc.h: shim out arc_referenced()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agoinclude: qat.h: mark unused macro arguments as used
наб [Sun, 12 Dec 2021 16:01:21 +0000 (17:01 +0100)]
include: qat.h: mark unused macro arguments as used

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibspl: kmem.h: mark unused kmem_*() macro arguments used
наб [Sun, 12 Dec 2021 14:20:26 +0000 (15:20 +0100)]
libspl: kmem.h: mark unused kmem_*() macro arguments used

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agolibspl: ASSERT*: mark arguments as used
наб [Sun, 12 Dec 2021 14:14:00 +0000 (15:14 +0100)]
libspl: ASSERT*: mark arguments as used

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12844

2 years agoZTS: Fix enospc_002_pos.ksh again
Brian Behlendorf [Thu, 23 Dec 2021 17:21:40 +0000 (09:21 -0800)]
ZTS: Fix enospc_002_pos.ksh again

This is a follow up commit for e03a41a60 which aimed to resolve
this same test failure.  The core "problem" here is that it takes
very little space to perform a clone/snapshot/bookmark, which
means if we want these commands to reliably fail the pool must
truely have exhausted all free space.

This commit increases the number of fill iterations to try and
consume every block which we can.  This still can't guarantee
the clone/snapshot/bookmark will fail, but it significantly
improves the odds.  The exception was kept since it's still
not a sure thing.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12903

2 years agoReduce number of arc_prune threads
Alexander Motin [Thu, 23 Dec 2021 01:07:13 +0000 (20:07 -0500)]
Reduce number of arc_prune threads

On FreeBSD vnode reclamation is single-threaded, protected by single
global lock.  Linux seems to be able to use a thread per mount point,
but at this time it creates more harm than good.

Reduce number of threads to 1, adding tunable in case somebody wants
to try more.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Chris Dunlop <chris@onthe.net.au>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Closes #12896
Issue #9966

2 years agoZTS: Fix rollback_003_pos.ksh
Brian Behlendorf [Wed, 22 Dec 2021 19:05:07 +0000 (11:05 -0800)]
ZTS: Fix rollback_003_pos.ksh

Under Linux when rolling back a mounted filesystem negative dentries
may not be dropped from the cache.  This can result in an ENOENT
being incorrectly returned on first access.  Issuing a `df` before
the unmount results in the negative dentries being invalidated and
side steps the issue.

This is solely a workaround for the test case on Linux and not
correct behavior.  The core issue of invalidating negative dentries
needs to be handled with a kernel side change.  This is being
tracked as issue #6143.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12898
Issue #6143

2 years agoZTS: Fix refreserv_raidz.ksh
Brian Behlendorf [Wed, 22 Dec 2021 17:37:27 +0000 (09:37 -0800)]
ZTS: Fix refreserv_raidz.ksh

The rerefreserv_raidz test was failing on Linux because the sync being
issued doesn't guarantee a pool sync.  Switch to using the sync_pool
function and remove the ZTS exception for Linux.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12897

2 years agozfs-test/mmap_seek: fix build on musl
Georgy Yakovlev [Wed, 22 Dec 2021 00:44:18 +0000 (16:44 -0800)]
zfs-test/mmap_seek: fix build on musl

The build on musl needs linux/fs.h for SEEK_DATA and friends,
and sys/sysmacros.h for P2ROUNDUP.  Add the needed headers.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes #12891

2 years agozed: send notification email by default
shodanshok [Wed, 22 Dec 2021 00:24:05 +0000 (01:24 +0100)]
zed: send notification email by default

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Gionatan Danti <g.danti@assyoma.it>
Closes #12806

2 years agocontrib/initrd hooks: properly quote @LIBFETCH_SONAME@
наб [Sat, 11 Dec 2021 01:41:23 +0000 (02:41 +0100)]
contrib/initrd hooks: properly quote @LIBFETCH_SONAME@

Bullseye shellcheck picks these up as SC2140, and it's right!
@LIBFETCH_SONAME@ is already quoted, so dracut had
  "$d/"libcurl.so.4""
and i-t had
  ""libcurl.so.4""

Partially reverts 34eef3e9a7a74d24a59d016051d547afc55dbaa0 (#12760),
which broke this

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agocontrib/pam_zfs_key: fix unused, remove argsused
наб [Sat, 11 Dec 2021 01:32:43 +0000 (02:32 +0100)]
contrib/pam_zfs_key: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agotests: fix unused, remove argsused
наб [Sat, 11 Dec 2021 01:24:35 +0000 (02:24 +0100)]
tests: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozfs: iter: fix unused, remove argsused
наб [Sat, 11 Dec 2021 01:00:02 +0000 (02:00 +0100)]
zfs: iter: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agoztest: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:57:41 +0000 (01:57 +0100)]
ztest: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozdb: il: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:40:42 +0000 (01:40 +0100)]
zdb: il: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozdb: main: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:37:25 +0000 (01:37 +0100)]
zdb: main: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozed: agents: fmd_api: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:26:20 +0000 (01:26 +0100)]
zed: agents: fmd_api: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozed: agents: zfs_retire: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:21:46 +0000 (01:21 +0100)]
zed: agents: zfs_retire: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozed: agents: zfs_mod: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:20:55 +0000 (01:20 +0100)]
zed: agents: zfs_mod: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozed: agents: zfs_diagnosis: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:18:01 +0000 (01:18 +0100)]
zed: agents: zfs_diagnosis: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozed: agents: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:08:22 +0000 (01:08 +0100)]
zed: agents: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozed: exec: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:07:57 +0000 (01:07 +0100)]
zed: exec: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozed: main: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:07:21 +0000 (01:07 +0100)]
zed: main: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozpool: vdev_os: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:06:29 +0000 (01:06 +0100)]
zpool: vdev_os: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozpool: main: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:05:17 +0000 (01:05 +0100)]
zpool: main: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozpool: iter: zpool_compare: fix unused, remove argsused
наб [Sat, 11 Dec 2021 00:05:01 +0000 (01:05 +0100)]
zpool: iter: zpool_compare: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozinject: cancel_one_handler: fix unused, remove argsused
наб [Fri, 10 Dec 2021 23:56:59 +0000 (00:56 +0100)]
zinject: cancel_one_handler: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agozhack: space_delta_cb: fix unused, remove argsused
наб [Fri, 10 Dec 2021 23:56:00 +0000 (00:56 +0100)]
zhack: space_delta_cb: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agoraidz_test: init_rand: fix unused, remove argsused
наб [Fri, 10 Dec 2021 23:53:04 +0000 (00:53 +0100)]
raidz_test: init_rand: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835

2 years agoZTS: speed up rsend tests
Brian Behlendorf [Fri, 17 Dec 2021 23:29:23 +0000 (23:29 +0000)]
ZTS: speed up rsend tests

With some minor tweaks several of rsend tests can be sped up
considerably without significantly reducing test coverage.

* send-c_verify_ratio:  ~120s -> ~60s
* send_realloc_*_files: ~330s -> ~65s

For the send_realloc* tests this also has the advantage of removing
(most of) the linux/freebsd conditional logic.  Note that for this
test more passes, and thus more incremental send/recvs, are preferable
to a larger number of files.

Total run time of the rsend test group was reduced from roughly 20 to
11 minutes in an environment similar to what's used by the CI.

Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12876

2 years agoZTS: rsend_007_pos failures
Brian Behlendorf [Fri, 17 Dec 2021 23:20:10 +0000 (23:20 +0000)]
ZTS: rsend_007_pos failures

The rsend_007_pos test reliably fails on Linux in the cleanup
function.  This is caused by an unmount error when attempting to
recursively destroy the newly received datasets.  Invoking `df`
prior to the `zfs destroy` interestingly avoids the unmont error.

Why this should matter is unclear and should be investigated.
However, this minor tweak may allow us to remove the ZTS rsend
exceptions.  The subsequent rsend_010_pos and rsend_011_pos
failures were a result of this initial failure.  The other
"maybe" failures I was unable to reproduce and have not been
recently observed in the master branch.

Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5665
Closes #6086
Closes #6087
Closes #6446
Closes #12876

2 years agoFreeBSD: fix world build after 143476ce8
Martin Matuška [Mon, 20 Dec 2021 22:28:43 +0000 (23:28 +0100)]
FreeBSD: fix world build after 143476ce8

Do not redefine the fallthrough macro when building with libcpp.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Martin Matuska <mm@FreeBSD.org>
Closes #12880

2 years agoFix error propagation from lzc_send_redacted
Philipp Riederer [Mon, 20 Dec 2021 18:50:46 +0000 (19:50 +0100)]
Fix error propagation from lzc_send_redacted

Any error from lzc_send_redacted is overwritten by the error of
send_conclusion_record; skip writing the conclusion record if there
was an earlier error.

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Philipp Riederer <philipp@riederer.email>
Closes #12766

2 years agoLinux: Implement FS_IOC_GETVERSION
Ryan Moeller [Sat, 18 Dec 2021 00:18:37 +0000 (19:18 -0500)]
Linux: Implement FS_IOC_GETVERSION

Provide access to file generation number on Linux.

Add test coverage.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #12856

2 years agolibshare: nfs: always try to mkdir()
наб [Tue, 18 May 2021 16:00:26 +0000 (18:00 +0200)]
libshare: nfs: always try to mkdir()

This also works out to one syscall if the directory exists,
but is one syscall shorter if it doesn't.

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agolibshare: nfs: set export file 644
наб [Mon, 17 May 2021 19:08:16 +0000 (21:08 +0200)]
libshare: nfs: set export file 644

The shares are publicly known anyway and can be interrogated by any
user, so this is a debugging aid more than anything.

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agolinux/libshare: nfs: don't needlessly strdup() hostspec
наб [Mon, 17 May 2021 18:34:04 +0000 (20:34 +0200)]
linux/libshare: nfs: don't needlessly strdup() hostspec

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agolibshare: nfs: share nfs_is_shared()
наб [Mon, 17 May 2021 18:25:29 +0000 (20:25 +0200)]
libshare: nfs: share nfs_is_shared()

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agolibshare: nfs: share nfs_copy_entries()
наб [Mon, 17 May 2021 17:56:48 +0000 (19:56 +0200)]
libshare: nfs: share nfs_copy_entries()

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agolibshare: nfs: open temporary file once
наб [Mon, 17 May 2021 16:13:18 +0000 (18:13 +0200)]
libshare: nfs: open temporary file once

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agolibshare: nfs: retry flock() when interrupted
наб [Mon, 17 May 2021 16:08:35 +0000 (18:08 +0200)]
libshare: nfs: retry flock() when interrupted

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agofreebsd/libshare: nfs: don't send SIGHUP to all processes
наб [Mon, 17 May 2021 16:03:26 +0000 (18:03 +0200)]
freebsd/libshare: nfs: don't send SIGHUP to all processes

pidfile_open() sets *pidptr to -1 if the process currently holding
the lock is between pidfile_open() and pidfile_write(),
the subsequent kill(mountdpid) would potentially SIGHUP all
non-system processes except init: just sleep for half a millisecond
and try again in that case

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agozfs-share.8: document -l flag
наб [Mon, 17 May 2021 16:09:46 +0000 (18:09 +0200)]
zfs-share.8: document -l flag

Description stolen from zfs-mount.8

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067

2 years agocontrib/initrd: systemd-ask-password --no-tty before argument
наб [Fri, 17 Dec 2021 20:44:23 +0000 (21:44 +0100)]
contrib/initrd: systemd-ask-password --no-tty before argument

In systemd 249 (sid), sd-a-p processes its arguments in getopt + mode,
so "systemd-ask-password zupa --no-tty" prompts for "zupa --no-tty",
not "zupa" not on the tty, as expected (bullseye, 247).

Ref: https://github.com/systemd/systemd/commit/4b1c842d95bfd6ab352ade1a4655f9e512f35185
Ref: https://github.com/systemd/systemd/pull/19806
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12870

2 years agoWorkaround Debian's fake System.map behavior
Rich Ercolani [Fri, 17 Dec 2021 20:43:13 +0000 (15:43 -0500)]
Workaround Debian's fake System.map behavior

Debian ships fake System.map files by default, leading to the
invocation of depmod with them to flood you with errors about
missing symbols.

Let's notice and not do that.

Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12862