All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
	qemu-block@nongnu.org, qemu-trivial <qemu-trivial@nongnu.org>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Peter Wu <peter@lekensteyn.nl>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-trivial] [PATCH] block/dmg: make it modular if using additional library
Date: Tue, 10 Mar 2015 17:38:32 +0300	[thread overview]
Message-ID: <54FF01E8.6040207@msgid.tls.msk.ru> (raw)
In-Reply-To: <20150310140751.GG3770@noname.str.redhat.com>

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.

Thanks,

/mjt


WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
	qemu-block@nongnu.org, qemu-trivial <qemu-trivial@nongnu.org>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	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: Tue, 10 Mar 2015 17:38:32 +0300	[thread overview]
Message-ID: <54FF01E8.6040207@msgid.tls.msk.ru> (raw)
In-Reply-To: <20150310140751.GG3770@noname.str.redhat.com>

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.

Thanks,

/mjt

  reply	other threads:[~2015-03-10 14:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10  7:06 [Qemu-trivial] [PATCH] block/dmg: make it modular if using additional library Michael Tokarev
2015-03-10  7:06 ` [Qemu-devel] " Michael Tokarev
2015-03-10  8:50 ` [Qemu-trivial] " Kevin Wolf
2015-03-10  8:50   ` [Qemu-devel] " Kevin Wolf
2015-03-10  9:17   ` [Qemu-trivial] " Fam Zheng
2015-03-10  9:17     ` [Qemu-devel] " Fam Zheng
2015-03-10 10:09     ` [Qemu-trivial] " Kevin Wolf
2015-03-10 10:09       ` [Qemu-devel] " Kevin Wolf
2015-03-10 13:24       ` [Qemu-trivial] " Markus Armbruster
2015-03-10 13:24         ` Markus Armbruster
2015-03-10 13:31         ` [Qemu-trivial] " Michael Tokarev
2015-03-10 13:31           ` [Qemu-devel] " Michael Tokarev
2015-03-10 13:59         ` [Qemu-trivial] " Kevin Wolf
2015-03-10 13:59           ` Kevin Wolf
2015-03-10 13:58       ` [Qemu-trivial] [Qemu-block] " Stefan Hajnoczi
2015-03-10 13:58         ` [Qemu-devel] " Stefan Hajnoczi
2015-03-10 14:01         ` [Qemu-trivial] " Michael Tokarev
2015-03-10 14:01           ` [Qemu-devel] " Michael Tokarev
2015-03-10 14:07           ` [Qemu-trivial] " Kevin Wolf
2015-03-10 14:07             ` [Qemu-devel] " Kevin Wolf
2015-03-10 14:38             ` Michael Tokarev [this message]
2015-03-10 14:38               ` [Qemu-devel] " Michael Tokarev
2015-03-11 13:17               ` [Qemu-trivial] " Stefan Hajnoczi
2015-03-11 13:17                 ` [Qemu-devel] " Stefan Hajnoczi
2015-03-11 13:06           ` [Qemu-trivial] [Qemu-block] " Stefan Hajnoczi
2015-03-11 13:06             ` [Qemu-devel] " Stefan Hajnoczi
2015-03-10  9:10 ` [Qemu-trivial] " Peter Wu
2015-03-10  9:10   ` [Qemu-devel] " Peter Wu
2015-03-11 13:23 ` [Qemu-trivial] " Stefan Hajnoczi
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=54FF01E8.6040207@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=peter@lekensteyn.nl \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefanha@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.