gpfs_get_snapdirname() subroutine

Obtains the name of the directory containing global snapshots.

Library

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

Synopsis

#include <gpfs.h>
int gpfs_get_snapdirname(gpfs_fssnap_handle_t *fssnapHandle,
                         char *snapdirName,
                         int bufLen); 

Description

The gpfs_get_snapdirname() subroutine obtains the name of the directory that contains global snapshots.

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.
snapdirName
Buffer into which the name of the snapshot directory will be copied.
bufLen
The size of the provided buffer.

Exit status

If the gpfs_get_snapdirname() subroutine is successful, it returns a value of 0 and the snapdirName and bufLen parameters are set.

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

ENOMEM
Unable to allocate memory for the request.
ENOSYS
The gpfs_get_snapdirname() subroutine is not available.
EPERM
The caller does not have superuser privileges.
ERANGE
The buffer is too small to return the snapshot directory name.
ESTALE
The cached file system information was not valid.
GPFS_E_INVAL_FSSNAPHANDLE
The file system snapshot handle is not valid.
E2BIG
The buffer is too small to return the snapshot directory name.

Location

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

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