aboutsummaryrefslogtreecommitdiffstats
path: root/module/zcommon
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-12-06 09:44:29 -0800
committerBrian Behlendorf <[email protected]>2019-12-06 09:44:29 -0800
commit0dcef9b966590ac2b7b30c2188996943198cd45c (patch)
tree7c9a07cc971f13b0d174ea1443e1d4996663f004 /module/zcommon
parent69b7e3f92df86348cd9e091d0d680c583743ab34 (diff)
Disable sysfs feature checks on FreeBSD
The sysfs infrastructure for reporting supported features and properties is Linux specific. Disable it on FreeBSD until it can be extended to be more portable. Reviewed-by: Kjeld Schouten <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9684
Diffstat (limited to 'module/zcommon')
-rw-r--r--module/zcommon/zfeature_common.c5
-rw-r--r--module/zcommon/zprop_common.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/module/zcommon/zfeature_common.c b/module/zcommon/zfeature_common.c
index cc59c406d..15dcefd5b 100644
--- a/module/zcommon/zfeature_common.c
+++ b/module/zcommon/zfeature_common.c
@@ -217,8 +217,11 @@ zfs_mod_supported_feature(const char *name)
* libzpool, always supports all the features. libzfs needs to
* query the running module, via sysfs, to determine which
* features are supported.
+ *
+ * The equivalent _can_ be done on FreeBSD by way of the sysctl
+ * tree, but this has not been done yet.
*/
-#if defined(_KERNEL) || defined(LIB_ZPOOL_BUILD)
+#if defined(_KERNEL) || defined(LIB_ZPOOL_BUILD) || defined(__FreeBSD__)
return (B_TRUE);
#else
return (zfs_mod_supported(ZFS_SYSFS_POOL_FEATURES, name));
diff --git a/module/zcommon/zprop_common.c b/module/zcommon/zprop_common.c
index c4256c66f..2f473413a 100644
--- a/module/zcommon/zprop_common.c
+++ b/module/zcommon/zprop_common.c
@@ -73,8 +73,11 @@ zfs_mod_supported_prop(const char *name, zfs_type_t type)
* The zfs module spa_feature_table[], whether in-kernel or in libzpool,
* always supports all the properties. libzfs needs to query the running
* module, via sysfs, to determine which properties are supported.
+ *
+ * The equivalent _can_ be done on FreeBSD by way of the sysctl
+ * tree, but this has not been done yet.
*/
-#if defined(_KERNEL) || defined(LIB_ZPOOL_BUILD)
+#if defined(_KERNEL) || defined(LIB_ZPOOL_BUILD) || defined(__FreeBSD__)
return (B_TRUE);
#else
return (zfs_mod_supported(type == ZFS_TYPE_POOL ?