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_snapdirname() Subroutine<br />

Name<br />

gpfs_get_snapdirname() – Obtains the name of the directory containing snapshots.<br />

Library<br />

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

Synopsis<br />

#include <br />

int gpfs_get_snapdirname(gpfs_fssnap_h<strong>and</strong>le_t *fssnapH<strong>and</strong>le,<br />

char *snapdirName, int bufLen);<br />

Description<br />

The gpfs_get_snapdirname() subroutine obtains the name of the directory that is used to contain<br />

snapshots.<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 />

snapdirName Buffer into which the name of the snapshot directory will be copied.<br />

bufLen The size of the provided buffer.<br />

Exit status<br />

If the gpfs_get_snapdirname() subroutine is successful, it returns a value of 0 <strong>and</strong> the snapdirName <strong>and</strong><br />

bufLen parameters are set as described above.<br />

If the gpfs_get_snapdirname() subroutine is unsuccessful, it returns a value of -1 <strong>and</strong> the global error<br />

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

Exceptions<br />

None.<br />

Error status<br />

ENOMEM Unable to allocate memory for this request.<br />

ENOSYS The gpfs_get_snapdirname() subroutine is not available.<br />

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

ERANGE The buffer is too small to return the snapshot directory name.<br />

ESTALE The cached file system information was not valid.<br />

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

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

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