From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: qemu-devel@nongnu.org, Denis Plotnikov <dplotnikov@virtuozzo.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] qemu-nbd: add the option to use pre-created server socket
Date: Thu, 29 Sep 2016 12:13:18 +0100 [thread overview]
Message-ID: <20160929111318.GN5312@redhat.com> (raw)
In-Reply-To: <1475146935-12118-1-git-send-email-den@openvz.org>
On Thu, Sep 29, 2016 at 02:02:15PM +0300, Denis V. Lunev wrote:
> From: Denis Plotnikov <dplotnikov@virtuozzo.com>
>
> Originally NBD server socket was created by qemu-nbd code. This leads to
> the race when the management layer starts qemu-nbd server and allows a
> client to connect to the server. In this case there is a possibility that
> qemu-nbd does not open listening server socket yet. Creating listening
> socket before starting of qemu-ndb and passing socket fd via command line
> solves this issue completely.
FWIW, this could be solved in qemu-nbd itself if we had a general
ability to request "daemon" mode - currently it only daemonizes
if attaching to a nbd block device.
The key would be that qemu-nbd would open the listening socket
before daemonizing. Thus when the mgmt application spawned
qemu-nbd in daemon mode, it can be sure that the listener
socket is present when waitpid() completes.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
next prev parent reply other threads:[~2016-09-29 11:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 11:02 [Qemu-devel] [PATCH 1/1] qemu-nbd: add the option to use pre-created server socket Denis V. Lunev
2016-09-29 11:13 ` Daniel P. Berrange [this message]
2016-09-29 12:18 ` Paolo Bonzini
2016-09-29 12:32 ` Daniel P. Berrange
2016-09-29 13:41 ` Stefan Hajnoczi
2016-09-29 15:05 ` Eric Blake
2016-09-29 15:52 ` Denis V. Lunev
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=20160929111318.GN5312@redhat.com \
--to=berrange@redhat.com \
--cc=den@openvz.org \
--cc=dplotnikov@virtuozzo.com \
--cc=pbonzini@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 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.