As it was suggested in D51549 here goes an attempt to implement the
auto_unmount feature from within the kernel. Currently it doesn't work at all:
- The filesystem gets mounted without MNT_NOCOVER, despite specifying this flag in fuse_vfsop_mount.
- Terminating the FUSE daemon results in a visible hangup during the VFS_UNMOUNT call for dozens of seconds. After some time the call returns 0 and the daemon process terminates, but the filesystem is not unmounted.
- Unmounting it manually with the umount command causes this panic: https://github.com/freebsd/freebsd-src/blob/d1bd541b385d49d2ae3a8bad9df72779b606e208/sys/fs/fuse/fuse_vfsops.c#L494
Corresponding libfuse changes are there: https://github.com/libfuse/libfuse/compare/master...arrowd:libfuse:kernel-bsd-auto-unmount
@asomers Could you please provide me guidance on how to proceed?