From nobody Sun May 18 21:38:29 2025 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 4b0vM95gfsz5vtVD; Sun, 18 May 2025 21:38:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b0vM920g2z3wgL; Sun, 18 May 2025 21:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747604309; 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=lCk6Eqj/0k3MMj+++dayszONEbe431I+IGFVK/vMz04=; b=mgzlMgRUSSOKy4f38eKh0dI9A0VLd+dX9j8pEr5GhVBs8Cl+8l9FyDyGG/uol/DCSVMdR5 TmNjZM1cdNEWkWJ8Tkg0DVMV/WrLqUeiE4/jmwsSSJHz1KH6rye3mgQsPA5S7xCn9fwfo+ MZaC/kkQNdwCI/IkMGHBWCSO+OXrVop49nbwg0B2knU3VShUa8i4EhGRRjjzH9tT7pCasS 0duZH5mO+V3jD8dmeM0Qmk/ZMiHYm0c4PuCF1IKHEyH5N42c59100XNashZh0pN4x2AGJE 6X+3mtxM9B6jQK7/TFy32IcUe9fOpd4OVN0TmhNVH8Me7G3x4OAn3HVsqGcmkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747604309; 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=lCk6Eqj/0k3MMj+++dayszONEbe431I+IGFVK/vMz04=; b=r6oYLXT2F+4s2Iqi8gBXk4sc/2qoMrc1I4bw+mpGhRUMdmpXidaCT+WQjDGFRaSCwh/AvD vFLTo9wlAEDVamzbsS7Wj2N1lfR0fpRvPC+EOuR+6sFFGbAwQrnOKhq8e5LytFLWd7G/Hb zArAS4JqcezexVEa2ed4hQXQxztwb7LOTZI/kP9LPM4XhcVLTMi/EgmptVBMZ3QhXKhYJt M5+GuOjukaET4W6qEKnbJSxCRQU3OQ6Em2k4rZa9BdDs73v6WBpDHGthECJF5PfTeA0rsy tZ1fn+pWRmddgLSXuBP+wy51cOpZGQ2Dsmg3MuIxuYQu65DBQinYVpV5N0O/Vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747604309; a=rsa-sha256; cv=none; b=Lb1/ZdNYk4Lkz51F6pEjsOvLkvpS6IACpoL1ij7H/oexiJQS84AqH1m189nu+AQeX+75gr pM4R8oLToc43KegPINJ78t9lZ2yzL9vL+QghRoMNt+RQA4DtH6oZf6pfY+BdpmmJxL+VKw kwbXcWV1d2bvyKOighmmpRV2v9TH8hb9rUpd6HQQxbhkDGDGtQVvJ+Y/0okLN0r19J7kgl 9iPxVhtZresQNzZCF0CK758QWG6pUh+oszrHiT+S3l4t7E+5+s+f3Of3UVOAhsM0vTRd9c fx/1kt++bsN8UsJQjuwH6eABOk98m8LW4vd9mHfUvMaceY7EjkhSQt3co7K5aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4b0vM91QXNzcjJ; Sun, 18 May 2025 21:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54ILcTMH081838; Sun, 18 May 2025 21:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54ILcTsB081835; Sun, 18 May 2025 21:38:29 GMT (envelope-from git) Date: Sun, 18 May 2025 21:38:29 GMT Message-Id: <202505182138.54ILcTsB081835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5673462af533 - main - namei.9: sort operational modifiers in numerical order 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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/main X-Git-Reftype: branch X-Git-Commit: 5673462af5330df20733008beae48a24da9cdf63 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5673462af5330df20733008beae48a24da9cdf63 commit 5673462af5330df20733008beae48a24da9cdf63 Author: Konstantin Belousov AuthorDate: 2025-05-18 21:30:55 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-18 21:37:29 +0000 namei.9: sort operational modifiers in numerical order Note that NC_NOMAKEENTRY is an alias of NOCACHE. Suggested by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week --- share/man/man9/namei.9 | 109 ++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 50 deletions(-) diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index fc0826cc7206..63e1a5de02ea 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -148,7 +148,26 @@ The function takes the following set of .Dq "operation flags" that influence its operation: -.Bl -tag -width ".Dv WANTPARENT" +.Bl -tag -width NC_KEEPPOSENTRY +.It Dv NC_NOMAKEENTRY +An alias for +.Dv NOCACHE . +.It Dv NC_KEEPPOSENTRY +Keep the positive-caching entry in cache. +This flag is typically combined with +.Dv NOCACHE +to not cache a new entry, +but keep existing one, or with +.Dv MAKEENTRY . +.It Dv NOCACHE +Avoid +.Fn namei +creating this entry in the namecache if it is not +already present. +Normally, +.Fn namei +will add entries to the name cache +if they are not already there. .It Dv LOCKLEAF Lock vnode on return with .Dv LK_EXCLUSIVE @@ -181,6 +200,45 @@ or .Xr VOP_UNLOCK 9 and .Xr vrele 9 . +.It Dv WANTPARENT +This flag allows the +.Fn namei +function to return the parent (directory) vnode in an unlocked state. +The parent vnode must be released separately by using +.Xr vrele 9 . +.It Dv WANTPARENT +This flag allows the +.Fn namei +function to return the parent (directory) vnode in an unlocked state. +The parent vnode must be released separately by using +.Xr vrele 9 . +.It Dv FAILIFEXISTS +Makes the +.Nm +operation fail if the target exists. +It requires that the +.Dv LOCKPARENT +flag is set and +.Dv LOCKLEAF +is not. +.It Dv FOLLOW +With this flag, +.Fn namei +will follow the symbolic link if the last part +of the path supplied is a symbolic link (i.e., it will return a vnode +for whatever the link points at, instead for the link itself). +.It Dv EMPTYPATH +For +.Nm +call initialized with +.Fn NDINIT_AT , +allow the +.Fa namep +path to be empty. +In this case, the +.Fa dirfd +file descriptor may reference a file of arbitrary type, not +necessary a directory, and lookup returns the vnode for this file. .It Dv LOCKSHARED Lock vnode on return with .Dv LK_SHARED , @@ -206,27 +264,6 @@ which is equivalent to calling followed by .Xr vrele 9 , all in one). -.It Dv WANTPARENT -This flag allows the -.Fn namei -function to return the parent (directory) vnode in an unlocked state. -The parent vnode must be released separately by using -.Xr vrele 9 . -.It Dv NOCACHE -Avoid -.Fn namei -creating this entry in the namecache if it is not -already present. -Normally, -.Fn namei -will add entries to the name cache -if they are not already there. -.It Dv FOLLOW -With this flag, -.Fn namei -will follow the symbolic link if the last part -of the path supplied is a symbolic link (i.e., it will return a vnode -for whatever the link points at, instead for the link itself). .It Dv NOFOLLOW Do not follow symbolic links (pseudo). This flag is not looked for by the actual code, which looks for @@ -234,34 +271,6 @@ This flag is not looked for by the actual code, which looks for .Dv NOFOLLOW is used to indicate to the source code reader that symlinks are intentionally not followed. -.It Dv NC_KEEPPOSENTRY -Keep the positive-caching entry in cache. -This flag is typically combined with -.Dv NOCACHE -to not cache a new entry, -but keep existing one, or with -.Dv MAKEENTRY . -.It Dv FAILIFEXISTS -Makes the -.Nm -operation fail if the target exists. -It requires that the -.Dv LOCKPARENT -flag is set and -.Dv LOCKLEAF -is not. -.It Dv EMPTYPATH -For -.Nm -call initialized with -.Fn NDINIT_AT , -allow the -.Fa namep -path to be empty. -In this case, the -.Fa dirfd -file descriptor may reference a file of arbitrary type, not -necessary a directory, and lookup returns the vnode for this file. .It Dv RBENEATH Requires that .Nm