svcadm(1M)을 검색하려면 섹션에서 1M 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
reflink(3c)
Standard C Library Functions reflink(3C)
NAME
reflink, reflinkat - fast copy source file to destination file
SYNOPSIS
int reflink(const char *path1, const char *path2, int preserve);
int reflinkat(int fd1, const char *path1,
int fd2, const char *path2,
int preserve, int flags);
DESCRIPTION
The reflink() function creates the file named by path2 with the con‐
tents of the file named by path1. The reflink() function does not read
or write the underlying data blocks. The path1 argument points to a
path name naming an existing file. The path2 argument points to a path
name naming the new directory entry to be created.
Both files must be in the same ZFS pool. The files named by path1 and
path2 should not be directories. The reflink() function will not create
directories. Path2 directory should not be read-only.
Upon successful completion, the reflink() function marks to update the
st_ctime field of the file. Also, the st_ctime and st_mtime fields of
the directory that contain the new entry are marked for update.
If the reflinkat() function is passed, the special value AT_FDCWD in
the fd1 or fd2 parameter uses the current working directory for the
respective path argument. If the AT_SYMLINK_FOLLOW flag is set in the
flag argument and the path1 argument names a symbolic link, the sym‐
bolic link path1 is dereferenced to provide the source of the reflink.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned,
no link is created, and errno is set to indicate the error.
ERRORS
The reflink() and reflinkat() functions will fail if:
EACCES A component of either path prefix denies search permis‐
sion, or the requested link requires writing in a
directory with a mode that denies write permission.
EBADF The path1 or path2 argument does not specify an abso‐
lute path and the fd1 or fd2 argument, respectively, is
neither AT_FDCWD nor a valid file descriptor open for
reading.
EDQUOT The directory where the entry for the new link is being
placed cannot be extended because the user's quota of
disk blocks on that file system has been exhausted.
EFAULT The path1 or path2 argument points to an illegal
address.
EILSEQ The path argument includes non-UTF-8 characters and the
file system accepts only file names where all charac‐
ters are part of the UTF-8 character codeset.
EINTR A signal is caught during the execution of the
reflink() function.
EINVAL The value of the preserve or flag argument is not
valid.
ELOOP Too many symbolic links were encountered in translating
path.
ENAMETOOLONG The length of the path1 or path2 argument exceeds
PATH_MAX, or the length of a path1 or path2 component
exceeds NAME_MAX while _POSIX_NO_TRUNC is in effect.
ENOENT The path1 or path2 argument is a null path name. A com‐
ponent of either path prefix does not exist, or the
file named by path1 does not exist.
ENOTDIR The path1 or path2 argument is not an absolute path and
fd1 or fd2, respectively, is neither AT_FDCWD nor a
file descriptor associated with a directory.
ENOTSUP Operation not supported.
EPERM The file named by path1 is a directory.
The effective user ID does not match the owner of the
file and the {PRIV_FILE_LINK_ANY} privilege is not
asserted in the effective set of the calling process.
EROFS The path2 filesystem is read-only.
EXDEV The path1 and path2 filesystems are not in the same
pool, or path1 and path2 are in different filesystems
with one or or both having encryption enabled.
EEXIST The file named by path2 is an existing file.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelAsync-Signal-
Safe _ StandardSee standards(7)
SEE ALSO
attributes(7), privileges(7), standards(7)
Oracle Solaris 11.4 15 Mar 2017 reflink(3C)