vget man page on DragonFly

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

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

NAME
     vget — Acquire a primary reference, lock, and reactivate a vnode

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

     int
     vget(struct vnode *vp, int lockflag);

DESCRIPTION
     Acquire a primary reference to vnode and lock it, reactivating the vnode
     from the cache or free list if necessary.	This kernel function must be
     used if the vnode in hand is not already known to be actively referenced,
     such as when obtaining the vnode pointer from a namecache or VM object
     structure.

     vp	       The vnode being acquired, typically obtained from some other
	       system structure.

     lockflag  Must be LK_SHARED or LK_EXCLUSIVE.  Passing 0 is illegal.
	       LK_NOWAIT may be logically ORd in if you do not wish to block
	       and can handle the additional error codes that might be
	       returned.

     When not in use, vnodes are kept on a free list or marked as being
     cached.  The vnodes still reference valid files but may be reused to
     refer to a new file at any time.  Often, references to these vnodes are
     present in auxiliary structures related to the vnode, such as namecache
     entries and VM objects.

     When acquiring a vnode pointer from these auxiliary structures the vget
     function must be used to both reference and, if necessary, reactivate the
     vnode.  The vnode will also be locked accordingly.

RETURN VALUES
     0 is returned on success, ENOENT is returned if the vnode becomes unus‐
     able while vget is blocked trying to lock it, and other errors may be
     returned as well.	ENOENT is not typically considered to be a fatal error
     but simply an indication that the caller needs to relookup the vnode as
     related structures may be in the midst of being destroyed.

SEE ALSO
     vdrop(9), vhold(9), vnode(9), vn_lock(9), vn_unlock(9), vput(9), vref(9),
     vrele(9)

AUTHORS
     This manual page was written by Doug Rabson.

BSD				  May 5, 2007				   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