aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
Diffstat (limited to 'cddl')
-rw-r--r--cddl/lib/Makefile10
-rw-r--r--cddl/lib/libtpool/Makefile32
-rw-r--r--cddl/lib/libtpool/Makefile.depend16
-rw-r--r--cddl/lib/libtpool/tests/Makefile11
-rw-r--r--cddl/lib/libtpool/tests/libtpool_test.c82
-rw-r--r--cddl/lib/libuutil/Makefile26
-rw-r--r--cddl/lib/libuutil/Makefile.depend17
-rw-r--r--cddl/lib/libzfs/Makefile1
-rw-r--r--cddl/lib/libzfs/Makefile.depend1
-rw-r--r--cddl/lib/libzutil/Makefile2
-rw-r--r--cddl/lib/libzutil/Makefile.depend1
-rw-r--r--cddl/lib/pam_zfs_key/Makefile2
-rw-r--r--cddl/sbin/zfs/Makefile2
-rw-r--r--cddl/sbin/zfs/Makefile.depend2
-rw-r--r--cddl/sbin/zpool/Makefile2
-rw-r--r--cddl/sbin/zpool/Makefile.depend2
-rw-r--r--cddl/usr.bin/zinject/Makefile2
-rw-r--r--cddl/usr.bin/zinject/Makefile.depend1
-rw-r--r--cddl/usr.bin/zstream/Makefile2
-rw-r--r--cddl/usr.bin/ztest/Makefile2
-rw-r--r--cddl/usr.bin/ztest/Makefile.depend1
-rw-r--r--cddl/usr.libexec/zpool_influxdb/Makefile.depend1
-rw-r--r--cddl/usr.sbin/zdb/Makefile2
-rw-r--r--cddl/usr.sbin/zdb/Makefile.depend1
-rw-r--r--cddl/usr.sbin/zfsd/Makefile.common2
-rw-r--r--cddl/usr.sbin/zfsd/Makefile.depend1
26 files changed, 12 insertions, 212 deletions
diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile
index 892798be347d..19f0cf4385e2 100644
--- a/cddl/lib/Makefile
+++ b/cddl/lib/Makefile
@@ -16,9 +16,7 @@ SUBDIR.${MK_ZFS}+= \
libicp \
libicp_rescue \
libnvpair \
- libtpool \
libumem \
- libuutil \
libzdb \
libzfs \
libzfs_core \
@@ -32,14 +30,12 @@ SUBDIR_DEPEND_libavl= libspl
SUBDIR_DEPEND_libctf= libspl
SUBDIR_DEPEND_libdtrace= libctf
SUBDIR_DEPEND_libnvpair= libspl
-SUBDIR_DEPEND_libtpool= libspl
-SUBDIR_DEPEND_libuutil= libavl libspl
SUBDIR_DEPEND_libzfs_core= libnvpair libspl libzutil
-SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil
+SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libzfs_core libzutil
SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp
-SUBDIR_DEPEND_libzutil= libavl libtpool
+SUBDIR_DEPEND_libzutil= libavl
SUBDIR_DEPEND_libzfsbootenv= libzfs libnvpair
-SUBDIR_DEPEND_pam_zfs_key= libnvpair libuutil libzfs libzfs_core
+SUBDIR_DEPEND_pam_zfs_key= libnvpair libzfs libzfs_core
SUBDIR_PARALLEL=
diff --git a/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile
deleted file mode 100644
index 1ebfc52f5be9..000000000000
--- a/cddl/lib/libtpool/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-.PATH: ${ZFSTOP}/lib/libtpool
-.PATH: ${ZFSTOP}/include
-
-PACKAGE= zfs
-LIB_PACKAGE=
-
-LIB= tpool
-SHLIBDIR?= /lib
-LIBADD= spl
-
-INCS= thread_pool_impl.h
-SRCS= thread_pool.c
-
-WARNS?= 2
-CSTD= c99
-CFLAGS+= -DIN_BASE
-CFLAGS+= -I${ZFSTOP}/include
-CFLAGS+= -I${ZFSTOP}/lib/libspl/include/
-CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd
-CFLAGS+= -I${SRCTOP}/sys
-CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
-CFLAGS+= -I${ZFSTOP}/module/icp/include
-CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h
-CFLAGS+= -DHAVE_ISSETUGID
-CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
-
-.include <src.opts.mk>
-
-HAS_TESTS=
-SUBDIR.${MK_TESTS}+= tests
-
-.include <bsd.lib.mk>
diff --git a/cddl/lib/libtpool/Makefile.depend b/cddl/lib/libtpool/Makefile.depend
deleted file mode 100644
index 409c3c86cc20..000000000000
--- a/cddl/lib/libtpool/Makefile.depend
+++ /dev/null
@@ -1,16 +0,0 @@
-# Autogenerated - do NOT edit!
-
-DIRDEPS = \
- cddl/lib/libspl \
- include \
- include/xlocale \
- lib/${CSU_DIR} \
- lib/libc \
- lib/libcompiler_rt \
-
-
-.include <dirdeps.mk>
-
-.if ${DEP_RELDIR} == ${_DEP_RELDIR}
-# local dependencies - needed for -jN in clean tree
-.endif
diff --git a/cddl/lib/libtpool/tests/Makefile b/cddl/lib/libtpool/tests/Makefile
deleted file mode 100644
index 72a82b6afa59..000000000000
--- a/cddl/lib/libtpool/tests/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-ATF_TESTS_C+= libtpool_test
-
-TEST_METADATA+= timeout="10"
-
-CFLAGS+= -I${ZFSTOP}/include \
- -I${ZFSTOP}/lib/libspl/include
-
-LIBADD+= pthread tpool
-
-.include "${SRCTOP}/cddl/Makefile.inc"
-.include <bsd.test.mk>
diff --git a/cddl/lib/libtpool/tests/libtpool_test.c b/cddl/lib/libtpool/tests/libtpool_test.c
deleted file mode 100644
index 42bce269cb23..000000000000
--- a/cddl/lib/libtpool/tests/libtpool_test.c
+++ /dev/null
@@ -1,82 +0,0 @@
-#include <sys/stdtypes.h>
-#include <sys/sysctl.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <thread_pool.h>
-
-#include <atf-c.h>
-
-static void
-tp_delay(void *arg)
-{
- pthread_barrier_t *barrier = arg;
- int r;
-
- /* Block this task until all thread pool workers have been created. */
- r = pthread_barrier_wait(barrier);
- ATF_REQUIRE_MSG(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD,
- "pthread_barrier_wait failed: %s", strerror(r));
-}
-
-/*
- * NB: we could reduce the test's resource cost by using rctl(4). But that
- * isn't enabled by default. And even with a thread limit of 1500, it takes <
- * 0.1s to run on my machine. So I don't think it's worth optimizing for the
- * case where rctl is available.
- */
-ATF_TC(complete_exhaustion);
-ATF_TC_HEAD(complete_exhaustion, tc)
-{
- atf_tc_set_md_var(tc, "descr",
- "A thread pool should fail to schedule tasks if it is completely impossible to spawn any threads.");
-}
-
-ATF_TC_BODY(complete_exhaustion, tc)
-{
- pthread_barrier_t barrier;
- tpool_t *tp0, *tp1;
- size_t len;
- int max_threads_per_proc = 0;
- int nworkers;
- int r, i;
-
- len = sizeof(max_threads_per_proc);
- r = sysctlbyname("kern.threads.max_threads_per_proc",
- &max_threads_per_proc, &len, NULL, 0);
- ATF_REQUIRE_EQ_MSG(r, 0, "sysctlbyname: %s", strerror(errno));
- nworkers = max_threads_per_proc - 1;
- pthread_barrier_init(&barrier, NULL, max_threads_per_proc);
-
- /*
- * Create the first thread pool and spawn the maximum allowed number of
- * processes.
- */
- tp0 = tpool_create(nworkers, nworkers, 1, NULL);
- ATF_REQUIRE(tp0 != NULL);
- for (i = 0; i < nworkers; i++) {
- ATF_REQUIRE_EQ(tpool_dispatch(tp0, tp_delay, &barrier), 0);
- }
-
- /*
- * Now create a second thread pool. Unable to create new threads, the
- * dispatch function should return an error.
- */
- tp1 = tpool_create(nworkers, 2 * nworkers, 1, NULL);
- ATF_REQUIRE(tp1 != NULL);
- ATF_REQUIRE_EQ(tpool_dispatch(tp1, tp_delay, NULL), -1);
-
- /* Cleanup */
- r = pthread_barrier_wait(&barrier);
- ATF_REQUIRE_MSG(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD,
- "pthread_barrier_wait failed: %s", strerror(r));
- tpool_wait(tp1);
- tpool_wait(tp0);
-}
-
-ATF_TP_ADD_TCS(tp)
-{
- ATF_TP_ADD_TC(tp, complete_exhaustion);
-
- return (atf_no_error());
-}
diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile
deleted file mode 100644
index ca5a71d811f7..000000000000
--- a/cddl/lib/libuutil/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-.PATH: ${ZFSTOP}/lib/libuutil
-
-PACKAGE= zfs
-LIB_PACKAGE=
-
-LIB= uutil
-SRCS=\
- uu_alloc.c \
- uu_avl.c \
- uu_ident.c \
- uu_list.c \
- uu_misc.c \
- uu_string.c
-
-WARNS?= 2
-CFLAGS+= -DIN_BASE
-CFLAGS+= -I${ZFSTOP}/include
-CFLAGS+= -I${ZFSTOP}/lib/libspl/include/
-CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd
-CFLAGS+= -I${SRCTOP}/sys
-CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
-CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h
-
-LIBADD= avl spl
-
-.include <bsd.lib.mk>
diff --git a/cddl/lib/libuutil/Makefile.depend b/cddl/lib/libuutil/Makefile.depend
deleted file mode 100644
index 808980b1879e..000000000000
--- a/cddl/lib/libuutil/Makefile.depend
+++ /dev/null
@@ -1,17 +0,0 @@
-# Autogenerated - do NOT edit!
-
-DIRDEPS = \
- cddl/lib/libavl \
- cddl/lib/libspl \
- include \
- include/xlocale \
- lib/${CSU_DIR} \
- lib/libc \
- lib/libcompiler_rt \
-
-
-.include <dirdeps.mk>
-
-.if ${DEP_RELDIR} == ${_DEP_RELDIR}
-# local dependencies - needed for -jN in clean tree
-.endif
diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile
index ed0c240b1113..a034118a6f5b 100644
--- a/cddl/lib/libzfs/Makefile
+++ b/cddl/lib/libzfs/Makefile
@@ -23,7 +23,6 @@ LIBADD= \
rt \
umem \
util \
- uutil \
z \
zfs_core \
zutil
diff --git a/cddl/lib/libzfs/Makefile.depend b/cddl/lib/libzfs/Makefile.depend
index 1fead4b4f29d..2ac18ce130ac 100644
--- a/cddl/lib/libzfs/Makefile.depend
+++ b/cddl/lib/libzfs/Makefile.depend
@@ -4,7 +4,6 @@ DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
- cddl/lib/libuutil \
cddl/lib/libzfs_core \
cddl/lib/libzutil \
include \
diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile
index 952ebda889b2..93b0ffdb6fac 100644
--- a/cddl/lib/libzutil/Makefile
+++ b/cddl/lib/libzutil/Makefile
@@ -6,7 +6,7 @@ PACKAGE= zfs
LIB_PACKAGE=
LIB= zutil
-LIBADD= avl geom m tpool
+LIBADD= avl geom m
INCS = zutil_import.h
diff --git a/cddl/lib/libzutil/Makefile.depend b/cddl/lib/libzutil/Makefile.depend
index ddad58a70480..1633aabc89f0 100644
--- a/cddl/lib/libzutil/Makefile.depend
+++ b/cddl/lib/libzutil/Makefile.depend
@@ -2,7 +2,6 @@
DIRDEPS = \
cddl/lib/libavl \
- cddl/lib/libtpool \
include \
include/xlocale \
lib/${CSU_DIR} \
diff --git a/cddl/lib/pam_zfs_key/Makefile b/cddl/lib/pam_zfs_key/Makefile
index 345321b5926d..d4be8090b287 100644
--- a/cddl/lib/pam_zfs_key/Makefile
+++ b/cddl/lib/pam_zfs_key/Makefile
@@ -6,7 +6,7 @@ LIB= pam_zfs_key
SHLIBDIR?= /usr/lib
-LIBADD= zfs zfs_core nvpair uutil crypto
+LIBADD= zfs zfs_core nvpair crypto
SRCS= pam_zfs_key.c
diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
index 3b9abe4446e8..32d26de952f8 100644
--- a/cddl/sbin/zfs/Makefile
+++ b/cddl/sbin/zfs/Makefile
@@ -71,7 +71,7 @@ CFLAGS+= \
-include ${SRCTOP}/sys/modules/zfs/zfs_config.h \
-I${SRCTOP}/sys/modules/zfs
-LIBADD= jail avl nvpair geom uutil zfs_core spl tpool zutil zfs m crypto
+LIBADD= jail avl nvpair geom zfs_core spl zutil zfs m crypto
LDADD+= -pthread
.include <bsd.prog.mk>
diff --git a/cddl/sbin/zfs/Makefile.depend b/cddl/sbin/zfs/Makefile.depend
index 41b9cb996621..4bc4ed382284 100644
--- a/cddl/sbin/zfs/Makefile.depend
+++ b/cddl/sbin/zfs/Makefile.depend
@@ -4,8 +4,6 @@ DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libspl \
- cddl/lib/libtpool \
- cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzutil \
diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile
index e2d8bf61e75b..2f46546da9a2 100644
--- a/cddl/sbin/zpool/Makefile
+++ b/cddl/sbin/zpool/Makefile
@@ -75,6 +75,6 @@ CFLAGS+= \
-DSYSCONFDIR=\"/etc\" \
-DPKGDATADIR=\"/usr/share/zfs\"
-LIBADD= geom nvpair uutil zfs zutil avl spl tpool zfs_core m
+LIBADD= geom nvpair zfs zutil avl spl zfs_core m
LDADD+= -pthread
.include <bsd.prog.mk>
diff --git a/cddl/sbin/zpool/Makefile.depend b/cddl/sbin/zpool/Makefile.depend
index 117ee30093fd..f51363d29398 100644
--- a/cddl/sbin/zpool/Makefile.depend
+++ b/cddl/sbin/zpool/Makefile.depend
@@ -4,8 +4,6 @@ DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libspl \
- cddl/lib/libtpool \
- cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzutil \
diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile
index cd22feda937a..30be6a90ad7b 100644
--- a/cddl/usr.bin/zinject/Makefile
+++ b/cddl/usr.bin/zinject/Makefile
@@ -21,6 +21,6 @@ CFLAGS+= \
-DHAVE_ISSETUGID \
-include ${SRCTOP}/sys/modules/zfs/zfs_config.h
-LIBADD= geom m nvpair umem uutil avl spl zfs_core zfs zutil zpool pthread
+LIBADD= geom m nvpair umem avl spl zfs_core zfs zutil zpool pthread
.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/zinject/Makefile.depend b/cddl/usr.bin/zinject/Makefile.depend
index c36e0e5ad2e7..f78d076ce0d3 100644
--- a/cddl/usr.bin/zinject/Makefile.depend
+++ b/cddl/usr.bin/zinject/Makefile.depend
@@ -5,7 +5,6 @@ DIRDEPS = \
cddl/lib/libnvpair \
cddl/lib/libspl \
cddl/lib/libumem \
- cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzpool \
diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile
index d3371101f6dc..f0a11383045c 100644
--- a/cddl/usr.bin/zstream/Makefile
+++ b/cddl/usr.bin/zstream/Makefile
@@ -31,6 +31,6 @@ CFLAGS+= \
-DHAVE_ISSETUGID \
-include ${SRCTOP}/sys/modules/zfs/zfs_config.h
-LIBADD= geom m nvpair umem uutil avl spl zfs_core zfs zutil zpool pthread
+LIBADD= geom m nvpair umem avl spl zfs_core zfs zutil zpool pthread
.include <bsd.prog.mk>
diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile
index 192c0222377a..71b8c1705c4f 100644
--- a/cddl/usr.bin/ztest/Makefile
+++ b/cddl/usr.bin/ztest/Makefile
@@ -20,7 +20,7 @@ CFLAGS+= \
-DHAVE_ISSETUGID \
-include ${SRCTOP}/sys/modules/zfs/zfs_config.h
-LIBADD= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs uutil icp
+LIBADD= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs icp
CSTD= c99
diff --git a/cddl/usr.bin/ztest/Makefile.depend b/cddl/usr.bin/ztest/Makefile.depend
index dd387951fe20..0fbcc239f881 100644
--- a/cddl/usr.bin/ztest/Makefile.depend
+++ b/cddl/usr.bin/ztest/Makefile.depend
@@ -6,7 +6,6 @@ DIRDEPS = \
cddl/lib/libnvpair \
cddl/lib/libspl \
cddl/lib/libumem \
- cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzpool \
diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile.depend b/cddl/usr.libexec/zpool_influxdb/Makefile.depend
index 50b043094969..69161b991f7d 100644
--- a/cddl/usr.libexec/zpool_influxdb/Makefile.depend
+++ b/cddl/usr.libexec/zpool_influxdb/Makefile.depend
@@ -4,7 +4,6 @@ DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
- cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
gnu/lib/csu \
diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile
index 6707d8fdaae7..fa49271dc760 100644
--- a/cddl/usr.sbin/zdb/Makefile
+++ b/cddl/usr.sbin/zdb/Makefile
@@ -21,7 +21,7 @@ CFLAGS+= \
-include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \
-DHAVE_ISSETUGID
-LIBADD= nvpair umem uutil zdb zfs_core zfs spl avl zutil zpool crypto pthread
+LIBADD= nvpair umem zdb zfs_core zfs spl avl zutil zpool crypto pthread
CFLAGS.gcc+= -fms-extensions
# Since there are many asserts in this program, it makes no sense to compile
diff --git a/cddl/usr.sbin/zdb/Makefile.depend b/cddl/usr.sbin/zdb/Makefile.depend
index d9ae0ff3c82e..d4e222e186ed 100644
--- a/cddl/usr.sbin/zdb/Makefile.depend
+++ b/cddl/usr.sbin/zdb/Makefile.depend
@@ -5,7 +5,6 @@ DIRDEPS = \
cddl/lib/libnvpair \
cddl/lib/libspl \
cddl/lib/libumem \
- cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzpool \
cddl/lib/libzutil \
diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common
index c610a3bf3e5b..1bade90d140f 100644
--- a/cddl/usr.sbin/zfsd/Makefile.common
+++ b/cddl/usr.sbin/zfsd/Makefile.common
@@ -25,7 +25,7 @@ CFLAGS+= -I${SRCTOP}/cddl/usr.sbin
CFLAGS+= -DHAVE_ISSETUGID
CFLAGS+= -DHAVE_EXECVPE
-LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl uutil zutil
+LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl zutil
cscope:
find ${.CURDIR} -type f -a \( -name "*.[ch]" -o -name "*.cc" \) \
diff --git a/cddl/usr.sbin/zfsd/Makefile.depend b/cddl/usr.sbin/zfsd/Makefile.depend
index 4b9049efecdc..64528ed3f4cb 100644
--- a/cddl/usr.sbin/zfsd/Makefile.depend
+++ b/cddl/usr.sbin/zfsd/Makefile.depend
@@ -3,7 +3,6 @@
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
- cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzutil \
include \