gpfs_declone() subroutine
Removes file clone references to clone parent blocks.
Library
GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)
Synopsis
#include <gpfs.h>
int gpfs_declone(gpfs_file_t fileDesc, int ancLimit, gpfs_off64_t nBlocks,
gpfs_off64_t *offsetP);
Description
The gpfs_declone() subroutine removes all file clone references to a clone parent by copying the clone parent blocks to the file clone.
Parameters
- fileDesc
- The file descriptor for the file clone.
- 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.
- nBlocks
- The maximum number of GPFS blocks to copy.
- offsetP
- A pointer to the starting offset within the file clone. This pointer will be updated to the offset of the next block to process or -1 if there no more blocks.
Exit status
If the gpfs_declone() subroutine is successful, it returns a value of 0.
If the gpfs_declone() 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.
- EFAULT
- The input argument points outside the accessible address space.
- EINVAL
- An argument to the function was not valid.
- ENOSPC
- The file system has run out of disk space.
- ENOSYS
- The gpfs_declone() subroutine is not available.
- EPERM
- The file descriptor does not refer to a regular file.
Location
/usr/lpp/mmfs/lib/libgpfs.a for AIX
/usr/lpp/mmfs/lib/libgpfs.so for Linux