aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/module/zcommon/zfeature_common.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2021-02-18 14:17:31 +0000
committerMartin Matuska <mm@FreeBSD.org>2021-02-18 14:19:35 +0000
commitee36e25a86cbe2a9474c1d61f2c4b450da8ef952 (patch)
tree1f9e503fe3f154ff3ebc542840b892419ad85314 /sys/contrib/openzfs/module/zcommon/zfeature_common.c
parentfa2528ac643519072c498b483d0dcc1fa5d99bc1 (diff)
parent62ceb3c592a54fc54d9cb3beee91906979c3df14 (diff)
downloadsrc-ee36e25a86cbe2a9474c1d61f2c4b450da8ef952.tar.gz
src-ee36e25a86cbe2a9474c1d61f2c4b450da8ef952.zip
zfs: merge OpenZFS master-bf156c966
Notable upstream changes: bf156c966 Remove unused abd_alloc_scatter_offset_chunkcnt 658fb8020 Add "compatibility" property for zpool feature sets This update introduces a new pool property called "compatibility" that can be used to enable a limited set of pool features on pool creation and "stick" to it, so the "zpool upgrade" does not accidentally enable features that are not desired. The value of this property may then be changed later. See zpool-features(5) for more information about the "compatibility" pool property. Obtained from: OpenZFS MFC after: 2 weeks
Diffstat (limited to 'sys/contrib/openzfs/module/zcommon/zfeature_common.c')
-rw-r--r--sys/contrib/openzfs/module/zcommon/zfeature_common.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/contrib/openzfs/module/zcommon/zfeature_common.c b/sys/contrib/openzfs/module/zcommon/zfeature_common.c
index 34ebabcf3b3c..e95a85e89ba2 100644
--- a/sys/contrib/openzfs/module/zcommon/zfeature_common.c
+++ b/sys/contrib/openzfs/module/zcommon/zfeature_common.c
@@ -222,9 +222,15 @@ zfs_mod_supported_feature(const char *name)
* features are supported.
*
* The equivalent _can_ be done on FreeBSD by way of the sysctl
- * tree, but this has not been done yet.
+ * tree, but this has not been done yet. Therefore, we return
+ * that all features except edonr are supported.
*/
-#if defined(_KERNEL) || defined(LIB_ZPOOL_BUILD) || defined(__FreeBSD__)
+#if defined(__FreeBSD__)
+ if (strcmp(name, "org.illumos:edonr") == 0)
+ return (B_FALSE);
+ else
+ return (B_TRUE);
+#elif defined(_KERNEL) || defined(LIB_ZPOOL_BUILD)
return (B_TRUE);
#else
return (zfs_mod_supported(ZFS_SYSFS_POOL_FEATURES, name));
@@ -440,8 +446,6 @@ zpool_feature_init(void)
skein_deps);
}
-#if !defined(__FreeBSD__)
-
{
static const spa_feature_t edonr_deps[] = {
SPA_FEATURE_EXTENSIBLE_DATASET,
@@ -453,7 +457,6 @@ zpool_feature_init(void)
ZFEATURE_FLAG_PER_DATASET, ZFEATURE_TYPE_BOOLEAN,
edonr_deps);
}
-#endif
{
static const spa_feature_t redact_books_deps[] = {