Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dg_set_cpd_limits(2) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mkdir(1)

rmdir(1)

rmdir(2)



dg_set_cpd_limits(2)           DG/UX 5.4R3.00           dg_set_cpd_limits(2)


NAME
       dgsetcpdlimits - change the resource limits of a control point
       directory

SYNOPSIS
       #include <sys/dgcpd.h>

       int  dgsetcpdlimits (path, blocks, filenodes)
       char * path;
       unsigned long blocks;
       unsigned long filenodes;

   where:
       path           Pathname of the CPD to be changed

       blocks         New block allocation ceiling

       filenodes     New file node allocation ceiling

DESCRIPTION
       The dgsetcpdlimits system call changes the limits associated with
       a control point directory.  The path parameter points to a pathname
       naming a control point directory (terminal symbolic links are
       followed in path).  If the calling process has the appropriate access
       to path (see below), the CPD limits of path are set to blocks disk
       blocks and filenodes file nodes.  The new CPD limits will be visible
       in subsequent dgstat calls on path: the maxcpdblocks field will be
       blocks and the maxcpdfilenodes field will be filenodes.

       The effects of a CPD's limits on its space descendants (those files
       and directories which are below path and not across a file system
       mount point boundary from it) are as follows: If the current number
       of disk blocks used by path and all its space descendants equals or
       exceeds blocks, all attempts to allocate blocks to path or one of its
       space descendants will fail with the error ENOSPC.  Likewise, if the
       total number of file nodes used by path and all its space descendants
       equals or exceeds filenodes, all attempts to allocate more file
       nodes below path will fail with the error ENOSPC.  The only exception
       to these rules is that the superuser may override the CPD limits of
       the root directory of a file system (which is always a CPD), though
       obviously not in excess of the actual physical resources in the file
       system.

       The blocks parameter can be set to any number between 0 and
       DG_CPD_NO_BLOCK_LIMIT, inclusive.  Likewise, the filenodes parameter
       can be set to any number between 0 and DG_CPD_NO_FILE_NODE_LIMIT,
       inclusive.  Note that it is not required that blocks be greater than
       the current number of blocks in use by path and its space
       descendants, or that filenodes be greater than the current number of
       file nodes in use by path and its space descendants.

       The last component of path may not be "." or "..".  Use an absolute
       pathname instead.




Licensed material--property of copyright holder(s)                         1




dg_set_cpd_limits(2)           DG/UX 5.4R3.00           dg_set_cpd_limits(2)


ACCESS CONTROL
       The calling process must have write access to the parent directory of
       path, unless path is the root of a file system.  In that case, only
       the superuser may make this call.

       The process must have permission to resolve path .

RETURN VALUE
       0      The limits of the control-point directory path were
              successfully modified.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EINVAL         The named file path exists but it is not a control
                      point directory; or the blocks parameter is not in the
                      range 0 to DG_CPD_NO_BLOCK_LIMIT; or the filenodes
                      parameter is not in the range 0 to
                      DG_CPD_NO_FILE_NODE_LIMIT; or the last component of
                      the path is "." or "..".

       ENOTSUPPORTED  The operation is not supported because the referenced
                      file is an NFS file.

       EPERM          The CPD denoted by path is the root of a file system,
                      and the process's effective user-ID is not superuser.

       EACCES         The CPD denoted by path is not the root of a file
                      system, and the process does not have write permission
                      in the parent directory of path.

       EROFS          The named file resides on a file system device mounted
                      read-only.

       ENOENT         The file the pathname resolved to does not exist.

       ENOENT         A non-terminal component of the pathname does not
                      exist.

       ENOTDIR        A non-terminal component of the pathname was not a
                      directory or symbolic link.

       ENAMETOOLONG   The pathname exceeds the length limit for pathnames.

       ENAMETOOLONG   A component of the pathname exceeds the length limit
                      for filenames.

       ENOMEM         There are not enough system resources to resolve the
                      pathname or to expand a symbolic link.

       ELOOP          The number of symbolic links encountered during
                      pathname resolution exceeded MAXSYMLINKS.  A symbolic



Licensed material--property of copyright holder(s)                         2




dg_set_cpd_limits(2)           DG/UX 5.4R3.00           dg_set_cpd_limits(2)


                      link cycle is suspected.

       EPERM          The pathname contains a character not in the allowed
                      character set.

       EFAULT         The pathname does not completely reside in the
                      process's address space or the pathname does not
                      terminate in the process's address space.

       EACCES         The calling process does not have permission to
                      resolve the pathname.

SEE ALSO
       mkdir(1), rmdir(1), dgmknod(2), rmdir(2), dgstat(5).











































Licensed material--property of copyright holder(s)                         3


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