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

Name<br />

gpfs_fcntl() – Performs operations on an open file.<br />

Library<br />

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

Synopsis<br />

#include <br />

int gpfs_fcntl(int fileDesc, void* fcntlArgP)<br />

Description<br />

The gpfs_fcntl() subroutine is used to pass file access pattern information <strong>and</strong> to control certain file<br />

attributes on behalf of an open file. More than one operation can be requested with a single invocation of<br />

gpfs_fcntl(). The type <strong>and</strong> number of operations is determined by the second oper<strong>and</strong>, fcntlArgP, which<br />

is a pointer to a data structure built in memory by the application. This data structure consists of:<br />

v A fixed length header, mapped by gpfsFcntlHeader_t.<br />

v A variable list of individual file access hints, directives or other control structures:<br />

– File access hints:<br />

1. gpfsAccessRange_t<br />

2. gpfsFreeRange_t<br />

3. gpfsMultipleAccessRange_t<br />

4. gpfsClearFileCache_t<br />

– File access directives:<br />

1. gpfsCancelHints_t<br />

2. gpfsDataShipMap_t<br />

3. gpfsDataShipStart_t<br />

4. gpfsDataShipStop_t<br />

– Other file attribute operations:<br />

1. gpfsGetFilesetName_t<br />

2. gpfsGetReplication_t<br />

3. gpfsGetSnapshotName_t<br />

4. gpfsGetStoragePool_t<br />

5. gpfsRestripeData_t<br />

6. gpfsSetReplication_t<br />

7. gpfsSetStoragePool_t<br />

The above hints, directives <strong>and</strong> other operations may be mixed within a single gpfs_fcntl() subroutine,<br />

<strong>and</strong> are performed in the order that they appear. A subsequent hint or directive may cancel out a<br />

preceding one. See Chapter 7, “Communicating file access patterns to <strong>GPFS</strong>,” on page 57.<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 />

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