fp_fsync Kernel Service

Purpose

Writes changes for a specified range of a file to permanent storage.

Syntax

#include <sys/fp_io.h>

int fp_fsync (fp, how, off, len)
struct file *fp;
int how;
offset_t off;
offset_t len;

Description

The fp_fsync kernel service is an internal interface to the function provided by the fsync_range subroutine.

Parameters

Item Description
fp Points to a file structure returned by the fp_open kernel service.
how Specifies the following handling characteristics of the operation:
FDATASYNC
The changed data in the range specified by the off and len parameters is written to the storage. If the metadata for the file is changed and this changed metadata must read the data, the metadata is also written to the storage. Otherwise, the metadata is not updated.
FFILESYNC
The changed data in the range specified by the off and len parameters is written to the storage. If any metadata is changed, all of the changed user data is written to the storage. Metadata changes and file attributes including time stamps are also written to the storage.
off Specifies the starting offset value of the data in the file to be written to the storage.
len Specifies the length of the file range to be written to the storage. If you specify the value as zero, all cached data is written to the storage.

Execution Environment

The fp_fsync kernel service can be called from the process environment only.

Return Values

Item Description
0 Indicates a successful operation.
ERRNO Returns an error number from the /usr/include/sys/errno.h file on failure.