Prefix external io engine loading with 'external'
This is needed because the parser checks the allowed values now,
which broke ioengine=/some/external/file.o for loading an
external engine.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index fb3e3cc..624814a 100644
--- a/init.c
+++ b/init.c
@@ -103,6 +103,7 @@
#ifdef FIO_HAVE_SYSLET
{ .ival = "syslet-rw", },
#endif
+ { .ival = "external", },
},
},
{
@@ -1017,11 +1018,26 @@
return 0;
}
+/* External engines are specified by "external:name.o") */
+static const char *get_engine_name(const char *str)
+{
+ char *p = strstr(str, ":");
+
+ if (!p)
+ return str;
+
+ p++;
+ strip_blank_front(&p);
+ strip_blank_end(p);
+ return p;
+}
+
static int str_ioengine_cb(void *data, const char *str)
{
struct thread_data *td = data;
+ const char *name = get_engine_name(str);
- td->io_ops = load_ioengine(td, str);
+ td->io_ops = load_ioengine(td, name);
if (td->io_ops)
return 0;