aboutsummaryrefslogtreecommitdiff
path: root/block_int.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-05-25 12:37:32 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-05-27 09:46:03 -0500
commitc16b5a2ca0b186de618654a576bdad9cdd2d1ab2 (patch)
tree8c793602c179ad2d5adbce65bc6583340a12cd92 /block_int.h
parentad53089b0d0b4bc0731d978e5713365e1a91ba74 (diff)
downloadqemu-c16b5a2ca0b186de618654a576bdad9cdd2d1ab2.zip
qemu-c16b5a2ca0b186de618654a576bdad9cdd2d1ab2.tar.gz
qemu-c16b5a2ca0b186de618654a576bdad9cdd2d1ab2.tar.bz2
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 <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/block_int.h b/block_int.h
index 0820ed1..8d0da7c 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);