Table of Contents
gfs_read_listio - read a series of data chunks from a fork
#include <gfs.h>
int gfs_read_listio(int fork_id, char *buf,
struct gfs_list *list, ulong_t quant);
int gfs_nb_read_listio(gfs_handle handle, int fork_id,
char *buf, struct gfs_list *list, ulong_t quant);
gfs_read_listio and gfs_nb_read_listio read a series of
chunks of data from fork fork_id. list contains a list of
(file_offset, memory_offset, size) triples, each of which
corresponds to a single gfs_read() request. quant indicates
how many elements there are in list.
gfs_read_listio is a blocking call, so it will not return
until all the data has been transferred to the local buffer.
gfs_nb_read_listio is a non-blocking call, so it will return
immediately. The application can call gfs_test(handle) to
determine whether or not all the data has been transferred.
The application must call gfs_wait(handle) before handle may
be used in another non-blocking call.
On a successful blocking call, the number of bytes read are
returned. On a successful non-blocking call, 0 is returned.
In either case, -1 is returned on an error, and gfs_errno is
set appropriately.
GFS_EBADF
fork_id is not a valid fork.
- GFS_EINVAL
-
handle is not a valid gfs_handle.
- GFS_EBUSY
-
Can only occur on a non-blocking request. handle is
already attached to an outstanding request, and
needs to be "cleared" by calling gfs_wait(handle).
Table of Contents