[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vfs_vget Entry Point

Purpose

Converts a file identifier into a virtual node (v-node).

Syntax

int vfs_vget (vfsp, vpp, fidp, crp)
struct vfs *vfsp;
struct vnode **vpp;
struct fileid *fidp;
struct ucred *crp;

Parameters

vfsp Points to the virtual file system that is to contain the v-node. Any returned v-node should belong to this virtual file system.
vpp Points to the place to return the v-node pointer. This is set to point to the new v-node. The fields in this v-node should be set as follows:
v_vntype The type of v-node dependent on private data.
v_count Set to at least 1 (one).
v_pdata If a new file, set to the private data for this file system.
fidp Points to a file identifier. This is a file system-specific file identifier that must conform to the fileid structure.
Note: If the fidp parameter is invalid, the vpp parameter should be set to a null value by the vfs_vget entry point.
crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vfs_vget entry point is called to convert a file identifier into a v-node. This entry point uses information in the vfsp and fidp parameters to create a v-node or attach to an existing v-node. This v-node represents, logically, the same file system object as the file identified by the fidp parameter.

If the v-node already exists, successful operation of this entry point increments the v-node use count and returns a pointer to the v-node. If the v-node does not exist, the vfs_vget entry point creates it using the vn_get kernel service and returns a pointer to the new v-node.

Execution Environment

The vfs_vget entry point can be called from the process environment only.

Return Values

0 Indicates success.

Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure. A typical value includes:

EINVAL Indicates that the remote virtual file system specified by the vfsp parameter does not support chained mounts.

Related Information

The vn_get kernel service.

The access subroutine.

Virtual File System Overview, Virtual File System Kernel Extensions Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes) in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]