From: Dmitry Monakhov Date: Wed, 19 Sep 2012 19:22:54 +0000 (+0400) Subject: ioengine: allow several external ioengines X-Git-Tag: fio-2.0.10~30 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0abea0b7428f930d423640feb4472218b83b8eea 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 Signed-off-by: Jens Axboe --- 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);