From nobody Tue Aug 11 11:05:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hK81g1JX5z6k4J5 for ; Tue, 11 Aug 2026 11:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hK81f5hY4z3Pw5 for ; Tue, 11 Aug 2026 11:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786446358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6yF/AHs2e3WIAjZTTHZxEcrN1Gw1NJNVKrQsjt4JW5I=; b=WwMSAFRJf8g2dIHT197GRkaeF2bPrgQ4vGvZhBTwcu05bPioXxzGYQu8+aH4gkMoj33Tou jgYKHivIDXi1K+hZHXiE/utMB8YPaBrtR4tAXJzrNeL4ZNYLioCISiD0LowYmUxXGCJzS/ 3fDW7B10sac/lID9TKjyrAP64hwHqhkV9l6Edidlu+SWTx1TVg2HcRLxhAS9zFJPjQA5dm 0whxdB99OMqKLLwfZkLEYEXih8MoH8vHTJGXWxGFizJDY7xk+QTtZiYnf/M+YboiYTAtOL eZVt6e8fA1dX7LK7a+SDcfcoV2e8eIbJBm4HObKXTLgKwQAOGDLVwztj2b6/RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786446358; a=rsa-sha256; cv=none; b=Le1wBoOZ1aD6Tu3K+gbdukovayzVWVsy0tIueoVZuFgV/wOBli6ckUuoDBQHSc8imQzn8X i4wLxUwvJcyn+TSG1XEgnrbH1+ictewr41pmDPnlWi/w/3mRiYfDilN05s8KYNC+X72apB MKFUFgW3YwxSilIJFlgjNcaa38KLRCE6bPgziF6gaIVK6hPYShHHyKIsbA00WfRYyrZg7H sYDXCdbDZv5mwutRuI7CyRA+bpBNIM+B9+9tSztrb6grNByHnILy82RQ8xUV3WjiPLhf+Z kH1HgMaoo3RZjqctBv4FfZAmQNsXvTpblwWO71HrswlwvNOrZQnSIfBTaysujQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786446358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6yF/AHs2e3WIAjZTTHZxEcrN1Gw1NJNVKrQsjt4JW5I=; b=ZgAYPBP/ZEzNenK04DfxmQfabhxS1FjMokVRK8FKOXPR6RWg//fjfjmBVzgOH4wwQqAsCF ITJOYZUVyMWu1g5YWv6HA3KTPy3hMyGhTruJJ/Zjo6a2cNY9+l0Vynhk21hh09Igp8CR/7 lGgC6ofG9mmCkhvOed9mePQkbLqtbgQSnAVZakeDlmioeeLyj02omViQ5W4iS3lZEHEo6+ h2KZDvAfrDI71YIPq/AiQz24rJDJvv5EZa2gR4JyWcULEWLrJV55TmVgtI+eF61arDFQHC k295q2NH+cSvXxqt2zpEkq1t/I4y8knlA0K6pHYqMB75SXMWfTlAPgglu+xBpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hK81f49Cczsh9 for ; Tue, 11 Aug 2026 11:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fcab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 11 Aug 2026 11:05:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0484b6a01a0e - stable/15 - autofs: try to avoid waiting for timeouts of in-flight requests for forced unmounts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0484b6a01a0e4eab1c77f7fb7c65eb64ad5dd408 Auto-Submitted: auto-generated Date: Tue, 11 Aug 2026 11:05:58 +0000 Message-Id: <6a7b0216.3fcab.836379@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0484b6a01a0e4eab1c77f7fb7c65eb64ad5dd408 commit 0484b6a01a0e4eab1c77f7fb7c65eb64ad5dd408 Author: Konstantin Belousov AuthorDate: 2026-08-04 06:26:56 +0000 Commit: Konstantin Belousov CommitDate: 2026-08-11 11:00:02 +0000 autofs: try to avoid waiting for timeouts of in-flight requests for forced unmounts (cherry picked from commit d3c3a705b5e6689798057b764713bfc0e3b69f6a) --- sys/fs/autofs/autofs_vfsops.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sys/fs/autofs/autofs_vfsops.c b/sys/fs/autofs/autofs_vfsops.c index 473a0b2280ac..3da9909b6c3e 100644 --- a/sys/fs/autofs/autofs_vfsops.c +++ b/sys/fs/autofs/autofs_vfsops.c @@ -109,6 +109,33 @@ autofs_mount(struct mount *mp) return (0); } +/* + * Try to abort any requests currently in flight. This is not + * strictly necessary, the strong pass is done after all vnodes are + * reclaimed, and does not prevent new requests from queueing. But + * doing it now should practically avoid waiting for timeouts because + * each in-flight requests busies the mount point, which makes + * unmount() to wait for it to drain. + */ +static void +autofs_purge(struct mount *mp) +{ + struct autofs_mount *amp; + struct autofs_request *ar; + + amp = VFSTOAUTOFS(mp); + sx_xlock(&autofs_softc->sc_lock); + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { + if (ar->ar_mount != amp) + continue; + ar->ar_error = ENXIO; + ar->ar_done = true; + ar->ar_in_progress = false; + } + sx_xunlock(&autofs_softc->sc_lock); + cv_broadcast(&autofs_softc->sc_cv); +} + static int autofs_unmount(struct mount *mp, int mntflags) { @@ -208,6 +235,7 @@ static struct vfsops autofs_vfsops = { .vfs_fhtovp = NULL, /* XXX */ .vfs_mount = autofs_mount, .vfs_unmount = autofs_unmount, + .vfs_purge = autofs_purge, .vfs_root = autofs_root, .vfs_statfs = autofs_statfs, .vfs_init = autofs_init,