mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
7c84b1b831
commit
097310b53e
42 changed files with 132 additions and 132 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue