aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-10-07 13:59:15 +0200
committerKevin Wolf <kwolf@redhat.com>2014-10-20 13:41:27 +0200
commit097310b53e9d498ef8e127d52ea57905cbe46ec5 (patch)
treee276753122d4c8d6ed74025779d3da923a6482d4 /include/block
parent7c84b1b8310cd634825c77d45b4db89bb44c5cee (diff)
block: Rename BlockDriverCompletionFunc to BlockCompletionFunc
I'll use it 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 <armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/aio.h6
-rw-r--r--include/block/block.h14
-rw-r--r--include/block/block_int.h20
-rw-r--r--include/block/blockjob.h4
-rw-r--r--include/block/thread-pool.h2
5 files changed, 23 insertions, 23 deletions
diff --git a/include/block/aio.h b/include/block/aio.h
index ce992502f1..6bf0e0456a 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -23,7 +23,7 @@
#include "qemu/timer.h"
typedef struct BlockAIOCB BlockAIOCB;
-typedef void BlockDriverCompletionFunc(void *opaque, int ret);
+typedef void BlockCompletionFunc(void *opaque, int ret);
typedef struct AIOCBInfo {
void (*cancel_async)(BlockAIOCB *acb);
@@ -34,13 +34,13 @@ typedef struct AIOCBInfo {
struct BlockAIOCB {
const AIOCBInfo *aiocb_info;
BlockDriverState *bs;
- BlockDriverCompletionFunc *cb;
+ BlockCompletionFunc *cb;
void *opaque;
int refcnt;
};
void *qemu_aio_get(const AIOCBInfo *aiocb_info, BlockDriverState *bs,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
void qemu_aio_unref(void *p);
void qemu_aio_ref(void *p);
diff --git a/include/block/block.h b/include/block/block.h
index 0edddfe4f3..9a490c221c 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -250,7 +250,7 @@ int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, BdrvRequestFlags flags);
BlockAIOCB *bdrv_aio_write_zeroes(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, BdrvRequestFlags flags,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags);
int bdrv_pread(BlockDriverState *bs, int64_t offset,
void *buf, int count);
@@ -328,15 +328,15 @@ typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector,
int sector_num);
BlockAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *iov, int nb_sectors,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
BlockAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *iov, int nb_sectors,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
BlockAIOCB *bdrv_aio_flush(BlockDriverState *bs,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
void bdrv_aio_cancel(BlockAIOCB *acb);
void bdrv_aio_cancel_async(BlockAIOCB *acb);
@@ -346,7 +346,7 @@ typedef struct BlockRequest {
int nb_sectors;
int flags;
QEMUIOVector *qiov;
- BlockDriverCompletionFunc *cb;
+ BlockCompletionFunc *cb;
void *opaque;
/* Filled by multiwrite implementation */
@@ -360,7 +360,7 @@ int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs,
int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf);
BlockAIOCB *bdrv_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
/* Invalidate any cached metadata used by image formats */
void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp);
diff --git a/include/block/block_int.h b/include/block/block_int.h
index ab74618464..e8e33a8b43 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -130,15 +130,15 @@ struct BlockDriver {
/* aio */
BlockAIOCB *(*bdrv_aio_readv)(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
BlockAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
BlockAIOCB *(*bdrv_aio_flush)(BlockDriverState *bs,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
BlockAIOCB *(*bdrv_aio_discard)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
int coroutine_fn (*bdrv_co_readv)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov);
@@ -220,7 +220,7 @@ struct BlockDriver {
int (*bdrv_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf);
BlockAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs,
unsigned long int req, void *buf,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
/* List of options for creating images, terminated by name == NULL */
QemuOptsList *create_opts;
@@ -501,7 +501,7 @@ int is_windows_drive(const char *filename);
*/
void stream_start(BlockDriverState *bs, BlockDriverState *base,
const char *base_id, int64_t speed, BlockdevOnError on_error,
- BlockDriverCompletionFunc *cb,
+ BlockCompletionFunc *cb,
void *opaque, Error **errp);
/**
@@ -519,7 +519,7 @@ void stream_start(BlockDriverState *bs, BlockDriverState *base,
*/
void commit_start(BlockDriverState *bs, BlockDriverState *base,
BlockDriverState *top, int64_t speed,
- BlockdevOnError on_error, BlockDriverCompletionFunc *cb,
+ BlockdevOnError on_error, BlockCompletionFunc *cb,
void *opaque, const char *backing_file_str, Error **errp);
/**
* commit_active_start:
@@ -535,7 +535,7 @@ void commit_start(BlockDriverState *bs, BlockDriverState *base,
void commit_active_start(BlockDriverState *bs, BlockDriverState *base,
int64_t speed,
BlockdevOnError on_error,
- BlockDriverCompletionFunc *cb,
+ BlockCompletionFunc *cb,
void *opaque, Error **errp);
/*
* mirror_start:
@@ -563,7 +563,7 @@ void mirror_start(BlockDriverState *bs, BlockDriverState *target,
int64_t speed, int64_t granularity, int64_t buf_size,
MirrorSyncMode mode, BlockdevOnError on_source_error,
BlockdevOnError on_target_error,
- BlockDriverCompletionFunc *cb,
+ BlockCompletionFunc *cb,
void *opaque, Error **errp);
/*
@@ -584,7 +584,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target,
int64_t speed, MirrorSyncMode sync_mode,
BlockdevOnError on_source_error,
BlockdevOnError on_target_error,
- BlockDriverCompletionFunc *cb, void *opaque,
+ BlockCompletionFunc *cb, void *opaque,
Error **errp);
#endif /* BLOCK_INT_H */
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 60aa835ec0..acb399f87d 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -104,7 +104,7 @@ struct BlockJob {
int64_t speed;
/** The completion function that will be called when the job completes. */
- BlockDriverCompletionFunc *cb;
+ BlockCompletionFunc *cb;
/** Block other operations when block job is running */
Error *blocker;
@@ -132,7 +132,7 @@ struct BlockJob {
* called from a wrapper that is specific to the job type.
*/
void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs,
- int64_t speed, BlockDriverCompletionFunc *cb,
+ int64_t speed, BlockCompletionFunc *cb,
void *opaque, Error **errp);
/**
diff --git a/include/block/thread-pool.h b/include/block/thread-pool.h
index 1fd57ec22d..42eb5e8421 100644
--- a/include/block/thread-pool.h
+++ b/include/block/thread-pool.h
@@ -29,7 +29,7 @@ void thread_pool_free(ThreadPool *pool);
BlockAIOCB *thread_pool_submit_aio(ThreadPool *pool,
ThreadPoolFunc *func, void *arg,
- BlockDriverCompletionFunc *cb, void *opaque);
+ BlockCompletionFunc *cb, void *opaque);
int coroutine_fn thread_pool_submit_co(ThreadPool *pool,
ThreadPoolFunc *func, void *arg);
void thread_pool_submit(ThreadPool *pool, ThreadPoolFunc *func, void *arg);