xref: /freebsd/share/man/man9/vgone.9 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
121642577SAlfred Perlstein.\"
221642577SAlfred Perlstein.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
321642577SAlfred Perlstein.\"
421642577SAlfred Perlstein.\" Redistribution and use in source and binary forms, with or without
521642577SAlfred Perlstein.\" modification, are permitted provided that the following conditions
621642577SAlfred Perlstein.\" are met:
721642577SAlfred Perlstein.\" 1. Redistributions of source code must retain the above copyright
821642577SAlfred Perlstein.\"    notice(s), this list of conditions and the following disclaimer as
921642577SAlfred Perlstein.\"    the first lines of this file unmodified other than the possible
1021642577SAlfred Perlstein.\"    addition of one or more copyright notices.
1121642577SAlfred Perlstein.\" 2. Redistributions in binary form must reproduce the above copyright
1221642577SAlfred Perlstein.\"    notice(s), this list of conditions and the following disclaimer in the
1321642577SAlfred Perlstein.\"    documentation and/or other materials provided with the distribution.
1421642577SAlfred Perlstein.\"
1521642577SAlfred Perlstein.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
1621642577SAlfred Perlstein.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1721642577SAlfred Perlstein.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1821642577SAlfred Perlstein.\" DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
1921642577SAlfred Perlstein.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2021642577SAlfred Perlstein.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2121642577SAlfred Perlstein.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2221642577SAlfred Perlstein.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2321642577SAlfred Perlstein.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2421642577SAlfred Perlstein.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
2521642577SAlfred Perlstein.\" DAMAGE.
2621642577SAlfred Perlstein.\"
27*abd80ddbSMateusz Guzik.Dd December 8, 2019
2821642577SAlfred Perlstein.Dt VGONE 9
2921642577SAlfred Perlstein.Os
3021642577SAlfred Perlstein.Sh NAME
31396a7f50SSergey Kandaurov.Nm vgone
3221642577SAlfred Perlstein.Nd "prepare a vnode for reuse"
3321642577SAlfred Perlstein.Sh SYNOPSIS
3421642577SAlfred Perlstein.In sys/param.h
3521642577SAlfred Perlstein.In sys/vnode.h
3621642577SAlfred Perlstein.Ft void
3721642577SAlfred Perlstein.Fn vgone "struct vnode *vp"
3821642577SAlfred Perlstein.Sh DESCRIPTION
39396a7f50SSergey KandaurovThe
4021642577SAlfred Perlstein.Fn vgone
41396a7f50SSergey Kandaurovfunction prepares the vnode to be destroyed.
4221642577SAlfred PerlsteinThe preparation includes the cleaning of all file system specific data and
4321642577SAlfred Perlsteinthe removal from its mount point vnode list.
4421642577SAlfred Perlstein.Pp
451f620c2eSRuslan ErmilovIf the vnode has a
461f620c2eSRuslan Ermilov.Va v_usecount
471f620c2eSRuslan Ermilovof zero, and its
48*abd80ddbSMateusz Guzik.Dv VIRF_DOOMED
491f620c2eSRuslan Ermilovflag is not set, it is moved to the head of the free list
501f620c2eSRuslan Ermilovas in most cases the vnode
5107fbcd3aSChad Davidis about to be reused, or its file system is being unmounted.
5221642577SAlfred Perlstein.Pp
53396a7f50SSergey KandaurovThe
5421642577SAlfred Perlstein.Fn vgone
55396a7f50SSergey Kandaurovfunction takes an exclusively locked vnode, and returns with the vnode
56396a7f50SSergey Kandaurovexclusively locked.
57396a7f50SSergey Kandaurov.Sh SEE ALSO
58396a7f50SSergey Kandaurov.Xr vnode 9
5921642577SAlfred Perlstein.Sh AUTHORS
60571dba6eSHiten PandyaThis manual page was written by
618a7314fcSBaptiste Daroussin.An Chad David Aq Mt davidc@acns.ab.ca .
62