summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Matuška <[email protected]>2021-02-28 02:16:02 +0100
committerGitHub <[email protected]>2021-02-27 17:16:02 -0800
commit03ef8f09e1d2854afe1436b897b81bac872f1be7 (patch)
treeddada2d3f845bbe4db8c58bf8dbf5460189e0c62 /lib
parent778fa36ee79bc8887f3b4bb2c3bb09784a3fb33c (diff)
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 <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes #11653
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_status.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_status.c b/lib/libzfs/libzfs_status.c
index fadae9388..5e5cb5f5d 100644
--- a/lib/libzfs/libzfs_status.c
+++ b/lib/libzfs/libzfs_status.c
@@ -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);