From nobody Sat Mar 05 19:56:54 2022 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 038B419FF73D; Sat, 5 Mar 2022 19:56:55 +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 4K9wTy5yKWz3t98; Sat, 5 Mar 2022 19:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646510214; 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=UxphDFi7TDbpBDksV0GNfhfaXbohiAznShP7CwfCel8=; b=Ly0yEzYtt/ncxVtij/cnuCIFLkF8cI/mrepVRl2cFcY9+hCB+Y4vyHYXjzyocXMMNstE93 9yp5FHcyk8WuKs9mSBW4BIgpKXQTvrwltZdCPFWH1nuPCnGwMB4bXa1D84jNtqDthv40to L/tscrFKB5ecE2yS8fLBk2SrinP2bKe/Ar8wpC+HSQTWgG5DTpTfK/Xj3oRPikpGzrhi+M 7eSPW/VB7gUcGSLjWaj5sjOMf7XqqIocsNN4wGkYGInQ1DB8cJdyuATMTZLusJ2Ou0v3AV 59d456rn3SY7vbC9xx/tRCfKWI10kC0zR+UUZXJK7BTCy0MX/naG3JTVWufO5A== 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 A18912675F; Sat, 5 Mar 2022 19:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 225JusOQ018212; Sat, 5 Mar 2022 19:56:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 225JusUc018211; Sat, 5 Mar 2022 19:56:54 GMT (envelope-from git) Date: Sat, 5 Mar 2022 19:56:54 GMT Message-Id: <202203051956.225JusUc018211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 807c4914a54b - stable/13 - cache: remove NOCACHE handling from cache_fplookup_noentry 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 807c4914a54b67bdf088f5d2ae6184f11d4f5f47 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646510214; 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=UxphDFi7TDbpBDksV0GNfhfaXbohiAznShP7CwfCel8=; b=qTFjvwHP9hQ/RGmwBfAL8iNgOAEdHeRLbypFtnAVcVR5TDinSNBQc+H1UL2vlWooMX7nne lsR40UBp6yaQR67rG41hhbFw279D6mFjnVEwHL6iFr1Z9AheKR5M0zvb/W4VzzoUrTpN0V /Y9KFaKF58t9otMODwNomVLkzI8bmEFdhrSlITP7LBU97n2FB3q3ReF/6qW2TGRTTZ0jPt QfUyq+30LoRkfrCu7b2tm1aDlYyeQ25XpzfpEdcN2oG2wEfQzNiYFsAZaWBk0oyPo3zyMV vTqgO2d9dpOwtYJd+krNmpoKRkqR17IiUUrmjKXXVnTXTP4Ab3Q4MGEsxHbhrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646510214; a=rsa-sha256; cv=none; b=tpie2EevMZTDgIqGaJSJExPhB4JV+MJew9ZkAjZiYuynqEb29oCGxG9f41XOL5+awXirlu SYeY8HaNVdsQ16lx7rLD9v2UYcv6CTyLCn1WvJ3+2J6rHO8UmbDTT5dVpENGFbaN69mLIb Msb9NJDZh6AGrVPkVX4JxDU4MXzdNoJWpbUV/t81SqMGGEI+zHY6KyRgvi60rHTjzq6hl1 6kPcPWTfcUAGGz+bSBEOVhvjxP5qAKmON71FFszB2D7tpMmkkZh/2B/IF2gddqSZAoZmFm 6qm0/vgbVhNoJaCs3VwQZeMrZkVs3yD04DGwrFccLdbLaAbJhl1Eu2WML/pJDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=807c4914a54b67bdf088f5d2ae6184f11d4f5f47 commit 807c4914a54b67bdf088f5d2ae6184f11d4f5f47 Author: Mateusz Guzik AuthorDate: 2022-02-09 20:39:28 +0000 Commit: Mateusz Guzik CommitDate: 2022-03-05 19:53:46 +0000 cache: remove NOCACHE handling from cache_fplookup_noentry It was copy-pasted from locked lookup. As LOOKUP operation cannot have the flag set it was always ending up setting MAKEENTRY. (cherry picked from commit 611470a51560db61488b2d864176b8076eb5a65c) --- sys/kern/vfs_cache.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index ef4e33308472..780b5003749b 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4830,7 +4830,6 @@ cache_fplookup_noentry(struct cache_fpl *fpl) struct vnode *dvp, *tvp; seqc_t dvp_seqc; int error; - bool docache; ndp = fpl->ndp; cnp = fpl->cnp; @@ -4839,6 +4838,8 @@ cache_fplookup_noentry(struct cache_fpl *fpl) MPASS((cnp->cn_flags & MAKEENTRY) == 0); MPASS((cnp->cn_flags & ISDOTDOT) == 0); + if (cnp->cn_nameiop == LOOKUP) + MPASS((cnp->cn_flags & NOCACHE) == 0); MPASS(!cache_fpl_isdotdot(cnp)); /* @@ -4915,10 +4916,7 @@ cache_fplookup_noentry(struct cache_fpl *fpl) /* * TODO: provide variants which don't require locking either vnode. */ - cnp->cn_flags |= ISLASTCN; - docache = (cnp->cn_flags & NOCACHE) ^ NOCACHE; - if (docache) - cnp->cn_flags |= MAKEENTRY; + cnp->cn_flags |= ISLASTCN | MAKEENTRY; cnp->cn_lkflags = LK_SHARED; if ((cnp->cn_flags & LOCKSHARED) == 0) { cnp->cn_lkflags = LK_EXCLUSIVE;