man.bsd.lv manual page server

Manual Page Search Parameters

GETNEWVNODE(9) Kernel Developer's Manual GETNEWVNODE(9)

getnewvnodeget a new vnode

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

int
getnewvnode(enum vtagtype tag, struct mount *mp, const struct vops *vops, struct vnode **vpp);

The () function initializes a new vnode, assigning it the vnode operations passed in vops. It will have its v_tag field set to tag and be placed in the mount queue for the mount point represented by mp.

The vnode is either freshly allocated, taken from the free list or taken from the hold list. If there are no vnodes on the free list, half the time a vnode referencing buffers will be taken from the hold list, otherwise it will be freshly allocated.

The arguments to () are:

tag
The file system type.
mp
The mount point to add the new vnode to.
vops
The vnode operations to assign to the new vnode.
vpp
Points to the new vnode upon successful completion.

getnewvnode() returns 0 on success, or ENFILE if the vnode table is full.

This man page was originally written by Chad David <davidc@acns.ab.ca> for FreeBSD.

November 14, 2020 OpenBSD-7.0