From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: [PATCH] ioemu: make AIO optional Date: Thu, 7 Feb 2008 14:20:15 +0000 Message-ID: <20080207142015.GD9343@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ioemu: make AIO optional (already done upstream) Signed-off-by: Samuel Thibault diff -r f5493972d237 tools/ioemu/block-raw.c --- a/tools/ioemu/block-raw.c Thu Feb 07 14:15:19 2008 +0000 +++ b/tools/ioemu/block-raw.c Thu Feb 07 14:15:34 2008 +0000 @@ -25,7 +25,9 @@ #include "block_int.h" #include #ifndef _WIN32 +#ifndef NO_AIO #include +#endif #ifndef QEMU_TOOL #include "exec-all.h" @@ -255,6 +257,7 @@ label__raw_write__success: /***********************************************************/ /* Unix AIO using POSIX AIO */ +#ifndef NO_AIO typedef struct RawAIOCB { BlockDriverAIOCB common; struct aiocb aiocb; @@ -480,6 +483,7 @@ static void raw_aio_cancel(BlockDriverAI pacb = &acb->next; } } +#endif static void raw_close(BlockDriverState *bs) { @@ -600,10 +604,12 @@ BlockDriver bdrv_raw = { raw_create, raw_flush, +#ifndef NO_AIO .bdrv_aio_read = raw_aio_read, .bdrv_aio_write = raw_aio_write, .bdrv_aio_cancel = raw_aio_cancel, .aiocb_size = sizeof(RawAIOCB), +#endif .protocol_name = "file", .bdrv_pread = raw_pread, .bdrv_pwrite = raw_pwrite, @@ -936,10 +942,12 @@ BlockDriver bdrv_host_device = { NULL, raw_flush, +#ifndef NO_AIO .bdrv_aio_read = raw_aio_read, .bdrv_aio_write = raw_aio_write, .bdrv_aio_cancel = raw_aio_cancel, .aiocb_size = sizeof(RawAIOCB), +#endif .bdrv_pread = raw_pread, .bdrv_pwrite = raw_pwrite, .bdrv_getlength = raw_getlength,