gpfs_stat_inode64() subroutine

Seeks the specified inode and retrieves that inode and its extended attributes from the inode scan.

Library

GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)

Synopsis

#include <gpfs.h>
int gpfs_stat_inode64(gpfs_iscan_t *iscan,
                      gpfs_ino64_t ino,
                      gpfs_ino64_t termIno,
                      const gpfs_iattr64_t **iattr);

Description

The gpfs_stat_inode64() subroutine is used to seek the specified inode and to retrieve that inode and its extended attributes from the inode scan. This subroutine combines gpfs_seek_inode64() and get_next_inode64(), but will only return the specified inode.

The data returned by gpfs_next_inode64() is overwritten by subsequent calls to gpfs_next_inode64(), gpfs_seek_inode64(), or gpfs_stat_inode64().

The termIno parameter provides a way to partition an inode scan so it can be run on more than one node. It is only used by this call to control prefetching.

Note: 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
A pointer to an inode scan descriptor.
ino
The inode number to be returned.
termIno
Prefetches inodes up to this inode. The caller might specify maxIno from gpfs_open_inodescan() or 0 to allow prefetching over the entire inode file.
iattr
A pointer to the returned pointer to the file's iattr.

Exit status

If the gpfs_stat_inode64() subroutine is successful, it returns a value of 0 and the iattr parameter is set to point to gpfs_iattr_t.

If the gpfs_stat_inode64() 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:

EPERM
The caller must have superuser privilege.
ENOSYS
The gpfs_stat_inode() subroutine is not supported under the current file system format.
ESTALE
The cached file system information was not valid.
ENOMEM
The buffer is too small.
GPFS_E_INVAL_ISCAN
Incorrect parameters.
GPFS_E_HOLE_IN_IFILE
The inode scan is reading only the inodes that have been copied to a snapshot and this inode has not yet been copied.

Location

/usr/lpp/mmfs/lib/libgpfs.a for AIX

/usr/lpp/mmfs/lib/libgpfs.so for Linux