#include <sys/types.h> #include <sys/errno.h>
int vn_get (vfsp, gnp, vpp) struct vfs *vfsp; struct gnode *gnp; struct vnode **vpp;
The vn_get kernel service provides a mechanism for allocating v-node objects for use within the virtual file system environment. A v-node is first allocated from an effectively infinite pool of available v-nodes.
Upon successful return from the vn_get kernel service, the pointer to the v-node pointer provided (specified by the vpp parameter) has been set to the address of the newly allocated v-node.
The fields in this v-node have been initialized as follows:
v_count | Set to 1. |
v_vfsp | Set to the value in the vfsp parameter. |
v_gnode | Set to the value in the gnp parameter. |
v_next | Set to list of others v-nodes with the same g-node. |
All other fields in the v-node are zeroed.
The vn_get kernel service can be called from the process environment only.
0 | Indicates successful completion. |
ENOMEM | Indicates that the vn_get kernel service could not allocate memory for the v-node. (This is a highly unlikely occurrence.) |
The vn_get kernel service is part of Base Operating System (BOS) Runtime.
The vn_free kernel service.
Virtual File System Overview and Virtual File System (VFS) Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.