[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/46] aio: move BlockDriverAIOCB to qemu-aio.h
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 06/46] aio: move BlockDriverAIOCB to qemu-aio.h |
Date: |
Thu, 5 Apr 2012 17:51:44 +0200 |
From: Paolo Bonzini <address@hidden>
And remove several block_int.h inclusions that should not be there.
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.h | 2 --
block_int.h | 18 ------------------
dma-helpers.c | 1 -
hw/ide/core.c | 1 -
hw/lsi53c895a.c | 1 -
linux-aio.c | 1 -
qemu-aio.h | 21 +++++++++++++++++++++
7 files changed, 21 insertions(+), 24 deletions(-)
diff --git a/block.h b/block.h
index 415bb17..e670606 100644
--- a/block.h
+++ b/block.h
@@ -180,8 +180,6 @@ typedef struct BdrvCheckResult {
int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res);
/* async block I/O */
-typedef struct BlockDriverAIOCB BlockDriverAIOCB;
-typedef void BlockDriverCompletionFunc(void *opaque, int ret);
typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector,
int sector_num);
BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
diff --git a/block_int.h b/block_int.h
index b460c36..22c86a5 100644
--- a/block_int.h
+++ b/block_int.h
@@ -53,12 +53,6 @@
typedef struct BdrvTrackedRequest BdrvTrackedRequest;
-typedef struct AIOPool {
- void (*cancel)(BlockDriverAIOCB *acb);
- int aiocb_size;
- BlockDriverAIOCB *free_aiocb;
-} AIOPool;
-
typedef struct BlockIOLimit {
int64_t bps[3];
int64_t iops[3];
@@ -302,20 +296,8 @@ struct BlockDriverState {
BlockJob *job;
};
-struct BlockDriverAIOCB {
- AIOPool *pool;
- BlockDriverState *bs;
- BlockDriverCompletionFunc *cb;
- void *opaque;
- BlockDriverAIOCB *next;
-};
-
void get_tmp_filename(char *filename, int size);
-void *qemu_aio_get(AIOPool *pool, BlockDriverState *bs,
- BlockDriverCompletionFunc *cb, void *opaque);
-void qemu_aio_release(void *p);
-
void bdrv_set_io_limits(BlockDriverState *bs,
BlockIOLimit *io_limits);
diff --git a/dma-helpers.c b/dma-helpers.c
index c29ea6d..7fcc86d 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -8,7 +8,6 @@
*/
#include "dma.h"
-#include "block_int.h"
#include "trace.h"
void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 4d568ac..6f06d28 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -31,7 +31,6 @@
#include "sysemu.h"
#include "dma.h"
#include "blockdev.h"
-#include "block_int.h"
#include <hw/ide/internal.h>
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index edc09b7..f022a02 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -15,7 +15,6 @@
#include "hw.h"
#include "pci.h"
#include "scsi.h"
-#include "block_int.h"
#include "dma.h"
//#define DEBUG_LSI
diff --git a/linux-aio.c b/linux-aio.c
index d2fc2e7..15261ec 100644
--- a/linux-aio.c
+++ b/linux-aio.c
@@ -9,7 +9,6 @@
*/
#include "qemu-common.h"
#include "qemu-aio.h"
-#include "block_int.h"
#include "block/raw-posix-aio.h"
#include <sys/eventfd.h>
diff --git a/qemu-aio.h b/qemu-aio.h
index 3bdd749..230c2f7 100644
--- a/qemu-aio.h
+++ b/qemu-aio.h
@@ -17,6 +17,27 @@
#include "qemu-common.h"
#include "qemu-char.h"
+typedef struct BlockDriverAIOCB BlockDriverAIOCB;
+typedef void BlockDriverCompletionFunc(void *opaque, int ret);
+
+typedef struct AIOPool {
+ void (*cancel)(BlockDriverAIOCB *acb);
+ int aiocb_size;
+ BlockDriverAIOCB *free_aiocb;
+} AIOPool;
+
+struct BlockDriverAIOCB {
+ AIOPool *pool;
+ BlockDriverState *bs;
+ BlockDriverCompletionFunc *cb;
+ void *opaque;
+ BlockDriverAIOCB *next;
+};
+
+void *qemu_aio_get(AIOPool *pool, BlockDriverState *bs,
+ BlockDriverCompletionFunc *cb, void *opaque);
+void qemu_aio_release(void *p);
+
/* Returns 1 if there are still outstanding AIO requests; 0 otherwise */
typedef int (AioFlushHandler)(void *opaque);
--
1.7.6.5
- [Qemu-devel] [PULL 00/46] Block patches, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 03/46] qcow2: Remove unused parameter in get_cluster_table(), Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 02/46] tracetool: Forbid argument name 'next', Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 04/46] qemu-io: add option to enable tracing, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 01/46] trace-events: Rename 'next' argument, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 05/46] block: push recursive flushing up from drivers, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 06/46] aio: move BlockDriverAIOCB to qemu-aio.h,
Kevin Wolf <=
- [Qemu-devel] [PATCH 07/46] ide: IDENTIFY word 86 bit 14 is reserved, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 10/46] ide: Adds wwn=hex qdev option, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 08/46] ide: Add "model=s" qdev option, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 17/46] vdi: merge aio_read_cb and aio_write_cb into callers, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 18/46] vdi: move aiocb fields to locals, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 23/46] block: disable I/O throttling on sync api, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 24/46] block: cancel jobs when a device is ready to go away, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 22/46] Use DMADirection type for dma_bdrv_io, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 43/46] qed: add bdrv_invalidate_cache to be called after incoming live migration, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 37/46] qemu-iotests: Fix call syntax for qemu-img, Kevin Wolf, 2012/04/05