From: Kevin Wolf <kwolf@redhat.com>
To: Ashijeet Acharya <ashijeetacharya@gmail.com>
Cc: Eric Blake <eblake@redhat.com>,
armbru@redhat.com, QEMU Developers <qemu-devel@nongnu.org>,
"Richard W.M. Jones" <rjones@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qapi: allow blockdev-add for ssh
Date: Mon, 10 Oct 2016 14:53:50 +0200 [thread overview]
Message-ID: <20161010125350.GH6775@noname.redhat.com> (raw)
In-Reply-To: <CAC2QTZbyjJJiJBh_A5JuJD_tQSJuMiOPWKginvUkqGRpV_dzZg@mail.gmail.com>
Am 10.10.2016 um 13:54 hat Ashijeet Acharya geschrieben:
> On Mon, Oct 10, 2016 at 5:01 PM, Kevin Wolf <kwolf@redhat.com> 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.
Kevin
next prev parent reply other threads:[~2016-10-10 12:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-08 10:44 [Qemu-devel] [PATCH] qapi: allow blockdev-add for ssh Ashijeet Acharya
2016-10-08 10:54 ` Richard W.M. Jones
2016-10-08 11:06 ` Ashijeet Acharya
2016-10-10 9:15 ` Kevin Wolf
2016-10-10 10:48 ` Ashijeet Acharya
2016-10-10 11:31 ` Kevin Wolf
2016-10-10 11:54 ` Ashijeet Acharya
2016-10-10 12:53 ` Kevin Wolf [this message]
2016-10-10 12:57 ` Ashijeet Acharya
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=20161010125350.GH6775@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=ashijeetacharya@gmail.com \
--cc=eblake@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@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.