X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fglusterfs_async.c;h=9e1c4bf038f3b3ce2fbe27f3ddb19cffbd6f3dd2;hb=d5495f0b72f8fbecb97192da430720aa56f8feb9;hp=97271d67f13927f7c95e7e814df42df662f20058;hpb=83a9e706745e5a5affd5475b884e42d0100f783f;p=fio.git diff --git a/engines/glusterfs_async.c b/engines/glusterfs_async.c index 97271d67..9e1c4bf0 100644 --- a/engines/glusterfs_async.c +++ b/engines/glusterfs_async.c @@ -70,20 +70,17 @@ static void fio_gf_io_u_free(struct thread_data *td, struct io_u *io_u) static int fio_gf_io_u_init(struct thread_data *td, struct io_u *io_u) { + struct fio_gf_iou *io; dprint(FD_FILE, "%s\n", __FUNCTION__); - - if (!io_u->engine_data) { - struct fio_gf_iou *io; - - io = malloc(sizeof(struct fio_gf_iou)); - if (!io) { - td_verror(td, errno, "malloc"); - return 1; - } - io->io_complete = 0; - io->io_u = io_u; - io_u->engine_data = io; - } + + io = malloc(sizeof(struct fio_gf_iou)); + if (!io) { + td_verror(td, errno, "malloc"); + return 1; + } + io->io_complete = 0; + io->io_u = io_u; + io_u->engine_data = io; return 0; } @@ -96,8 +93,8 @@ static void gf_async_cb(glfs_fd_t * fd, ssize_t ret, void *data) iou->io_complete = 1; } -static int fio_gf_async_queue(struct thread_data fio_unused * td, - struct io_u *io_u) +static enum fio_q_status fio_gf_async_queue(struct thread_data fio_unused * td, + struct io_u *io_u) { struct gf_data *g = td->io_ops_data; int r;