aboutsummaryrefslogtreecommitdiffstats
path: root/include/libzfs_core.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2021-10-07 10:31:26 -0700
committerGitHub <[email protected]>2021-10-07 11:31:26 -0600
commit514498fef6977e4d1d6dc676710567384d6f6b39 (patch)
treedea185662b7c79bc5937dae3adad3bc31bd7fecc /include/libzfs_core.h
parent48df24d4ce7bbf14fedc10c5f33396d6cb42f5db (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 'include/libzfs_core.h')
-rw-r--r--include/libzfs_core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libzfs_core.h b/include/libzfs_core.h
index 83d8211ab..9020d70db 100644
--- a/include/libzfs_core.h
+++ b/include/libzfs_core.h
@@ -41,6 +41,9 @@ extern "C" {
_LIBZFS_CORE_H int libzfs_core_init(void);
_LIBZFS_CORE_H void libzfs_core_fini(void);
+struct zfs_cmd;
+_LIBZFS_CORE_H int lzc_ioctl_fd(int, unsigned long, struct zfs_cmd *);
+
/*
* NB: this type should be kept binary-compatible with dmu_objset_type_t.
*/