From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjZhG-0005zo-Eu for qemu-devel@nongnu.org; Wed, 20 Jul 2011 12:32:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjZhA-0001KW-VH for qemu-devel@nongnu.org; Wed, 20 Jul 2011 12:32:29 -0400 Received: from oxygen.pond.sub.org ([78.46.104.156]:39185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjZhA-0001K1-8y for qemu-devel@nongnu.org; Wed, 20 Jul 2011 12:32:24 -0400 From: Markus Armbruster Date: Wed, 20 Jul 2011 18:24:26 +0200 Message-Id: <1311179069-27882-53-git-send-email-armbru@redhat.com> In-Reply-To: <1311179069-27882-1-git-send-email-armbru@redhat.com> References: <1311179069-27882-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 52/55] block: Move BlockDriverAIOCB & friends from block_int.h to block.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, quintela@redhat.com, dbaryshkov@gmail.com, stefano.stabellini@eu.citrix.com, lcapitulino@redhat.com, amit.shah@redhat.com Device models should be able to use them without an unclean include of block_int.h. Signed-off-by: Markus Armbruster --- 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 -- 1.7.2.3