vxfs_ap_query - return information about a specific allocation policy
For 32-bit applications:For both applications: #include <sys/types.h>cc -I /opt/VRTS/include -L /opt/VRTS/lib
-l vxfsutil -ldlFor 64-bit applications:
cc -I /opt/VRTS/include -L /opt/VRTS/lib/64
-l vxfsutil -ldld
#include <vxfsutil.h>
int vxfs_ap_query(int fd, struct fsap_info *fsap);
AVAILABILITY
VRTSvxfs
vxfs_ap_query() fills the fsap_info structure with the information for the policy specified by name fsap->ap_name. The file descriptor fd specifies the mount point or any file in the file system.struct fsap_info { char ap_name[FSAP_NAMESZ]; uint32_t ap_flags; uint32_t ap_order; uint32_t ap_ndevs; char ap_devs[FSAP_MAXDEVS][FSDEV_NAMESZ]; };Possible value for ap_flags is:
FSAP_ANYUSER
The policy can be assigned by non-privileged users. By default, only privileged users can assign policies.Possible values for ap_order are:
FSAP_ORDER_ASGIVEN
Allocations are done from the volume in the order in which they are given in the allocation policy.FSAP_ORDER_LEASTFULL
Allocations are done from the volume specified in the allocation policy that has the most free blocks.FSAP_ORDER_ROUNDROBIN
Allocations are done from a volume that is selected in a round-robin fashion from those specified in the allocation policy.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.
This API supports file system versions 6.0 and above.
vxfs_ap_query() returns zero on success, non-zero on failure.
EFAULT One or more of the specified pointer arguments points to an illegal address. EINVAL The specified number of volumes exceeds the maximum number of volumes. ENOENT The specified policy does not exist. ENOMEM Memory could not be allocated to support the API. ENOTSUP This operation is not supported by the disk layout version of the specified file system. Use vxupgrade(1m) to enable this operation. ERANGE The result was too large. VX_ETOOMANYVOLS Too many volumes were specified for the volume set.
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_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)
VxFS 7.0 | vxfs_ap_query(3) |