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

vn_fsync_range Entry Point

Purpose

Flushes file data to disk.

Syntax

int
vn_fsync_range (vp, flags, fd, offset, length, crp)
struct vnode *vp;
int flags;
int fd;
offset_t offset;
offset_t length;
struct ucred *crp;

Parameters

vp Points to the vnode.
flags Specifies the File flags.
fd Specifies the File descriptor.
length Specifies the length of the flush request.
crp Specifies user's credentials.

Description

The vn_fsync_range entry point is used to flush file data and meta-data to disk. The offset and length parameters define the range that needs to be flushed. If length is given as zero, then the entire file past offset should be flushed.

The flags parameter controls how the flushing should be done. If the O_SYNC flag is set, then the flush should be done according to the synchronized file I/O integrity completion rules. If O_DSYNC is set, then the flush should be done according to the synchronized data I/O integrity completion rules.

File systems that do not define GFS_VERSION421 in their gfs flags do not need to supply a vn_fsync_range entry point. The logical file system will funnel all fsync requests through the old vn_fsync entry point.

Execution Environment

The vn_fsync_range entry points can be called from the process environment only.

Return Values

Zero Indicates a successful operation.
Nonzero Indicates that the operation failed; return values should be chosen from the /usr/include/sys/errno.h file.

Related Information

The fsync, fdatasync, fsync_range subroutines.

Virtual File System Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes), and Virtual File System Kernel Extensions Overview.

List of Virtual File System Operations.


[ Previous | Next | Contents | Home | Search ]