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: Andrey Kuzmin <andrey.v.kuzmin@gmail.com> Reviewed-on: https://review.gerrithub.io/413749 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
1559a7cdaa
commit
4e51a274de
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user