summaryrefslogtreecommitdiff
path: root/ioengines.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2012-09-19 23:22:54 +0400
committerJens Axboe <axboe@kernel.dk>2012-09-19 21:31:47 +0200
commit0abea0b7428f930d423640feb4472218b83b8eea (patch)
treebb0dce088fed6ec4afd27e43a2bcd026f1aa4deb /ioengines.c
parent1ccc6dc75b28ef70cd7a8c39ac8c1cb68c720a65 (diff)
downloadfio-0abea0b7428f930d423640feb4472218b83b8eea.tar.gz
ioengine: allow several external ioengines
Currently only one external ioengine can be exported because it use hardcoded 'ioengine' symbol, but if we allow external modules to have ops symbol similar to it's name then several extrnal engines become possible. NOTE: Old linking layout preserved Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'ioengines.c')
-rw-r--r--ioengines.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ioengines.c b/ioengines.c
index b43374e7..c2a64cb0 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -104,7 +104,9 @@ static struct ioengine_ops *dlopen_ioengine(struct thread_data *td,
* Unlike the included modules, external engines should have a
* non-static ioengine structure that we can reference.
*/
- ops = dlsym(dlhandle, "ioengine");
+ ops = dlsym(dlhandle, engine_lib);
+ if (!ops)
+ ops = dlsym(dlhandle, "ioengine");
if (!ops) {
td_vmsg(td, -1, dlerror(), "dlsym");
dlclose(dlhandle);