Device models should be able to use them without an unclean include of block_int.h.
Signed-off-by: Markus Armbruster <arm...@redhat.com> --- block.h | 15 +++++++++++++++ block_int.h | 18 ------------------ hw/ide/core.c | 1 - 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/block.h b/block.h index c596b4c..be5ed0a 100644 --- a/block.h +++ b/block.h @@ -140,8 +140,23 @@ int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res); /* async block I/O */ 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; +}; typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector, int sector_num); +void *qemu_aio_get(AIOPool *pool, BlockDriverState *bs, + BlockDriverCompletionFunc *cb, void *opaque); +void qemu_aio_release(void *p); BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *iov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque); diff --git a/block_int.h b/block_int.h index 768c842..9f1121d 100644 --- a/block_int.h +++ b/block_int.h @@ -40,12 +40,6 @@ #define BLOCK_OPT_TABLE_SIZE "table_size" #define BLOCK_OPT_PREALLOC "preallocation" -typedef struct AIOPool { - void (*cancel)(BlockDriverAIOCB *acb); - int aiocb_size; - BlockDriverAIOCB *free_aiocb; -} AIOPool; - struct BlockDriver { const char *format_name; int instance_size; @@ -199,20 +193,8 @@ struct BlockDriverState { void *private; }; -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); - #ifdef _WIN32 int is_windows_drive(const char *filename); #endif diff --git a/hw/ide/core.c b/hw/ide/core.c index bfa1162..cac3518 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -30,7 +30,6 @@ #include "sysemu.h" #include "dma.h" #include "blockdev.h" -#include "block_int.h" #include <hw/ide/internal.h> -- 1.7.2.3