Veritas™ File System Programmer's Reference Guide - Solaris
- Veritas File System software developer's kit
- File Change Log
- About the File Change Log file
- Record types
- File Change Log tunables
- Application programming interface for File Change Log
- API functions
- File Change Log record
- Copying File Change Log records
- Veritas File System and File Change Log upgrade and downgrade
- Reverse path name lookup
- Multi-volume support
- Named data streams
- Veritas File System I/O
- Caching advisories
- Extents
- Thin Reclamation
Copying File Change Log records
Each FCL record returned by vxfs_fcl_read is of variable size and consists of the fcl_record structure, followed by the additional data associated with the record. The pointers in the fcl_record structure point to the data stored after the fcl_record structure and the record length specifies the size of the variable sized record. However, making an in-core copy of the FCL record involves more than replicating fr_reclen bytes of data from the source to the copy.
A simple memory copy just copies over the pointers from the source record to the target record. This leaves the pointers in the target record pointing to data from the source. Eventually, this can cause problems when the memory for the source record is re-used or freed. The pointers in the replica must be modified to point to data in the target record. Therefore, to make an in-core copy of the FCL record, the application must use the vxfs_fcl_copyrec() function to copy and perform the pointer relocation. The user application must allocate the memory needed for the copy.