gpfs_seek_inode() subroutine

Advances an inode scan to the specified inode number.

Library

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

Synopsis

#include <gpfs.h>
int gpfs_seek_inode(gpfs_iscan_t *iscan, 
                    gpfs_ino_t ino);

Description

The gpfs_seek_inode() subroutine advances an inode scan to the specified inode number.

The gpfs_seek_inode() subroutine is used to start an inode scan at some place other than the beginning of the inode file. This is useful to restart a partially completed backup or an interrupted dump transfer to a mirror. It could also be used to do an inode scan in parallel from multiple nodes, by partitioning the inode number space into separate ranges for each participating node. The maximum inode number is returned when the scan was opened and each invocation to obtain the next inode specifies a termination inode number to avoid returning the same inode more than once.

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
Pointer to the inode scan handle.
ino
The next inode number to be scanned.

Exit status

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

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

ENOSYS
The gpfs_seek_inode() subroutine is not available.
GPFS_E_INVAL_ISCAN
Incorrect parameters.

Examples

For an example using gpfs_seek_inode(), see /usr/lpp/mmfs/samples/util/tsinode.c.

Location

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

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