Start of change

gpfs_stat_x() subroutine

Returns extended status information for a GPFS™ file with specified accuracy.

Library

GPFS library. Runs on Linux, AIX®, and Windows.

Synopsis

#include <gpfs.h>
int gpfs_stat_x(const char *pathname, 
            unsigned int *st_litemask,
            gpfs_iattr64_t *iattr,
            size_t iattrBufLen);

Description

The gpfs_stat_x() subroutine is similar to the gpfs_stat() 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.

Note: Compile any program that uses this subroutine with the -lgpfs flag from the following library:
  • libgpfs.so for Linux

Parameters

*pathname
A pointer to the path of the 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 system is using.

Exit status

If the gpfs_stat_x() subroutine is successful, it returns a value of 0.

If the gpfs_stat_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:

EINVAL
The path name does not refer to a GPFS file or a regular file.
ENOENT
The file does not exist.
ENOSYS
The gpfs_stat_x() subroutine is not supported under the current file system format.
ESTALE
The cached file system information was invalid.

Location

/usr/lpp/mmfs/lib

End of change