1e4702126SSascha Wildner.\" 2e4702126SSascha Wildner.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. 3e4702126SSascha Wildner.\" 4e4702126SSascha Wildner.\" Redistribution and use in source and binary forms, with or without 5e4702126SSascha Wildner.\" modification, are permitted provided that the following conditions 6e4702126SSascha Wildner.\" are met: 7e4702126SSascha Wildner.\" 1. Redistributions of source code must retain the above copyright 8e4702126SSascha Wildner.\" notice(s), this list of conditions and the following disclaimer as 9e4702126SSascha Wildner.\" the first lines of this file unmodified other than the possible 10e4702126SSascha Wildner.\" addition of one or more copyright notices. 11e4702126SSascha Wildner.\" 2. Redistributions in binary form must reproduce the above copyright 12e4702126SSascha Wildner.\" notice(s), this list of conditions and the following disclaimer in the 13e4702126SSascha Wildner.\" documentation and/or other materials provided with the distribution. 14e4702126SSascha Wildner.\" 15e4702126SSascha Wildner.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 16e4702126SSascha Wildner.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17e4702126SSascha Wildner.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18e4702126SSascha Wildner.\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 19e4702126SSascha Wildner.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20e4702126SSascha Wildner.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21e4702126SSascha Wildner.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22e4702126SSascha Wildner.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23e4702126SSascha Wildner.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24e4702126SSascha Wildner.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25e4702126SSascha Wildner.\" DAMAGE. 26e4702126SSascha Wildner.\" 27e4702126SSascha Wildner.\" $FreeBSD: src/share/man/man9/vhold.9,v 1.4 2005/07/22 00:28:22 rodrigc Exp $ 28e4702126SSascha Wildner.\" 292988aed0SSascha Wildner.Dd May 5, 2007 30e4702126SSascha Wildner.Dt VHOLD 9 31e4702126SSascha Wildner.Os 32e4702126SSascha Wildner.Sh NAME 33e4702126SSascha Wildner.Nm vhold , vdrop 34a706b3b1SMatthew Dillon.Nd "Acquire/release an auxiliary reference on a vnode" 35e4702126SSascha Wildner.Sh SYNOPSIS 36e4702126SSascha Wildner.In sys/param.h 37e4702126SSascha Wildner.In sys/vnode.h 38e4702126SSascha Wildner.Ft void 39e4702126SSascha Wildner.Fn vhold "struct vnode *vp" 40e4702126SSascha Wildner.Ft void 41e4702126SSascha Wildner.Fn vdrop "struct vnode *vp" 42e4702126SSascha Wildner.Sh DESCRIPTION 43e4702126SSascha WildnerThe 44e4702126SSascha Wildner.Fn vhold 45a706b3b1SMatthew Dillonfunction acquires an auxiliary reference on a vnode by incrementing the 462988aed0SSascha Wildner.Fa v_auxrefs 474a312324SMatthew Dillonfield. 48a706b3b1SMatthew DillonAuxiliary references do not reactivate a vnode or move it to the cache 494a312324SMatthew Dillonif it resides on the free list, but they will prevent the vnode from 504a312324SMatthew Dillonbeing recycled (if not already being recycled), or reused. 51a706b3b1SMatthew DillonAuxiliary references are used to associate auxiliary structures such as 524a312324SMatthew Dillonnamecache records with the vnode for those cases where the intent is to 534a312324SMatthew Dillonnot allow the vnode to be immediately recycled. 54a706b3b1SMatthew DillonAuxiliary references are also used to access a vnode via an auxiliary 554a312324SMatthew Dillonstructure without having to hold a deep stack of locks that might 564a312324SMatthew Dilloncreate deadlock issues for the caller. 57e4702126SSascha Wildner.Pp 58e4702126SSascha WildnerThe 59e4702126SSascha Wildner.Fn vdrop 60e4702126SSascha Wildnerfunction decrements the 612988aed0SSascha Wildner.Fa v_auxrefs 624a312324SMatthew Dillonfield. If the vnode has been deactivated and resides in the cache, 634a312324SMatthew Dillonit will be moved to the free list when 642988aed0SSascha Wildner.Fa v_auxrefs 654a312324SMatthew Dillondrops to 0. 66e4702126SSascha Wildner.Sh SEE ALSO 67666855caSSascha Wildner.Xr vget 9 , 684a312324SMatthew Dillon.Xr vnode 9 , 694a312324SMatthew Dillon.Xr vn_lock 9 , 704a312324SMatthew Dillon.Xr vn_unlock 9 , 714a312324SMatthew Dillon.Xr vput 9 , 724a312324SMatthew Dillon.Xr vref 9 , 734a312324SMatthew Dillon.Xr vrele 9 74e4702126SSascha Wildner.Sh AUTHORS 75e4702126SSascha WildnerThis manual page was written by 76*c616d378SFranco Fichtner.An Chad David Aq Mt davidc@acns.ab.ca . 77