Validates file mapping requests.
int vn_map (vp, addr, length, offset, flags, crp) struct vnode *vp; caddr_t addr; uint length; uint offset; uint flags; struct ucred *crp;
Note: The addr, offset, and length parameters are unused in the current implementation. The file system is expected to store the segment ID with the file in the gn_seg field of the g-node for the file.
|vp||Points to the virtual node (v-node) of the file.|
|addr||Identifies the location within the process address space where the mapping is to begin.|
|length||Specifies the maximum size to be mapped.|
|offset||Specifies the location within the file where the mapping is to begin.|
|flags|| Identifies what type of mapping to perform. This value is composed of bit values defined in the /usr/include/sys/shm.h file. The following values are of particular interest to file system implementations:
|crp||Points to the cred structure. This structure contains data that applications can use to validate access permission.|
The vn_map entry point is called by the logical file system to validate mapping requests resulting from the mmap or shmat subroutines. The logical file system creates the virtual memory object (if it does not already exist) and increments the object's use count.
The vn_map entry point can be called from the process environment only.
Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.
The shmat subroutine, vn_fsync entry point.
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.
List of Virtual File System Operations.