Home > Veritas Storage Foundation™ File System Manual Pages

VXFS_FCL_SYNC (3)

Library Functions

Table of contents


NAME

vxfs_fcl_sync - set a synchronization point in the VxFS file change log

SYNOPSIS

cc -I /opt/VRTS/include -L /opt/VRTS/lib
-l vxfsutil -ldl

#include <sys/types.h>

#include <vxfsutil.h>

int vxfs_fcl_sync(char *fname, uint64_t *offp);


AVAILABILITY

VRTSvxfs

DESCRIPTION

The vxfs_fcl_sync() function sets a synchronization point within the VxFS file change log (FCL). This synchronization point defines a clear offset into the FCL file that applications can use as a stopping point when reading the FCL. The application saves this offset to use it as a starting point the next time the application reads more of the FCL file.

Setting a synchronization point in the FCL also resets the FCL data write interval for all of the files in the file system. The FCL data write interval is a VxFS tunable used to limit the number of FCL records for file data changes during a specified time interval. This limitation applies to all files in all read-write mounted filesets for a given file system volume or device (see the vxtunefs(1M) manual page).

By resetting the FCL data write interval, an application is certain to find at least one FCL data change record for each file in the file system that is being overwritten, extended, or truncated the next time that the application reads the FCL file from offp.

Multiple applications can use the vxfs_fcl_sync() function. The synchronization point that is set does not affect the operation of other applications using the FCL, and multiple applications issuing a call to vxfs_fcl_sync() obtain different offsets to use as their own synchronization points.

To use this function, specify -l vxfsutil while linking.

vxfs_fcl_sync() has two parameters, a pointer to the FCL file name, and the address of a 64-bit offset.


NOTES

This function is supported only on Version 6 and later disk layouts.

RETURN VALUES

Upon successful completion, vxfs_fcl_sync() stores the offset into the FCL file corresponding to the exact time that the synchronization point was made in offp. This offset also corresponds to the exact time that the FCL data write interval was reset for all files in the file system. The value returned upon successful completion is zero. Otherwise, vxfs_fcl_sync() returns a negative number and *offp is set to (uint64_t)0.

EXAMPLES

The following sample code fragment opens the FCL file defined in FCLFILE, issues an FCL synchronization point, saves the offset returned in save_off, and closes the FCL file.

fd = open(FCLFILE, O_RDONLY, 444);
if (fd < 0) {
	return ENOENT;
}
ret = vxfs_fcl_sync(FCLFILE, &save_off);
if (ret < 0) {
	return EINVAL;
}
(void)close(fd);

SEE ALSO

fcladm(1M), vxtunefs(1M)

Last updated: 01 April 2006
Copyright ©2009 Symantec Corporation
All rights reserved.