int vn_fclear (vp, flags, offset, len, vinfo, crp) struct vnode *vp; int flags; offset_t offset; offset_t len; caddr_t vinfo; struct ucred *crp;
vp | Points to the virtual node (v-node) of the file. |
flags | Identifies the flags from the open file structure. |
offset | Indicates where to start clearing in the file. |
len | Specifies the length of the area to be cleared. |
vinfo | This parameter is unused. |
crp | Points to the cred structure. This structure contains data that the file system can use to validate access permission. |
The vn_fclear entry point is called from the logical file system to clear bytes in a file, returning whole free blocks to the underlying file system. This entry point performs the clear regardless of whether the file is mapped.
Upon completion of the vn_fclear entry point, the logical file system updates the file offset to reflect the number of bytes cleared.
The vn_fclear entry point can be called from the process environment only.
0 | Indicates success. |
Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.
The fclear 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.