From 8314b549969852e2e6f875071f8ec90d657bba65 Mon Sep 17 00:00:00 2001 From: Chun Liu Date: Tue, 6 Sep 2016 16:08:14 -0700 Subject: [PATCH] nvme/fio_plugin: fix compliation with recent FIO Fixes compilation after fio commit 565e784df05c2529479eed8a38701a33b01894bd ("Don't malloc/memcpy ioengine_ops on td initialization"). Change-Id: Id7138e774e523af3a27ac24e08b8ccd05a3ed77a --- examples/nvme/fio_plugin/README.md | 4 ++-- examples/nvme/fio_plugin/fio_plugin.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/nvme/fio_plugin/README.md b/examples/nvme/fio_plugin/README.md index 0e1135f2e..af9eca8f5 100644 --- a/examples/nvme/fio_plugin/README.md +++ b/examples/nvme/fio_plugin/README.md @@ -5,9 +5,9 @@ First, clone the fio source repository from http://github.com/axboe/fio git clone http://github.com/axboe/fio -Then check out the fio 2.8 tag +Then check out the fio 2.17 tag - cd fio && git checkout fio-2.8 + cd fio && git checkout fio-2.17 Finally, compile the code with diff --git a/examples/nvme/fio_plugin/fio_plugin.c b/examples/nvme/fio_plugin/fio_plugin.c index 56e671d69..cfc64eb94 100644 --- a/examples/nvme/fio_plugin/fio_plugin.c +++ b/examples/nvme/fio_plugin/fio_plugin.c @@ -123,7 +123,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts) { struct thread_data *td = cb_ctx; - struct spdk_fio_thread *fio_thread = td->io_ops->data; + struct spdk_fio_thread *fio_thread = td->io_ops_data; struct spdk_fio_ctrlr *fio_ctrlr; struct spdk_fio_ns *fio_ns; struct fio_file *f; @@ -192,7 +192,7 @@ static int spdk_fio_setup(struct thread_data *td) fio_thread = calloc(1, sizeof(*fio_thread)); assert(fio_thread != NULL); - td->io_ops->data = fio_thread; + td->io_ops_data = fio_thread; fio_thread->td = td; fio_thread->iocq = calloc(td->o.iodepth + 1, sizeof(struct io_u *)); @@ -236,7 +236,7 @@ static void spdk_fio_iomem_free(struct thread_data *td) static int spdk_fio_io_u_init(struct thread_data *td, struct io_u *io_u) { - struct spdk_fio_thread *fio_thread = td->io_ops->data; + struct spdk_fio_thread *fio_thread = td->io_ops_data; struct spdk_fio_request *fio_req; fio_req = calloc(1, sizeof(*fio_req)); @@ -276,7 +276,7 @@ static void spdk_fio_completion_cb(void *ctx, const struct spdk_nvme_cpl *cpl) static int spdk_fio_queue(struct thread_data *td, struct io_u *io_u) { int rc = 1; - struct spdk_fio_thread *fio_thread = td->io_ops->data; + struct spdk_fio_thread *fio_thread = td->io_ops_data; struct spdk_fio_request *fio_req = io_u->engine_data; struct spdk_fio_ctrlr *fio_ctrlr; struct spdk_fio_ns *fio_ns; @@ -328,7 +328,7 @@ static int spdk_fio_queue(struct thread_data *td, struct io_u *io_u) static struct io_u *spdk_fio_event(struct thread_data *td, int event) { - struct spdk_fio_thread *fio_thread = td->io_ops->data; + struct spdk_fio_thread *fio_thread = td->io_ops_data; int idx = (fio_thread->getevents_start + event) % td->o.iodepth; if (event > (int)fio_thread->getevents_count) { @@ -341,7 +341,7 @@ static struct io_u *spdk_fio_event(struct thread_data *td, int event) static int spdk_fio_getevents(struct thread_data *td, unsigned int min, unsigned int max, const struct timespec *t) { - struct spdk_fio_thread *fio_thread = td->io_ops->data; + struct spdk_fio_thread *fio_thread = td->io_ops_data; struct spdk_fio_ctrlr *fio_ctrlr; unsigned int count = 0; struct timespec t0, t1; @@ -390,7 +390,7 @@ static int spdk_fio_invalidate(struct thread_data *td, struct fio_file *f) static void spdk_fio_cleanup(struct thread_data *td) { - struct spdk_fio_thread *fio_thread = td->io_ops->data; + struct spdk_fio_thread *fio_thread = td->io_ops_data; struct spdk_fio_ctrlr *fio_ctrlr, *fio_ctrlr_tmp; struct spdk_fio_ns *fio_ns, *fio_ns_tmp;