]> git.proxmox.com Git - mirror_zfs.git/commit
Add '-u' - nomount flag for zfs set
authorUmer Saleem <usaleem@ixsystems.com>
Mon, 2 Oct 2023 23:58:54 +0000 (04:58 +0500)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 23:58:54 +0000 (16:58 -0700)
commit4e16964e1c1555704f6e7cd031ae32e1491f0b11
tree2f4c6bcee616affec904b8b8ec328213bccab7c9
parent249d759caf816eaadd1b4ff3ca22f438a8c25c36
Add '-u' - nomount flag for zfs set

This commit adds '-u' flag for zfs set operation. With this flag,
mountpoint, sharenfs and sharesmb properties can be updated
without actually mounting or sharing the dataset.

Previously, if dataset was unmounted, and mountpoint property was
updated, dataset was not mounted after the update. This behavior
is changed in #15240. We mount the dataset whenever mountpoint
property is updated, regardless if it's mounted or not.

To provide the user with option to keep the dataset unmounted and
still update the mountpoint without mounting the dataset, '-u'
flag can be used.

If any of mountpoint, sharenfs or sharesmb properties are updated
with '-u' flag, the property is set to desired value but the
operation to (re/un)mount and/or (re/un)share the dataset is not
performed and dataset remains as it was before.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #15322
cmd/zfs/zfs_main.c
include/libzfs.h
lib/libzfs/libzfs.abi
lib/libzfs/libzfs_changelist.c
lib/libzfs/libzfs_dataset.c
man/man7/zfsprops.7
man/man8/zfs-set.8
tests/runfiles/common.run
tests/runfiles/sanity.run
tests/zfs-tests/tests/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_nomount.ksh [new file with mode: 0755]