diff options
author | Brian Behlendorf <[email protected]> | 2021-10-07 10:31:26 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-07 11:31:26 -0600 |
commit | 514498fef6977e4d1d6dc676710567384d6f6b39 (patch) | |
tree | dea185662b7c79bc5937dae3adad3bc31bd7fecc /lib/libzpool/Makefile.am | |
parent | 48df24d4ce7bbf14fedc10c5f33396d6cb42f5db (diff) |
Simplify and document OpenZFS library dependencies
For those not already familiar with the code base it can be a
challenge to understand how the libraries are laid out. This
has sometimes resulted in functionality being added in the
wrong place. To help avoid that in the future this commit
documents the high-level dependencies for easy reference in
lib/Makefile.am. It also simplifies a few things.
- Switched libzpool dependency on libzfs_core to libzutil.
This change makes it clear libzpool should never depend
on the ioctl() functionality provided by libzfs_core.
- Moved zfs_ioctl_fd() from libzutil to libzfs_core and
renamed it lzc_ioctl_fd(). Normal access to the kmods
should all be funneled through the libzfs_core library.
The sole exception is the pool_active() which was updated
to not use lzc_ioctl_fd() to remove the libzfs_core
dependency.
- Removed libzfs_core dependency on libzutil.
- Removed the lib/libzfs/os/freebsd/libzfs_ioctl_compat.c
source file which was all dead code.
- Removed libzfs_core dependency from mkbusy and ctime
test utilities. It was only needed for some trivial
wrapper functions and that code is easy to replicate
to shed the unneeded dependency.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Don Brady <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #12602
Diffstat (limited to 'lib/libzpool/Makefile.am')
-rw-r--r-- | lib/libzpool/Makefile.am | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am index c9a55591e..3cc0c2f2e 100644 --- a/lib/libzpool/Makefile.am +++ b/lib/libzpool/Makefile.am @@ -214,9 +214,9 @@ nodist_libzpool_la_SOURCES = \ libzpool_la_LIBADD = \ $(abs_top_builddir)/lib/libicp/libicp.la \ $(abs_top_builddir)/lib/libunicode/libunicode.la \ - $(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \ $(abs_top_builddir)/lib/libnvpair/libnvpair.la \ - $(abs_top_builddir)/lib/libzstd/libzstd.la + $(abs_top_builddir)/lib/libzstd/libzstd.la \ + $(abs_top_builddir)/lib/libzutil/libzutil.la libzpool_la_LIBADD += $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -ldl -lm |