qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v2 2/2] nbd: Coroutine based nbd_send_negotiate


From: Fam Zheng
Subject: Re: [Qemu-block] [PATCH v2 2/2] nbd: Coroutine based nbd_send_negotiate
Date: Tue, 12 Jan 2016 19:44:13 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, 01/11 15:00, Paolo Bonzini wrote:
> 
> 
> On 11/01/2016 04:36, Fam Zheng wrote:
> >  
> > +    aio_set_fd_handler(ctx, client->sock, true,
> > +                       nbd_negotiate_continue,
> > +                       nbd_negotiate_continue, data->co);
> >      TRACE("Beginning negotiation.");
> >      memset(buf, 0, sizeof(buf));
> 
> This causes a busy loop if the socket is writable but the client does
> not send data.  I think you need to set/clear the handler (using
> qemu_coroutine_self() instead of data->co, probably) every time the
> direction of negotiation switches.  That is, set only a read handler
> before read_sync, and only a write handler before write_sync.
> 

You are right, I'll take a look and work on v3.

Fam



reply via email to

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