Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ quotactl(2) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

quota(1)

quotacheck(1M)

quotaon(1M)

mount(2)



quotactl(2)                                                        quotactl(2)



NAME
     quotactl - manipulate disk quotas

SYNOPSIS
     #include <sys/types.h>
     #include <sys/quota.h>

int quotactl (int cmd, char *special, int uid, caddrt addr);
DESCRIPTION
The quotactl(2) call manipulates disk quotas for local EFS and XFS
filesystems. cmd indicates a command to be applied to the user ID uid.
special is a pointer to a null-terminated string containing the pathname
of the block special device for the filesystem being manipulated. The
block special device must be mounted as an EFS or XFS filesystem (see
mount(2)). addr is the address of an optional, command specific data
structure which is copied in or out of the system. The interpretation of
addr is given with each command below.
QQUOTAON
Turn on quotas for a filesystem. In EFS, addr points to the pathname
of the file containing the quotas for the filesystem. This quotas
file must exist. In contrast, XFS provides the ability to turn
on/off quota limit enforcement with quota accounting. Therefore, XFS
expects the addr to be a pointer to an unsigned int that contains
the flags XFSQUOTAUDQACCT and/or XFSQUOTAUDQENFD defined in
<sys/quota.h>. This call is restricted to the superuser.
QQUOTAOFF
Turn off quotas for a filesystem. As in Q_QUOTAON, XFS filesystems
expect a pointer to an unsigned int that specifies whether quota
accounting and/or limit enforcement need to be turned off. The uid
field is ignored. EFS ignores the addr field as well. This call is
restricted to the superuser.
QGETQUOTA
Get disk quota limits and current usage for user uid. addr is a
pointer to a dqblk structure (defined in <sys/quota.h> ). Only the
superuser may get the quotas of a user other than himself.
QSETQUOTA
Set disk quota limits and current usage for user uid. addr is a
pointer to a dqblk structure (defined in <sys/quota.h> ). This call
is restricted to the superuser, and is not supported in XFS.
QSETQLIM
Set disk quota limits for user uid. addr is a pointer to a dqblk
structure (defined in <sys/quota.h> ). This call is restricted to
the superuser.
Page 1


quotactl(2)                                                        quotactl(2)



     QSYNC
          Update the on-disk copy of quota usages for an EFS filesystem.  If
          special is null then all filesystems with active quotas are sync'ed.
          addr and uid are ignored. This option is not supported in XFS since
          sync(1M) writes quota information to disk as well.

     QACTIVATE
          If quotas are not already enabled, this call will permit queries and
          updates to be made to the quota file without enabling quotas.  addr
          points to the pathname of the file containing the quotas for the EFS
          filesystem.  The quota file must exist. This command is not
          applicable to XFS filesystems.

     QXGETQUOTA
     QXSETQLIM
          These are extensions to Q_GETQUOTA and Q_SETQLIM respectively to
          support the added functionalities of XFS filesystems. Instead of a
          dqblk structure, these commands expect a fsdiskquota structure
          defined in <sys/quota.h>.

     QGETQSTAT
          Returns a fsquotastat structure containing XFS filesystem specific
          quota information. This is useful in finding out how much space is
          spent to store quota information, and also to get quotaon/off status
          of a given local XFS filesystem.

     QQUOTARM
          Free the disk space taken by disk quotas. Quotas must have already
          been turned off.

RETURN VALUE
     Upon successful completion, a value of 0 is returned.  Otherwise, a value
     of -1 is returned and errno is set to indicate the error.

ERRORS
     A quotactl(2) call will fail when one of the following occurs:

     EINVAL
          cmd is invalid.

     ESRCH
          Quotas have not been turned on for this filesystem.

     EPERM
          The call is privileged and the caller was not the superuser.

     ENODEV
          special is not a mounted EFS or XFS filesystem.

     ENOTBLK
          special is not a block device.




                                                                        Page 2





quotactl(2)                                                        quotactl(2)



     EACCES
          (QQUOTAON) The quota file pointed to by addr exists but is either
          not a regular file or is not on the EFS filesystem pointed to by
          special or is not owned by root.

     ENOSPC
          The quota table is full. Doesn't apply to XFS filesystems since XFS
          dynamically allocates space for quota information.

     EEXIST
          QQUOTAON attempted on a filesystem where quotas have already been
          turned on or QQUOTAOFF attempted on a filesystem where quotas have
          not been turned on.

     ENOENT
          The file specified by special or addr does not exist.

     EFAULT
          addr or special are invalid.

     ENOTSUP
          cmd is not supported by the given filesystem.

BUGS
     XFS currently does not support the Q_GETQUOTA and Q_SETQLIM commands.

     EFS does not support commands such as Q_XGETQUOTA and Q_XSETQLIM that
     take in a fsdiskquota structure.

SEE ALSO
     quota(1), quotacheck(1M), quotaon(1M), mount(2)
























                                                                        Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026