gpfs_get_fssnaphandle_by_path() subroutine

Obtains a file system snapshot handle using its path name.

Library

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

Synopsis

#include <gpfs.h>
gpfs_fssnap_handle_t *gpfs_get_fssnaphandle_by_path(const char *pathName);

Description

The gpfs_get_fssnaphandle_by_path() subroutine creates a handle for the file system or snapshot that is uniquely identified by a path through the file system's mount point to a file or directory within the file system or snapshot.

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

pathName
A pointer to the path name to a file or directory within the desired file system or snapshot.

Exit status

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

If the gpfs_get_fssnaphandle_by_path() subroutine is unsuccessful, it returns NULL 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:

ENOENT
The path name is not valid.
ENOMEM
Space could not be allocated for the file system snapshot handle.
ENOSYS
The gpfs_get_fssnaphandle_by_path() subroutine is not available.
EPERM
The caller does not have superuser privileges.

Examples

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

Location

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

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