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

Name<br />

gpfs_cmp_fssnapid() - Compares two snapshot IDs for the same file system to determine the order in<br />

which the two snapshots were taken.<br />

Library<br />

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

Synopsis<br />

#include <br />

int gpfs_cmp_fssnapid (const gpfs_fssnap_id_t *fssnapId1,<br />

const gpfs_fssnap_id_t *fssnapId2,<br />

int *result);<br />

Description<br />

The gpfs_cmp_fssnapid() subroutine compares two snapshot IDs for the same file system to determine<br />

the order in which the two snapshots were taken. The result parameter is set as follows:<br />

v result less than zero indicates that snapshot 1 was taken before snapshot 2.<br />

v result equal to zero indicates that snapshot 1 <strong>and</strong> 2 are the same.<br />

v result greater than zero indicates that snapshot 1 was taken after snapshot 2.<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 />

fssnapId1 File system snapshot ID of the first snapshot.<br />

fssnapId2 File system snapshot ID of the second snapshot.<br />

result Pointer to an integer indicating the outcome of the comparison.<br />

Exit status<br />

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

set as described above.<br />

If the gpfs_cmp_fssnapid() 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 />

EDOM The two snapshots cannot be compared because they were taken from two different file<br />

systems.<br />

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

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

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

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

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

Saved successfully!

Ooh no, something went wrong!