[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3 3/3] nbd-server: Coroutine based negotiation

From: Daniel P. Berrange
Subject: Re: [Qemu-block] [PATCH v3 3/3] nbd-server: Coroutine based negotiation
Date: Thu, 14 Jan 2016 17:29:16 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

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

> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  nbd/server.c | 150 
> ++++++++++++++++++++++++++++++++++++++++-------------------

Reviewed-by: Daniel P. Berrange <address@hidden>

|: 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 via email to

[Prev in Thread] Current Thread [Next in Thread]