qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] Question nbd_refresh_filename()
Date: Mon, 27 Mar 2017 13:35:53 +0100	[thread overview]
Message-ID: <20170327123553.GB28620@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170324174844.GC3823@noname.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]

On Fri, Mar 24, 2017 at 06:48:44PM +0100, Kevin Wolf wrote:
> Am 24.03.2017 um 16:47 hat Stefan Hajnoczi geschrieben:
> > On Thu, Mar 23, 2017 at 05:48:48PM +0100, Markus Armbruster wrote:
> > > BlockdevOptionsNbd has a member SocketAddress, and nbd_config() doesn't
> > > restrict variants.  Thus, all four SOCKET_ADDRESS_KIND_ can occur.
> > > 
> > > Now have a look at nbd_refresh_filename().  s->saddr->type is If
> > > SOCKET_ADDRESS_KIND_VSOCK or SOCKET_ADDRESS_KIND_FD, then @host, @port
> > > and @path all remain null, and bs->exact_filename[] is not touched.
> > > 
> > > Does this work as intended?
> > 
> > NDB over AF_VSOCK has not been tested.  I would expect it to fail
> > earlier than nbd_refresh_filename().
> 
> Why would that be? Do the socket creation helper functions not support
> vsock yet?

You are right.  The following creates an AF_VSOCK connection:

  -drive if=virtio,file.driver=nbd,file.server.type=vsock,file.server.data.cid=3,file.server.data.port=1234

There is no pretty filename or URL representation that block/nbd.c
parses today.  The user must specify the full file.server
VsockSocketAddress options.

I think nbd_refresh_filename() is fine from a vsock point of view.  If
we'd like to encourage NBD-over-vsock in the future we could add code to
for nbd+vsock:// but in the meantime we don't need to fill in
bs->exact_filename[].

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

      reply	other threads:[~2017-03-27 12:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 16:48 [Qemu-devel] Question nbd_refresh_filename() Markus Armbruster
2017-03-24 15:47 ` Stefan Hajnoczi
2017-03-24 17:48   ` Kevin Wolf
2017-03-27 12:35     ` Stefan Hajnoczi [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=20170327123553.GB28620@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --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).