add userspace ioctl for refcounting