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
-- 
------------- [EMAIL PROTECTED] ---------------
"The best way to predict the future is to invent it."
- Alan Kay

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to