Home > Veritas Storage Foundation™ File System Manual Pages

VXFS_AP_DEFINE (3)

Library Functions

Table of contents


NAME

vxfs_ap_define - define a new allocation policy

SYNOPSIS

cc -I /opt/VRTS/include -L /opt/VRTS/lib

-l vxfsutil -ldl

#include <sys/types.h>

#include <vxfsutil.h>

int vxfs_ap_define(int fd, struct fsap_info *fsap, uint32_t flags);


AVAILABILITY

VRTSvxfs

DESCRIPTION

vxfs_ap_define() defines an allocation policy with the specified name, flags, order, and volume names. If the policy name is already defined, the definition is overwritten with the new values. The specified volume names must all exist as component volumes in the file system. The file descriptor fd specifies any file in the file system where the policy will be defined. The flags argument is currently unused.

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


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.


RETURN VALUES

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

ERRORS

EEXIST
The specified policy name is reserved.
EFAULT
An address specified by an argument is invalid.
EINVAL
The specified number of volumes exceeds the maximum number of volumes.
EIO
An I/O error occurred during the operation.
ENOENT
One or more of the specified volumes does not exist in the file system.
ENOMEM
Sufficient memory could not be allocated to hold path names.
ENOSPC
There was not enough space to store the policy definition.
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 priviledges to perform this operation.
ERANGE
The result was too large.
EROFS
The specified file system is mounted read-only.
VX_ETOOMANYVOLS
Too many volumes were specified for the volume set.

SEE ALSO

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

Last updated: 7 May 2007
Copyright ©2009 Symantec Corporation
All rights reserved.