aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zpool
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2021-01-22 09:47:06 -0800
committerGitHub <[email protected]>2021-01-22 09:47:06 -0800
commit76e1f78d4b5f759f8972dc14b1e04cdce364d548 (patch)
treea31a3ed49016bc9d1ac1de93a5dc5e9741a42eb7 /cmd/zpool
parentaa755b35493a2d27dbbc59f1527c6c93788b28f6 (diff)
Only add supported features during pool creation
When creating a pool only features supported by both user and kernel space should be enabled. Furthermore, improve the error messages when attempting to create, or add, a dRAID vdev when the dRAID feature is not supported by the kernel modules. Reviewed-by: Mark Maybee <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11492
Diffstat (limited to 'cmd/zpool')
-rw-r--r--cmd/zpool/zpool_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index a13ff5ebd..3ac372866 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -1653,7 +1653,8 @@ zpool_do_create(int argc, char **argv)
if (strcmp(propval, ZFS_FEATURE_DISABLED) == 0)
(void) nvlist_remove_all(props,
propname);
- } else if (enable_all_pool_feat) {
+ } else if (enable_all_pool_feat &&
+ feat->fi_zfs_mod_supported) {
ret = add_prop_list(propname,
ZFS_FEATURE_ENABLED, &props, B_TRUE);
if (ret != 0)