engines/io_uring: add new I/O engine for uring passthrough support
[fio.git] / ioengines.c
index f88b0537f1e622f963919b4be9679164e98c7c59..68f307e541a9f5b0cd469c5f7fc695506b8e5144 100644 (file)
@@ -223,6 +223,8 @@ struct ioengine_ops *load_ioengine(struct thread_data *td)
  */
 void free_ioengine(struct thread_data *td)
 {
+       assert(td != NULL && td->io_ops != NULL);
+
        dprint(FD_IO, "free ioengine %s\n", td->io_ops->name);
 
        if (td->eo && td->io_ops->options) {
@@ -234,7 +236,6 @@ void free_ioengine(struct thread_data *td)
        if (td->io_ops->dlhandle) {
                dprint(FD_IO, "dlclose ioengine %s\n", td->io_ops->name);
                dlclose(td->io_ops->dlhandle);
-               td->io_ops->dlhandle = NULL;
        }
 
        td->io_ops = NULL;
@@ -414,7 +415,6 @@ enum fio_q_status td_io_queue(struct thread_data *td, struct io_u *io_u)
        if (!td->io_ops->commit) {
                io_u_mark_submit(td, 1);
                io_u_mark_complete(td, 1);
-               zbd_put_io_u(td, io_u);
        }
 
        if (ret == FIO_Q_COMPLETED) {
@@ -694,17 +694,17 @@ int fio_show_ioengine_help(const char *engine)
        }
 
        td.o.ioengine = (char *)engine;
-       io_ops = load_ioengine(&td);
+       td.io_ops = load_ioengine(&td);
 
-       if (!io_ops) {
+       if (!td.io_ops) {
                log_info("IO engine %s not found\n", engine);
                return 1;
        }
 
-       if (io_ops->options)
-               ret = show_cmd_help(io_ops->options, sep);
+       if (td.io_ops->options)
+               ret = show_cmd_help(td.io_ops->options, sep);
        else
-               log_info("IO engine %s has no options\n", io_ops->name);
+               log_info("IO engine %s has no options\n", td.io_ops->name);
 
        free_ioengine(&td);
        return ret;