Add FreeBSD support to OpenZFS

Add the FreeBSD platform code to the OpenZFS repository.  As of this
commit the source can be compiled and tested on FreeBSD 11 and 12.
Subsequent commits are now required to compile on FreeBSD and Linux.
Additionally, they must pass the ZFS Test Suite on FreeBSD which is
being run by the CI.  As of this commit 1230 tests pass on FreeBSD
and there are no unexpected failures.

Reviewed-by: Sean Eric Fagan <sef@ixsystems.com>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #898 
Closes #8987
This commit is contained in:
Matthew Macy
2020-04-14 11:36:28 -07:00
committed by GitHub
parent 75c62019f3
commit 9f0a21e641
209 changed files with 46197 additions and 77 deletions
+12 -6
View File
@@ -4056,13 +4056,19 @@ function ls_xattr # path
function get_arcstat # stat
{
if is_linux; then
typeset stat=$1
typeset stat=$1
case $(uname) in
FreeBSD)
sysctl -n kstat.zfs.misc.arcstats.$stat
;;
Linux)
typeset zfs_arcstats="/proc/spl/kstat/zfs/arcstats"
[[ -f "$zfs_arcstats" ]] || return 1
grep $stat $zfs_arcstats | awk '{print $3}'
return $?
else
return 1
fi
;;
*)
false
;;
esac
}
+2 -2
View File
@@ -36,8 +36,8 @@ INITIALIZE_CHUNK_SIZE initialize_chunk_size zfs_initialize_chunk_size
INITIALIZE_VALUE initialize_value zfs_initialize_value
KEEP_LOG_SPACEMAPS_AT_EXPORT keep_log_spacemaps_at_export zfs_keep_log_spacemaps_at_export
L2ARC_NOPREFETCH l2arc.noprefetch l2arc_noprefetch
L2ARC_REBUILD_BLOCKS_MIN_L2SIZE UNSUPPORTED l2arc_rebuild_blocks_min_l2size
L2ARC_REBUILD_ENABLED UNSUPPORTED l2arc_rebuild_enabled
L2ARC_REBUILD_BLOCKS_MIN_L2SIZE l2arc.rebuild_blocks_min_l2size l2arc_rebuild_blocks_min_l2size
L2ARC_REBUILD_ENABLED l2arc.rebuild_enabled l2arc_rebuild_enabled
L2ARC_WRITE_BOOST l2arc.write_boost l2arc_write_boost
L2ARC_WRITE_MAX l2arc.write_max l2arc_write_max
LIVELIST_CONDENSE_NEW_ALLOC livelist.condense.new_alloc zfs_livelist_condense_new_alloc