*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> VOP_INACTIVE (9)              
Title
Content
Arch
Section
 

VOP_INACTIVE(9)

Contents


NAME    [Toc]    [Back]

     VOP_INACTIVE, VOP_RECLAIM -- reclaim file system resources for a vnode

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/vnode.h>

     int
     VOP_INACTIVE(struct vnode *vp, struct thread *td);

     int
     VOP_RECLAIM(struct vnode *vp, struct thread *td);

DESCRIPTION    [Toc]    [Back]

     The arguments are:

     vp  the vnode being reclaimed

     VOP_INACTIVE() is called when the kernel is no longer using the vnode.
     This may be because the reference count reaches zero or it may be that
     the file system is being forcibly unmounted while there are open files.
     It can be used to reclaim space for `open but deleted' files.

     VOP_RECLAIM() is called when a vnode is being reused for a different file
     system.  Any file system specific resources associated with the vnode
     should be freed.

LOCKS    [Toc]    [Back]

     For VOP_INACTIVE, the vp will be locked on entry.	Your VOP_INACTIVE code
     must unlock the vp prior to returning.

     For VOP_RECLAIM, the vp will not be locked on entry and should be left
     unlocked on return.

PSEUDOCODE    [Toc]    [Back]

     int
     vop_inactive(struct vnode *vp, struct thread *td)
     {
	 if (link count of vp == 0) {
	     /*
	      * Reclaim space in file system for vp.
	      */
	     ...;
	 }
	 VOP_UNLOCK(vp, 0, td);

	 return 0;
     }

     int
     vop_reclaim(struct vnode *vp, struct thread *td)
     {
	 /*
	  * Clean out the name cache.
	  */
	 cache_purge(vp);

	 /*
	  * Free file system related data.
	  */
	 ...;

	 return 0;
     }

SEE ALSO    [Toc]    [Back]

      
      
     vnode(9)

AUTHORS    [Toc]    [Back]

     This man page was written by Doug Rabson.


FreeBSD 5.2.1			 July 24, 1996			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
vclean OpenBSD disassociate the underlying file system from a vnode
VFS_ROOT FreeBSD return the root vnode of a file system
vfs_mountedon FreeBSD check if the vnode belongs to a mounted file system
freeaddrinfo Tru64 Free system resources used by an address information structure
Execute Tru64 Contains instructions for running commands that require the resources of a remote system
vnconfig OpenBSD configure vnode disks for file swapping or pseudo file systems
mount_nullfs FreeBSD mount a loopback file system sub-tree; demonstrate the use of a null file system layer
bus_release_resource FreeBSD release resources on a bus
glresources IRIX X resources used by GL programs
SgTextField IRIX XmText SGI Resources
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service