Re: [PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-25 Thread Anthony Liguori
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

Re: [PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-25 Thread Kevin Wolf
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

Re: [PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-25 Thread Anthony Liguori
Kevin Wolf wrote: 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.

Re: [PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-25 Thread Kevin Wolf
Anthony Liguori schrieb: Kevin Wolf wrote: Anthony Liguori schrieb: 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? It's

Re: [PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-25 Thread Laurent Vivier
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

Re: [PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-25 Thread Anthony Liguori
Kevin Wolf wrote: Anthony Liguori schrieb: Kevin Wolf wrote: Anthony Liguori schrieb: 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

Re: [PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-25 Thread Kevin Wolf
Anthony Liguori schrieb: Kevin Wolf wrote: Anthony Liguori schrieb: Kevin Wolf wrote: Anthony Liguori schrieb: 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

Re: [PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-25 Thread Anthony Liguori
Kevin Wolf wrote: Anthony Liguori schrieb: Kevin Wolf wrote: Anthony Liguori schrieb: Kevin Wolf wrote: Anthony Liguori schrieb: 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

[PATCH] Use qemu_memalign instead of qemu_malloc

2008-06-24 Thread Anthony Liguori
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. It applies on top of my previous patch to introduce copies in virtio-blk. Signed-off-by: Anthony Liguori [EMAIL