From c16b5a2ca0b186de618654a576bdad9cdd2d1ab2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 25 May 2009 12:37:32 +0200 Subject: fully split aio_pool from BlockDriver Now that we have a separate aio pool structure we can remove those aio pool details from BlockDriver. Every driver supporting AIO now needs to declare a static AIOPool with the aiocb size and the cancellation method. This cleans up the current code considerably and will make it cleaner and more obvious to support two different aio implementations behind a single BlockDriver. Signed-off-by: Christoph Hellwig Signed-off-by: Anthony Liguori --- block_int.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'block_int.h') diff --git a/block_int.h b/block_int.h index 0820ed1d5c..8d0da7cfd7 100644 --- a/block_int.h +++ b/block_int.h @@ -67,8 +67,6 @@ struct BlockDriver { BlockDriverAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque); - void (*bdrv_aio_cancel)(BlockDriverAIOCB *acb); - int aiocb_size; const char *protocol_name; int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset); @@ -102,8 +100,6 @@ struct BlockDriver { unsigned long int req, void *buf, BlockDriverCompletionFunc *cb, void *opaque); - AIOPool aio_pool; - /* List of options for creating images, terminated by name == NULL */ QEMUOptionParameter *create_options; @@ -173,13 +169,8 @@ struct BlockDriverAIOCB { void get_tmp_filename(char *filename, int size); -void aio_pool_init(AIOPool *pool, int aiocb_size, - void (*cancel)(BlockDriverAIOCB *acb)); - -void *qemu_aio_get(BlockDriverState *bs, BlockDriverCompletionFunc *cb, - void *opaque); -void *qemu_aio_get_pool(AIOPool *pool, BlockDriverState *bs, - BlockDriverCompletionFunc *cb, void *opaque); +void *qemu_aio_get(AIOPool *pool, BlockDriverState *bs, + BlockDriverCompletionFunc *cb, void *opaque); void qemu_aio_release(void *p); void *qemu_blockalign(BlockDriverState *bs, size_t size); -- cgit v1.2.3