From bd53d09c31abd5210bd6f8fec4600e83fc30845f Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Mon, 7 Jun 2021 10:13:54 +0000 Subject: [PATCH] nvme/fio_plugin: remove ZBD_IGNORE usage The define ZBD_IGNORE has been removed from upstream fio. fio will now return an error if --zonemode=zbd is used with a --filename that points to something that is unsupported by either the zbd code in fio or by the ioengine itself. ioengines are now supposed to return -EINVAL for unsupported files (instead of returning 0 with ZBD_IGNORE for unsupported files). This change does not need any special ifdef FIO_IOOPS_VERSION check. Signed-off-by: Niklas Cassel Change-Id: I7bec0b1f5dc8f166ebf683f6f3937b2ef295a21e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8326 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Paul Luse Reviewed-by: Changpeng Liu Community-CI: Mellanox Build Bot --- examples/nvme/fio_plugin/fio_plugin.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/nvme/fio_plugin/fio_plugin.c b/examples/nvme/fio_plugin/fio_plugin.c index c169e6e72..3a2dd24a9 100644 --- a/examples/nvme/fio_plugin/fio_plugin.c +++ b/examples/nvme/fio_plugin/fio_plugin.c @@ -1153,13 +1153,11 @@ spdk_fio_get_zoned_model(struct thread_data *td, struct fio_file *f, enum zbd_zo struct spdk_fio_qpair *fio_qpair = NULL; const struct spdk_nvme_zns_ns_data *zns_data = NULL; - *model = ZBD_IGNORE; - if (f->filetype != FIO_TYPE_FILE && \ f->filetype != FIO_TYPE_BLOCK && \ f->filetype != FIO_TYPE_CHAR) { - log_info("spdk/nvme: ignoring filetype: %d\n", f->filetype); - return 0; + log_info("spdk/nvme: unsupported filetype: %d\n", f->filetype); + return -EINVAL; } fio_qpair = get_fio_qpair(fio_thread, f);