On 05/29/12 08:32 AM, Richard Elling wrote:
Hi Dhiraj,

On May 27, 2012, at 11:28 PM, Dhiraj Bhandare wrote:

Hi All

I would like to create a sample application for ZFS using C++/C and libzfs. I am very new to ZFS, I would like to have an some information about ZFS API.
Even some sample code will be useful.
Looking for help and constructive suggestion.

libzfs is a private interface (see Solaris man page for attributes)
It was not designed to be used directly by external programmers.
I can't comment on what Oracle might or might not be doing, but for the
open source community, there is a project underway called "libzfs_core"
that is developing a stable library for external consumers. For more info,

That's good news.  It's a shame it wasn't announced here.

I'm one of the many Matt refers to in the presentation who has been using libzfs. I started using it pretty much the week ZFS shipped and it a was a long while after that I discovered the the private nature of the interface (through a posting here asking for an enhancement!).

Since then I have been using a thin wrapper to decouple my applications from changes to the API. Generally the API has been stable for basic operations such as iteration and accessing properties. Not so for send and receive!

I have a simple (150 line) C++ wrapper that supports iteration and property access I'm happy to share if anyone is interested.


zfs-discuss mailing list

Reply via email to