Table of Contents

NAME

gfs_write_listio - write a series of data chunks to a fork

SYNOPSIS

#include <gfs.h>

int gfs_write_listio(int fork_id, char *buf, struct gfs_list *list, ulong_t quant);

int gfs_nb_write_listio(gfs_handle handle, int fork_id, char *buf, struct gfs_list *list, ulong_t quant);

DESCRIPTION

gfs_write_listio and gfs_nb_write_listio write a series of chunks of data to fork fork_id. list contains a list of (file_offset, memory_offset, size) triples, each of which corresponds to a single gfs_write() request. quant indicates how many elements there are in list.

gfs_write_listio is a blocking call, so it will not return until all the data has been transferred to the local buffer.

gfs_nb_write_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 nonblocking call.

RETURN VALUE

On a successful blocking call, the number of bytes written 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.

ERRORS

GFS_EBADF
fork_id is not a valid fork.

GFS_EINVAL
handle is not a valid gfs_handle.

GFS_EIO A failure occurred at the server.

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