29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gpfs_get_fssnaph<strong>and</strong>le_by_path() Subroutine<br />

Name<br />

gpfs_get_fssnaph<strong>and</strong>le_by_path() – Obtains a <strong>GPFS</strong> file system snapshot h<strong>and</strong>le given a path to the<br />

file system or snapshot.<br />

Library<br />

<strong>GPFS</strong> Library (libgpfs.a for AIX, libgpfs.so for Linux)<br />

Synopsis<br />

#include <br />

gpfs_fssnap_h<strong>and</strong>le_t *gpfs_get_fssnaph<strong>and</strong>le_by_path<br />

(const char *pathName);<br />

Description<br />

The gpfs_get_fssnaph<strong>and</strong>le_by_path() subroutine creates a h<strong>and</strong>le for the file system or snapshot that<br />

is uniquely identified by a path through the file system’s mount point to a file or directory within the file<br />

system or snapshot.<br />

Notes:<br />

1. Compile any program that uses this subroutine with the -lgpfs flag from the following library:<br />

v libgpfs.a for AIX<br />

v libgpfs.so for Linux<br />

Parameters<br />

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

Exit status<br />

If the gpfs_get_fssnaph<strong>and</strong>le_by_path() subroutine is successful, it returns a pointer to the file system<br />

snapshot h<strong>and</strong>le.<br />

If the gpfs_get_fssnaph<strong>and</strong>le_by_path() subroutine is unsuccessful, it returns NULL <strong>and</strong> sets the global<br />

error variable errno to indicate the nature of the error.<br />

Exceptions<br />

None.<br />

Error status<br />

ENOENT The path name is not valid.<br />

ENOMEM Space could not be allocated for the file system snapshot h<strong>and</strong>le.<br />

ENOSYS The gpfs_get_fssnaph<strong>and</strong>le_by_path() subroutine is not available.<br />

EPERM The caller does not have superuser privileges.<br />

Examples<br />

For an example using gpfs_get_fssnaph<strong>and</strong>le_by_path(), see /usr/lpp/mmfs/samples/util/tsbackup.C.<br />

Location<br />

/usr/lpp/mmfs/lib/libgpfs.a for AIX, /usr/lpp/mmfs/lib/libgpfs.so for Linux<br />

298 <strong>GPFS</strong>: <strong>Administration</strong> <strong>and</strong> <strong>Programming</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!