From: Stefan Hajnoczi <stefanha@gmail.com>
To: Lindsay Mathieson <lindsay.mathieson@gmail.com>
Cc: qemu-devel@nongnu.org, Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] Loadable block drivers?
Date: Wed, 4 Apr 2018 14:41:22 +0100 [thread overview]
Message-ID: <20180404134122.GS4467@stefanha-x1.localdomain> (raw)
In-Reply-To: <20180403033033.GD6839@lemon.usersys.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]
On Tue, Apr 03, 2018 at 11:30:33AM +0800, Fam Zheng wrote:
> On Tue, 04/03 13:17, Lindsay Mathieson wrote:
> > On 3 April 2018 at 13:11, Fam Zheng <famz@redhat.com> wrote:
> >
> > > On Tue, 04/03 12:59, Lindsay Mathieson wrote:
> > > > Hi all, was looking at developing a block driver for qemu - have examined
> > > > the drivers at:
> > > >
> > > > https://github.com/qemu/qemu/tree/master/block
> > > >
> > > > And it seems straightforward enough.
> > > >
> > > > One thing that is unclear - all the drivers appear to be compiled
> > > directly
> > > > into qemu. Is there no way to load them dynamically as .so modules?
> > >
> > > './configure --enable-modules' will enable building block drivers as .so
> > > objects, and they are loaded dynamically. These are in-tree .so modules;
> > > out-of-tree modules like in Linux kernel are intentionally forbidden.
> > >
> > > Fam
> > >
> >
> >
> >
> > Rats, I take it that means I can't develop a testing block module and load
> > it with an pre-existing qemu install.
>
> No, that's not possible.
Depending on what you are trying to do, you could use the blkdebug,
null-co, NBD, or iSCSI drivers to perform your testing.
blkdebug does fault injection (e.g. you can test what happens when
certain I/O requests fail).
null-co is a nop block driver useful for some types of performance
testing and it also supports introducing an artificial delays.
NBD and iSCSI can be used to forward I/O requests to an external server
where you can implement any behavior you want.
We can discuss it more if you can explain what you're trying to do.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2018-04-04 13:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 2:59 [Qemu-devel] Loadable block drivers? Lindsay Mathieson
2018-04-03 3:11 ` Fam Zheng
2018-04-03 3:17 ` Lindsay Mathieson
2018-04-03 3:30 ` Fam Zheng
2018-04-04 13:41 ` Stefan Hajnoczi [this message]
2018-04-05 1:40 ` Lindsay Mathieson
2018-04-08 9:27 ` Fam Zheng
2018-04-09 6:19 ` Stefan Hajnoczi
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=20180404134122.GS4467@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=lindsay.mathieson@gmail.com \
--cc=qemu-devel@nongnu.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).