Add missing checks for unsupported features

After 35ec517 it has become possible to import ZFS pools witn an
active org.illumos:edonr feature on FreeBSD, leading to a panic.

In addition, "zpool status" reported all pools without edonr
as upgradable and "zpool upgrade -v" reported edonr in the list
of upgradable features.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Martin Matuska <mm@FreeBSD.org>
Closes #11653
This commit is contained in:
Martin Matuška
2021-02-28 02:16:02 +01:00
committed by GitHub
parent 778fa36ee7
commit 03ef8f09e1
4 changed files with 9 additions and 0 deletions
+2
View File
@@ -482,6 +482,8 @@ check_status(nvlist_t *config, boolean_t isimport,
return (ZPOOL_STATUS_COMPATIBILITY_ERR);
for (i = 0; i < SPA_FEATURES; i++) {
zfeature_info_t *fi = &spa_feature_table[i];
if (!fi->fi_zfs_mod_supported)
continue;
if (pool_features[i] &&
!nvlist_exists(feat, fi->fi_guid))
return (ZPOOL_STATUS_FEAT_DISABLED);