From: Fam Zheng <famz@redhat.com>
To: Colin Lord <clord@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>,
qemu-devel@nongnu.org, kwolf@redhat.com, qemu-block@nongnu.org,
mjt@tls.msk.ru
Subject: Re: [Qemu-devel] [PATCH v5 0/3] Dynamic module loading for block drivers
Date: Fri, 29 Jul 2016 14:33:36 +0800 [thread overview]
Message-ID: <20160729063335.GE6820@ad.usersys.redhat.com> (raw)
In-Reply-To: <b4aa9694-28c4-1a9e-069c-97a4e39dd5bd@redhat.com>
On Mon, 07/25 09:56, Colin Lord wrote:
> >> - Remove dmg from block-obj-m since it is not a target of the
> >> modularization effort.
> >
> > Hm, I'm afraid I don't quite understand the reasoning behind this.
> > Intuitively, I'd say "Doesn't matter, it was already modular, so what
> > prevents it from staying that way?"
> >
> > Is it because the changes to util/module.c in patch 3 break how the dmg
> > module worked, e.g. that it was always implicitly fully loaded on qemu
> > startup if it was available, but now modules are only loaded on request?
> >
> Yes, that's pretty much it. Previously all the modules would get loaded
> during initialization, but since the third patch adds dynamic loading
> that no longer happens. As we aren't loading format drivers on demand,
> dmg.o should be added to block-obj-y instead of block-obj-m so that it
> doesn't get modularized.
The question should be raised about the extra libbz2 dependency that could be
pulled in to qemu main package again, by this series. dmg.o was added to
block-obj-m in 5505e8b76 to make it a separate module (and therefore a
downstream package), so that its reference to libbz2, since 6b383c08c, doesn't
add an extra library to the main executable.
Michael can correct me if I'm wrong about that.
For the constructive part. To prevent the hard dependency, we can probably
extract the BZ2_bzDecompress* part into block/dmg-bz2.so, and use the same
"register" trick as in the SDL series [1] to hook up into dmg_read_chunk().
[1]: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg06085.html
Fam
prev parent reply other threads:[~2016-07-29 6:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 14:30 [Qemu-devel] [PATCH v5 0/3] Dynamic module loading for block drivers Colin Lord
2016-07-20 14:30 ` [Qemu-devel] [PATCH v5 1/3] blockdev: prepare iSCSI block driver for dynamic loading Colin Lord
2016-07-20 14:30 ` [Qemu-devel] [PATCH v5 2/3] blockdev: Add dynamic generation of module_block.h Colin Lord
2016-07-20 14:30 ` [Qemu-devel] [PATCH v5 3/3] blockdev: Add dynamic module loading for block drivers Colin Lord
2016-07-23 18:21 ` [Qemu-devel] [PATCH v5 0/3] Dynamic " Max Reitz
2016-07-25 13:56 ` Colin Lord
2016-07-25 19:38 ` Max Reitz
2016-07-29 6:33 ` Fam Zheng [this message]
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=20160729063335.GE6820@ad.usersys.redhat.com \
--to=famz@redhat.com \
--cc=clord@redhat.com \
--cc=kwolf@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).