From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 2/2] nbd: Coroutine based nbd_send_negotiate
Date: Tue, 12 Jan 2016 19:44:13 +0800 [thread overview]
Message-ID: <20160112114413.GA3903@ad.usersys.redhat.com> (raw)
In-Reply-To: <5693B59A.6040806@redhat.com>
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
prev parent reply other threads:[~2016-01-12 11:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 3:36 [Qemu-devel] [PATCH v2 0/2] nbd: Async built-in server negotiation Fam Zheng
2016-01-11 3:36 ` [Qemu-devel] [PATCH v2 1/2] nbd: Always call "close_fn" in nbd_client_new Fam Zheng
2016-01-11 3:36 ` [Qemu-devel] [PATCH v2 2/2] nbd: Coroutine based nbd_send_negotiate Fam Zheng
2016-01-11 14:00 ` Paolo Bonzini
2016-01-12 11:44 ` Fam Zheng [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=20160112114413.GA3903@ad.usersys.redhat.com \
--to=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).