From: Stefan Hajnoczi <stefanha@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-block@nongnu.org, qemu-trivial <qemu-trivial@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>,
Markus Armbruster <armbru@redhat.com>,
Peter Wu <peter@lekensteyn.nl>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] block/dmg: make it modular if using additional library
Date: Wed, 11 Mar 2015 13:17:34 +0000 [thread overview]
Message-ID: <20150311131734.GC10493@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <54FF01E8.6040207@msgid.tls.msk.ru>
[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]
On Tue, Mar 10, 2015 at 05:38:32PM +0300, Michael Tokarev wrote:
> 10.03.2015 17:07, Kevin Wolf wrote:
> > Am 10.03.2015 um 15:01 hat Michael Tokarev geschrieben:
> []
> >> That might be useful if module loading will be modified a bit,
> >> like by loadin modules on demand only. Something like this,
> >> search a "foo" block driver in the registered list, found ->
> >> use it, if not, try to open block-foo.so (maybe after looking
> >> in the "available" internal list before that) and look up in
> >> the registered list again.
> >>
> >> That will make it more useful.
> >
> > The problem with that would be that format probing wouldn't work any
> > more for drivers that aren't loaded yet.
>
> Probing needed -> run the current "load everything" sequence (maybe
> limiting stuff being loaded to "block" system when other systems
> will be there) before actual probing. That should fix both worlds.
>
> Alternatively, and this might be even better alternative actually,
> the more I think about it, is to have a single probe function
> which recognizes all known formats, no matter if the particular
> driver is being built or not. This routine will be significantly
> simpler thant the combined "probe" functionality, it might know
> much more formats even if a given format is not supported, etc,
> So that format probing will be its own code which will trigger
> (attempt) to load a detected driver.
Or something like /usr/share/magic or /lib/modules/$(uname
-r)/modules.alias could be used for probing.
For example:
be32 at 0 == "QFI\xfb" load qcow2
le32 at 0 == "QED\x00" load qed
contains "version=2\n" load vmdk
contains "version=1\n" load vmdk
QEMU's probe engine matches the rules and loads appropriate modules.
Your suggestions are better though because they are simpler and less
hassle. In any case, we can solve the probing problem.
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-03-11 13:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 7:06 [Qemu-devel] [PATCH] block/dmg: make it modular if using additional library Michael Tokarev
2015-03-10 8:50 ` Kevin Wolf
2015-03-10 9:17 ` Fam Zheng
2015-03-10 10:09 ` Kevin Wolf
2015-03-10 13:24 ` Markus Armbruster
2015-03-10 13:31 ` Michael Tokarev
2015-03-10 13:59 ` Kevin Wolf
2015-03-10 13:58 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-03-10 14:01 ` Michael Tokarev
2015-03-10 14:07 ` Kevin Wolf
2015-03-10 14:38 ` [Qemu-devel] " Michael Tokarev
2015-03-11 13:17 ` Stefan Hajnoczi [this message]
2015-03-11 13:06 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-03-10 9:10 ` [Qemu-devel] " Peter Wu
2015-03-11 13:23 ` 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=20150311131734.GC10493@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=peter@lekensteyn.nl \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.com \
/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).