qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Changlong Xie <xiecl.fnst@cn.fujitsu.com>,
	qemu devel <qemu-devel@nongnu.org>,
	"Daniel P. Berrange" <berrange@redhat.com>
Cc: Li Zhijian <lizhijian@cn.fujitsu.com>,
	zhanghailiang <zhang.zhanghailiang@huawei.com>
Subject: Re: [Qemu-devel] Questions about nbd with QIOChannel
Date: Thu, 7 Apr 2016 13:17:35 +0200	[thread overview]
Message-ID: <570641CF.7000704@redhat.com> (raw)
In-Reply-To: <57063EA4.6050402@cn.fujitsu.com>



On 07/04/2016 13:04, Changlong Xie wrote:
> Hi all
> 
> Recently during test COLO, i found sometimes the client goes to hung on
> Primary side. First i thought it maybe a COLO revelant issue, but after
> ton of tests i doubt that this maybe a NBD issue (athough i'm not sure).
> So i'd like to share what i found:
> 
> Since commit 1c778ef7, we convert to using QIOChannel APIs for actual
> socket I/O.
> 
> nbd_reply_ready()
>   read_sync()
>     nbd_wr_syncv()
>     {
>      ...
>      while (nlocal_iov > 0) {
>          ...
>          if (do_read) {
>              len = qio_channel_readv(ioc, local_iov, nlocal_iov,
>                                      &local_err);
>          } else {
>              ...
>          }
>          if (len == QIO_CHANNEL_ERR_BLOCK) {
>              if (qemu_in_coroutine()) {
>                  qemu_coroutine_yield();
>              } else {
>                  qio_channel_wait(ioc,
>                                   do_read ? G_IO_IN : G_IO_OUT);
>              }

You are right; you've found a bug.

Paolo

      reply	other threads:[~2016-04-07 11:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 11:04 [Qemu-devel] Questions about nbd with QIOChannel Changlong Xie
2016-04-07 11:17 ` Paolo Bonzini [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=570641CF.7000704@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiecl.fnst@cn.fujitsu.com \
    --cc=zhang.zhanghailiang@huawei.com \
    /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).