qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 3/3] nbd-server: Coroutine based negotiation
Date: Thu, 14 Jan 2016 17:29:16 +0000	[thread overview]
Message-ID: <20160114172916.GF19340@redhat.com> (raw)
In-Reply-To: <1452760863-25350-4-git-send-email-famz@redhat.com>

On Thu, Jan 14, 2016 at 04:41:03PM +0800, Fam Zheng wrote:
> Create a coroutine in nbd_client_new, so that nbd_send_negotiate doesn't
> need qemu_set_block().
> 
> Handlers need to be set temporarily for csock fd in case the coroutine
> yields during I/O.
> 
> With this, if the other end disappears in the middle of the negotiation,
> we don't block the whole event loop.
> 
> To make the code clearer, unify all function names that belong to
> negotiate, so they are less likely to be misused. This is important
> because we rely on negotiation staying in main loop, as commented in
> nbd_negotiate_read/write().

To nit-pick, is generally better to do such generic renaming of
existing code separately from commits which include functional
changes

> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  nbd/server.c | 150 ++++++++++++++++++++++++++++++++++++++++-------------------

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

      reply	other threads:[~2016-01-14 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14  8:41 [Qemu-devel] [PATCH v3 0/3] nbd: Async built-in server negotiation Fam Zheng
2016-01-14  8:41 ` [Qemu-devel] [PATCH v3 1/3] nbd: Always call "close_fn" in nbd_client_new Fam Zheng
2016-01-14 17:23   ` Daniel P. Berrange
2016-01-14  8:41 ` [Qemu-devel] [PATCH v3 2/3] nbd: Split nbd.c Fam Zheng
2016-01-14 17:26   ` Daniel P. Berrange
2016-01-14 20:31     ` Paolo Bonzini
2016-01-14  8:41 ` [Qemu-devel] [PATCH v3 3/3] nbd-server: Coroutine based negotiation Fam Zheng
2016-01-14 17:29   ` Daniel P. Berrange [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=20160114172916.GF19340@redhat.com \
    --to=berrange@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).