[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Questions about nbd with QIOChannel
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] Questions about nbd with QIOChannel |
Date: |
Thu, 7 Apr 2016 13:17:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
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