zfs/module/zcommon
Colm 658fb8020f
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
2021-02-17 21:30:45 -08:00
..
Makefile.in Linux 5.10 compat: use iov_iter in uio structure 2020-12-18 08:48:26 -08:00
cityhash.c Compile cityhash code into libzfs 2020-03-27 09:11:22 -07:00
zfeature_common.c FreeBSD: disable edonr in zfs_mod_supported_feature() 2021-02-17 08:14:51 -08:00
zfs_comutil.c Fix "zpool add -n" for dedup, special and log devices 2020-01-06 15:40:06 -08:00
zfs_deleg.c Remove code for zfs remap 2019-06-24 16:44:01 -07:00
zfs_fletcher.c FreeBSD: Implement sysctl for fletcher4 impl 2020-12-11 10:29:01 -08:00
zfs_fletcher_aarch64_neon.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_avx512.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_fletcher_intel.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_sse.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_superscalar.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_fletcher_superscalar4.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_namecheck.c Distributed Spare (dRAID) Feature 2020-11-13 13:51:51 -08:00
zfs_prop.c FreeBSD: Do zcommon_init sooner to avoid FPU panic 2020-12-09 21:29:00 -08:00
zpool_prop.c Add "compatibility" property for zpool feature sets 2021-02-17 21:30:45 -08:00
zprop_common.c Left-align index props 2020-01-31 08:55:51 -08:00