Table of Contents
gfs_read_strided, gfs_nb_read_strided, gfs_write_strided,
gfs_nb_write_strided, - access a fork with a strided
pattern.
#include <gfs.h>
int gfs_read_strided(int fork_id, char *buf, ulong_t offset,
ulong_t size, ulong_t fstride, ulong_t mstride,
ulong_t quant);
int gfs_nb_read_strided(gfs_handle handle, int fork_id,
char *buf, ulong_t offset, ulong_t size,
ulong_t fstride, ulong_t mstride, ulong_t quant);
int gfs_write_strided(int fork_id, char *buf, ulong_t offset,
ulong_t size, ulong_t fstride, ulong_t mstride,
ulong_t quant);
int gfs_nb_write_strided(gfs_handle handle, int fork_id,
char *buf, ulong_t offset, ulong_t size,
ulong_t fstride, ulong_t mstride, ulong_t quant);
Galley's strided I/O requests read or write a series of
chunks of data from fork fork_id. For a read request,
Galley starts by reading the data stored in the file at
offset and storing the data into the buffer starting at buf.
For a write request, Galley starts by writing to the file at
offset and taking the data from the buffer starting at buf.
After each chunk of data is read or written, the offset into
the file is increased by fstride, and the offset into memory
is increased by mstride.
gfs_read_strided and gfs_write_strided are blocking calls,
so they will not return until all the data has actually been
transferred.
gfs_nb_read_strided and gfs_nb_write_strided are nonblocking
calls, so they 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 or
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.
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. This should not
happen.
- 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