qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.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: Fri, 24 Mar 2017 18:48:44 +0100	[thread overview]
Message-ID: <20170324174844.GC3823@noname.redhat.com> (raw)
In-Reply-To: <20170324154710.GC5849@stefanha-x1.localdomain>

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?

> It's certainly possible to come up with the host=,port= for AF_VSOCK.
> 
> Not sure about file descriptor passing.  Either we could getsockaddr()
> and print out the host=,port= or path= (depending on the address
> family), or we could use some syntax for referring to the file
> descriptor.

The point of .bdrv_refresh_filename is to provide a "nicer" filename for
humans, but it still needs to be a valid input. We do accept URLs as a
convenience feature for NBD connections over TCP and Unix domain
sockets, so we create a filename for those. For everything else, we
require individual options rather than a URL and should therefore not
create a filename. The block layer creates a json: description then.

Kevin

  reply	other threads:[~2017-03-24 17:48 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 [this message]
2017-03-27 12:35     ` 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=20170324174844.GC3823@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).