From 7c84b1b8310cd634825c77d45b4db89bb44c5cee Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 7 Oct 2014 13:59:14 +0200 Subject: block: Rename BlockDriverAIOCB* to BlockAIOCB* I'll use BlockDriverAIOCB with block backends shortly, and the name is going to fit badly there. It's a block layer thing anyway, not just a block driver thing. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- include/block/aio.h | 8 ++++---- include/block/block.h | 34 +++++++++++++++++----------------- include/block/block_int.h | 10 +++++----- include/block/thread-pool.h | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) (limited to 'include/block') diff --git a/include/block/aio.h b/include/block/aio.h index 1562721..ce99250 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -22,16 +22,16 @@ #include "qemu/rfifolock.h" #include "qemu/timer.h" -typedef struct BlockDriverAIOCB BlockDriverAIOCB; +typedef struct BlockAIOCB BlockAIOCB; typedef void BlockDriverCompletionFunc(void *opaque, int ret); typedef struct AIOCBInfo { - void (*cancel_async)(BlockDriverAIOCB *acb); - AioContext *(*get_aio_context)(BlockDriverAIOCB *acb); + void (*cancel_async)(BlockAIOCB *acb); + AioContext *(*get_aio_context)(BlockAIOCB *acb); size_t aiocb_size; } AIOCBInfo; -struct BlockDriverAIOCB { +struct BlockAIOCB { const AIOCBInfo *aiocb_info; BlockDriverState *bs; BlockDriverCompletionFunc *cb; diff --git a/include/block/block.h b/include/block/block.h index 3dc7c56..0edddfe 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -248,9 +248,9 @@ int bdrv_write(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors); int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BdrvRequestFlags flags); -BlockDriverAIOCB *bdrv_aio_write_zeroes(BlockDriverState *bs, int64_t sector_num, - int nb_sectors, BdrvRequestFlags flags, - BlockDriverCompletionFunc *cb, void *opaque); +BlockAIOCB *bdrv_aio_write_zeroes(BlockDriverState *bs, int64_t sector_num, + int nb_sectors, BdrvRequestFlags flags, + BlockDriverCompletionFunc *cb, void *opaque); int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags); int bdrv_pread(BlockDriverState *bs, int64_t offset, void *buf, int count); @@ -326,19 +326,19 @@ BlockDriverState *check_to_replace_node(const char *node_name, Error **errp); /* async block I/O */ typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector, int sector_num); -BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num, - QEMUIOVector *iov, int nb_sectors, - BlockDriverCompletionFunc *cb, void *opaque); -BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num, - QEMUIOVector *iov, int nb_sectors, - BlockDriverCompletionFunc *cb, void *opaque); -BlockDriverAIOCB *bdrv_aio_flush(BlockDriverState *bs, - BlockDriverCompletionFunc *cb, void *opaque); -BlockDriverAIOCB *bdrv_aio_discard(BlockDriverState *bs, - int64_t sector_num, int nb_sectors, - BlockDriverCompletionFunc *cb, void *opaque); -void bdrv_aio_cancel(BlockDriverAIOCB *acb); -void bdrv_aio_cancel_async(BlockDriverAIOCB *acb); +BlockAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num, + QEMUIOVector *iov, int nb_sectors, + BlockDriverCompletionFunc *cb, void *opaque); +BlockAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num, + QEMUIOVector *iov, int nb_sectors, + BlockDriverCompletionFunc *cb, void *opaque); +BlockAIOCB *bdrv_aio_flush(BlockDriverState *bs, + BlockDriverCompletionFunc *cb, void *opaque); +BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs, + int64_t sector_num, int nb_sectors, + BlockDriverCompletionFunc *cb, void *opaque); +void bdrv_aio_cancel(BlockAIOCB *acb); +void bdrv_aio_cancel_async(BlockAIOCB *acb); typedef struct BlockRequest { /* Fields to be filled by multiwrite caller */ @@ -358,7 +358,7 @@ int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs, /* sg packet commands */ int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf); -BlockDriverAIOCB *bdrv_aio_ioctl(BlockDriverState *bs, +BlockAIOCB *bdrv_aio_ioctl(BlockDriverState *bs, unsigned long int req, void *buf, BlockDriverCompletionFunc *cb, void *opaque); diff --git a/include/block/block_int.h b/include/block/block_int.h index da00aa5..ab74618 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -128,15 +128,15 @@ struct BlockDriver { void (*bdrv_refresh_filename)(BlockDriverState *bs); /* aio */ - BlockDriverAIOCB *(*bdrv_aio_readv)(BlockDriverState *bs, + BlockAIOCB *(*bdrv_aio_readv)(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque); - BlockDriverAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs, + BlockAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque); - BlockDriverAIOCB *(*bdrv_aio_flush)(BlockDriverState *bs, + BlockAIOCB *(*bdrv_aio_flush)(BlockDriverState *bs, BlockDriverCompletionFunc *cb, void *opaque); - BlockDriverAIOCB *(*bdrv_aio_discard)(BlockDriverState *bs, + BlockAIOCB *(*bdrv_aio_discard)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque); @@ -218,7 +218,7 @@ struct BlockDriver { /* to control generic scsi devices */ int (*bdrv_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf); - BlockDriverAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs, + BlockAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf, BlockDriverCompletionFunc *cb, void *opaque); diff --git a/include/block/thread-pool.h b/include/block/thread-pool.h index 4723752..1fd57ec 100644 --- a/include/block/thread-pool.h +++ b/include/block/thread-pool.h @@ -27,7 +27,7 @@ typedef struct ThreadPool ThreadPool; ThreadPool *thread_pool_new(struct AioContext *ctx); void thread_pool_free(ThreadPool *pool); -BlockDriverAIOCB *thread_pool_submit_aio(ThreadPool *pool, +BlockAIOCB *thread_pool_submit_aio(ThreadPool *pool, ThreadPoolFunc *func, void *arg, BlockDriverCompletionFunc *cb, void *opaque); int coroutine_fn thread_pool_submit_co(ThreadPool *pool, -- cgit v1.1