To answer your question:
"Also as you are changing MNTTAB is there any reason not to be using that here?"
The "reading" is redirected to /proc/self/mounts and the "writing" to /etc/mtab, but if it doesn't exist, that's fine. ZFS just won't update /etc/mtab.
Ideally, ZFS should be integrated with libmount in a second phase (ZoL maintainers are aware that eventually a 2nd is needed to integrate libmount), until then /proc/self/mounts is a viable solution to address issues cause by mtab.
@apw
To answer your question:
"Also as you are changing MNTTAB is there any reason not to be using that here?"
The "reading" is redirected to /proc/self/mounts and the "writing" to /etc/mtab, but if it doesn't exist, that's fine. ZFS just won't update /etc/mtab.
Ideally, ZFS should be integrated with libmount in a second phase (ZoL maintainers are aware that eventually a 2nd is needed to integrate libmount), until then /proc/self/mounts is a viable solution to address issues cause by mtab.
Eric