zfsonlinux/zfs — pull request #1288 by ryao (2013-02-12 03:53:16+00:00)
Title: Make libzfs_init into a singleton

libzfs_init opens a file descriptor to /dev/zfs. This fails when run as
a non-root user on ZFSOnLinux for lack of delegation support. The
failures revealed that libzfs_init is run twice. Once by the dynamic
loader and a second time by zdb's main function. The purpose of the
second invocation is to obtain a libzfs_handle_t. Since multiple
invocations do not make sense, make libzfs_init return a singleton.

Signed-off-by: Richard Yao