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
This commit is contained in:
Chun Liu 2016-09-06 16:08:14 -07:00 committed by Daniel Verkamp
parent a9133b405a
commit 8314b54996
2 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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;