summaryrefslogtreecommitdiffstats
path: root/module
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 /module
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 'module')
-rw-r--r--module/zcommon/zfeature_common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zcommon/zfeature_common.c b/module/zcommon/zfeature_common.c
index e95a85e89..fc0e09605 100644
--- a/module/zcommon/zfeature_common.c
+++ b/module/zcommon/zfeature_common.c
@@ -100,6 +100,8 @@ zfeature_is_supported(const char *guid)
for (spa_feature_t i = 0; i < SPA_FEATURES; i++) {
zfeature_info_t *feature = &spa_feature_table[i];
+ if (!feature->fi_zfs_mod_supported)
+ continue;
if (strcmp(guid, feature->fi_guid) == 0)
return (B_TRUE);
}