From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: [PATCH] Use qemu_memalign instead of qemu_malloc Date: Wed, 25 Jun 2008 16:15:22 +0200 Message-ID: <486252FA.6030804@suse.de> References: <1214333395-4094-1-git-send-email-aliguori@us.ibm.com> <48620DAB.5010501@suse.de> <48624C9D.90903@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from cantor.suse.de ([195.135.220.2]:36591 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754187AbYFYOSQ (ORCPT ); Wed, 25 Jun 2008 10:18:16 -0400 In-Reply-To: <48624C9D.90903@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori schrieb: > Kevin Wolf wrote: >> Anthony Liguori schrieb: >> >>> I guess the main block code is not as defensive as I thought it was. >>> This patch >>> uses qemu_memalign to allocate the buffers for IO so that you don't >>> get errors >>> when using O_DIRECT. >>> >> >> Actually, the block code should be able to deal with unaligned buffers >> since qemu rev. 4599. This change seems to be present in current KVM. >> > > That was what I thought at first too. > >> Can you tell exactly which operation failed? > > The aio requests fail with -22 (EINVAL). Yes, if it fails, the EINVAL is no surprise. I meant what code path it was using. Obviously we missed something in our patch and I'd like to fix that. Did the error occur on raw images or something like qcow2? Kevin