65 lines
1.8 KiB
Diff
65 lines
1.8 KiB
Diff
# HG changeset patch
|
|
# User Keir Fraser <keir.fraser@citrix.com>
|
|
# Date 1202724185 0
|
|
# Node ID dbb60ed6bc22ea17d34d18ae4a769b917acd5ef4
|
|
# Parent 54bd38dab5ef5713623cd5b83721820a1fd61a06
|
|
ioemu: make AIO optional (already done upstream)
|
|
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
Index: xen-3.2.1-testing/tools/ioemu/block-raw.c
|
|
===================================================================
|
|
--- xen-3.2.1-testing.orig/tools/ioemu/block-raw.c
|
|
+++ xen-3.2.1-testing/tools/ioemu/block-raw.c
|
|
@@ -25,7 +25,9 @@
|
|
#include "block_int.h"
|
|
#include <assert.h>
|
|
#ifndef _WIN32
|
|
+#ifndef NO_AIO
|
|
#include <aio.h>
|
|
+#endif
|
|
|
|
#ifndef QEMU_TOOL
|
|
#include "exec-all.h"
|
|
@@ -268,6 +270,7 @@ label__raw_write__success:
|
|
/***********************************************************/
|
|
/* Unix AIO using POSIX AIO */
|
|
|
|
+#ifndef NO_AIO
|
|
typedef struct RawAIOCB {
|
|
BlockDriverAIOCB common;
|
|
struct aiocb aiocb;
|
|
@@ -493,6 +496,7 @@ static void raw_aio_cancel(BlockDriverAI
|
|
pacb = &acb->next;
|
|
}
|
|
}
|
|
+#endif
|
|
|
|
static void raw_close(BlockDriverState *bs)
|
|
{
|
|
@@ -613,10 +617,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,
|
|
@@ -949,10 +955,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,
|