Symantec logo

vxfs_ap_query_fs

NAME

vxfs_ap_query_fs - retrieve allocation policies assigned to a specified file system

SYNOPSIS

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

#include <sys/types.h>

#include <vxfsutil.h>

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

AVAILABILITY

VRTSvxfs

DESCRIPTION

vxfs_ap_query_fs() retrieves allocation policies assigned to the given file system. The datapol and metapol arguments must point to buffers of (FSAP_NAMESZ + 1) bytes, which are filled in with the name of the policy (if any) and NULL-terminated. If no policy is assigned, the string "NONE" is returned. 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 in the file system to be operated on.

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

NOTES

This API does not require root permission and can be run by any user. This API supports file system versions 6.0 and above.

RETURN VALUES

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

ERRORS

EFAULT

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

EFBIG

The calling function issued a request with a file offset off past the EOF mark.

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

There is no such device or address.

SEE ALSO

vxfs_ap_assign_ckpt(3), vxfs_ap_assign_file(3), vxfs_ap_assign_fs(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_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)