aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* dracut: fix boot on non-zfs-root systemsToyam Cox2022-06-301-5/+5
| | | | | | | | | | Simply prevent overwriting root until it needs to be overwritten. Dracut could change this value before this module is called, but won't change the kernel command line. Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Toyam Cox <[email protected]> Closes #13592
* contrib: dracut: README.mdgregory-lee-bartholomew2022-06-301-1/+1
| | | | | | | | Change zfs-snapshot-bootfs.service to zfs-rollback-bootfs.service in cmdline point 4 of README.md. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Gregory Bartholomew <[email protected]> Closes #13609
* contrib: dracut: zfs-{rollback,snapshot}-bootfs: explicit snapname fixgregory-lee-bartholomew2022-06-292-2/+2
| | | | | | | | | | | Due to a missing semicolon on the ExecStart line, it wasn't possible to specify the snapshot name on the bootfs.{rollback,snapshot} kernel parameters if the boot dataset name was obtained from the root=zfs:... kernel parameter. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Gregory Bartholomew <[email protected]> Closes #13585
* dracut: fix typo in mount-zfs.sh.inBrian Behlendorf2022-06-291-1/+1
| | | | | | | | | Format the `zpool get` command correctly. The -o option must be followed by "all" or the requested field name. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #13602
* Remove install of zfs-load-module.service for dracutMatthew Thode2022-06-211-2/+1
| | | | | | | | The zfs-load-module.service service is not currently provided by the OpenZFS repository so we cannot safely assume it exists. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Thode <[email protected]> Closes #13574
* Add Linux namespace delegation supportWill Andrews2022-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows ZFS datasets to be delegated to a user/mount namespace Within that namespace, only the delegated datasets are visible Works very similarly to Zones/Jailes on other ZFS OSes As a user: ``` $ unshare -Um $ zfs list no datasets available $ echo $$ 1234 ``` As root: ``` # zfs list NAME ZONED MOUNTPOINT containers off /containers containers/host off /containers/host containers/host/child off /containers/host/child containers/host/child/gchild off /containers/host/child/gchild containers/unpriv on /unpriv containers/unpriv/child on /unpriv/child containers/unpriv/child/gchild on /unpriv/child/gchild # zfs zone /proc/1234/ns/user containers/unpriv ``` Back to the user namespace: ``` $ zfs list NAME USED AVAIL REFER MOUNTPOINT containers 129M 47.8G 24K /containers containers/unpriv 128M 47.8G 24K /unpriv containers/unpriv/child 128M 47.8G 128M /unpriv/child ``` Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Will Andrews <[email protected]> Signed-off-by: Allan Jude <[email protected]> Signed-off-by: Mateusz Piotrowski <[email protected]> Co-authored-by: Allan Jude <[email protected]> Co-authored-by: Mateusz Piotrowski <[email protected]> Sponsored-by: Buddy <https://buddy.works> Closes #12263
* Replace EXTRA_DIST with dist_noinst_DATABrian Behlendorf2022-05-265-7/+5
| | | | | | | | | | | | | | | The EXTRA_DIST variable is ignored when used in the FALSE conditional of a Makefile.am. This results in the `make dist` target omitting these files from the generated tarball unless CONFIG_USER is defined. This issue can be avoided by switching to use the dist_noinst_DATA variable which is handled as expected by autoconf. This change also adds support for --with-config=dist as an alias for --with-config=srpm and updates the GitHub workflows to use it. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #13459 Closes #13505
* Remove constrained path on cleanнаб2022-05-101-1/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
* contrib: bash_completion.d: install, fix distнаб2022-05-101-5/+6
| | | | | | | | | | | | | dist diff: -zfs-2.1.99/contrib/bash_completion.d/zfs install diff: +destdir/usr/local/etc/bash_completion.d +destdir/usr/local/etc/bash_completion.d/zfs Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
* autoconf: use include directives instead of recursing down contribнаб2022-05-1018-148/+106
| | | | | | | | | Also make the pyzfs build actually out-of-tree and quiet by default Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Rapptz <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
* autoconf: use include directives instead of recursing down cmdнаб2022-05-108-4/+17
| | | | | | | | | | | | | | | | | No installation diff, dist lost -zfs-2.1.99/cmd/fsck_zfs/fsck.zfs which was distributed erroneously, since it's generated Also clean gitrev on clean Also add -e 'any possible bashisms' to default checkbashisms flags, and fully parallelise it and shellcheck, and it works out-of-tree, too Also align the Release in the dist META file correctly Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
* autoconf: use include directives instead of recursing down libнаб2022-05-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a bonus, this also adds zfs-mount-generator (previously undescended down) and libzstd (not included) to CppCheck As a bonus bonus, abigail rules work out-of-tree, too Against current trunk: $ diff -U0 ./destdir.listing ~/store/code/zfs/destdir.listing -destdir/usr/local/include/libspl/sscanf.h $ diff --color -U0 ./zfs-2.1.99.tar.gz.listing ../oot/zfs-2.1.99.tar.gz.listing | grep -v @@ | grep -v /Makefile -zfs-2.1.99/config/Abigail.am -zfs-2.1.99/lib/libspl/include/util/ -zfs-2.1.99/lib/libspl/include/util/sscanf.h $ diff --color -U0 ./zfs-2.1.99.tar.gz.listing ../oot/zfs-2.1.99.tar.gz.listing | grep -v @@ | grep /Makefile -zfs-2.1.99/lib/libavl/Makefile.in -zfs-2.1.99/lib/libefi/Makefile.in -zfs-2.1.99/lib/libicp/Makefile.in -zfs-2.1.99/lib/libnvpair/Makefile.in -zfs-2.1.99/lib/libshare/Makefile.in -zfs-2.1.99/lib/libspl/include/Makefile.in -zfs-2.1.99/lib/libspl/include/os/freebsd/Makefile.am -zfs-2.1.99/lib/libspl/include/os/freebsd/Makefile.in -zfs-2.1.99/lib/libspl/include/os/freebsd/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/os/freebsd/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/os/linux/Makefile.am -zfs-2.1.99/lib/libspl/include/os/linux/Makefile.in -zfs-2.1.99/lib/libspl/include/os/linux/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/os/linux/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/os/Makefile.am -zfs-2.1.99/lib/libspl/include/os/Makefile.in -zfs-2.1.99/lib/libspl/include/rpc/Makefile.am -zfs-2.1.99/lib/libspl/include/rpc/Makefile.in -zfs-2.1.99/lib/libspl/include/sys/dktp/Makefile.am -zfs-2.1.99/lib/libspl/include/sys/dktp/Makefile.in -zfs-2.1.99/lib/libspl/include/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/util/Makefile.am -zfs-2.1.99/lib/libspl/include/util/Makefile.in -zfs-2.1.99/lib/libspl/Makefile.in -zfs-2.1.99/lib/libtpool/Makefile.in -zfs-2.1.99/lib/libunicode/Makefile.in -zfs-2.1.99/lib/libuutil/Makefile.in -zfs-2.1.99/lib/libzfsbootenv/Makefile.in -zfs-2.1.99/lib/libzfs_core/Makefile.in -zfs-2.1.99/lib/libzfs/Makefile.in -zfs-2.1.99/lib/libzpool/Makefile.in -zfs-2.1.99/lib/libzstd/Makefile.in -zfs-2.1.99/lib/libzutil/Makefile.in -zfs-2.1.99/lib/Makefile.in Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
* contrib: dracut: remove getargbool polyfillнаб2022-04-201-14/+0
| | | | | | | | | It was originally released in dracut 008 in February 2011; we can probably drop it now Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* Add dracut.zfs.7наб2022-04-201-0/+2
| | | | | | | | | | Thorough documentation with a dracut.bootup(7)-style flowchart, dracut.cmdline(7)-style cmdline listing, and per-file docs like the old README Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib: dracut: zfs-needshutdown: don't listнаб2022-04-201-1/+1
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib: dracut: zfs-{rollback,snapshot}-bootfs: order after key loadingнаб2022-04-202-8/+4
| | | | | | | | This fixes at least one race I got with an encrypted root Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib: dracut: don't require essentials to be under the same encrootнаб2022-04-202-32/+40
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib: dracut: inline single-use import_pool, move single-use ask_for_passwordнаб2022-04-202-82/+72
| | | | | | | | | Also don't set ROOTFS_MOUNTED; the final mention was removed in dracut 011 from July 2011 Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib: dracut: zfs-lib: remove find_bootfsнаб2022-04-202-27/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib: dracut: zfs-lib: simplify ask_for_passwordнаб2022-04-202-50/+13
| | | | | | | | | The only user is mount-zfs.sh (non-systemd systems), so reduce it to what it needs Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib; dracut: flatten zfs-load-key, simplify zfs-env-bootfsнаб2022-04-203-45/+36
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib; dracut: centralise root= parsing, actually support root=sнаб2022-04-206-119/+108
| | | | | | | | | | | | | | | | | | | | | | | | | So far, everything parsed root= manually, which meant that while zfs-parse.sh was updated, and supposedly supported + -> ' ' conversion, it meant nothing Instead, centralise parsing, and allow: root= root=zfs root=zfs: root=zfs:AUTO root=ZFS=data/set root=zfs:data/set root=zfs:ZFS=data/set (as a side-effect; allowed but undocumented) rootfstype=zfs AND root=data/set <=> root=data/set rootfstype=zfs AND root= <=> root=zfs:AUTO So rootfstype=zfs /also/ behaves as expected, and + decoding works Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib: dracut: parse-zfs: stop pretending we support FILESYSTEM=наб2022-04-201-4/+1
| | | | | | | | | | | | | It was added in the original ae26d0465a ("Add dracut support") commit in 2011, and was then broken a bit later with the advent of dracut-zfs-generator, or maybe earlier as part of other churn Either way, it's broken, and has been in 2.0+ as well, and no-one complained. Stop pretending we support it at all Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* contrib: dracut: parse-zfs: drop initqueue-finished for i/fнаб2022-04-201-3/+0
| | | | | | | | | The switch was released in dracut 009 in March 2011, we can safely get rid of the compatibility hook Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
* initramfs: use `mount.zfs` instead of `mount`Damian Szuberski2022-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A followup to d7a67402a85252e163aa8a9b69e7eda499db8c61 For `mount -t zfs -o opts ds mp` command line some implementations of `mount(8)`, e. g. Busybox in Debian work as follows: ``` newfstatat(AT_FDCWD, "ds", 0x7fff826f4ab0, 0) = -1 mount("ds", "mp", "zfs", MS_SILENT, NULL) = 0 ``` The logic above skips completely `mount.zfs` and prevents us from reading filesystem properties and applying mount options. For comparison, the coreutils `mount(8)` implementation does: ``` openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_CLOEXEC) = 3 // figure out that zfs is a `nodev` filesystem and look for a helper newfstatat(AT_FDCWD, "/sbin/mount.zfs" ...) = 0 execve("/sbin/mount.zfs" ...) = 0 ``` Using `mount.zfs` in initramfs would help circumvent deficiencies of some of `mount(8)` implementations. `mount -t zfs` translates to `mount.zfs` invocation, except for cases when explicitly disabled by `-i`. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #13305
* tests: clean out more temporary filesнаб2022-04-011-0/+2
| | | | | | | | | | | | What remains is a bunch of anonymous untraceable /tmp/tmp.XXXXXXXXXX files and bak.root.receive.staff1.3835 from an error branch, testdir.1, testdir.3, and testroot454470 (with children) in testroot Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13259
* Remove bcopy(), bzero(), bcmp()наб2022-03-151-1/+1
| | | | | | | | | | bcopy() has a confusing argument order and is actually a move, not a copy; they're all deprecated since POSIX.1-2001 and removed in -2008, and we shim them out to mem*() on Linux anyway Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* contrib/dracut: README: note rootfstype=zfsнаб2022-03-031-0/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13093
* contrib/dracut: zfs-lib: export_all: replace with inline zpool export -aнаб2022-03-033-20/+2
| | | | | | | | | 07a3312f170ac56cb480b0df9fdf4c83f116b59b, which introduced this in October of 2014, didn't have zpool export -a available; we do Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13093
* contrib/dracut: export-zfs: simplifyнаб2022-03-031-10/+4
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13093
* Default to ON for compressionRich Ercolani2022-03-031-1/+2
| | | | | | | | | A simple change, but so many tests break with it, and those are the majority of this. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #13078
* dracut: skip zfsexpandknoweldge when zfs_devs is present in dracutSavyasachee Jha2022-02-281-0/+6
| | | | | | | | | | | PR 1711 (https://github.com/dracutdevs/dracut/pull/1711) adds a zfs_devs function to dracut to detect the physical devices backing zfs pools. If this function exists in the version of dracut this module is being called from, then it does not need to run. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ahelenia Ziemiańska <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13121
* userspace: mark arguments usedнаб2022-02-181-0/+1
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* Multiple dracut module install script cleanupsSavyasachee Jha2022-02-161-61/+40
| | | | | | | | | | | | | | | | | | | | | | | | - Replaced intances of `dracut_install` with `inst_simple` - Removed calls to `test -x mark_hostonly` because the function is an inbuilt dracut function - Removed redundant installation of `systemd-ask-password` and `systemd-tty-ask-password-agent` because they are already installed by the systemd module. There is no need to install them again - Removed multiple calls to the `mark_hostonly` function because the `inst_simple` has a command-line switch for it - Cleaned up the installation of the `zpool.cache`, `vdev_id.conf` and `hostid` files to make the logic easier to follow - Cleaned up and simplified the systemd service installation logic by invoking systemctl instead of creating symlinks manually - Replaced various hard-coded paths with dracut equivalents to better conform with expected dracut behaviour - Removed redundant call to `mkdir` (`inst_simple` creates the parent directory if it does not exist on the destination initrd) Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13010
* Remove absolute paths to udev rules and binaries for dracutSavyasachee Jha2022-02-161-12/+5
| | | | | | | | | | | | Since dracut functions can locate both udev rules and binaries, there is no point in keeping absolute paths in the module setup script. It also breaks the --sysroot option in dracut. This commit removes mentions to absolute paths for binaries and udev rules. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13010
* Make dracut fail if essential files cannot be installedSavyasachee Jha2022-02-161-10/+30
| | | | | | | | | | Dracut will now fail in initramfs generation if essential files cannot be installed. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13010
* Make better use of dracut functions when building initramfsSavyasachee Jha2022-02-161-53/+24
| | | | | | | | | | | | | | | | | | Setting up the module involves multiple redundant calls to a bunch of dracut functions wheich can be combined into one. Additionally, the mass of code required to load libgcc_s.so* can be replaced with one dracut function. This has the additional effect of removing errors involving the non-installation of libgcc_s.so* which are seen on debian bullseye when using version 2.1.2-1~bpo11+1 from the backports repository. The systemd binaries are separated out into their own `dracut_install` function call so they do not get pulled in when dracut does not load the systemd module. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Andrew J. Hesford <[email protected]> Signed-off-by: Savyasachee Jha <[email protected]> Closes #13010
* contrib: rename initrd READMEs to README.mdнаб2022-02-114-3/+2
| | | | | | | | It's an unhelpful naming scheme and one that breaks GitHub autoreadme. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13017
* contrib: dracut: zfs-{rollback,snapshot}-bootfs: don't shell for testнаб2022-02-112-2/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13017
* dracut: README: rewriteнаб2022-02-111-225/+46
| | | | | | | | | | The documentation in the dracut README has grown stale and inaccurate. Remove the stale content and write a short and useful reference manual. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13012 Closes #13017
* Add `--enable=all` to ShellCheck by defaultDamian Szuberski2022-02-079-9/+0
| | | | | | | | | | | Change enforced shell type from `dash` to `sh` and excluded `SC2039` and `SC3043` by default. `local` keyword is accepted by all POSIX shells from practical point of view. There is no need anymore to enforce dash so `local` is accepted. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #13020
* Removed Python 2 and Python 3.5- supportDamian Szuberski2022-01-131-5/+4
| | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12925
* libfetch: unquote @LIBFETCH_SONAME@ substнаб2022-01-062-4/+4
| | | | | | | | | | @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 <[email protected]> Reviewed-by: Damian Szuberski <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12922
* Revert "zfs list: Allow more fields in ZFS_ITER_SIMPLE mode"Paul Dagnelie2022-01-061-1/+1
| | | | | | | | | This reverts commit f6a0dac84af2fba9c306a3a307ea7aafcbe32d2b. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Mark Maybee <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #12938
* contrib/initrd hooks: properly quote @LIBFETCH_SONAME@наб2021-12-212-4/+4
| | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12835
* contrib/pam_zfs_key: fix unused, remove argsusedнаб2021-12-211-0/+9
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12835
* contrib/initrd: systemd-ask-password --no-tty before argumentнаб2021-12-172-2/+2
| | | | | | | | | | | 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 <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12870
* zfs list: Allow more fields in ZFS_ITER_SIMPLE modeAllan Jude2021-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the fields to be listed and sorted by are constrained to those populated by dsl_dataset_fast_stat(), then zfs list is much faster, as it does not need to open each objset and reads its properties. A previous optimization by Pawel Dawidek (0cee24064a79f9c01fc4521543c37acea538405f) took advantage of this to make listing snapshot names sorted only by name much faster. However, it was limited to `-o name -s name`, this work extends this optimization to work with: - name - guid - createtxg - numclones - inconsistent - redacted - origin and could be further extended to any other properties supported by dsl_dataset_fast_stat() or similar, that do not require extra locking or reading from disk. Reviewed-by: Mark Maybee <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pawel Jakub Dawidek <[email protected]> Signed-off-by: Allan Jude <[email protected]> Closes #11080
* contrib/bash_completion.d: fix error spew from __zfs_match_snapshot()наб2021-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given: /sbin/zfs list filling/a-zvol<TAB> -o space,refratio The rest of the cmdline gets vored by: /sbin/zfs list filling/a-zvolcannot open 'filling/a-zvol': operation not applicable to datasets of this type With -x (fragment): + COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur")) +++ __zfs_match_snapshot +++ local base_dataset=filling/dziadtop-nowe-duchy +++ [[ filling/dziadtop-nowe-duchy != filling/dziadtop-nowe-duchy ]] +++ [[ filling/dziadtop-nowe-duchy != '' ]] +++ __zfs_list_datasets filling/dziadtop-nowe-duchy +++ /sbin/zfs list -H -o name -s name -t filesystem -r filling/dziadtop-nowe-duchy +++ tail -n +2 cannot open 'filling/dziadtop-nowe-duchy': operation not applicable to datasets of this type +++ echo filling/dziadtop-nowe-duchy +++ echo filling/dziadtop-nowe-duchy@ ++ compgen -W 'filling/dziadtop-nowe-duchy This properly completes with: $ /sbin/zfs list filling/a-zvol<TAB> -o space,refratio filling/a-zvol filling/a-zvol@ $ /sbin/zfs list filling/a-zvol<cursor> -o space,refratio Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12820
* Add `const` to nvlist functions to properly expose their real behaviorPaul Dagnelie2021-12-061-14/+24
| | | | | | | | Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #12728