gpfs_igetstoragepool() subroutine
Returns the name of the storage pool for the given storage pool ID.
Library
GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)
Synopsis
#include <gpfs.h>
int gpfs_igetstoragepool(gpfs_iscan_t *iscan,
unsigned int dataPoolId,
void *buffer,
int bufferSize);
Description
The gpfs_igetstoragepool() subroutine is part of the backup by inode interface. The caller provides a pointer to the scan descriptor used to obtain the storage pool ID. This routine returns the name of the storage pool for the given storage pool ID. The name is the null-terminated string provided by the administrator when the storage pool was defined. The maximum string length is GPFS_MAXNAMLEN, which is defined in /usr/lpp/mmfs/include/gpfs.h.
- This routine is not thread safe. Only one thread at a time is allowed to invoke this routine for the given scan descriptor.
- Compile any program that uses this subroutine with the -lgpfs flag
from the following library:
- libgpfs.a for AIX
- libgpfs.so for Linux
Parameters
- iscan
- Pointer to gpfs_iscan_t used to obtain the storage pool ID.
- dataPoolId
- The storage pool ID.
- buffer
- Pointer to buffer for returned attributes.
- bufferSize
- Size of the buffer.
Exit status
If the gpfs_igetstoragepool() subroutine is successful, it returns a value of 0.
If the gpfs_igetstoragepool() subroutine is unsuccessful, it returns a value of -1 and sets the global error variable errno to indicate the nature of the error.
Exceptions
None.
Error status
Error codes include but are not limited to the following:
- E2BIG
- The buffer is too small to return the storage pool name.
- EINTR
- The call was interrupted. This routine is not thread safe.
- EINVAL
- The storage pool ID is not valid.
- ENOMEM
- Unable to allocate memory for the request.
- ENOSYS
- The gpfs_igetstoragepool() subroutine is not available.
- EPERM
- The caller does not have superuser privileges.
- ESTALE
- The cached storage pool information was not valid.
- GPFS_E_INVAL_ISCAN
- The iscan parameters were not valid.
Examples
gpfs_iscan_t *fsInodeScanP;
gpfs_igetstoragepool(fsInodeScanP,StgpoolIdBuffer, &StgpoolNameBuffer,StgpoolNameSize);
Location
/usr/lpp/mmfs/lib/libgpfs.a for AIX
/usr/lpp/mmfs/lib/libgpfs.so for Linux