Symantec logo

vxfs_ap_assign_ckpt

NAME

vxfs_ap_assign_ckpt - assign an allocation policy to file data and metadata in a Storage Checkpoint

SYNOPSIS

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

#include <sys/types.h>

#include <vxfsutil.h>

int vxfs_ap_assign_ckpt(int fd, char *ckptname, char *datapol, char *metapol);

AVAILABILITY

VRTSvxfs

DESCRIPTION

vxfs_ap_assign_ckpt() assigns the given allocation policies for data and metadata to the Storage Checkpoint specified by ckptname. 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. The file descriptor fd must refer to a file to be operated on in the Storage Checkpoint.

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

NOTES

Assigning or defining an allocation policy can fail because of a conflict with volume flags. The conflict detection attempts to detect all conflicts, but there is no guarantee that all conflicts will be detected.

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

RETURN VALUES

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

ERRORS

EAGAIN

The file system is not currently frozen.

EFAULT

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

EINVAL

The specified flags are invalid.

EIO

An I/O error occurred during the operation.

ENOENT

One or more of the specified policies does not exist.

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.

ENXIO

An I/O error occurred during the 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.

EXAMPLES

To assign a policy to a Storage Checkpoint:

# vxfs_ap_assign_ckpt(fd, checkpoint_name data_policy, meta_policy);

SEE ALSO

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)