From nobody Thu Sep 14 20:36:23 2023 X-Original-To: dev-commits-src-all@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 4Rmpxz3CYqz4sMDm; Thu, 14 Sep 2023 20:36:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rmpxz2h40z4Wsr; Thu, 14 Sep 2023 20:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694723783; 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=Uh7+F3jU9aGEabh96csRFHbl986sUUWAPMUbFKIoSpA=; b=elF3hQf8OzKA9Koh9e6CCOX/77nmVg876i6PAm4K018BkOzMTHW05br6oW07sTZ0isi5O0 iFysz3Yfwo2tBleePIchU8w2EM8MvmvJ7MPOLxksW0bIAydaLbGgpLMHfgRgDABCi+STdw AAe5MtohXzgJoxEdE/tZJNk+DPhxiEVlSet6N/3YI5HDDX0xUAB7Hx5t0JOK0eGpyDLFO2 2nvBdURAn9FEvJbScrc6nLUXRCsUI/KX9u+MrAU4ETWQohbQIin4PLom6VFRKyePG18HE/ FYWC5sv21pGNjNLwBTH/5zFzHGMviOGqqh5EnQER1ymfWr4flOS277+hX/Y93Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694723783; a=rsa-sha256; cv=none; b=MFsJtDqKdcvc0Y2+V2X6eM+AvL8D81CGWfHvZ51pcl5pHdlTPdoBRALAz/rfugEz7RSP/c E7QljDr9y/lv1GmToLcIBBvGXKUSAFFneEfh90s5OoJhBKyAbFlbyZ7GpzC/TCCuBsb7K1 ZwQaucOKfwJVDH3BWXR6emE+DY8YDOkZ1MF9tFCdoLMr5G50owCaFL7f4bo/oXE8FxLKCd 0JmEx2GHZori/FcQs3srfmkthRvGUp8c7ah2yQaLdBvSrnJxWaKV9yky7Tc5+P8PoQTzhm lpxn74YbSapRThJIwvJKouSjwR8du8G737QKkDPVQ+puk7I5StBA4DuzUk63SA== 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=1694723783; 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=Uh7+F3jU9aGEabh96csRFHbl986sUUWAPMUbFKIoSpA=; b=hcFMOUxRNnFOhKObqjEYNJfkL9zE6C9bKGyq72mEQGzgsF0ybTe0GQPQZAg7qi7lxcfnGH dMInlSR46tZVlQyXQ9AbF6nSn6CcDLvNXAzj/n5yyVjEmoZmamvZHm7SKg7+7N/svIQIus +2X9OLR95cNiTIQzUMgbbPgXNaD9rrZnEd/L6T2sxGU6hHdqY4gRLf6z3tlGwSB0Pn6Ap/ DZmknCqzVoeVafcrGiwW5/Jn+yhnLrRDjqmHyu4xUOGQlFFZwTneFw37hyVNDdVDCNCbpu q56gQSXyqThKrMlT+qkALpwDfKuv/l96spsqhLhmHM3wPk4vKdA47/osbIvaJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rmpxz1j3kz1B3y; Thu, 14 Sep 2023 20:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38EKaNAT045291; Thu, 14 Sep 2023 20:36:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38EKaNfF045289; Thu, 14 Sep 2023 20:36:23 GMT (envelope-from git) Date: Thu, 14 Sep 2023 20:36:23 GMT Message-Id: <202309142036.38EKaNfF045289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 07f52c4b5a4f - main - vfs cache: garbage collect the fullpathfail2 counter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07f52c4b5a4f7a658bf7ed29eadd5c4d52a4f3b2 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=07f52c4b5a4f7a658bf7ed29eadd5c4d52a4f3b2 commit 07f52c4b5a4f7a658bf7ed29eadd5c4d52a4f3b2 Author: Mateusz Guzik AuthorDate: 2023-09-14 20:25:54 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-14 20:34:20 +0000 vfs cache: garbage collect the fullpathfail2 counter The conditions it checks cannot legally be true (modulo races against forced unmount), so assert on it instead. --- sys/kern/vfs_cache.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 5b0cd64146ad..0f4d7526ebb5 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -542,7 +542,6 @@ STATNODE_COUNTER(negzaps, numnegzaps, STATNODE_COUNTER(neghits, numneghits, "Number of cache hits (negative)"); /* These count for vn_getcwd(), too. */ STATNODE_COUNTER(fullpathcalls, numfullpathcalls, "Number of fullpath search calls"); -STATNODE_COUNTER(fullpathfail1, numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); STATNODE_COUNTER(fullpathfail2, numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE_COUNTER(fullpathfail4, numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); @@ -3400,14 +3399,7 @@ vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, vp = vp1; continue; } - if (vp->v_type != VDIR) { - vrele(vp); - counter_u64_add(numfullpathfail1, 1); - error = ENOTDIR; - SDT_PROBE3(vfs, namecache, fullpath, return, - error, vp, NULL); - break; - } + VNPASS(vp->v_type == VDIR || VN_IS_DOOMED(vp), vp); error = vn_vptocnp(&vp, buf, &buflen); if (error) break;