gpfs_fstat_x() subroutine
Returns extended status information for a GPFS™ file with specified accuracy.
Library
GPFS library. Runs on AIX®, Linux, and Windows.
Synopsis
#include <gpfs.h>
int gpfs_fstat_x(gpfs_file_t fileDesc,
unsigned int *st_litemask,
gpfs_iattr64_t *iattr,
size_t iattrBufLen);
Description
The gpfs_fstat_x() subroutine is similar to the gpfs_fstat() subroutine but returns more information in a gpfs_iattr64 structure that is defined in gpfs.h. This subroutine is supported only on the Linux operating system.
Your program must verify that the version of the gpfs_iattr64 structure that is returned in the field ia_version is the same as the version that you are using. Versions are defined in gpfs.h with the pattern GPFS_IA64_VERSION*.
File permissions read, write, and execute are not required for the specified file, but all the directories in the specified path must be searchable.
- libgpfs.so for Linux
Parameters
- gpfs_file_t fileDesc
- The file descriptor of a file for which information is requested.
- *st_litemask
- A pointer to a bitmask specification of the items that you want to be returned exactly. Bitmasks are defined in gpfs.h with the pattern GPFS_SLITE_*BIT. The subroutine returns exact values for the items that you specify in the bitmask. The subroutine also sets bits in the bitmask to indicate any other items that are exact.
- *iattr
- A pointer to a gpfs_iattr64_t structure in which the information is returned. The structure is described in the gpfs.h file.
- iattrBufLen
- The length of your gpfs_iattr64_t structure, as given by sizeof(myStructure). The subroutine does not write data past this limit. The field ia_reclen in the returned structure is the length of the gpfs_iattr64_t structure that the subroutine is using.
Exit status
If the gpfs_fstat_x() subroutine is successful, it returns a value of 0.
If the gpfs_fstat_x() 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 errors:
- EBADF
- The file handle does not refer to an existing or accessible object.
- ENOSYS
- The gpfs_fstat_x() subroutine is not supported under the current file system format.
- ESTALE
- The cached file system information was invalid.
Location
/usr/lpp/mmfs/lib