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

vn_fclear Entry Point

Purpose

Releases portions of a file.

Syntax

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;

Parameters

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.

Description

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.

Execution Environment

The vn_fclear 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.

Related Information

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.


[ Previous | Next | Contents | Home | Search ]