quotactl(4i) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

quotactl(4i)

quotactl(4I)      Ioctls for a class of drivers or subsystems     quotactl(4I)

NAME
       quotactl - manipulate UFS disk quotas

SYNOPSIS
       #include <sys/fs/ufs_quota.h>

       int ioctl(int fd, Q_QUOTACTL, struct quotcl *qp);

DESCRIPTION
       This ioctl() call manipulates disk quotas on UFS filesystems. fd is the
       file  descriptor  returned  by the open() system call after opening the
       quotas file (located in the root directory of  the  filesystem  running
       quotas).  Q_QUOTACTL  is defined in /usr/include/sys/fs/ufs_quota.h. qp
       is the address of the quotctl structure which is defined as

         struct quotctl {
           int op;
           uid_t uid;
           caddr_t addr;
         };



       op indicates an operation to be applied to the user ID  uid.  (See  be‐
       low.) addr is the address of an optional, command specific, data struc‐
       ture  which  is  copied  in or out of the system. The interpretation of
       addr is given with each value of op below.

       Q_QUOTAON     Turn on quotas for a file system. addr points to the full
                     pathname of the quotas file. uid is ignored. It is recom‐
                     mended that uid have the value of 0. This  call  requires
                     the {PRIV_SYS_MOUNT} privilege.


       Q_QUOTAOFF    Turn  off  quotas for a file system. addr and uid are ig‐
                     nored. It is recommended that addr have the value of NULL
                     and uid have the value  of  0.  This  call  requires  the
                     {PRIV_SYS_MOUNT} privilege.


       Q_GETQUOTA    Get  disk  quota  limits  and current usage for user uid.
                     addr is a  pointer  to  a  dqblk  structure  (defined  in
                     <sys/fs/ufs_quota.h>).  All users may get their own quota
                     information, the {PRIV_SYS_MOUNT} privilege  is  required
                     to get the quota information for another user.


       Q_SETQUOTA    Set  disk  quota  limits  and current usage for user uid.
                     addr is a  pointer  to  a  dqblk  structure  (defined  in
                     sys/fs/ufs_quota.h).     This     call    requires    the
                     {PRIV_SYS_MOUNT} privilege.


       Q_SETQLIM     Set disk quota limits for user uid. addr is a pointer  to
                     a  dqblk  structure (defined in sys/fs/ufs_quota.h). This
                     call requires the {PRIV_SYS_MOUNT} privilege.


       Q_SYNC        Update the on-disk copy of quota  usages  for  this  file
                     system. addr and uid are ignored.


       Q_ALLSYNC     Update the on-disk copy of quota usages for all file sys‐
                     tems with active quotas. addr and uid are ignored.


RETURN VALUES
       This ioctl() returns:

       0        on success.


       −1       on failure and sets errno to indicate the error.


ERRORS
       EFAULT    addr is invalid.


       EINVAL    op is invalid.


       ENOENT    The quotas file specified by addr does not exist.


       EPERM     The call is privileged and the calling process did not assert
                 {PRIV_SYS_MOUNT} in the effective set.


       ESRCH     No  disk  quota  is found for the indicated user. Quotas have
                 not been turned on for this file system.


       EUSERS    The quota table is full.



       If op is Q_QUOTAON, ioctl() may set errno to:

       EACCES    The quota file pointed to by addr exists but is not a regular
                 file. The quota file pointed to by addr exists but is not  on
                 the file system pointed to by special.


       EIO       Internal  I/O  error while attempting to read the quotas file
                 pointed to by addr.


FILES
       /usr/include/sys/fs/ufs_quota.h

           quota-related structure/function definitions and defines


SEE ALSO
       getrlimit(2),  mount(2),  ufs(4FS),   privileges(7),   quota(8),   quo‐
       tacheck(8), quotaon(8)

NOTES
       ZFS  has  a  different quota implementation that does not support these
       ioctl calls.

Oracle Solaris 11.4               14 Jun 2024                     quotactl(4I)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3