From: Colin Lord <clord@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH 0/3] Dynamic module loading for block drivers
Date: Wed, 22 Jun 2016 17:41:11 -0400 [thread overview]
Message-ID: <21d86c50-a7ea-e9d1-90c6-8465c7ed24e9@redhat.com> (raw)
In-Reply-To: <1466631354-17309-1-git-send-email-clord@redhat.com>
On 06/22/2016 05:35 PM, Colin Lord wrote:
> This is v2 of the series I sent out last week. These are the changes I
> made based on the feedback I got:
> - Fixed typo and Marc's email address in the python script
> - Moved registration of iscsi_opts into vl.c
>
> What I didn't do:
> - Remove copy-pasted loops
>
> There was a bit of discussion about how to remove the need for the copy-
> paste loops that are in block.c. I attempted to solve it by using
> g_module_sym to load the BlockDriver struct directly at the time the
> module gets loaded and returning it so that the loops were not
> necessary. I accomplished this by adding a field to the struct which,
> for a given format/protocol configuration, had the name of the
> corresponding BlockDriver struct. Having the name allowed me to load the
> symbol right out of the loaded module. However, it turns out that, at
> least as far as I can tell, g_module_sym can't load the BlockDriver
> structs in this way because they are declared static.
>
> I tested the attempt to remove the copy-pasted loops by using the
> qemu-iotests on it with ssh (which is modularized). The errors I got
> were along the lines of:
>
> can't open device ssh://[address removed]: Unknown protocol 'ssh'
> Failed to find driver in module
>
> To test my theory (I haven't had much luck finding reliable
> documentation about this) that it was because they were static, I
> changed the definition of the bdrv_ssh BlockDriver to not be static.
> Unfortunately I still got errors, but I believe the drivers got loaded.
> The errors were not the same, rather these ones were complaining about
> the host key not matching the one in known_hosts. I've had this issue
> while trying to set up ssh with qemu in the past, so I'm not quite as
> worried about it (although I'd love to hear a fix), and more importantly
> there aren't any messages about the driver not being found.
>
> That hopefully explains some of the issues, and why I'm submitting this
> with the duplicated loops still intact. If there are other ideas for
> dealing with this my ears are open, but this is what I have for now.
>
> Colin Lord (1):
> blockdev: prepare iSCSI block driver for dynamic loading
>
> Marc Mari (2):
> blockdev: Add dynamic generation of module_block.h
> blockdev: Add dynamic module loading for block drivers
>
> .gitignore | 1 +
> Makefile | 11 +++-
> block.c | 86 +++++++++++++++++++++++---
> block/iscsi.c | 36 -----------
> include/qemu/module.h | 3 +
> scripts/modules/module_block.py | 134 ++++++++++++++++++++++++++++++++++++++++
> util/module.c | 37 +++--------
> vl.c | 36 +++++++++++
> 8 files changed, 269 insertions(+), 75 deletions(-)
> create mode 100644 scripts/modules/module_block.py
>
Hmm, apologies for not labeling this series as v2 in the subject line.
Still trying to get this process down properly. Also let me know if I
need to rebase with master again. Of course I'd forget these things and
remember only right after mailing the patches in.
next prev parent reply other threads:[~2016-06-22 21:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 21:35 [Qemu-devel] [PATCH 0/3] Dynamic module loading for block drivers Colin Lord
2016-06-22 21:35 ` [Qemu-devel] [PATCH 1/3] blockdev: prepare iSCSI block driver for dynamic loading Colin Lord
2016-06-23 1:22 ` Fam Zheng
2016-06-23 20:44 ` Colin Lord
2016-06-22 21:35 ` [Qemu-devel] [PATCH 2/3] blockdev: Add dynamic generation of module_block.h Colin Lord
2016-06-23 1:48 ` Fam Zheng
2016-06-24 9:54 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 21:35 ` [Qemu-devel] [PATCH 3/3] blockdev: Add dynamic module loading for block drivers Colin Lord
2016-06-23 2:00 ` Fam Zheng
2016-06-23 2:47 ` Fam Zheng
2016-06-24 10:04 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-24 10:37 ` Daniel P. Berrange
2016-06-27 9:31 ` Fam Zheng
2016-06-27 12:44 ` Stefan Hajnoczi
2016-06-22 21:41 ` Colin Lord [this message]
2016-06-23 1:53 ` [Qemu-devel] [PATCH 0/3] Dynamic " Fam Zheng
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=21d86c50-a7ea-e9d1-90c6-8465c7ed24e9@redhat.com \
--to=clord@redhat.com \
--cc=kwolf@redhat.com \
--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).