From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
qemu-block@nongnu.org, qemu-trivial@nongnu.org,
Michael Tokarev <mjt@tls.msk.ru>,
qemu-devel@nongnu.org, Peter Wu <peter@lekensteyn.nl>,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block/dmg: make it modular if using additional library
Date: Tue, 10 Mar 2015 14:59:35 +0100 [thread overview]
Message-ID: <20150310135934.GF3770@noname.str.redhat.com> (raw)
In-Reply-To: <87mw3lx9xb.fsf@blackfin.pond.sub.org>
Am 10.03.2015 um 14:24 hat Markus Armbruster geschrieben:
> Kevin Wolf <kwolf@redhat.com> writes:
>
> > Am 10.03.2015 um 10:17 hat Fam Zheng geschrieben:
> >> On Tue, 03/10 09:50, Kevin Wolf wrote:
> >> > Am 10.03.2015 um 08:06 hat Michael Tokarev geschrieben:
> >> > > block/dmg can use additional library (libbz2) to read
> >> > > bzip2-compressed files. Make the block driver to be
> >> > > a module if libbz2 support is requested, to avoid extra
> >> > > library dependency by default.
> >> > >
> >> > > Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> >> >
> >> > First of all: I don't think this is suitable for trivial. The actual
> >> > code change might be small, but the change in behaviour is important and
> >> > needs discussion.
> >> >
> >> > > This might be questionable, to make the thing to be either
> >> > > module or built-in depending on build environment, so a
> >> > > better idea may be to make it modular unconditionally.
> >> > > This block device format isn't used often.
> >> >
> >> > Yes, I'm concerned that making it conditional might be a bit surprising.
> >> > I'd like to hear some more opinions before applying this.
> >>
> >> I don't see the advantage over making it an unconditional module - condition
> >> only makes it a bit more complicated.
> >>
> >> >
> >> > Also, should we consider making some more rarely used image formats
> >> > modules even if they don't pull in external dependencies?
> >>
> >> Sounds reasonable to me. Is the intention to reduce binary size?
>
> Fair argument, but not a paricularly weighty one. The unused code never
> gets paged in, mostly, and isn't particularly large to begin with.
>
> > Yes, that and also that it allows compiling out some drivers without
> > having to mess with the Makefiles. You just don't install all of them.
>
> Second best solution of the configuration management problem "select a
> subset of the available block drivers", good enough when compiling the
> unused ones isn't bothersome. But the best solution is still
> configuration management capable of disabling optional components.
Yes. Though as far as I know, nobody is currently working on that.
> > Related to that, Peter also mentioned that you (the user, not developer
> > or packager) could simply disable a single driver, for example as a
> > temporary hotfix in the case of security problems in a block driver.
> > That would actually be an argument for making _all_ drivers modules.
>
> And pretty much every other optional component.
>
> For me, avoiding bothersome dependencies is a strong practical argument
> for making a something a loadable module. Other benefits of loadable
> modules presented so far seem pretty negligible to me. If you want
> them, no objection from me, as long as the cost is similarly negligible,
> additional complexity for developers, packagers and users in particular.
I don't really have a strong opinion either way. I agree that the
benefits wouldn't be huge, but then, it would be easy to do and I
haven't heard yet of any drawbacks either. There may well be some that
I'm not aware of, that's why I'm asking.
Kevin
next prev parent reply other threads:[~2015-03-10 14:00 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 [this message]
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
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=20150310135934.GF3770@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@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).