VOP_INACTIVE man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

VOP_INACTIVE(9)		 BSD Kernel Developer's Manual	       VOP_INACTIVE(9)

NAME
     VOP_INACTIVE, VOP_RECLAIM — reclaim filesystem resources for a vnode

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

     int
     VOP_INACTIVE(struct vnode *vp, struct proc *p);

     int
     VOP_RECLAIM(struct vnode *vp, struct proc *p);

DESCRIPTION
     The arguments are:

     vp	 the vnode being reclaimed

     VOP_INACTIVE(9) 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 filesystem is being forcibly unmounted while there are open files.
     It can be used to reclaim space for 'open but deleted' files.
     VOP_RECLAIM(9) is called when a vnode is being reused for a different
     filesystem.  Any filesystem specific resources associated with the vnode
     should be freed.

LOCKS
     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
     int
     vop_inactive(struct vnode *vp)
     {
	 if (link count of vp == 0) {
	     /*
	      * Reclaim space in filesystem for vp.
	      */
	     ...;
	 }
	 VOP_UNLOCK(vp, 0, p);

	 return 0;
     }

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

	 /*
	  * Free filesystem-related data.
	  */
	 ...;

	 return 0;
     }

SEE ALSO
     vnode(9)

AUTHORS
     This man page was written by Doug Rabson.

BSD				 July 24, 1996				   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net