diff mbox

[v4,12/23] block: Rename BlockDriverCompletionFunc to BlockCompletionFunc

Message ID 1412105144-532-13-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster Sept. 30, 2014, 7:25 p.m. UTC
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>
---
 block.c                     | 30 +++++++++++++++---------------
 block/archipelago.c         |  8 ++++----
 block/backup.c              |  2 +-
 block/blkdebug.c            |  8 ++++----
 block/blkverify.c           |  8 ++++----
 block/commit.c              |  2 +-
 block/curl.c                |  2 +-
 block/iscsi.c               |  2 +-
 block/linux-aio.c           |  2 +-
 block/mirror.c              |  6 +++---
 block/null.c                |  8 ++++----
 block/qed-gencb.c           |  4 ++--
 block/qed-table.c           | 10 +++++-----
 block/qed.c                 | 18 +++++++++---------
 block/qed.h                 | 10 +++++-----
 block/quorum.c              |  6 +++---
 block/raw-aio.h             |  4 ++--
 block/raw-posix.c           | 16 ++++++++--------
 block/raw-win32.c           |  8 ++++----
 block/raw_bsd.c             |  2 +-
 block/rbd.c                 | 10 +++++-----
 block/stream.c              |  2 +-
 block/win32-aio.c           |  2 +-
 blockjob.c                  |  4 ++--
 dma-helpers.c               |  2 +-
 hw/ide/ahci.c               |  2 +-
 hw/ide/core.c               |  4 ++--
 hw/ide/internal.h           |  6 +++---
 hw/ide/macio.c              |  2 +-
 hw/ide/pci.c                |  2 +-
 hw/ide/pci.h                |  2 +-
 hw/scsi/scsi-generic.c      |  2 +-
 include/block/aio.h         |  6 +++---
 include/block/block.h       | 14 +++++++-------
 include/block/block_int.h   | 20 ++++++++++----------
 include/block/blockjob.h    |  4 ++--
 include/block/thread-pool.h |  2 +-
 include/monitor/monitor.h   |  4 ++--
 include/sysemu/dma.h        |  8 ++++----
 monitor.c                   |  6 +++---
 thread-pool.c               |  2 +-
 41 files changed, 131 insertions(+), 131 deletions(-)

Comments

Max Reitz Oct. 1, 2014, 4:55 p.m. UTC | #1
On 30.09.2014 21:25, Markus Armbruster wrote:
> 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>
> ---
>   block.c                     | 30 +++++++++++++++---------------
>   block/archipelago.c         |  8 ++++----
>   block/backup.c              |  2 +-
>   block/blkdebug.c            |  8 ++++----
>   block/blkverify.c           |  8 ++++----
>   block/commit.c              |  2 +-
>   block/curl.c                |  2 +-
>   block/iscsi.c               |  2 +-
>   block/linux-aio.c           |  2 +-
>   block/mirror.c              |  6 +++---
>   block/null.c                |  8 ++++----
>   block/qed-gencb.c           |  4 ++--
>   block/qed-table.c           | 10 +++++-----
>   block/qed.c                 | 18 +++++++++---------
>   block/qed.h                 | 10 +++++-----
>   block/quorum.c              |  6 +++---
>   block/raw-aio.h             |  4 ++--
>   block/raw-posix.c           | 16 ++++++++--------
>   block/raw-win32.c           |  8 ++++----
>   block/raw_bsd.c             |  2 +-
>   block/rbd.c                 | 10 +++++-----
>   block/stream.c              |  2 +-
>   block/win32-aio.c           |  2 +-
>   blockjob.c                  |  4 ++--
>   dma-helpers.c               |  2 +-
>   hw/ide/ahci.c               |  2 +-
>   hw/ide/core.c               |  4 ++--
>   hw/ide/internal.h           |  6 +++---
>   hw/ide/macio.c              |  2 +-
>   hw/ide/pci.c                |  2 +-
>   hw/ide/pci.h                |  2 +-
>   hw/scsi/scsi-generic.c      |  2 +-
>   include/block/aio.h         |  6 +++---
>   include/block/block.h       | 14 +++++++-------
>   include/block/block_int.h   | 20 ++++++++++----------
>   include/block/blockjob.h    |  4 ++--
>   include/block/thread-pool.h |  2 +-
>   include/monitor/monitor.h   |  4 ++--
>   include/sysemu/dma.h        |  8 ++++----
>   monitor.c                   |  6 +++---
>   thread-pool.c               |  2 +-
>   41 files changed, 131 insertions(+), 131 deletions(-)

I requested some trivial changes to patch 11 and rebasing this patch 
unto it will result in some trivial "functional" changes, if you heed my 
requests. Those should only be alignment changes, however (even the hunk 
in scsi-generic.c). In addition, docs/blkdebug.txt mentions 
BlockDriverCompletionFunc. Thus, like patch 11, this patch should 
replace that occurrence as well.

With these trivial changes (alignment changes due to rebasing on a patch 
11 changed according to my proposals and the replacement in 
docs/blkdebug.txt):

Reviewed-by: Max Reitz <mreitz@redhat.com>
Markus Armbruster Oct. 2, 2014, 7:12 a.m. UTC | #2
Max Reitz <mreitz@redhat.com> writes:

> On 30.09.2014 21:25, Markus Armbruster wrote:
>> 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>
>> ---
>>   block.c                     | 30 +++++++++++++++---------------
>>   block/archipelago.c         |  8 ++++----
>>   block/backup.c              |  2 +-
>>   block/blkdebug.c            |  8 ++++----
>>   block/blkverify.c           |  8 ++++----
>>   block/commit.c              |  2 +-
>>   block/curl.c                |  2 +-
>>   block/iscsi.c               |  2 +-
>>   block/linux-aio.c           |  2 +-
>>   block/mirror.c              |  6 +++---
>>   block/null.c                |  8 ++++----
>>   block/qed-gencb.c           |  4 ++--
>>   block/qed-table.c           | 10 +++++-----
>>   block/qed.c                 | 18 +++++++++---------
>>   block/qed.h                 | 10 +++++-----
>>   block/quorum.c              |  6 +++---
>>   block/raw-aio.h             |  4 ++--
>>   block/raw-posix.c           | 16 ++++++++--------
>>   block/raw-win32.c           |  8 ++++----
>>   block/raw_bsd.c             |  2 +-
>>   block/rbd.c                 | 10 +++++-----
>>   block/stream.c              |  2 +-
>>   block/win32-aio.c           |  2 +-
>>   blockjob.c                  |  4 ++--
>>   dma-helpers.c               |  2 +-
>>   hw/ide/ahci.c               |  2 +-
>>   hw/ide/core.c               |  4 ++--
>>   hw/ide/internal.h           |  6 +++---
>>   hw/ide/macio.c              |  2 +-
>>   hw/ide/pci.c                |  2 +-
>>   hw/ide/pci.h                |  2 +-
>>   hw/scsi/scsi-generic.c      |  2 +-
>>   include/block/aio.h         |  6 +++---
>>   include/block/block.h       | 14 +++++++-------
>>   include/block/block_int.h   | 20 ++++++++++----------
>>   include/block/blockjob.h    |  4 ++--
>>   include/block/thread-pool.h |  2 +-
>>   include/monitor/monitor.h   |  4 ++--
>>   include/sysemu/dma.h        |  8 ++++----
>>   monitor.c                   |  6 +++---
>>   thread-pool.c               |  2 +-
>>   41 files changed, 131 insertions(+), 131 deletions(-)
>
> I requested some trivial changes to patch 11 and rebasing this patch
> unto it will result in some trivial "functional" changes, if you heed
> my requests. Those should only be alignment changes, however (even the
> hunk in scsi-generic.c). In addition, docs/blkdebug.txt mentions
> BlockDriverCompletionFunc. Thus, like patch 11, this patch should
> replace that occurrence as well.
>
> With these trivial changes (alignment changes due to rebasing on a
> patch 11 changed according to my proposals and the replacement in
> docs/blkdebug.txt):
>
> Reviewed-by: Max Reitz <mreitz@redhat.com>

Done, thanks!
diff mbox

Patch

diff --git a/block.c b/block.c
index d2218d1..d8d7214 100644
--- a/block.c
+++ b/block.c
@@ -63,10 +63,10 @@  struct BdrvDirtyBitmap {
 static void bdrv_dev_change_media_cb(BlockDriverState *bs, bool load);
 static BlockAIOCB *bdrv_aio_readv_em(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque);
+        BlockCompletionFunc *cb, void *opaque);
 static BlockAIOCB *bdrv_aio_writev_em(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque);
+        BlockCompletionFunc *cb, void *opaque);
 static int coroutine_fn bdrv_co_readv_em(BlockDriverState *bs,
                                          int64_t sector_num, int nb_sectors,
                                          QEMUIOVector *iov);
@@ -84,7 +84,7 @@  static BlockAIOCB *bdrv_co_aio_rw_vector(BlockDriverState *bs,
                                          QEMUIOVector *qiov,
                                          int nb_sectors,
                                          BdrvRequestFlags flags,
-                                         BlockDriverCompletionFunc *cb,
+                                         BlockCompletionFunc *cb,
                                          void *opaque,
                                          bool is_write);
 static void coroutine_fn bdrv_co_do_rw(void *opaque);
@@ -4415,7 +4415,7 @@  int bdrv_get_backing_file_depth(BlockDriverState *bs)
 
 BlockAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
                            QEMUIOVector *qiov, int nb_sectors,
-                           BlockDriverCompletionFunc *cb, void *opaque)
+                           BlockCompletionFunc *cb, void *opaque)
 {
     trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque);
 
@@ -4425,7 +4425,7 @@  BlockAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
 
 BlockAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
                             QEMUIOVector *qiov, int nb_sectors,
-                            BlockDriverCompletionFunc *cb, void *opaque)
+                            BlockCompletionFunc *cb, void *opaque)
 {
     trace_bdrv_aio_writev(bs, sector_num, nb_sectors, opaque);
 
@@ -4435,7 +4435,7 @@  BlockAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
 
 BlockAIOCB *bdrv_aio_write_zeroes(BlockDriverState *bs,
         int64_t sector_num, int nb_sectors, BdrvRequestFlags flags,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     trace_bdrv_aio_write_zeroes(bs, sector_num, nb_sectors, flags, opaque);
 
@@ -4450,7 +4450,7 @@  typedef struct MultiwriteCB {
     int num_requests;
     int num_callbacks;
     struct {
-        BlockDriverCompletionFunc *cb;
+        BlockCompletionFunc *cb;
         void *opaque;
         QEMUIOVector *free_qiov;
     } callbacks[];
@@ -4688,7 +4688,7 @@  static BlockAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
                                       int64_t sector_num,
                                       QEMUIOVector *qiov,
                                       int nb_sectors,
-                                      BlockDriverCompletionFunc *cb,
+                                      BlockCompletionFunc *cb,
                                       void *opaque,
                                       int is_write)
 
@@ -4717,14 +4717,14 @@  static BlockAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
 
 static BlockAIOCB *bdrv_aio_readv_em(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 0);
 }
 
 static BlockAIOCB *bdrv_aio_writev_em(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 1);
 }
@@ -4775,7 +4775,7 @@  static BlockAIOCB *bdrv_co_aio_rw_vector(BlockDriverState *bs,
                                          QEMUIOVector *qiov,
                                          int nb_sectors,
                                          BdrvRequestFlags flags,
-                                         BlockDriverCompletionFunc *cb,
+                                         BlockCompletionFunc *cb,
                                          void *opaque,
                                          bool is_write)
 {
@@ -4806,7 +4806,7 @@  static void coroutine_fn bdrv_aio_flush_co_entry(void *opaque)
 }
 
 BlockAIOCB *bdrv_aio_flush(BlockDriverState *bs,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     trace_bdrv_aio_flush(bs, opaque);
 
@@ -4833,7 +4833,7 @@  static void coroutine_fn bdrv_aio_discard_co_entry(void *opaque)
 
 BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs,
         int64_t sector_num, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     Coroutine *co;
     BlockAIOCBCoroutine *acb;
@@ -4861,7 +4861,7 @@  void bdrv_init_with_whitelist(void)
 }
 
 void *qemu_aio_get(const AIOCBInfo *aiocb_info, BlockDriverState *bs,
-                   BlockDriverCompletionFunc *cb, void *opaque)
+                   BlockCompletionFunc *cb, void *opaque)
 {
     BlockAIOCB *acb;
 
@@ -5289,7 +5289,7 @@  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)
 {
     BlockDriver *drv = bs->drv;
 
diff --git a/block/archipelago.c b/block/archipelago.c
index edbfbb5..702e94d 100644
--- a/block/archipelago.c
+++ b/block/archipelago.c
@@ -860,7 +860,7 @@  static BlockAIOCB *qemu_archipelago_aio_rw(BlockDriverState *bs,
                                                  int64_t sector_num,
                                                  QEMUIOVector *qiov,
                                                  int nb_sectors,
-                                                 BlockDriverCompletionFunc *cb,
+                                                 BlockCompletionFunc *cb,
                                                  void *opaque,
                                                  int op)
 {
@@ -896,7 +896,7 @@  err_exit:
 
 static BlockAIOCB *qemu_archipelago_aio_readv(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     return qemu_archipelago_aio_rw(bs, sector_num, qiov, nb_sectors, cb,
                                    opaque, ARCHIP_OP_READ);
@@ -904,7 +904,7 @@  static BlockAIOCB *qemu_archipelago_aio_readv(BlockDriverState *bs,
 
 static BlockAIOCB *qemu_archipelago_aio_writev(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     return qemu_archipelago_aio_rw(bs, sector_num, qiov, nb_sectors, cb,
                                    opaque, ARCHIP_OP_WRITE);
@@ -1053,7 +1053,7 @@  static QemuOptsList qemu_archipelago_create_opts = {
 };
 
 static BlockAIOCB *qemu_archipelago_aio_flush(BlockDriverState *bs,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     return qemu_archipelago_aio_rw(bs, 0, NULL, 0, cb, opaque,
                                    ARCHIP_OP_FLUSH);
diff --git a/block/backup.c b/block/backup.c
index d0b0225..e334740 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -353,7 +353,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)
 {
     int64_t len;
diff --git a/block/blkdebug.c b/block/blkdebug.c
index f629140..e046b92 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -464,7 +464,7 @@  static void error_callback_bh(void *opaque)
 }
 
 static BlockAIOCB *inject_error(BlockDriverState *bs,
-    BlockDriverCompletionFunc *cb, void *opaque, BlkdebugRule *rule)
+    BlockCompletionFunc *cb, void *opaque, BlkdebugRule *rule)
 {
     BDRVBlkdebugState *s = bs->opaque;
     int error = rule->options.inject.error;
@@ -491,7 +491,7 @@  static BlockAIOCB *inject_error(BlockDriverState *bs,
 
 static BlockAIOCB *blkdebug_aio_readv(BlockDriverState *bs,
     int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-    BlockDriverCompletionFunc *cb, void *opaque)
+    BlockCompletionFunc *cb, void *opaque)
 {
     BDRVBlkdebugState *s = bs->opaque;
     BlkdebugRule *rule = NULL;
@@ -513,7 +513,7 @@  static BlockAIOCB *blkdebug_aio_readv(BlockDriverState *bs,
 
 static BlockAIOCB *blkdebug_aio_writev(BlockDriverState *bs,
     int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-    BlockDriverCompletionFunc *cb, void *opaque)
+    BlockCompletionFunc *cb, void *opaque)
 {
     BDRVBlkdebugState *s = bs->opaque;
     BlkdebugRule *rule = NULL;
@@ -534,7 +534,7 @@  static BlockAIOCB *blkdebug_aio_writev(BlockDriverState *bs,
 }
 
 static BlockAIOCB *blkdebug_aio_flush(BlockDriverState *bs,
-    BlockDriverCompletionFunc *cb, void *opaque)
+    BlockCompletionFunc *cb, void *opaque)
 {
     BDRVBlkdebugState *s = bs->opaque;
     BlkdebugRule *rule = NULL;
diff --git a/block/blkverify.c b/block/blkverify.c
index a29ed05..b5d2d08 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -165,7 +165,7 @@  static int64_t blkverify_getlength(BlockDriverState *bs)
 static BlkverifyAIOCB *blkverify_aio_get(BlockDriverState *bs, bool is_write,
                                          int64_t sector_num, QEMUIOVector *qiov,
                                          int nb_sectors,
-                                         BlockDriverCompletionFunc *cb,
+                                         BlockCompletionFunc *cb,
                                          void *opaque)
 {
     BlkverifyAIOCB *acb = qemu_aio_get(&blkverify_aiocb_info, bs, cb, opaque);
@@ -231,7 +231,7 @@  static void blkverify_verify_readv(BlkverifyAIOCB *acb)
 
 static BlockAIOCB *blkverify_aio_readv(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     BDRVBlkverifyState *s = bs->opaque;
     BlkverifyAIOCB *acb = blkverify_aio_get(bs, false, sector_num, qiov,
@@ -251,7 +251,7 @@  static BlockAIOCB *blkverify_aio_readv(BlockDriverState *bs,
 
 static BlockAIOCB *blkverify_aio_writev(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     BDRVBlkverifyState *s = bs->opaque;
     BlkverifyAIOCB *acb = blkverify_aio_get(bs, true, sector_num, qiov,
@@ -265,7 +265,7 @@  static BlockAIOCB *blkverify_aio_writev(BlockDriverState *bs,
 }
 
 static BlockAIOCB *blkverify_aio_flush(BlockDriverState *bs,
-                                             BlockDriverCompletionFunc *cb,
+                                             BlockCompletionFunc *cb,
                                              void *opaque)
 {
     BDRVBlkverifyState *s = bs->opaque;
diff --git a/block/commit.c b/block/commit.c
index 91517d3..60a2acc 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -182,7 +182,7 @@  static const BlockJobDriver commit_job_driver = {
 
 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)
 {
     CommitBlockJob *s;
diff --git a/block/curl.c b/block/curl.c
index 0ff70b7..b4157cc 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -682,7 +682,7 @@  static void curl_readv_bh_cb(void *p)
 
 static BlockAIOCB *curl_aio_readv(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     CURLAIOCB *acb;
 
diff --git a/block/iscsi.c b/block/iscsi.c
index 00d2045..84ab5cc 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -658,7 +658,7 @@  iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int status,
 
 static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs,
         unsigned long int req, void *buf,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     IscsiLun *iscsilun = bs->opaque;
     struct iscsi_context *iscsi = iscsilun->iscsi;
diff --git a/block/linux-aio.c b/block/linux-aio.c
index 16e09d1..d92513b 100644
--- a/block/linux-aio.c
+++ b/block/linux-aio.c
@@ -245,7 +245,7 @@  int laio_io_unplug(BlockDriverState *bs, void *aio_ctx, bool unplug)
 
 BlockAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque, int type)
+        BlockCompletionFunc *cb, void *opaque, int type)
 {
     struct qemu_laio_state *s = aio_ctx;
     struct qemu_laiocb *laiocb;
diff --git a/block/mirror.c b/block/mirror.c
index 829be2f..e8a43eb 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -613,7 +613,7 @@  static void mirror_start_job(BlockDriverState *bs, BlockDriverState *target,
                              int64_t buf_size,
                              BlockdevOnError on_source_error,
                              BlockdevOnError on_target_error,
-                             BlockDriverCompletionFunc *cb,
+                             BlockCompletionFunc *cb,
                              void *opaque, Error **errp,
                              const BlockJobDriver *driver,
                              bool is_none_mode, BlockDriverState *base)
@@ -673,7 +673,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)
 {
     bool is_none_mode;
@@ -690,7 +690,7 @@  void mirror_start(BlockDriverState *bs, BlockDriverState *target,
 void commit_active_start(BlockDriverState *bs, BlockDriverState *base,
                          int64_t speed,
                          BlockdevOnError on_error,
-                         BlockDriverCompletionFunc *cb,
+                         BlockCompletionFunc *cb,
                          void *opaque, Error **errp)
 {
     int64_t length, base_length;
diff --git a/block/null.c b/block/null.c
index b353a73..caa1d2a 100644
--- a/block/null.c
+++ b/block/null.c
@@ -95,7 +95,7 @@  static void null_bh_cb(void *opaque)
 }
 
 static inline BlockAIOCB *null_aio_common(BlockDriverState *bs,
-                                                BlockDriverCompletionFunc *cb,
+                                                BlockCompletionFunc *cb,
                                                 void *opaque)
 {
     NullAIOCB *acb;
@@ -109,7 +109,7 @@  static inline BlockAIOCB *null_aio_common(BlockDriverState *bs,
 static BlockAIOCB *null_aio_readv(BlockDriverState *bs,
                                         int64_t sector_num, QEMUIOVector *qiov,
                                         int nb_sectors,
-                                        BlockDriverCompletionFunc *cb,
+                                        BlockCompletionFunc *cb,
                                         void *opaque)
 {
     return null_aio_common(bs, cb, opaque);
@@ -118,14 +118,14 @@  static BlockAIOCB *null_aio_readv(BlockDriverState *bs,
 static BlockAIOCB *null_aio_writev(BlockDriverState *bs,
                                          int64_t sector_num, QEMUIOVector *qiov,
                                          int nb_sectors,
-                                         BlockDriverCompletionFunc *cb,
+                                         BlockCompletionFunc *cb,
                                          void *opaque)
 {
     return null_aio_common(bs, cb, opaque);
 }
 
 static BlockAIOCB *null_aio_flush(BlockDriverState *bs,
-                                        BlockDriverCompletionFunc *cb,
+                                        BlockCompletionFunc *cb,
                                         void *opaque)
 {
     return null_aio_common(bs, cb, opaque);
diff --git a/block/qed-gencb.c b/block/qed-gencb.c
index 7d7ac1f..b817a8b 100644
--- a/block/qed-gencb.c
+++ b/block/qed-gencb.c
@@ -13,7 +13,7 @@ 
 
 #include "qed.h"
 
-void *gencb_alloc(size_t len, BlockDriverCompletionFunc *cb, void *opaque)
+void *gencb_alloc(size_t len, BlockCompletionFunc *cb, void *opaque)
 {
     GenericCB *gencb = g_malloc(len);
     gencb->cb = cb;
@@ -24,7 +24,7 @@  void *gencb_alloc(size_t len, BlockDriverCompletionFunc *cb, void *opaque)
 void gencb_complete(void *opaque, int ret)
 {
     GenericCB *gencb = opaque;
-    BlockDriverCompletionFunc *cb = gencb->cb;
+    BlockCompletionFunc *cb = gencb->cb;
     void *user_opaque = gencb->opaque;
 
     g_free(gencb);
diff --git a/block/qed-table.c b/block/qed-table.c
index f61107a..513aa87 100644
--- a/block/qed-table.c
+++ b/block/qed-table.c
@@ -49,7 +49,7 @@  out:
 }
 
 static void qed_read_table(BDRVQEDState *s, uint64_t offset, QEDTable *table,
-                           BlockDriverCompletionFunc *cb, void *opaque)
+                           BlockCompletionFunc *cb, void *opaque)
 {
     QEDReadTableCB *read_table_cb = gencb_alloc(sizeof(*read_table_cb),
                                                 cb, opaque);
@@ -119,7 +119,7 @@  out:
  */
 static void qed_write_table(BDRVQEDState *s, uint64_t offset, QEDTable *table,
                             unsigned int index, unsigned int n, bool flush,
-                            BlockDriverCompletionFunc *cb, void *opaque)
+                            BlockCompletionFunc *cb, void *opaque)
 {
     QEDWriteTableCB *write_table_cb;
     unsigned int sector_mask = BDRV_SECTOR_SIZE / sizeof(uint64_t) - 1;
@@ -180,7 +180,7 @@  int qed_read_l1_table_sync(BDRVQEDState *s)
 }
 
 void qed_write_l1_table(BDRVQEDState *s, unsigned int index, unsigned int n,
-                        BlockDriverCompletionFunc *cb, void *opaque)
+                        BlockCompletionFunc *cb, void *opaque)
 {
     BLKDBG_EVENT(s->bs->file, BLKDBG_L1_UPDATE);
     qed_write_table(s, s->header.l1_table_offset,
@@ -235,7 +235,7 @@  static void qed_read_l2_table_cb(void *opaque, int ret)
 }
 
 void qed_read_l2_table(BDRVQEDState *s, QEDRequest *request, uint64_t offset,
-                       BlockDriverCompletionFunc *cb, void *opaque)
+                       BlockCompletionFunc *cb, void *opaque)
 {
     QEDReadL2TableCB *read_l2_table_cb;
 
@@ -275,7 +275,7 @@  int qed_read_l2_table_sync(BDRVQEDState *s, QEDRequest *request, uint64_t offset
 
 void qed_write_l2_table(BDRVQEDState *s, QEDRequest *request,
                         unsigned int index, unsigned int n, bool flush,
-                        BlockDriverCompletionFunc *cb, void *opaque)
+                        BlockCompletionFunc *cb, void *opaque)
 {
     BLKDBG_EVENT(s->bs->file, BLKDBG_L2_UPDATE);
     qed_write_table(s, request->l2_table->offset,
diff --git a/block/qed.c b/block/qed.c
index 0382228..66f1fbb 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -130,7 +130,7 @@  static void qed_write_header_read_cb(void *opaque, int ret)
  * This function only updates known header fields in-place and does not affect
  * extra data after the QED header.
  */
-static void qed_write_header(BDRVQEDState *s, BlockDriverCompletionFunc cb,
+static void qed_write_header(BDRVQEDState *s, BlockCompletionFunc cb,
                              void *opaque)
 {
     /* We must write full sectors for O_DIRECT but cannot necessarily generate
@@ -759,7 +759,7 @@  static BDRVQEDState *acb_to_s(QEDAIOCB *acb)
 static void qed_read_backing_file(BDRVQEDState *s, uint64_t pos,
                                   QEMUIOVector *qiov,
                                   QEMUIOVector **backing_qiov,
-                                  BlockDriverCompletionFunc *cb, void *opaque)
+                                  BlockCompletionFunc *cb, void *opaque)
 {
     uint64_t backing_length = 0;
     size_t size;
@@ -851,7 +851,7 @@  static void qed_copy_from_backing_file_write(void *opaque, int ret)
  */
 static void qed_copy_from_backing_file(BDRVQEDState *s, uint64_t pos,
                                        uint64_t len, uint64_t offset,
-                                       BlockDriverCompletionFunc *cb,
+                                       BlockCompletionFunc *cb,
                                        void *opaque)
 {
     CopyFromBackingFileCB *copy_cb;
@@ -902,7 +902,7 @@  static void qed_update_l2_table(BDRVQEDState *s, QEDTable *table, int index,
 static void qed_aio_complete_bh(void *opaque)
 {
     QEDAIOCB *acb = opaque;
-    BlockDriverCompletionFunc *cb = acb->common.cb;
+    BlockCompletionFunc *cb = acb->common.cb;
     void *user_opaque = acb->common.opaque;
     int ret = acb->bh_ret;
 
@@ -1064,7 +1064,7 @@  static void qed_aio_write_main(void *opaque, int ret)
     BDRVQEDState *s = acb_to_s(acb);
     uint64_t offset = acb->cur_cluster +
                       qed_offset_into_cluster(s, acb->cur_pos);
-    BlockDriverCompletionFunc *next_fn;
+    BlockCompletionFunc *next_fn;
 
     trace_qed_aio_write_main(s, acb, ret, offset, acb->cur_qiov.size);
 
@@ -1164,7 +1164,7 @@  static void qed_aio_write_zero_cluster(void *opaque, int ret)
 static void qed_aio_write_alloc(QEDAIOCB *acb, size_t len)
 {
     BDRVQEDState *s = acb_to_s(acb);
-    BlockDriverCompletionFunc *cb;
+    BlockCompletionFunc *cb;
 
     /* Cancel timer when the first allocating request comes in */
     if (QSIMPLEQ_EMPTY(&s->allocating_write_reqs)) {
@@ -1368,7 +1368,7 @@  static void qed_aio_next_io(void *opaque, int ret)
 static BlockAIOCB *qed_aio_setup(BlockDriverState *bs,
                                        int64_t sector_num,
                                        QEMUIOVector *qiov, int nb_sectors,
-                                       BlockDriverCompletionFunc *cb,
+                                       BlockCompletionFunc *cb,
                                        void *opaque, int flags)
 {
     QEDAIOCB *acb = qemu_aio_get(&qed_aiocb_info, bs, cb, opaque);
@@ -1393,7 +1393,7 @@  static BlockAIOCB *qed_aio_setup(BlockDriverState *bs,
 static BlockAIOCB *bdrv_qed_aio_readv(BlockDriverState *bs,
                                             int64_t sector_num,
                                             QEMUIOVector *qiov, int nb_sectors,
-                                            BlockDriverCompletionFunc *cb,
+                                            BlockCompletionFunc *cb,
                                             void *opaque)
 {
     return qed_aio_setup(bs, sector_num, qiov, nb_sectors, cb, opaque, 0);
@@ -1402,7 +1402,7 @@  static BlockAIOCB *bdrv_qed_aio_readv(BlockDriverState *bs,
 static BlockAIOCB *bdrv_qed_aio_writev(BlockDriverState *bs,
                                              int64_t sector_num,
                                              QEMUIOVector *qiov, int nb_sectors,
-                                             BlockDriverCompletionFunc *cb,
+                                             BlockCompletionFunc *cb,
                                              void *opaque)
 {
     return qed_aio_setup(bs, sector_num, qiov, nb_sectors, cb,
diff --git a/block/qed.h b/block/qed.h
index fc49804..d3934a0 100644
--- a/block/qed.h
+++ b/block/qed.h
@@ -203,11 +203,11 @@  typedef void QEDFindClusterFunc(void *opaque, int ret, uint64_t offset, size_t l
  * Generic callback for chaining async callbacks
  */
 typedef struct {
-    BlockDriverCompletionFunc *cb;
+    BlockCompletionFunc *cb;
     void *opaque;
 } GenericCB;
 
-void *gencb_alloc(size_t len, BlockDriverCompletionFunc *cb, void *opaque);
+void *gencb_alloc(size_t len, BlockCompletionFunc *cb, void *opaque);
 void gencb_complete(void *opaque, int ret);
 
 /**
@@ -230,16 +230,16 @@  void qed_commit_l2_cache_entry(L2TableCache *l2_cache, CachedL2Table *l2_table);
  */
 int qed_read_l1_table_sync(BDRVQEDState *s);
 void qed_write_l1_table(BDRVQEDState *s, unsigned int index, unsigned int n,
-                        BlockDriverCompletionFunc *cb, void *opaque);
+                        BlockCompletionFunc *cb, void *opaque);
 int qed_write_l1_table_sync(BDRVQEDState *s, unsigned int index,
                             unsigned int n);
 int qed_read_l2_table_sync(BDRVQEDState *s, QEDRequest *request,
                            uint64_t offset);
 void qed_read_l2_table(BDRVQEDState *s, QEDRequest *request, uint64_t offset,
-                       BlockDriverCompletionFunc *cb, void *opaque);
+                       BlockCompletionFunc *cb, void *opaque);
 void qed_write_l2_table(BDRVQEDState *s, QEDRequest *request,
                         unsigned int index, unsigned int n, bool flush,
-                        BlockDriverCompletionFunc *cb, void *opaque);
+                        BlockCompletionFunc *cb, void *opaque);
 int qed_write_l2_table_sync(BDRVQEDState *s, QEDRequest *request,
                             unsigned int index, unsigned int n, bool flush);
 
diff --git a/block/quorum.c b/block/quorum.c
index e173ef0..437b122 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -186,7 +186,7 @@  static QuorumAIOCB *quorum_aio_get(BDRVQuorumState *s,
                                    QEMUIOVector *qiov,
                                    uint64_t sector_num,
                                    int nb_sectors,
-                                   BlockDriverCompletionFunc *cb,
+                                   BlockCompletionFunc *cb,
                                    void *opaque)
 {
     QuorumAIOCB *acb = qemu_aio_get(&quorum_aiocb_info, bs, cb, opaque);
@@ -679,7 +679,7 @@  static BlockAIOCB *quorum_aio_readv(BlockDriverState *bs,
                                     int64_t sector_num,
                                     QEMUIOVector *qiov,
                                     int nb_sectors,
-                                    BlockDriverCompletionFunc *cb,
+                                    BlockCompletionFunc *cb,
                                     void *opaque)
 {
     BDRVQuorumState *s = bs->opaque;
@@ -700,7 +700,7 @@  static BlockAIOCB *quorum_aio_writev(BlockDriverState *bs,
                                      int64_t sector_num,
                                      QEMUIOVector *qiov,
                                      int nb_sectors,
-                                     BlockDriverCompletionFunc *cb,
+                                     BlockCompletionFunc *cb,
                                      void *opaque)
 {
     BDRVQuorumState *s = bs->opaque;
diff --git a/block/raw-aio.h b/block/raw-aio.h
index e1eee3f..80681ce 100644
--- a/block/raw-aio.h
+++ b/block/raw-aio.h
@@ -37,7 +37,7 @@  void *laio_init(void);
 void laio_cleanup(void *s);
 BlockAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque, int type);
+        BlockCompletionFunc *cb, void *opaque, int type);
 void laio_detach_aio_context(void *s, AioContext *old_context);
 void laio_attach_aio_context(void *s, AioContext *new_context);
 void laio_io_plug(BlockDriverState *bs, void *aio_ctx);
@@ -52,7 +52,7 @@  int win32_aio_attach(QEMUWin32AIOState *aio, HANDLE hfile);
 BlockAIOCB *win32_aio_submit(BlockDriverState *bs,
         QEMUWin32AIOState *aio, HANDLE hfile,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque, int type);
+        BlockCompletionFunc *cb, void *opaque, int type);
 void win32_aio_detach_aio_context(QEMUWin32AIOState *aio,
                                   AioContext *old_context);
 void win32_aio_attach_aio_context(QEMUWin32AIOState *aio,
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 70fafdd..1ccb5a7 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1043,7 +1043,7 @@  static int paio_submit_co(BlockDriverState *bs, int fd,
 
 static BlockAIOCB *paio_submit(BlockDriverState *bs, int fd,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque, int type)
+        BlockCompletionFunc *cb, void *opaque, int type)
 {
     RawPosixAIOData *acb = g_slice_new(RawPosixAIOData);
     ThreadPool *pool;
@@ -1068,7 +1068,7 @@  static BlockAIOCB *paio_submit(BlockDriverState *bs, int fd,
 
 static BlockAIOCB *raw_aio_submit(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque, int type)
+        BlockCompletionFunc *cb, void *opaque, int type)
 {
     BDRVRawState *s = bs->opaque;
 
@@ -1127,7 +1127,7 @@  static void raw_aio_flush_io_queue(BlockDriverState *bs)
 
 static BlockAIOCB *raw_aio_readv(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     return raw_aio_submit(bs, sector_num, qiov, nb_sectors,
                           cb, opaque, QEMU_AIO_READ);
@@ -1135,14 +1135,14 @@  static BlockAIOCB *raw_aio_readv(BlockDriverState *bs,
 
 static BlockAIOCB *raw_aio_writev(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     return raw_aio_submit(bs, sector_num, qiov, nb_sectors,
                           cb, opaque, QEMU_AIO_WRITE);
 }
 
 static BlockAIOCB *raw_aio_flush(BlockDriverState *bs,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     BDRVRawState *s = bs->opaque;
 
@@ -1597,7 +1597,7 @@  static int64_t coroutine_fn raw_co_get_block_status(BlockDriverState *bs,
 
 static coroutine_fn BlockAIOCB *raw_aio_discard(BlockDriverState *bs,
     int64_t sector_num, int nb_sectors,
-    BlockDriverCompletionFunc *cb, void *opaque)
+    BlockCompletionFunc *cb, void *opaque)
 {
     BDRVRawState *s = bs->opaque;
 
@@ -1937,7 +1937,7 @@  static int hdev_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
 
 static BlockAIOCB *hdev_aio_ioctl(BlockDriverState *bs,
         unsigned long int req, void *buf,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     BDRVRawState *s = bs->opaque;
     RawPosixAIOData *acb;
@@ -1978,7 +1978,7 @@  static int fd_open(BlockDriverState *bs)
 
 static coroutine_fn BlockAIOCB *hdev_aio_discard(BlockDriverState *bs,
     int64_t sector_num, int nb_sectors,
-    BlockDriverCompletionFunc *cb, void *opaque)
+    BlockCompletionFunc *cb, void *opaque)
 {
     BDRVRawState *s = bs->opaque;
 
diff --git a/block/raw-win32.c b/block/raw-win32.c
index c11d522..7b58881 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -140,7 +140,7 @@  static int aio_worker(void *arg)
 
 static BlockAIOCB *paio_submit(BlockDriverState *bs, HANDLE hfile,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque, int type)
+        BlockCompletionFunc *cb, void *opaque, int type)
 {
     RawWin32AIOData *acb = g_slice_new(RawWin32AIOData);
     ThreadPool *pool;
@@ -371,7 +371,7 @@  fail:
 
 static BlockAIOCB *raw_aio_readv(BlockDriverState *bs,
                          int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-                         BlockDriverCompletionFunc *cb, void *opaque)
+                         BlockCompletionFunc *cb, void *opaque)
 {
     BDRVRawState *s = bs->opaque;
     if (s->aio) {
@@ -385,7 +385,7 @@  static BlockAIOCB *raw_aio_readv(BlockDriverState *bs,
 
 static BlockAIOCB *raw_aio_writev(BlockDriverState *bs,
                           int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-                          BlockDriverCompletionFunc *cb, void *opaque)
+                          BlockCompletionFunc *cb, void *opaque)
 {
     BDRVRawState *s = bs->opaque;
     if (s->aio) {
@@ -398,7 +398,7 @@  static BlockAIOCB *raw_aio_writev(BlockDriverState *bs,
 }
 
 static BlockAIOCB *raw_aio_flush(BlockDriverState *bs,
-                         BlockDriverCompletionFunc *cb, void *opaque)
+                         BlockCompletionFunc *cb, void *opaque)
 {
     BDRVRawState *s = bs->opaque;
     return paio_submit(bs, s->hfile, 0, NULL, 0, cb, opaque, QEMU_AIO_FLUSH);
diff --git a/block/raw_bsd.c b/block/raw_bsd.c
index cde05fc..401b967 100644
--- a/block/raw_bsd.c
+++ b/block/raw_bsd.c
@@ -131,7 +131,7 @@  static int raw_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
 
 static BlockAIOCB *raw_aio_ioctl(BlockDriverState *bs,
                                  unsigned long int req, void *buf,
-                                 BlockDriverCompletionFunc *cb,
+                                 BlockCompletionFunc *cb,
                                  void *opaque)
 {
     return bdrv_aio_ioctl(bs->file, req, buf, cb, opaque);
diff --git a/block/rbd.c b/block/rbd.c
index f44a093..2d03f84 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -593,7 +593,7 @@  static BlockAIOCB *rbd_start_aio(BlockDriverState *bs,
                                        int64_t sector_num,
                                        QEMUIOVector *qiov,
                                        int nb_sectors,
-                                       BlockDriverCompletionFunc *cb,
+                                       BlockCompletionFunc *cb,
                                        void *opaque,
                                        RBDAIOCmd cmd)
 {
@@ -679,7 +679,7 @@  static BlockAIOCB *qemu_rbd_aio_readv(BlockDriverState *bs,
                                             int64_t sector_num,
                                             QEMUIOVector *qiov,
                                             int nb_sectors,
-                                            BlockDriverCompletionFunc *cb,
+                                            BlockCompletionFunc *cb,
                                             void *opaque)
 {
     return rbd_start_aio(bs, sector_num, qiov, nb_sectors, cb, opaque,
@@ -690,7 +690,7 @@  static BlockAIOCB *qemu_rbd_aio_writev(BlockDriverState *bs,
                                              int64_t sector_num,
                                              QEMUIOVector *qiov,
                                              int nb_sectors,
-                                             BlockDriverCompletionFunc *cb,
+                                             BlockCompletionFunc *cb,
                                              void *opaque)
 {
     return rbd_start_aio(bs, sector_num, qiov, nb_sectors, cb, opaque,
@@ -699,7 +699,7 @@  static BlockAIOCB *qemu_rbd_aio_writev(BlockDriverState *bs,
 
 #ifdef LIBRBD_SUPPORTS_AIO_FLUSH
 static BlockAIOCB *qemu_rbd_aio_flush(BlockDriverState *bs,
-                                            BlockDriverCompletionFunc *cb,
+                                            BlockCompletionFunc *cb,
                                             void *opaque)
 {
     return rbd_start_aio(bs, 0, NULL, 0, cb, opaque, RBD_AIO_FLUSH);
@@ -879,7 +879,7 @@  static int qemu_rbd_snap_list(BlockDriverState *bs,
 static BlockAIOCB* qemu_rbd_aio_discard(BlockDriverState *bs,
                                               int64_t sector_num,
                                               int nb_sectors,
-                                              BlockDriverCompletionFunc *cb,
+                                              BlockCompletionFunc *cb,
                                               void *opaque)
 {
     return rbd_start_aio(bs, sector_num, NULL, nb_sectors, cb, opaque,
diff --git a/block/stream.c b/block/stream.c
index cdea3e8..a1dc8da 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -220,7 +220,7 @@  static const BlockJobDriver stream_job_driver = {
 void stream_start(BlockDriverState *bs, BlockDriverState *base,
                   const char *backing_file_str, int64_t speed,
                   BlockdevOnError on_error,
-                  BlockDriverCompletionFunc *cb,
+                  BlockCompletionFunc *cb,
                   void *opaque, Error **errp)
 {
     StreamBlockJob *s;
diff --git a/block/win32-aio.c b/block/win32-aio.c
index 16c31a8..64e8682 100644
--- a/block/win32-aio.c
+++ b/block/win32-aio.c
@@ -113,7 +113,7 @@  static const AIOCBInfo win32_aiocb_info = {
 BlockAIOCB *win32_aio_submit(BlockDriverState *bs,
         QEMUWin32AIOState *aio, HANDLE hfile,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque, int type)
+        BlockCompletionFunc *cb, void *opaque, int type)
 {
     struct QEMUWin32AIOCB *waiocb;
     uint64_t offset = sector_num * 512;
diff --git a/blockjob.c b/blockjob.c
index 3af0f6c..ff0908a 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -36,7 +36,7 @@ 
 #include "qapi-event.h"
 
 void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs,
-                       int64_t speed, BlockDriverCompletionFunc *cb,
+                       int64_t speed, BlockCompletionFunc *cb,
                        void *opaque, Error **errp)
 {
     BlockJob *job;
@@ -155,7 +155,7 @@  void block_job_iostatus_reset(BlockJob *job)
 
 struct BlockCancelData {
     BlockJob *job;
-    BlockDriverCompletionFunc *cb;
+    BlockCompletionFunc *cb;
     void *opaque;
     bool cancelled;
     int ret;
diff --git a/dma-helpers.c b/dma-helpers.c
index b1cc96d..026e567 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -192,7 +192,7 @@  static const AIOCBInfo dma_aiocb_info = {
 
 BlockAIOCB *dma_bdrv_io(
     BlockDriverState *bs, QEMUSGList *sg, uint64_t sector_num,
-    DMAIOFunc *io_func, BlockDriverCompletionFunc *cb,
+    DMAIOFunc *io_func, BlockCompletionFunc *cb,
     void *opaque, DMADirection dir)
 {
     DMAAIOCB *dbs = qemu_aio_get(&dma_aiocb_info, bs, cb, opaque);
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 8978643..5cf86c2 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1122,7 +1122,7 @@  out:
 }
 
 static void ahci_start_dma(IDEDMA *dma, IDEState *s,
-                           BlockDriverCompletionFunc *dma_cb)
+                           BlockCompletionFunc *dma_cb)
 {
 #ifdef DEBUG_AHCI
     AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
diff --git a/hw/ide/core.c b/hw/ide/core.c
index ee37d97..d8362c6 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -440,7 +440,7 @@  static void ide_issue_trim_cb(void *opaque, int ret)
 
 BlockAIOCB *ide_issue_trim(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     TrimAIOCB *iocb;
 
@@ -789,7 +789,7 @@  static void ide_sector_start_dma(IDEState *s, enum ide_dma_cmd dma_cmd)
     ide_start_dma(s, ide_dma_cb);
 }
 
-void ide_start_dma(IDEState *s, BlockDriverCompletionFunc *cb)
+void ide_start_dma(IDEState *s, BlockCompletionFunc *cb)
 {
     if (s->bus->dma->ops->start_dma) {
         s->bus->dma->ops->start_dma(s->bus->dma, s, cb);
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index c661a74..9314c80 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -319,7 +319,7 @@  typedef enum { IDE_HD, IDE_CD, IDE_CFATA } IDEDriveKind;
 
 typedef void EndTransferFunc(IDEState *);
 
-typedef void DMAStartFunc(IDEDMA *, IDEState *, BlockDriverCompletionFunc *);
+typedef void DMAStartFunc(IDEDMA *, IDEState *, BlockCompletionFunc *);
 typedef void DMAVoidFunc(IDEDMA *);
 typedef int DMAIntFunc(IDEDMA *, int);
 typedef void DMAStopFunc(IDEDMA *, bool);
@@ -521,7 +521,7 @@  void ide_bus_reset(IDEBus *bus);
 int64_t ide_get_sector(IDEState *s);
 void ide_set_sector(IDEState *s, int64_t sector_num);
 
-void ide_start_dma(IDEState *s, BlockDriverCompletionFunc *cb);
+void ide_start_dma(IDEState *s, BlockCompletionFunc *cb);
 void ide_dma_error(IDEState *s);
 
 void ide_atapi_cmd_ok(IDEState *s);
@@ -557,7 +557,7 @@  void ide_transfer_stop(IDEState *s);
 void ide_set_inactive(IDEState *s, bool more);
 BlockAIOCB *ide_issue_trim(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
-        BlockDriverCompletionFunc *cb, void *opaque);
+        BlockCompletionFunc *cb, void *opaque);
 
 /* hw/ide/atapi.c */
 void ide_atapi_cmd(IDEState *s);
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index cefc85c..6b5cce5 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -558,7 +558,7 @@  static void ide_nop_restart(void *opaque, int x, RunState y)
 }
 
 static void ide_dbdma_start(IDEDMA *dma, IDEState *s,
-                            BlockDriverCompletionFunc *cb)
+                            BlockCompletionFunc *cb)
 {
     MACIOIDEState *m = container_of(dma, MACIOIDEState, dma);
 
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 2397f35..6ff1c58 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -38,7 +38,7 @@ 
         IDE_RETRY_READ | IDE_RETRY_FLUSH)
 
 static void bmdma_start_dma(IDEDMA *dma, IDEState *s,
-                            BlockDriverCompletionFunc *dma_cb)
+                            BlockCompletionFunc *dma_cb)
 {
     BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma);
 
diff --git a/hw/ide/pci.h b/hw/ide/pci.h
index 517711f..2e9314a 100644
--- a/hw/ide/pci.h
+++ b/hw/ide/pci.h
@@ -23,7 +23,7 @@  typedef struct BMDMAState {
     uint32_t cur_prd_addr;
     uint32_t cur_prd_len;
     uint8_t unit;
-    BlockDriverCompletionFunc *dma_cb;
+    BlockCompletionFunc *dma_cb;
     int64_t sector_num;
     uint32_t nsector;
     MemoryRegion addr_ioport;
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index 8baee16..5301886 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -157,7 +157,7 @@  static void scsi_cancel_io(SCSIRequest *req)
 
 static int execute_command(BlockDriverState *bdrv,
                            SCSIGenericReq *r, int direction,
-                           BlockDriverCompletionFunc *complete)
+                           BlockCompletionFunc *complete)
 {
     r->io_header.interface_id = 'S';
     r->io_header.dxfer_direction = direction;
diff --git a/include/block/aio.h b/include/block/aio.h
index ce99250..6bf0e04 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 4349c95..2de1ff4 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 ab74618..e8e33a8 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 60aa835..acb399f 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 1fd57ec..42eb5e8 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);
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index 78a5fc8..47606d0 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -27,10 +27,10 @@  int monitor_suspend(Monitor *mon);
 void monitor_resume(Monitor *mon);
 
 int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs,
-                                BlockDriverCompletionFunc *completion_cb,
+                                BlockCompletionFunc *completion_cb,
                                 void *opaque);
 int monitor_read_block_device_key(Monitor *mon, const char *device,
-                                  BlockDriverCompletionFunc *completion_cb,
+                                  BlockCompletionFunc *completion_cb,
                                   void *opaque);
 
 int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp);
diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h
index 1bc2223..bcff53a 100644
--- a/include/sysemu/dma.h
+++ b/include/sysemu/dma.h
@@ -199,18 +199,18 @@  void qemu_sglist_destroy(QEMUSGList *qsg);
 
 typedef BlockAIOCB *DMAIOFunc(BlockDriverState *bs, int64_t sector_num,
                               QEMUIOVector *iov, int nb_sectors,
-                              BlockDriverCompletionFunc *cb, void *opaque);
+                              BlockCompletionFunc *cb, void *opaque);
 
 BlockAIOCB *dma_bdrv_io(BlockDriverState *bs,
                         QEMUSGList *sg, uint64_t sector_num,
-                        DMAIOFunc *io_func, BlockDriverCompletionFunc *cb,
+                        DMAIOFunc *io_func, BlockCompletionFunc *cb,
                         void *opaque, DMADirection dir);
 BlockAIOCB *dma_bdrv_read(BlockDriverState *bs,
                           QEMUSGList *sg, uint64_t sector,
-                          BlockDriverCompletionFunc *cb, void *opaque);
+                          BlockCompletionFunc *cb, void *opaque);
 BlockAIOCB *dma_bdrv_write(BlockDriverState *bs,
                            QEMUSGList *sg, uint64_t sector,
-                           BlockDriverCompletionFunc *cb, void *opaque);
+                           BlockCompletionFunc *cb, void *opaque);
 uint64_t dma_buf_read(uint8_t *ptr, int32_t len, QEMUSGList *sg);
 uint64_t dma_buf_write(uint8_t *ptr, int32_t len, QEMUSGList *sg);
 
diff --git a/monitor.c b/monitor.c
index 412e63f..fba4ce2 100644
--- a/monitor.c
+++ b/monitor.c
@@ -206,7 +206,7 @@  struct Monitor {
     ReadLineState *rs;
     MonitorControl *mc;
     CPUState *mon_cpu;
-    BlockDriverCompletionFunc *password_completion_cb;
+    BlockCompletionFunc *password_completion_cb;
     void *password_opaque;
     mon_cmd_t *cmd_table;
     QError *error;
@@ -5374,7 +5374,7 @@  ReadLineState *monitor_get_rs(Monitor *mon)
 }
 
 int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs,
-                                BlockDriverCompletionFunc *completion_cb,
+                                BlockCompletionFunc *completion_cb,
                                 void *opaque)
 {
     int err;
@@ -5406,7 +5406,7 @@  int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs,
 }
 
 int monitor_read_block_device_key(Monitor *mon, const char *device,
-                                  BlockDriverCompletionFunc *completion_cb,
+                                  BlockCompletionFunc *completion_cb,
                                   void *opaque)
 {
     BlockDriverState *bs;
diff --git a/thread-pool.c b/thread-pool.c
index 70ebb50..e2cac8e 100644
--- a/thread-pool.c
+++ b/thread-pool.c
@@ -235,7 +235,7 @@  static const AIOCBInfo thread_pool_aiocb_info = {
 
 BlockAIOCB *thread_pool_submit_aio(ThreadPool *pool,
         ThreadPoolFunc *func, void *arg,
-        BlockDriverCompletionFunc *cb, void *opaque)
+        BlockCompletionFunc *cb, void *opaque)
 {
     ThreadPoolElement *req;