Add support for >= 4G block sizes
[fio.git] / engines / glusterfs_sync.c
index 6de4ee292eee4e082b3011b544ce1735a8786785..099a5af10406a4da4f2d7158df2df28881456f6d 100644 (file)
@@ -7,11 +7,11 @@
 
 #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");
 
@@ -29,12 +29,12 @@ static int fio_gf_prep(struct thread_data *td, struct io_u *io_u)
        return 0;
 }
 
-static int fio_gf_queue(struct thread_data *td, struct io_u *io_u)
+static enum fio_q_status 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);
+       dprint(FD_FILE, "fio queue len %llu\n", io_u->xfer_buflen);
        fio_ro_check(td, io_u);
 
        if (io_u->ddir == DDIR_READ)
@@ -47,9 +47,10 @@ static int fio_gf_queue(struct thread_data *td, struct io_u *io_u)
                ret = glfs_fdatasync(g->fd);
        else {
                log_err("unsupported operation.\n");
-               return -EINVAL;
+               io_u->error = EINVAL;
+               return FIO_Q_COMPLETED;
        }
-       dprint(FD_FILE, "fio len %lu ret %d\n", io_u->xfer_buflen, ret);
+       dprint(FD_FILE, "fio len %llu ret %d\n", io_u->xfer_buflen, ret);
        if (io_u->file && ret >= 0 && ddir_rw(io_u->ddir))
                LAST_POS(io_u->file) = io_u->offset + ret;