freebsd-dev/lib
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
..
libavl cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libefi Fix multiplication converted to larger type 2022-10-28 09:30:37 -07:00
libicp Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
libnvpair nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libshare Give strlcat() full buffer lengths rather than smaller buffer lengths 2023-02-14 11:03:42 -08:00
libspl spl: cmn_err_once() should be usable in brace-less if else statements 2023-03-15 11:13:25 -07:00
libtpool Add <limits.h> header 2022-11-28 13:24:17 -08:00
libunicode cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libuutil ABI files: sync with new Ubuntu release in CI 2023-03-10 16:23:01 -08:00
libzfs Create zap for root vdev 2023-04-20 10:07:56 -07:00
libzfs_core nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzfsbootenv nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzpool nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzstd cppcheck: explicitly exclude kernel code from userspace checks 2022-05-10 10:20:55 -07:00
libzutil Create zap for root vdev 2023-04-20 10:07:56 -07:00
Makefile.am autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00