#include "gfapi.h"
-#define LAST_POS(f) ((f)->engine_data)
+#define LAST_POS(f) ((f)->engine_pos)
static int fio_gf_prep(struct thread_data *td, struct io_u *io_u)
{
struct fio_file *f = io_u->file;
- struct gf_data *g = td->io_ops->data;
+ struct gf_data *g = td->io_ops_data;
dprint(FD_FILE, "fio prep\n");
static int fio_gf_queue(struct thread_data *td, struct io_u *io_u)
{
- struct gf_data *g = td->io_ops->data;
+ struct gf_data *g = td->io_ops_data;
int ret = 0;
dprint(FD_FILE, "fio queue len %lu\n", io_u->xfer_buflen);
ret = glfs_read(g->fd, io_u->xfer_buf, io_u->xfer_buflen, 0);
else if (io_u->ddir == DDIR_WRITE)
ret = glfs_write(g->fd, io_u->xfer_buf, io_u->xfer_buflen, 0);
+ else if (io_u->ddir == DDIR_SYNC)
+ ret = glfs_fsync(g->fd);
+ else if (io_u->ddir == DDIR_DATASYNC)
+ ret = glfs_fdatasync(g->fd);
else {
log_err("unsupported operation.\n");
return -EINVAL;