From nobody Tue Dec 17 21:06:12 2024 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 4YCTr45DrJz5hjvP; Tue, 17 Dec 2024 21:06:12 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YCTr44k0xz4fxT; Tue, 17 Dec 2024 21:06:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734469572; 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=Jssoqsrpc97+S7pXMHJUnQzZp1kmJyGlRoIoEmNVANg=; b=DrP4g02OnFWQSxcIOR5LhOvU8J4ylOv0dIt4gfPJsMN5uK2Y+0NRFadmJn3XVX2Y/X1x3K 8aU38Paq1TkpyH8Nf/ZUeCg5POGxBDe2kx/KvfQq750TrMqDSsoUOAAF4lhuvgCCjmQ9F/ 3wx9OqbpDpHnJjs6vQQBI0d8G5OHcC0f37P/9h40C58PYI8NANb3rck0N6i2i5eGN97uU2 lKmGJq8TqmLBRe1mw3MtMLdtq+xsaBwJwsgpLA2kVOSI8k4VZimP5CHrKT9gScx+BI57iH qHCI/ld7srsopUKQumK/gRFbbW2XxufwysDTVD/w+C1i0OB7kwCqBAi0PpD8nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734469572; 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=Jssoqsrpc97+S7pXMHJUnQzZp1kmJyGlRoIoEmNVANg=; b=FlhWLd82blK25BNnFcUD2AA+Ytw/NezuFwlu9OUNvP5epjcYQtbqpAiEFCSWI2DtPY6f3t 3aA1EuwVoavlZkLluyyygTngPX+M8E2eq7fUB4gtblRpmisTZ27n7LeKTvFP0/8ae0Tr3l gZ9x8o6etjoyZHAgI8+m4+7XulYZCus7KmxVSZVXhj2duzH1I0p+lk17ovevmTtPykKOG9 mZQ6IBF3s9WBNhM128m3+VeiUDGAMS3pYF57mIrLRHSJLSTLLFa8b/nIzjws3pAa5reQFQ clxzsv3mK33z+AcaffLJ6agkbbmjWtZGFZ0Lq1bYkQvTkx0aykJLAH2gFMcKtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734469572; a=rsa-sha256; cv=none; b=lq+0tVq8tUNSOkakpgwmpBPSJhJVKDPDJ9JXhS3EhzGIfH/5q38JHBmPHBsKTTSgR74EkW nEG44G7TgijwbKZCjHbRx72JcMohBulPUgv7WZ1ytz2Q1Mx9XYPA+4OrFRT7XSsZwnQMhp dSzQLrbZOZvgTQe8eXv7ljD/Ake7+KFEq//JkY593i7hYR+wK6TWd0kw1YDPz27BNrOmGZ UhG66GW+GlmsyKcrtPsH7Hika+T8LP9WezaJexpAIt3cAGk//clH1Q76PLXAqQiWX2vQ+o d/ZOObJad4XatxFbq5cLAjQUzaSUGCocinhaS2HurgcZKjEk3KyYNFdmY34HAw== 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 4YCTr44LN9zfhy; Tue, 17 Dec 2024 21:06:12 +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 4BHL6CiX056462; Tue, 17 Dec 2024 21:06:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BHL6Chl056459; Tue, 17 Dec 2024 21:06:12 GMT (envelope-from git) Date: Tue, 17 Dec 2024 21:06:12 GMT Message-Id: <202412172106.4BHL6Chl056459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 22bb70a6b3bb - main - namei: add more detail about LOCKSHARED's behavior 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22bb70a6b3bb7799276ab480e40665b7d6e4ce25 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=22bb70a6b3bb7799276ab480e40665b7d6e4ce25 commit 22bb70a6b3bb7799276ab480e40665b7d6e4ce25 Author: Alan Somers AuthorDate: 2024-12-17 20:10:57 +0000 Commit: Alan Somers CommitDate: 2024-12-17 21:05:59 +0000 namei: add more detail about LOCKSHARED's behavior [skip ci] MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D48125 --- share/man/man9/namei.9 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index 0be73f68cdda..63a6d3b11f6f 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -31,7 +31,7 @@ .\" If you integrate this manpage in another OS, I'd appreciate a note .\" - eivind@FreeBSD.org .\" -.Dd July 8, 2023 +.Dd December 17, 2024 .Dt NAMEI 9 .Os .Sh NAME @@ -124,7 +124,6 @@ Lock vnode on return with unless .Dv LOCKSHARED is also set. -The .Xr VOP_UNLOCK 9 should be used to release the lock (or @@ -153,8 +152,20 @@ and .Xr vrele 9 . .It Dv LOCKSHARED Lock vnode on return with -.Dv LK_SHARED . -The +.Dv LK_SHARED , +if permitted by the file system that owns the vnode. +The file system must explicitly permit this by setting +.Dv MNTK_LOOKUP_SHARED +in +.Dv mp->mnt_kern_flag +during mount and by calling +.Fn VN_LOCK_ASHARE +when allocating the vnode. +If +.Dv LOCKLEAF +is specified but shared locking is not permitted, then the vnode will be +returned with +.Dv LK_EXCLUSIVE . .Xr VOP_UNLOCK 9 should be used to release the lock (or