[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH] qapi: allow blockdev-add for ssh

From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH] qapi: allow blockdev-add for ssh
Date: Mon, 10 Oct 2016 14:53:50 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 10.10.2016 um 13:54 hat Ashijeet Acharya geschrieben:
> On Mon, Oct 10, 2016 at 5:01 PM, Kevin Wolf <address@hidden> wrote:
> > Your .bdrv_open() callback in ssh gets these options as keys in
> > QDict *options, using the dot syntax. options might look like this
> > (using "key" = "value" for the example):
> >
> >     "server.host" = "localhost"
> >     "server.port" = "1234"
> >     "server.ipv4" = "on"
> >     "server.ipv6" = "on"
> >     "path" = "/tmp/test.img"
> >     "user" = "test"
> >
> > You can manually parse the "server.*" fields with
> > qdict_extract_subqdict() and QemuOpts and then construct an
> > InetSocketAddress object in C similar to what NBD does currently.
> >
> > The other option, and maybe a bit nicer, would be to use a visitor to
> > directly go from the (sub-)QDict to InetSocketAddress.
> If I am not wrong, this is how Max did it here to unflatten things:
>     https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg06709.html
> But they don't seem to have been merged yet. I will rebase on top of
> his work though.

The current version of his series is v4 (from end of September), which
has in turn rebased on top of Dan's "QAPI/QOM work for non-scalar object
properties" series, which adds a qdict_crumple() function. This is a
more complete function to "unflatten" the dict again.

So maybe you want to rebase on top of Dan's series instead of Max's, and
just refer to Max's series to see how he's integrating things in the
block driver.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]