gpfs_cmp_fssnapid() subroutine
Compares two file system snapshot IDs.
Library
GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)
Synopsis
#include <gpfs.h>
int gpfs_cmp_fssnapid(const gpfs_fssnap_id_t *fssnapId1,
const gpfs_fssnap_id_t *fssnapId2,
int *result);
Description
The gpfs_cmp_fssnapid() subroutine
compares two snapshot IDs for the same file system to determine the
order in which the two snapshots were taken. The result parameter
is set as follows:
- result less than zero indicates that snapshot 1 was taken before snapshot 2.
- result equal to zero indicates that snapshot 1 and 2 are the same.
- result greater than zero indicates that snapshot 1 was taken after snapshot 2.
Note: Compile any program that uses this subroutine with
the -lgpfs flag from the following library:
- libgpfs.a for AIX
- libgpfs.so for Linux
Parameters
- fssnapId1
- File system snapshot ID of the first snapshot.
- fssnapId2
- File system snapshot ID of the second snapshot.
- result
- Pointer to an integer indicating the outcome of the comparison.
Exit status
If the gpfs_cmp_fssnapid() subroutine is successful, it returns a value of 0 and the result parameter is set.
If the gpfs_cmp_fssnapid() subroutine is unsuccessful, it returns a value of -1 and the global error variable errno is set to indicate the nature of the error.
Exceptions
None.
Error status
Error codes include but are not limited to the following:
- EDOM
- The two snapshots cannot be compared because they were taken from two different file systems.
- ENOSYS
- The gpfs_cmp_fssnapid() subroutine is not available.
- GPFS_E_INVAL_FSSNAPID
- fssnapId1 or fssnapId2 is not a valid snapshot ID.
Location
/usr/lpp/mmfs/lib/libgpfs.a for AIX
/usr/lpp/mmfs/lib/libgpfs.so for Linux