freebsd-dev/lib/libzfs
rob-wing 3e4ed4213d
Create zap for root vdev
And add it to the AVZ, this is not backwards compatible with older pools
due to an assertion in spa_sync() that verifies the number of ZAPs of
all vdevs matches the number of ZAPs in the AVZ.

Granted, the assertion only applies to #DEBUG builds - still, a feature
flag is introduced to avoid the assertion, com.klarasystems:vdev_zaps_v2

Notably, this allows to get/set properties on the root vdev:

    % zpool set user:prop=value <pool> root-0

Before this commit, it was already possible to get/set properties on
top-level vdevs with the syntax <type>-<vdev_id> (e.g. mirror-0):

    % zpool set user:prop=value <pool> mirror-0

This syntax also applies to the root vdev as it is is of type 'root'
with a vdev_id of 0, root-0. The keyword 'root' as an alias for
'root-0'.

The following tests have been added:

    - zpool get all properties from root vdev
    - zpool set a property on root vdev
    - verify root vdev ZAP is created

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Wing <rob.wing@klarasystems.com>
Sponsored-by: Seagate Technology
Submitted-by: Klara, Inc.
Closes #14405
2023-04-20 10:07:56 -07:00
..
os nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_config.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
libzfs_crypto.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_dataset.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_diff.c Add more ANSI colors to libzfs 2023-03-24 10:21:19 -07:00
libzfs_impl.h nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzfs_import.c nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzfs_iter.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_mount.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_pool.c Create zap for root vdev 2023-04-20 10:07:56 -07:00
libzfs_sendrecv.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_status.c nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzfs_util.c Fix "Add colored output to zfs list" 2023-04-05 09:57:01 -07:00
libzfs.abi Create zap for root vdev 2023-04-20 10:07:56 -07:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
Makefile.am Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00