umount() taking minutes for FUSE filesystems

Conrad Meyer cem at freebsd.org
Fri Sep 8 14:54:26 UTC 2017


On Fri, Sep 8, 2017 at 7:22 AM, Nikolaus Rath <Nikolaus at rath.org> wrote:
> In most cases, umount() is not called by the filesystem but by the
> user. In that case, the FUSE_DESTROY request gives the filesystem a
> chance to clean-up and exit the main loop.
>
> That said, the filesystem could also detect the unmount by the kernel
> closing the fd. So I'm not sure what is gained by the extra request
> either... Theoretically, at least under Linux the destroy handler could
> perform some notify_* operations, but I don't see how that would be
> useful when the filesystem will be unmounted anyway.


Hi Nikolaus,

It seems like the destroy notification is a good chance for the
filesystem to flush any dirty buffers before umount completes.  Sure,
the filesystem could just do that when it detects the kernel has
closed the fd, but then there is no guarantee it happens during
umount.  It seems that it should happen during umount for logical
correctness.

Best,
Conrad


More information about the freebsd-fs mailing list