Skip to content

Commit

Permalink
Merge OpenZFS support in to HEAD.
Browse files Browse the repository at this point in the history
The primary benefit is maintaining a completely shared
code base with the community allowing FreeBSD to receive
new features sooner and with less effort.

I would advise against doing 'zpool upgrade'
or creating indispensable pools using new
features until this change has had a month+
to soak.

Work on merging FreeBSD support in to what was
at the time "ZFS on Linux" began in August 2018.
I first publicly proposed transitioning FreeBSD
to (new) OpenZFS on December 18th, 2018. FreeBSD
support in OpenZFS was finally completed in December
2019. A CFT for downstreaming OpenZFS support in
to FreeBSD was first issued on July 8th. All issues
that were reported have been addressed or, for
a couple of less critical matters there are
pull requests in progress with OpenZFS. iXsystems
has tested and dogfooded extensively internally.
The TrueNAS 12 release is based on OpenZFS with
some additional features that have not yet made
it upstream.

Improvements include:
  project quotas, encrypted datasets,
  allocation classes, vectorized raidz,
  vectorized checksums, various command line
  improvements, zstd compression.

Thanks to those who have helped along the way:
Ryan Moeller, Allan Jude, Zack Welch, and many
others.

Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D25872
  • Loading branch information
mattmacy committed Aug 25, 2020
1 parent 22df1ff commit 9e5787d
Show file tree
Hide file tree
Showing 497 changed files with 2,733 additions and 276,678 deletions.
22 changes: 20 additions & 2 deletions Makefile.inc1
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@ _btxld= usr.sbin/btxld
# Rebuild ctfconvert and ctfmerge to avoid difficult-to-diagnose failures
# resulting from missing bug fixes or ELF Toolchain updates.
.if ${MK_CDDL} != "no"
_dtrace_tools= cddl/lib/libctf cddl/usr.bin/ctfconvert \
_dtrace_tools= cddl/lib/libctf cddl/lib/libspl cddl/usr.bin/ctfconvert \
cddl/usr.bin/ctfmerge
.endif

Expand Down Expand Up @@ -2756,7 +2756,12 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \
${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
${_cddl_lib_libuutil} \
${_cddl_lib_libavl} \
${_cddl_lib_libicp} \
${_cddl_lib_libicp_rescue} \
${_cddl_lib_libspl} \
${_cddl_lib_libtpool} \
${_cddl_lib_libzfs_core} ${_cddl_lib_libzfs} \
${_cddl_lib_libzutil} \
${_cddl_lib_libctf} \
lib/libufs \
lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \
Expand Down Expand Up @@ -2826,21 +2831,34 @@ _cddl_lib_libumem= cddl/lib/libumem
_cddl_lib_libnvpair= cddl/lib/libnvpair
_cddl_lib_libavl= cddl/lib/libavl
_cddl_lib_libuutil= cddl/lib/libuutil
_cddl_lib_libspl= cddl/lib/libspl

cddl/lib/libuutil__L: cddl/lib/libavl__L cddl/lib/libspl__L

.if ${MK_ZFS} != "no"
_cddl_lib_libicp= cddl/lib/libicp
_cddl_lib_libicp_rescue= cddl/lib/libicp_rescue
_cddl_lib_libtpool= cddl/lib/libtpool
_cddl_lib_libzutil= cddl/lib/libzutil
_cddl_lib_libzfs_core= cddl/lib/libzfs_core
_cddl_lib_libzfs= cddl/lib/libzfs

cddl/lib/libtpool__L: cddl/lib/libspl__L

cddl/lib/libzutil__L: cddl/lib/libavl__L cddl/lib/libtpool__L

cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L

cddl/lib/libzfs__L: cddl/lib/libzfs_core__L lib/msun__L lib/libutil__L
cddl/lib/libzfs__L: lib/libthr__L lib/libmd__L lib/libz__L cddl/lib/libumem__L
cddl/lib/libzfs__L: cddl/lib/libuutil__L cddl/lib/libavl__L lib/libgeom__L
cddl/lib/libzfs__L: cddl/lib/libnvpair__L cddl/lib/libzutil__L

lib/libbe__L: cddl/lib/libzfs__L
.endif
_cddl_lib_libctf= cddl/lib/libctf
_cddl_lib= cddl/lib
cddl/lib/libctf__L: lib/libz__L
cddl/lib/libctf__L: lib/libz__L cddl/lib/libspl__L
.endif
# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db
_prebuild_libs+= lib/libprocstat lib/libproc lib/librtld_db
Expand Down
2 changes: 2 additions & 0 deletions cddl/compat/opensolaris/include/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@

#include_next <fcntl.h>

#ifndef open64
#define open64(...) open(__VA_ARGS__)
#endif
#define openat64(...) openat(__VA_ARGS__)

#endif
35 changes: 0 additions & 35 deletions cddl/compat/opensolaris/include/mnttab.h

This file was deleted.

6 changes: 6 additions & 0 deletions cddl/contrib/opensolaris/cmd/lockstat/sym.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#endif
#include <sys/cpuvar.h>


typedef struct syment {
uintptr_t addr;
char *name;
Expand All @@ -72,6 +73,11 @@ static char maxsymname[64];
#endif
#endif

#define __sElfN(x) typedef __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x) x
__sElfN(Sym);
__sElfN(Shdr);
#define elf_getshdr __elfN(getshdr)

static void
add_symbol(char *name, uintptr_t addr, size_t size)
{
Expand Down
Loading

0 comments on commit 9e5787d

Please sign in to comment.