Bug 193748 - Userland support for libzfs and libzfs_core feature request
Summary: Userland support for libzfs and libzfs_core feature request
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-18 14:04 UTC by Sean Sill
Modified: 2021-09-09 04:39 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Sill 2014-09-18 14:04:44 UTC
Currently to compile against libzfs, or libzfs_core you need to have the entire kernel source available. Compiling against it is also a pain as many kernel only types seem to "leak" through or are present and shouldn't have to be. There should be a port for zfs-devel or something similar with the required headers need to link compile against libzfs, or libzfs_core.
Comment 1 WHR 2021-09-09 04:13:05 UTC
Link to #257222.
Comment 2 WHR 2021-09-09 04:13:54 UTC
Link to bug #257222.
Comment 3 Alan Somers freebsd_committer freebsd_triage 2021-09-09 04:39:42 UTC
The thing about libzfs is that it is not a stable interface.  It was never intended to be one, and never has been.  It changes frequently, and in non-backwards compatible ways.  That's why its use is highly discouraged by programs outside of the base system.  The few that do use it (sysutils/py-iocage for example) typically break during an OS upgrade.

libzfs_core, OTOH, _is_ a stable interface.  It has a simple API, very similar to what the zfs command line tools provide.  And it's guaranteed to preserve backwards compatibility.

FreeBSD 13+ include libzfs_core.h in /usr/include, and libzfs_core is finally mature enough that you can write useful applications with it.  So I think this bug is finally resolved.