1fab63cc4SDoug Rabson.\" -*- nroff -*- 2fab63cc4SDoug Rabson.\" 3fab63cc4SDoug Rabson.\" Copyright (c) 1996 Doug Rabson 4fab63cc4SDoug Rabson.\" 5fab63cc4SDoug Rabson.\" All rights reserved. 6fab63cc4SDoug Rabson.\" 7fab63cc4SDoug Rabson.\" This program is free software. 8fab63cc4SDoug Rabson.\" 9fab63cc4SDoug Rabson.\" Redistribution and use in source and binary forms, with or without 10fab63cc4SDoug Rabson.\" modification, are permitted provided that the following conditions 11fab63cc4SDoug Rabson.\" are met: 12fab63cc4SDoug Rabson.\" 1. Redistributions of source code must retain the above copyright 13fab63cc4SDoug Rabson.\" notice, this list of conditions and the following disclaimer. 14fab63cc4SDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright 15fab63cc4SDoug Rabson.\" notice, this list of conditions and the following disclaimer in the 16fab63cc4SDoug Rabson.\" documentation and/or other materials provided with the distribution. 17fab63cc4SDoug Rabson.\" 18fab63cc4SDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 19fab63cc4SDoug Rabson.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20fab63cc4SDoug Rabson.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21fab63cc4SDoug Rabson.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 22fab63cc4SDoug Rabson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23fab63cc4SDoug Rabson.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24fab63cc4SDoug Rabson.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25fab63cc4SDoug Rabson.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26fab63cc4SDoug Rabson.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27fab63cc4SDoug Rabson.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28fab63cc4SDoug Rabson.\" 297f3dea24SPeter Wemm.\" $FreeBSD$ 30fab63cc4SDoug Rabson.\" 31*398467c1SAlan Somers.Dd March 15, 2019 32fab63cc4SDoug Rabson.Dt VOP_INACTIVE 9 33aa12cea2SUlrich Spörlein.Os 34fab63cc4SDoug Rabson.Sh NAME 35fab63cc4SDoug Rabson.Nm VOP_INACTIVE , 36fab63cc4SDoug Rabson.Nm VOP_RECLAIM 37fab63cc4SDoug Rabson.Nd reclaim file system resources for a vnode 38fab63cc4SDoug Rabson.Sh SYNOPSIS 3932eef9aeSRuslan Ermilov.In sys/param.h 4032eef9aeSRuslan Ermilov.In sys/vnode.h 41fab63cc4SDoug Rabson.Ft int 42c2508101SAndrew R. Reiter.Fn VOP_INACTIVE "struct vnode *vp" "struct thread *td" 43fab63cc4SDoug Rabson.Ft int 44c2508101SAndrew R. Reiter.Fn VOP_RECLAIM "struct vnode *vp" "struct thread *td" 45fab63cc4SDoug Rabson.Sh DESCRIPTION 46fab63cc4SDoug RabsonThe arguments are: 47218d2162SRuslan Ermilov.Bl -tag -width 2n 480640e9e0SHiten Pandya.It Fa vp 490a57ea7dSRuslan ErmilovThe vnode being reclaimed. 50fab63cc4SDoug Rabson.El 51fab63cc4SDoug Rabson.Pp 52facc6767SRuslan Ermilov.Fn VOP_INACTIVE 53*398467c1SAlan Somersis usually called when the kernel is no longer using the vnode. 54*398467c1SAlan SomersHowever, there is no guarantee that it will be called at all, for example if 55*398467c1SAlan Somersthe last reference was dropped while the vnode lock could not be upgraded 56*398467c1SAlan Somersto exclusive without sleeping. 57c1c03d49SHiten PandyaThis may be 58fab63cc4SDoug Rabsonbecause the reference count reaches zero or it may be that the 59fab63cc4SDoug Rabsonfile system is being forcibly unmounted while there are open files. 60*398467c1SAlan SomersIt can be used to reclaim space on the last close of an 61ed06180aSHiten Pandya.Sq open but deleted 62*398467c1SAlan Somersfile. 63ed06180aSHiten Pandya.Pp 64facc6767SRuslan Ermilov.Fn VOP_RECLAIM 65fab63cc4SDoug Rabsonis called when a vnode is being reused for a different file system. 66fab63cc4SDoug RabsonAny file system specific resources associated with the vnode should be 67fab63cc4SDoug Rabsonfreed. 68fe11eb74SMatthew Dillon.Sh LOCKS 69e4bf2628SKonstantin BelousovFor both 70e4bf2628SKonstantin Belousov.Fn VOP_INACTIVE 71e4bf2628SKonstantin Belousovand 72e4bf2628SKonstantin Belousov.Fn VOP_RECLAIM , 73e4bf2628SKonstantin Belousovthe 74ed06180aSHiten Pandya.Fa vp 75c448f58fSKonstantin Belousovwill be exclusively locked on entry, and must be left exclusively 76c448f58fSKonstantin Belousovlocked on return. 77fab63cc4SDoug Rabson.Sh SEE ALSO 78fab63cc4SDoug Rabson.Xr vnode 9 79fab63cc4SDoug Rabson.Sh AUTHORS 80571dba6eSHiten PandyaThis manual page was written by 81aaf1f16eSPhilippe Charnier.An Doug Rabson . 82