Symantec logo

vxfs_ap_enforce_ckpt

NAME

vxfs_ap_enforce_ckpt - reorganize blocks in a Storage Checkpoint to match a specified allocation policy

SYNOPSIS

For 32-bit applications:

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

For 64-bit applications:

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

For both applications:

#include <sys/types.h>

#include <vxfsutil.h>

int vxfs_ap_enforce_ckpt(int fd, char *datapol, char *metapol);

AVAILABILITY

VRTSvxfs

DESCRIPTION

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/VRTSvxfs/lib directory for 32-bit executables, or the /opt/VRTSvxfs/lib/sparcv9 directory for 64-bit executables.

NOTES

This function is supported only on Version 6 and later disk layouts. This API supports file system versions 6.0 and above.

RETURN VALUES

vxfs_ap_enforce_ckpt() returns zero on success, non-zero on failure.

ERRORS

EFAULT

One or more of the specified pointer arguments points to an illegal address.

EIO

An I/O error occurred during the operation.

ENXIO

There is not such device or address.

ENOSPC

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.

ENOSYS

There is no license installed to allow this operation.

ENOTSUP

This operation is not supported by the disk layout version of the specified file system. Use vxupgrade(1m) to enable this operation.

EPERM

The effective user ID of the calling process does not have appropriate privileges to perform this operation.

EROFS

The specified file system is mounted read-only.

SEE ALSO

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)