aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zpool
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 /cmd/zpool
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 'cmd/zpool')
-rw-r--r--cmd/zpool/zpool_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 29252e6a2..e89eb3bea 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -9030,6 +9030,8 @@ zpool_do_upgrade(int argc, char **argv)
"---------------\n");
for (i = 0; i < SPA_FEATURES; i++) {
zfeature_info_t *fi = &spa_feature_table[i];
+ if (!fi->fi_zfs_mod_supported)
+ continue;
const char *ro =
(fi->fi_flags & ZFEATURE_FLAG_READONLY_COMPAT) ?
" (read-only compatible)" : "";