Date: Fri, 8 Sep 2017 07:54:17 -0700 From: Conrad Meyer <cem@freebsd.org> To: freebsd-fs@freebsd.org Subject: Re: umount() taking minutes for FUSE filesystems Message-ID: <CAG6CVpU-OZS36piCGj_142aP%2BUAptejhoS6vn7z-rR%2BjC97K2Q@mail.gmail.com> In-Reply-To: <87lglp6zj8.fsf@vostro.rath.org> References: <87bmn44ruu.fsf@vostro.rath.org> <87o9qyrbs8.fsf@vostro.rath.org> <CAG6CVpWX1TPtR65dXkC4A_-hiSrh0L524mcPtcQM=K28RM7vWw@mail.gmail.com> <2FAD66DE-031B-4B36-9E85-C7BC6B52B5E6@gmail.com> <29de6425-9f92-3bd8-f446-1c9dded33b15@freebsd.org> <87k21dzdrp.fsf@thinkpad.rath.org> <201709051811.v85IBmbO005440@higson.cam.lispworks.com> <87ingugw2v.fsf@thinkpad.rath.org> <201709081143.v88BhEOn001626@higson.cam.lispworks.com> <87lglp6zj8.fsf@vostro.rath.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 8, 2017 at 7:22 AM, Nikolaus Rath <Nikolaus@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpU-OZS36piCGj_142aP%2BUAptejhoS6vn7z-rR%2BjC97K2Q>