From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60929 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OORRx-0002eN-Mw for qemu-devel@nongnu.org; Tue, 15 Jun 2010 04:24:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OORRu-00030C-PF for qemu-devel@nongnu.org; Tue, 15 Jun 2010 04:24:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6984) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OORRu-000306-Ig for qemu-devel@nongnu.org; Tue, 15 Jun 2010 04:24:46 -0400 Message-ID: <4C1738AE.8040906@redhat.com> Date: Tue, 15 Jun 2010 10:24:14 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1275933621-404-1-git-send-email-morita.kazutaka@lab.ntt.co.jp> <4C123BAC.9080008@redhat.com> <878w6hs8e5.wl%morita.kazutaka@lab.ntt.co.jp> In-Reply-To: <878w6hs8e5.wl%morita.kazutaka@lab.ntt.co.jp> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v5] block: add sheepdog driver for distributed storage support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: MORITA Kazutaka Cc: aliguori@us.ibm.com, sheepdog@lists.wpkg.org, chris.krumme@windriver.com, kvm@vger.kernel.org, qemu-devel@nongnu.org, Christian Brunner Am 14.06.2010 21:48, schrieb MORITA Kazutaka: >> 3) qemu-io aio_read/write doesn't seem to work well with it. I only get >> the result of the AIO request when I exit qemu-io. This may be a qemu-io >> problem or a Sheepdog one. We need to look into this, qemu-io is >> important for testing and debugging (particularly for qemu-iotests) >> > Sheepdog receives responses from the server in the fd handler to the > socket connection. But, while qemu-io executes aio_read/aio_write, it > doesn't call qemu_aio_wait() and the fd handler isn't invoked at all. > This seems to be the reason of the problem. > > I'm not sure this is a qemu-io problem or a Sheepdog one. If it is a > qemu-io problem, we need to call qemu_aio_wait() somewhere in the > command_loop(), I guess. If it is a Sheepdog problem, we need to > consider another mechanism to receive responses... Not sure either. I think posix-aio-compat needs fd handlers to be called, too, and it kind of works. I'm saying "kind of" because after an aio_read/write command qemu-io exits (it doesn't with Sheepdog). And when exiting there is a qemu_aio_wait(), so this explains why you get a result there. I guess it's a bug in the posix-aio-compat case rather than with Sheepdog. The good news is that if qemu-iotests works with only one aio_read/write command before qemu-io exits, it's going to work with Sheepdog, too. Kevin