Date: Sun, 1 Feb 2026 23:18:53 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Gleb Popov <arrowd@freebsd.org> Cc: Alan Somers <asomers@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 10037d0978f8 - main - fusefs: Implement support for the auto_unmount option kernel-side Message-ID: <aX_DPTeqT_hHqpzh@kib.kiev.ua> In-Reply-To: <CALH631nbrVB-qYbGLrf0sjuz=PDjfRm2hpxf6bhd3DMWLhNB1g@mail.gmail.com> References: <697499a8.335a0.2e12eda1@gitrepo.freebsd.org> <aXZxX7UEaXqNQRt6@kib.kiev.ua> <CALH631nbrVB-qYbGLrf0sjuz=PDjfRm2hpxf6bhd3DMWLhNB1g@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On Sun, Feb 01, 2026 at 10:27:41PM +0300, Gleb Popov wrote: > On Sun, Jan 25, 2026 at 10:39 PM Konstantin Belousov > <kostikbel@gmail.com> wrote: > > > > > > > + vfs_ref(fdata->mp); > > Don't you need to take the reference when the fdata is created and mp member > > is initialized, and not here? > > > > What guarantees that the mp is still ours? > > In fact, I think that you should use vfs_busy() and not vfs_ref(), > > since what prevents mp from being unmounted under us? > > Using vfs_busy() before dounmount() results in a soft hang: > - vfs_busy increments mp->mnt_lockref in > https://github.com/freebsd/freebsd-src/blob/98bdf63f6e94be42a1787de73608de15bcb3419a/sys/kern/vfs_subr.c#L929 > - dounmount spins until mp->mnt_lockref becomes 0 in > https://github.com/freebsd/freebsd-src/blob/98bdf63f6e94be42a1787de73608de15bcb3419a/sys/kern/vfs_mount.c#L2318-L2322 > > This results in a FUSE process to hang in the "mount drain" state. Ok, change it to the mnt_ref() done when assigning to fdata->mp for now, please.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aX_DPTeqT_hHqpzh>
