Symantec logo

vxfs_ap_assign_fs

NAME

vxfs_ap_assign_fs - assign an allocation policy to all file data and metadata within a specified file system

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/64
-l vxfsutil -ldld

For both applications:

#include <sys/types.h>

#include <vxfsutil.h>

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

AVAILABILITY

VRTSvxfs

DESCRIPTION

vxfs_ap_assign_fs() assigns the given allocation policies for data and metadata to a file system. The fd argument can reference any file within the file system. To clear a policy assignment, specify a NULL pointer for the policy field to be cleared (either datapol or metapol).

To use this function, 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.

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 API supports file system versions 6.0 and above.

RETURN VALUES

vxfs_ap_assign_fs() 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 function is being used incorrectly or the arguments to the function cannot be validated. This can occur when an application uses an fshandle that was not created by the same process.

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\P

There is no such device or address.

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_define(3), vxfs_ap_remove(3), vxfs_ap_enforce_file(3), vxfs_ap_enumerate(3), vxfs_ap_query(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)