CHFSTORE(2,L) AIX Technical Reference CHFSTORE(2,L)
-------------------------------------------------------------------------------
chfstore
PURPOSE
Changes replicated storage attribute of a file.
SYNTAX
#include <sys/types.h>
int chfstore (path, fstore)
char *path;
fstore_t fstore;
DESCRIPTION
The chfstore system call sets the replicated storage attribute of the file
named by path to the bit pattern contained in fstore. If the file does not
reside on a replicated file system, chfstore has no effect and does not return
an error.
The fstore bits are used to determine whether a copy of a file is stored in a
nonprimary, nonbackbone copy of a replicated file system. Each copy of a
replicated file system contains an fstore field in the super block. The system
stores the file on those copies where the bitwise AND of the file's fstore
field and the copy's fstore field is nonzero.
If the last component of path is a symbolic link, chfstore changes the fstore
bits on the symbolic link rather than the file pointed to by the symbolic link.
The effective user ID of the process must match the owner of the file or be
superuser to change the fstore of a file.
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.
ERROR CONDITIONS
The chfstore system call fails and the replicated storage attribute is
unchanged if one or more of the following are true:
EPERM The effective user ID does not match the owner of the file and the
effective user ID is not superuser.
EROFS The named file resides in a replicated file system in which the
primary copy is unavailable, or in a replicated file system which has
been mounted read-only.
Processed November 7, 1990 CHFSTORE(2,L) 1
CHFSTORE(2,L) AIX Technical Reference CHFSTORE(2,L)
ENOTDIR A component of the path prefix is not a directory.
ENOENT The named file does not exist.
ENOENT A null path name is provided.
ENOENT A hidden directory is named, but no component inside it matches the
process's current site path list.
ENOENT A symbolic link is named, but the file to which it refers does not
exist. (Since chfstore does not follow a symbolic link when it is
the last component of the path, this error cannot occur on the last
component).
EACCES Search permission is denied on a component of the path prefix.
EFAULT path points outside the process's allocated address space.
If the Transparent Computing Facility is installed on your system chfstore
could fail if the following is true:
EINTR A signal was caught during the chfstore system call. This can occur
if the internal open of this file is suspended because of a topology
change.
ESITEDN1 path cannot be accessed because a site went down.
ESITEDN2 The operation was terminated because a site failed.
ENOSTORE path is a name relative to the working directory, but no site which
stores this directory is currently up.
ENOSTORE A component of path is replicated but is not stored on any site which
is currently up.
ELOOP A loop of symbolic links was detected. Since chfstore does not
follow a symbolic link when it is the last component of the path,
this error cannot occur on the last component.
RELATED INFORMATION
In this book: "fs."
The chfstore and store commands in AIX Operating System Commands Reference.
Processed November 7, 1990 CHFSTORE(2,L) 2