bdev/fio_plugin: add support for DDIR_SYNC

One of the io types FIO can send down is DDIR_SYNC,
which matches spdk_bdev_flush.
This patch adds handling for this io type.

Related #1712

This was first observed in ./test/vhost/shared/shared.sh

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icfa9b9833c6b0d9a18310222ef18d0865cf51b17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5551
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
This commit is contained in:
Tomasz Zawadzki 2020-12-11 08:41:47 -05:00
parent 45c42ac2f2
commit 45744ace4c

View File

@ -675,6 +675,11 @@ spdk_fio_queue(struct thread_data *td, struct io_u *io_u)
io_u->offset, io_u->xfer_buflen,
spdk_fio_completion_cb, fio_req);
break;
case DDIR_SYNC:
rc = spdk_bdev_flush(target->desc, target->ch,
io_u->offset, io_u->xfer_buflen,
spdk_fio_completion_cb, fio_req);
break;
default:
assert(false);
break;