Manipulates disk quotas on file systems.
GPFS™ Library (libgpfs.a for AIX®, libgpfs.so for Linux)
#include <gpfs.h>
int gpfs_quotactl(const char *pathname,
int cmd,
int id,
void *bufferP);
The gpfs_quotactl() subroutine manipulates disk quotas. It enables, disables, and manipulates disk quotas for file systems on which quotas have been enabled.
Enables disk quotas for the file system specified by the pathname parameter and type specified in Type. The id and bufferP parameters are unused. Root user authority is required to enable quotas.
Disables disk quotas for the file system specified by the pathname parameter and type specified in Type. The id and bufferP parameters are unused. Root user authority is required to disable quotas.
Retrieves quota limits and current usage for a user, group, or fileset specified by the id parameter. The bufferP parameter points to a gpfs_quotaInfo_t structure to hold the returned information. The gpfs_quotaInfo_t structure is defined in gpfs.h.
Root authority is required if the id value is not the current id (user id for GPFS_USRQUOTA, group id for GPFS_GRPQUOTA) of the caller.
Sets disk quota limits for a user, group, or fileset specified by the id parameter. The bufferP parameter points to a gpfs_quotaInfo_t structure containing the new quota limits. The gpfs_quotaInfo_t structure is defined in gpfs.h. Root user authority is required to set quota limits.
Sets disk quota usage for a user, group, or fileset specified by the id parameter. The bufferP parameter points to a gpfs_quotaInfo_t structure containing the new quota usage. The gpfs_quotaInfo_t structure is defined in gpfs.h. Root user authority is required to set quota usage.
Updates the on disk copy of quota usage information for a file system. The id and bufferP parameters are unused. Root user authority is required to synchronize a file system quota.
If the gpfs_quotactl() subroutine is successful, it returns a value of 0.
If the gpfs_quotactl() subroutine is unsuccessful, it returns a value of -1 and sets the global error variable errno to indicate the nature of the error.
None.
Error codes include but are not limited to the following:
/usr/lpp/mmfs/lib/libgpfs.a for AIX
/usr/lpp/mmfs/lib/libgpfs.so for Linux