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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

gpfs_get_snapname_from_fssnaph<strong>and</strong>le() Subroutine<br />

Name<br />

gpfs_get_snapname_from_fssnaph<strong>and</strong>le() - Obtains the name of the snapshot identified by the <strong>GPFS</strong><br />

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

Library<br />

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

Synopsis<br />

#include <br />

const char *gpfs_get_snapname_from_fssnaph<strong>and</strong>le<br />

(gpfs_fssnap_h<strong>and</strong>le_t *fssnapH<strong>and</strong>le);<br />

Description<br />

The gpfs_get_snapname_from_fssnaph<strong>and</strong>le() subroutine obtains a pointer to the name of a <strong>GPFS</strong><br />

snapshot given its file system snapshot h<strong>and</strong>le. If the fssnapH<strong>and</strong>le identifies an active file system, as<br />

opposed to a snapshot of a file system, gpfs_get_snapname_from_fssnaph<strong>and</strong>le() returns a pointer to a<br />

zero-length snapshot name <strong>and</strong> a successful return code.<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 />

fssnapH<strong>and</strong>le File system snapshot h<strong>and</strong>le.<br />

Exit status<br />

If the gpfs_get_snapname_from_fssnaph<strong>and</strong>le() subroutine is successful, it returns a pointer to the<br />

name of the snapshot.<br />

If the gpfs_get_snapname_from_fssnaph<strong>and</strong>le() subroutine is unsuccessful, it returns NULL <strong>and</strong> sets<br />

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

Exceptions<br />

None.<br />

Error status<br />

ENOSYS The gpfs_get_snapname_from_fssnaph<strong>and</strong>le() subroutine is not available.<br />

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

<strong>GPFS</strong>_E_INVAL_FSSNAPHANDLE<br />

The file system snapshot h<strong>and</strong>le is not valid.<br />

<strong>GPFS</strong>_E_INVAL_SNAPNAME<br />

The snapshot has been deleted.<br />

Location<br />

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

304 <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!