]> git.proxmox.com Git - mirror_zfs.git/commit - tests/runfiles/common.run
Add "compatibility" property for zpool feature sets
authorColm <colm@tuatha.org>
Thu, 18 Feb 2021 05:30:45 +0000 (05:30 +0000)
committerGitHub <noreply@github.com>
Thu, 18 Feb 2021 05:30:45 +0000 (21:30 -0800)
commit658fb8020f0501435516baeea7004575d640649b
treec457e97687bbef4abe4b791fce7f4515feaaf4d2
parent35ec51796f0aa8d4fe322b48e7d1d5a65e38a4ce
Add "compatibility" property for zpool feature sets

Property to allow sets of features to be specified; for compatibility
with specific versions / releases / external systems. Influences
the behavior of 'zpool upgrade' and 'zpool create'. Initial man
page changes and test cases included.

Brief synopsis:

zpool create -o compatibility=off|legacy|file[,file...] pool vdev...

compatibility = off : disable compatibility mode (enable all features)
compatibility = legacy : request that no features be enabled
compatibility = file[,file...] : read features from specified files.
Only features present in *all* files will be enabled on the
resulting pool. Filenames may be absolute, or relative to
/etc/zfs/compatibility.d or /usr/share/zfs/compatibility.d (/etc
checked first).

Only affects zpool create, zpool upgrade and zpool status.

ABI changes in libzfs:

* New function "zpool_load_compat" to load and parse compat sets.
* Add "zpool_compat_status_t" typedef for compatibility parse status.
* Add ZPOOL_PROP_COMPATIBILITY to the pool properties enum
* Add ZPOOL_STATUS_COMPATIBILITY_ERR to the pool status enum

An initial set of base compatibility sets are included in
cmd/zpool/compatibility.d, and the Makefile for cmd/zpool is
modified to install these in $pkgdatadir/compatibility.d and to
create symbolic links to a reasonable set of aliases.

Reviewed-by: ericloewe
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Colm Buckley <colm@tuatha.org>
Closes #11468
48 files changed:
cmd/zpool/Makefile.am
cmd/zpool/compatibility.d/compat-2018 [new file with mode: 0644]
cmd/zpool/compatibility.d/compat-2019 [new file with mode: 0644]
cmd/zpool/compatibility.d/compat-2020 [new file with mode: 0644]
cmd/zpool/compatibility.d/compat-2021 [new file with mode: 0644]
cmd/zpool/compatibility.d/freebsd-11.0 [new file with mode: 0644]
cmd/zpool/compatibility.d/freebsd-11.2 [new file with mode: 0644]
cmd/zpool/compatibility.d/freebsd-11.3 [new file with mode: 0644]
cmd/zpool/compatibility.d/freenas-9.10.2 [new file with mode: 0644]
cmd/zpool/compatibility.d/grub2 [new file with mode: 0644]
cmd/zpool/compatibility.d/openzfs-2.0-freebsd [new file with mode: 0644]
cmd/zpool/compatibility.d/openzfs-2.0-linux [new file with mode: 0644]
cmd/zpool/compatibility.d/openzfsonosx-1.7.0 [new file with mode: 0644]
cmd/zpool/compatibility.d/openzfsonosx-1.8.1 [new file with mode: 0644]
cmd/zpool/compatibility.d/openzfsonosx-1.9.3 [new file with mode: 0644]
cmd/zpool/compatibility.d/zol-0.6.5 [new file with mode: 0644]
cmd/zpool/compatibility.d/zol-0.7 [new file with mode: 0644]
cmd/zpool/compatibility.d/zol-0.8 [new file with mode: 0644]
cmd/zpool/zpool_main.c
config/Rules.am
include/libzfs.h
include/sys/fs/zfs.h
include/sys/spa_impl.h
lib/libzfs/libzfs.abi
lib/libzfs/libzfs_pool.c
lib/libzfs/libzfs_status.c
lib/libzutil/zutil_import.c
man/man5/zpool-features.5
man/man8/zpool-create.8
man/man8/zpool-upgrade.8
man/man8/zpoolprops.8
module/zcommon/zpool_prop.c
module/zfs/spa.c
module/zfs/spa_config.c
rpm/generic/zfs.spec.in
scripts/Makefile.am
tests/runfiles/common.run
tests/zfs-tests/include/default.cfg.in
tests/zfs-tests/tests/functional/cli_root/zpool_create/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_006_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_007_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_008_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_features_001_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_features_001_pos.ksh [new file with mode: 0755]