dgsetcpdlimits(2) DG/UX 4.30 dgsetcpdlimits(2)
NAME
dg_set_cpd_limits - Change the resource limits of a control
point directory.
SYNOPSIS
#include <sys/dg_cpd.h>
int dg_set_cpd_limits (path, blocks, file_nodes)
char * path;
unsigned long blocks;
unsigned long file_nodes;
PARAMETERS
path Pathname of the CPD to be changed.
blocks New block allocation ceiling.
file_nodes 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 file_nodes file nodes. The new CPD limits will
be visible in subsequent dgstat calls on path:the
max_cpd_blocks field will be blocks and the
max_cpd_file_nodes field will be file_nodes.
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 file_nodes, 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 file_nodes
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
Licensed material--property of copyright holder(s) Page 1
dgsetcpdlimits(2) DG/UX 4.30 dgsetcpdlimits(2)
blocks in use by path and its space descendants, or that
file_nodes be greater than the current number of file nodes
in use by path and its space descendants.
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.
EXCEPTIONS
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 file_nodes
parameter is not in the range 0 to
DG_CPD_NO_FILE_NODE_LIMIT.
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.
Licensed material--property of copyright holder(s) Page 2
dgsetcpdlimits(2) DG/UX 4.30 dgsetcpdlimits(2)
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 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
dg_mknod(2), rmdir(2),
mkdir(1), rmdir(1),
dg_stat(5).
Licensed material--property of copyright holder(s) Page 3