]> git.proxmox.com Git - mirror_zfs.git/commit
Add support for zpool user properties
authorAllan Jude <allan@klarasystems.com>
Fri, 21 Apr 2023 17:20:36 +0000 (13:20 -0400)
committerGitHub <noreply@github.com>
Fri, 21 Apr 2023 17:20:36 +0000 (10:20 -0700)
commit8eae2d214cfa53862833eeeda9a5c1e9d5ded47d
tree29dfb37fc683a015473e70c8c90a6284d5df463e
parent135d9a9048e3716c755373182720d0eba170285f
Add support for zpool user properties

Usage:

    zpool set org.freebsd:comment="this is my pool" poolname

Tests are based on zfs_set's user property tests.

Also stop truncating property values at MAXNAMELEN, use ZFS_MAXPROPLEN.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Mateusz Piotrowski <mateusz.piotrowski@klarasystems.com>
Sponsored-by: Beckhoff Automation GmbH & Co. KG.
Sponsored-by: Klara Inc.
Closes #11680
12 files changed:
cmd/zpool/zpool_main.c
include/libzfs.h
lib/libzfs/libzfs.abi
lib/libzfs/libzfs_pool.c
lib/libzfs/libzfs_util.c
man/man7/zpoolprops.7
module/zfs/spa.c
tests/runfiles/common.run
tests/zfs-tests/tests/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_set/user_property_001_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_set/user_property_002_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_set/zpool_set_common.kshlib [new file with mode: 0644]