From: Laurent Vivier <Laurent.Vivier@bull.net>
To: Kevin Wolf <kwolf@suse.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] Use qemu_memalign instead of qemu_malloc
Date: Wed, 25 Jun 2008 16:55:44 +0200 [thread overview]
Message-ID: <1214405744.5798.12.camel@frecb07144> (raw)
In-Reply-To: <486252FA.6030804@suse.de>
Le mercredi 25 juin 2008 à 16:15 +0200, Kevin Wolf a écrit :
> 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?
Generally EINVAL with O_DIRECT opened files means there is an alignment
problem with offset, buffer address or size to read (must be multiple of
512).
Regards,
Laurent
--
------------- Laurent.Vivier@bull.net ---------------
"The best way to predict the future is to invent it."
- Alan Kay
next prev parent reply other threads:[~2008-06-25 14:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 18:49 [PATCH] Use qemu_memalign instead of qemu_malloc Anthony Liguori
2008-06-25 9:19 ` Kevin Wolf
2008-06-25 13:48 ` Anthony Liguori
2008-06-25 14:15 ` Kevin Wolf
2008-06-25 14:19 ` Anthony Liguori
2008-06-25 14:29 ` Kevin Wolf
2008-06-25 15:22 ` Anthony Liguori
2008-06-25 15:29 ` Kevin Wolf
2008-06-25 15:44 ` Anthony Liguori
2008-06-25 14:55 ` Laurent Vivier [this message]
2008-06-25 15:14 ` Kevin Wolf
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=1214405744.5798.12.camel@frecb07144 \
--to=laurent.vivier@bull.net \
--cc=aliguori@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=kwolf@suse.de \
/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