linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: linux-ext4@vger.kernel.org, fio@vger.kernel.org
Cc: axboe@kernel.dk, Dmitry Monakhov <dmonakhov@openvz.org>
Subject: [PATCH 2/4] ioengine: allow several external ioengines
Date: Wed, 19 Sep 2012 23:22:54 +0400	[thread overview]
Message-ID: <1348082576-10528-3-git-send-email-dmonakhov@openvz.org> (raw)
In-Reply-To: <1348082576-10528-1-git-send-email-dmonakhov@openvz.org>

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>
---
 ioengines.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ioengines.c b/ioengines.c
index b43374e..c2a64cb 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);
-- 
1.7.7.6


  parent reply	other threads:[~2012-09-19 19:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 19:22 [PATCH 0/4] ioengine: File based ioengines Dmitry Monakhov
2012-09-19 19:22 ` [PATCH 1/4] export file_lookup_open Dmitry Monakhov
2012-09-19 19:22 ` Dmitry Monakhov [this message]
2012-09-19 19:22 ` [PATCH 3/4] ioengine: Add fallocate ioengine Dmitry Monakhov
2012-09-19 19:22 ` [PATCH 4/4] engine: add e4defrag engine Dmitry Monakhov
2012-09-19 19:40 ` [PATCH 0/4] ioengine: File based ioengines Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348082576-10528-3-git-send-email-dmonakhov@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).