gpfs_get_fssnapid_from_fssnaphandle() subroutine

Obtains a file system snapshot ID using its handle.

Library

GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)

Synopsis

#include <gpfs.h>
int gpfs_get_fssnapid_from_fssnaphandle(gpfs_fssnap_handle_t *fssnapHandle,
                                        gpfs_fssnap_id_t *fssnapId);

Description

The gpfs_get_fssnapid_from_fssnaphandle() subroutine obtains the permanent, globally unique file system snapshot ID of the file system or snapshot identified by the open file system snapshot handle.

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

fssnapHandle
File system snapshot handle.
fssnapId
File system snapshot ID.

Exit status

If the gpfs_get_fssnapid_from_fssnaphandle() subroutine is successful, it returns a pointer to the file system snapshot ID.

If the gpfs_get_fssnapid_from_fssnaphandle() 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:

EFAULT
Size mismatch for fssnapId.
EINVAL
NULL pointer given for returned fssnapId.
ENOSYS
The gpfs_get_fssnapid_from_fssnaphandle() subroutine is not available.
GPFS_E_INVAL_FSSNAPHANDLE
The file system snapshot handle is not valid.

Examples

For an example using gpfs_get_fssnapid_from_fssnaphandle(), see /usr/lpp/mmfs/samples/util/tsinode.c.

Location

/usr/lpp/mmfs/lib/libgpfs.a for AIX

/usr/lpp/mmfs/lib/libgpfs.so for Linux