Veritas™ File System 5.0.1 Programmer's Reference Guide
be of variable sizes, such as a file remove or rename record. These records contain
additional information, such as the name of a file that is removed or renamed.
To ensure that the first few bytes at the start of any file system block is always a
valid FCL record (if the filename crosses a block boundary), the file system block
may be split across multiple on-disk records. Previously, you were required to
write additional code to assemble these records to get the filename. The VxFS 5.0
API provides a mechanism to directly read a single assembled logical record. This
makes it easier for applications using the API. The API also lets the application
specify a filter to indicate a subset of the events of interest and return only required
records.
Backward compatibility
The API lets applications read the FCL independent of the FCL layout changes.
For example, consider a scenario where an application directly accesses and
interprets the on-disk FCL records. If the next VxFS release adds new records or
changes the way the records are stored in the FCL file, the application needs to
be rewritten or at least re-compiled to accommodate for the changes (under
previous VxFS versions).
With an intermediate API, the on-disk layout of FCL is hidden from the application,
so even if the disk layout of FCL changes, the API internally translates the data
returns the expected output record to the user. The user application can then
continue without a recompilation or a rewrite.This insulates programs from FCL
layout changes and provides greater compatibility for existing applications.
API functions
The API uses the following type of functions:
■ Functions for accessing FCL records
■ Functions for seeking offsets and time stamps
Functions for accessing File Change Log records
The following are general functions for accessing FCL records:
Opens the FCL file and returns a handle which can be used for
further operations. All subsequent accesses of the FCL file through
the API must use this handle.
vxfs_fcl_open
Closes the FCL file and cleans up resources associated with the
handle
vxfs_fcl_close
File Change Log
Application programming interface for File Change Log
28