libtopo zfs module will clobber libzfs handle when an instance of the module unloads
The problem here is that g_zfs global gets clobbered by other instances of the module doing a zfs_fini() - setting g_zfs to NULL.
impact of this bug is that when g_zfs is NULL we get the wrong ASRU/FMRI string being generated which in turn will cause some corresponding FMA event(s) to not be cleared (see http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/fm/topo/libtopo/common/zfs.c#158 & http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/fm/modules/common/zfs-retire/zfs_retire.c#275).
you can use the "echo g_zfs/X |mdb -p `pgrep fmd`" command to check if you are in this state where g_zfs is zeroed out.
The proposed fix adds a refcount so that g_zfs doesn't get freed unless no one is using it.
This way when a module instance unloads it doesn't set g_zfs to NULL for all other instances.