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

Name<br />

gpfs_iclose() - Closes a file given its inode file 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 />

int gpfs_iclose(gpfs_ifile_t *ifile);<br />

Description<br />

The gpfs_iclose() subroutine closes an open file descriptor created by gpfs_iopen().<br />

For an overview of using gpfs_iclose() in a backup application, see “Using APIs to develop backup<br />

applications” on page 24.<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 />

ifile Pointer to gpfs_ifile_t from gpfs_iopen().<br />

Exit status<br />

If the gpfs_iclose() subroutine is successful, it returns a value of 0.<br />

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

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

Exceptions<br />

None.<br />

Error status<br />

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

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

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

Examples<br />

For an example using gpfs_iclose(), 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 />

Chapter 9. <strong>GPFS</strong> programming interfaces 309

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

Saved successfully!

Ooh no, something went wrong!