mirror_zfs/lib/libzfs
Brian Behlendorf 514498fef6
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 <ryan@ixsystems.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Don Brady <don.brady@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12602
2021-10-07 11:31:26 -06:00
..
os Simplify and document OpenZFS library dependencies 2021-10-07 11:31:26 -06:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c libzfs: convert to -fvisibility=hidden 2021-06-03 13:17:55 -07:00
libzfs_config.c Use zfs_ioctl with zfs_cmd_t in libzfs 2019-10-23 17:29:43 -07:00
libzfs_crypto.c Make get_key_material_file fail more verbosely 2021-08-05 17:48:33 -06:00
libzfs_dataset.c Upstream: unmount snapshots before destroying them on macOS 2021-09-20 09:29:59 -06:00
libzfs_diff.c libzfs: write_inuse_diffs_one: format strerror() with "%s" 2021-06-04 16:04:37 -07:00
libzfs_impl.h pass handle to do_unmount() 2021-07-15 12:31:00 -06:00
libzfs_import.c libzfs: don't distribute libzfs_impl.h 2021-06-03 13:17:35 -07:00
libzfs_iter.c lib/: set O_CLOEXEC on all fds 2021-04-11 15:45:59 -07:00
libzfs_mount.c Add zpool_disable_datasets_os() / zfs_unmount_os() 2021-08-31 09:56:00 -06:00
libzfs_pool.c Use fallthrough macro 2021-09-14 10:17:54 -06:00
libzfs_sendrecv.c Reject zfs send -RI with nonexistent fromsnap 2021-10-04 10:17:30 -07:00
libzfs_status.c Improvements to the 'compatibility' property 2021-04-12 09:08:56 -07:00
libzfs_util.c Use fallthrough macro 2021-09-14 10:17:54 -06:00
libzfs.abi Simplify and document OpenZFS library dependencies 2021-10-07 11:31:26 -06:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
Makefile.am Simplify and document OpenZFS library dependencies 2021-10-07 11:31:26 -06:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00