- if (ops->version != FIO_IOOPS_VERSION) {
- log_err("bad ioops version %d (want %d)\n", ops->version, FIO_IOOPS_VERSION);
- dlclose(dlhandle);
+ ops->dlhandle = dlhandle;
+ return ops;
+}
+
+struct ioengine_ops *load_ioengine(struct thread_data *td, const char *name)
+{
+ struct ioengine_ops *ops, *ret;
+ char engine[16];
+
+ strncpy(engine, name, sizeof(engine) - 1);
+
+ /*
+ * linux libaio has alias names, so convert to what we want
+ */
+ if (!strncmp(engine, "linuxaio", 8) || !strncmp(engine, "aio", 3))
+ strcpy(engine, "libaio");
+
+ ops = find_ioengine(engine);
+ if (!ops)
+ ops = dlopen_ioengine(td, name);
+
+ if (!ops) {
+ log_err("fio: engine %s not loadable\n", name);