Date: Sun, 1 Feb 2026 22:27:41 +0300 From: Gleb Popov <arrowd@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com>, Alan Somers <asomers@freebsd.org> Cc: 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: <CALH631nbrVB-qYbGLrf0sjuz=PDjfRm2hpxf6bhd3DMWLhNB1g@mail.gmail.com> In-Reply-To: <aXZxX7UEaXqNQRt6@kib.kiev.ua> References: <697499a8.335a0.2e12eda1@gitrepo.freebsd.org> <aXZxX7UEaXqNQRt6@kib.kiev.ua>
index | next in thread | previous in thread | raw e-mail
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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631nbrVB-qYbGLrf0sjuz=PDjfRm2hpxf6bhd3DMWLhNB1g>
