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 <kjeld@schouten-lebbing.nl> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9684
This commit is contained in:
parent
69b7e3f92d
commit
0dcef9b966
|
@ -217,8 +217,11 @@ zfs_mod_supported_feature(const char *name)
|
||||||
* libzpool, always supports all the features. libzfs needs to
|
* libzpool, always supports all the features. libzfs needs to
|
||||||
* query the running module, via sysfs, to determine which
|
* query the running module, via sysfs, to determine which
|
||||||
* features are supported.
|
* 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);
|
return (B_TRUE);
|
||||||
#else
|
#else
|
||||||
return (zfs_mod_supported(ZFS_SYSFS_POOL_FEATURES, name));
|
return (zfs_mod_supported(ZFS_SYSFS_POOL_FEATURES, name));
|
||||||
|
|
|
@ -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,
|
* The zfs module spa_feature_table[], whether in-kernel or in libzpool,
|
||||||
* always supports all the properties. libzfs needs to query the running
|
* always supports all the properties. libzfs needs to query the running
|
||||||
* module, via sysfs, to determine which properties are supported.
|
* 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);
|
return (B_TRUE);
|
||||||
#else
|
#else
|
||||||
return (zfs_mod_supported(type == ZFS_TYPE_POOL ?
|
return (zfs_mod_supported(type == ZFS_TYPE_POOL ?
|
||||||
|
|
Loading…
Reference in New Issue