X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fglusterfs_sync.c;h=05e184cb16465b8123381bde26c87e1f91aae80f;hb=97900ebfb0192130823dce8aa8f36916313a1c18;hp=938baf46d0eeac32ac9b7178ece129d8c17581a7;hpb=b29c813fc632d486d8c9c7858c26ab31e0b89e8d;p=fio.git diff --git a/engines/glusterfs_sync.c b/engines/glusterfs_sync.c index 938baf46..05e184cb 100644 --- a/engines/glusterfs_sync.c +++ b/engines/glusterfs_sync.c @@ -11,7 +11,7 @@ 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"); @@ -31,7 +31,7 @@ static int fio_gf_prep(struct thread_data *td, struct io_u *io_u) 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); @@ -41,6 +41,10 @@ static int fio_gf_queue(struct thread_data *td, struct io_u *io_u) 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; @@ -76,6 +80,7 @@ static struct ioengine_ops ioengine = { .queue = fio_gf_queue, .open_file = fio_gf_open_file, .close_file = fio_gf_close_file, + .unlink_file = fio_gf_unlink_file, .get_file_size = fio_gf_get_file_size, .options = gfapi_options, .option_struct_size = sizeof(struct gf_options),