vxfs_ap_enforce_ckpt - reorganize blocks in a Storage Checkpoint to match a specified allocation policy
cc -I /opt/VRTS/include -L /opt/VRTS/lib
-l vxfsutil -ldl
cc -I /opt/VRTS/include -L /opt/VRTS/lib/64
-l vxfsutil -ldld
int vxfs_ap_enforce_ckpt(int fd, char *datapol, char *metapol);
vxfs_ap_enforce_ckpt() reallocates the blocks in a Storage Checkpoint. The file specified by fd points to a file within the Storage Checkpoint. All allocations for files in this Storage Checkpoint are changed to match the given policies. To clear a policy assignment, specify a NULL pointer for the policy field to be cleared (either datapol or metapol). datapol is the name of the data policy that can be created with fsapadm(1M) or through the vxfs_ap_defined() API. metapol is the name of the metadata policy that can be created with fsapadm(1M) or through the vxfs_ap_define() API.
Only the owner of the file is allowed to call this API. In addition, when the policy is defined (see vxfs_ap_define(3)), the FSAP_ANYUSER flag must have been passed. If both conditions are not true (a call by the file owner and a passed FSAP_ANYUSER flag), an EPERM error is returned.
To use this function (when both conditions are met), specify -l vxfsutil while linking. Specify the /opt/VRTSfssdk/5.0/lib directory for 32-bit executables, or the /opt/VRTSfssdk/5.0/lib/64 directory for 64-bit executables.
If the LIBVXFSUTIL_DLL_PATH environment variable is defined, it should be set to the name of the vxfsutil.so file, such as ~/mylib/vxfsutil.so. If undefined, this variable is assumed to point to the 32-bit and 64-bit vxfsutil.so files, /opt/VRTSvxfs/lib/vxfsutil.so and /opt/VRTSvxfs/lib/64/vxfsutil.so, respectively.
This function is supported only on Version 6 and later disk layouts. This API supports file system versions 6.0 and above.
vxfs_ap_enforce_ckpt() returns zero on success, non-zero on failure.
One or more of the specified pointer arguments points to an illegal address.
An I/O error occurred during the operation.
There is not such device or address.
There was not enough space in the devices specified in the policies to hold all the blocks for all the files in the Storage Checkpoint.
There is no license installed to allow this operation.
This operation is not supported by the disk layout version of the specified file system. Use vxupgrade(1m) to enable this operation.
The effective user ID of the calling process does not have appropriate privileges to perform this operation.
The specified file system is mounted read-only.
vxfs_ap_assign_ckpt(3), vxfs_ap_assign_file(3), vxfs_ap_assign_fs(3), vxfs_ap_define(3), vxfs_ap_define2(3), vxfs_ap_remove(3), vxfs_ap_enforce_file(3), vxfs_ap_enforce_file2(3), vxfs_ap_enumerate(3), vxfs_ap_query(3), vxfs_ap_query2(3), vxfs_ap_query_ckpt(3), vxfs_ap_query_file(3), vxfs_ap_query_fs(3), vxfs_vol_add(3), vxfs_vol_deencapsulate(3), vxfs_vol_encapsulate(3), vxfs_vol_enumerate(3), vxfs_vol_remove(3), vxfs_vol_resize(3), vxfs_vol_stat(3)