Commit 4e51a274 authored by Andrey Kuzmin's avatar Andrey Kuzmin Committed by Jim Harris
Browse files

Fix fio_plugin build for FIO_IOOPS_VERSION >= 24.



Fio commit d3b07186b1d4c7c1d9adc1306407458ce41ad048 changed return
type of the ioengine->queue method to a new enumeration type
fio_q_status. Add preprocessor checks to ensure SPDK fio_plugin builds
successfully with both current and earlier fio ioengine API version.

Change-Id: Ie9eb818473c6453624d6cfe51a19c6bf0d17e334
Signed-off-by: default avatarAndrey Kuzmin <andrey.v.kuzmin@gmail.com>
Reviewed-on: https://review.gerrithub.io/413749


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent 1559a7cd
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -489,7 +489,13 @@ spdk_fio_completion_cb(struct spdk_bdev_io *bdev_io,
	spdk_bdev_free_io(bdev_io);
}

static int
#if FIO_IOOPS_VERSION >= 24
typedef enum fio_q_status fio_q_status_t;
#else
typedef int fio_q_status_t;
#endif

static fio_q_status_t
spdk_fio_queue(struct thread_data *td, struct io_u *io_u)
{
	int rc = 1;
+8 −1
Original line number Diff line number Diff line
@@ -416,7 +416,14 @@ spdk_nvme_io_next_sge(void *ref, void **address, uint32_t *length)
	return 0;
}

static int spdk_fio_queue(struct thread_data *td, struct io_u *io_u)
#if FIO_IOOPS_VERSION >= 24
typedef enum fio_q_status fio_q_status_t;
#else
typedef int fio_q_status_t;
#endif

static fio_q_status_t
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;