From nobody Mon Jan 31 14:53:12 2022 X-Original-To: dev-commits-src-main@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 D69541993B73; Mon, 31 Jan 2022 14:53:13 +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 4JnWJn3fjSz4Rnp; Mon, 31 Jan 2022 14:53:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643640793; 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=tduVN+g4JTxarnAb4vKzgPbr7B5ry3/KXowQCWKsRRY=; b=cxbHcib5ozHF9Cb62Q0glf8bANTYTnOi0b0fjX58xHTjWGsUjgkpQokwxEvKuN+a9lvqeT Rd8wio5na00sTOJdfEgHdq3dI+V+EDS3EdtN9FrzWXcs6z/7/K7nwvYBKObjbZRpcyz4kd b9EhEQueHaenAM+Nh7oxbHyqw9HoKAsJkKZw4hEXrCAFwDd5jcLjXTwL4UJd97PoKJhCTm 43HljqrBslCYlBzHXGL10JpVG8H3SIVzwZwBhr78GNlPto/JsFWexgdLtl0hs62AD7giin 7AlPUjl/bDN1rVoEeJUsWCAm+ttN2YILqFK9SS76dTYuO/4yn/sdHD5lcIKpKA== 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 223411E49C; Mon, 31 Jan 2022 14:53:13 +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 20VErCoq081825; Mon, 31 Jan 2022 14:53:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20VErCEj081824; Mon, 31 Jan 2022 14:53:12 GMT (envelope-from git) Date: Mon, 31 Jan 2022 14:53:12 GMT Message-Id: <202201311453.20VErCEj081824@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: 90be4091a76e - main - insmntque(9): update and correct man page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 90be4091a76e89bcd6c917e885bd679d66d36458 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643640793; 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=tduVN+g4JTxarnAb4vKzgPbr7B5ry3/KXowQCWKsRRY=; b=W0hEE3y6DXdrxNsuZg1mT/tqZwcVCiSBoyizHJosBY8ojHVfkmLBLPA+EBE9XfrQTDQ3zS b5BwwfgB53M19YlT47Zq1vGwNUpWlGWucBBx5EEX0h/4uF00lfgkfHMCRTaodfTLtGEVEb 61jgGr5+7tnkjHc0OmRNGFGKyIIblZiTnl19vGNemugcPx1ZkZm97v+pq4bFWwaKb4OvWR SoHiXnR2fXohSK6ED+KEpYcyoYvmpUPUHyb+irnuFQgTmw1p6YiD832G3CekURuok3uGZl vQjH0zan/jbt6CuFBA4/psFtMhYMrapdoiM7SPFT5ZgCCv/TQEdilOWG+3mLog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643640793; a=rsa-sha256; cv=none; b=RQyUzCHMYBLyKCEnXbo5b+6zcvW8/wKuZwe8SvhHvgHGnRmz7r7AVCcu/f32Iivck3Knpr Jzt+KW3Lj7UsQxQ6aHR2fJqU29sXKOTZGQQXyQgSZ0J0JwLAMlmFNT25c3lLCiq9ged4j1 WN8aZykwigz1hMYH5Szpd9SuBASl1mZqAnZRf25oN8SgXlySY0jKaV+sHdaEjryyU13XvR HXpmD2IeDLSqiwozBPzumWNv8FeA4vJefEvOJSlEMqFNiNxB4k8uD/HY5iBq5g8fRMhGxS u6e4jZfdvZZ8uGQuxJL952iHUjboxIixmYV02SO0iza30SAVNQNCfsPTLw5WRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=90be4091a76e89bcd6c917e885bd679d66d36458 commit 90be4091a76e89bcd6c917e885bd679d66d36458 Author: Konstantin Belousov AuthorDate: 2022-01-29 00:55:28 +0000 Commit: Konstantin Belousov CommitDate: 2022-01-31 14:51:05 +0000 insmntque(9): update and correct man page Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D34071 --- share/man/man9/insmntque.9 | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/share/man/man9/insmntque.9 b/share/man/man9/insmntque.9 index ae94d901b755..543c64a2bbe1 100644 --- a/share/man/man9/insmntque.9 +++ b/share/man/man9/insmntque.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 8, 2008 +.Dd January 29, 2022 .Dt INSMNTQUE 9 .Os .Sh NAME @@ -39,7 +39,7 @@ .Ft int .Fn insmntque "struct vnode *vp" "struct mount *mp" .Ft int -.Fn insmntque1 "struct vnode *vp" "struct mount *mp" "void (*dtr)(struct vnode *, void *)" "void *dtr_arg" +.Fn insmntque1 "struct vnode *vp" "struct mount *mp" .Sh DESCRIPTION The .Fn insmntque @@ -48,32 +48,36 @@ This includes updating .Va v_mount for the vnode, and inserting the vnode into the mount's vnode list. .Pp -The mount reference count is incremented for each vnode added to the +The indirect mount reference count, maintained as the count of the +vnodes owned by it, is incremented for each vnode added to the mount, and that reference is decremented by .Xr vgone 9 . .Pp The mount's interlock is held while the vnode is inserted. -For MP-safe file systems, the vnode must be exclusively locked. +The vnode must be exclusively locked. .Pp On failure, .Fn insmntque -calls +resets vnode' operation vector to the vector of +.Xr deadfs 9 , +clears +.Va v_data , +and then calls .Xr vgone 9 -on the supplied vnode, and then drops the vnode lock and reference. +and +.Xr vput 9 . If more elaborated cleanup after .Fn insmntque failure is needed, the .Fn insmntque1 function may be used instead. -The -.Fa dtr -argument is a pointer to a function that is called on failure. -This function may perform any custom cleanup. -The vnode pointer is supplied as the first argument to -.Fa dtr . -The -.Fa dtr_arg -argument is the second, supplying any additional context needed. +It does not do any cleanup following a failure, leaving all +the work to the caller. +In particular, the operation vector +.Va v_op +and +.Va v_data +fields of the vnode are kept intact. .Sh RETURN VALUES The .Fn insmntque