gpfs_clone_split() subroutine
Splits a file clone from its clone parent.
Library
GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)
Synopsis
#include <gpfs.h>
int gpfs_clone_split(gpfs_file_t fileDesc, int ancLimit);
Description
The gpfs_clone_split() subroutine splits a file clone from its clone parent. The gpfs_declone() subroutine must be called first to remove all references to the clone parent.
Parameters
- fileDesc
- File descriptor for the file clone to split from its clone parent.
- ancLimit
- The ancestor limit specified with one of these values:
- GPFS_CLONE_ALL
- Remove references to all clone parents.
- GPFS_CLONE_PARENT_ONLY
- Remove references from the immediate clone parent only.
Exit status
If the gpfs_clone_split() subroutine is successful, it returns a value of 0.
If the gpfs_clone_split() subroutine is unsuccessful, it returns a value of -1 and sets the global error variable errno to indicate the nature of the error.
Exceptions
None.
Error status
Error codes include but are not limited to the following:
- EACCESS
- Permission denied when writing to the target file.
- EBADF
- The file descriptor is not valid or is not a GPFS file.
- EINVAL
- An argument to the function was not valid.
- ENOSYS
- The gpfs_clone_split() subroutine is not available.
- EPERM
- The file descriptor does not refer to a regular file or a file clone.
Location
/usr/lpp/mmfs/lib/libgpfs.a for AIX
/usr/lpp/mmfs/lib/libgpfs.so for Linux