Commit 7c84b1b8 authored by Markus Armbruster's avatar Markus Armbruster Committed by Kevin Wolf

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: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent fa1d36df
...@@ -72,7 +72,7 @@ typedef struct BlkMigBlock { ...@@ -72,7 +72,7 @@ typedef struct BlkMigBlock {
int nr_sectors; int nr_sectors;
struct iovec iov; struct iovec iov;
QEMUIOVector qiov; QEMUIOVector qiov;
BlockDriverAIOCB *aiocb; BlockAIOCB *aiocb;
/* Protected by block migration lock. */ /* Protected by block migration lock. */
int ret; int ret;
......
This diff is collapsed.
...@@ -86,7 +86,7 @@ typedef enum { ...@@ -86,7 +86,7 @@ typedef enum {
} ARCHIPCmd; } ARCHIPCmd;
typedef struct ArchipelagoAIOCB { typedef struct ArchipelagoAIOCB {
BlockDriverAIOCB common; BlockAIOCB common;
QEMUBH *bh; QEMUBH *bh;
struct BDRVArchipelagoState *s; struct BDRVArchipelagoState *s;
QEMUIOVector *qiov; QEMUIOVector *qiov;
...@@ -856,13 +856,13 @@ err_exit: ...@@ -856,13 +856,13 @@ err_exit:
return ret; return ret;
} }
static BlockDriverAIOCB *qemu_archipelago_aio_rw(BlockDriverState *bs, static BlockAIOCB *qemu_archipelago_aio_rw(BlockDriverState *bs,
int64_t sector_num, int64_t sector_num,
QEMUIOVector *qiov, QEMUIOVector *qiov,
int nb_sectors, int nb_sectors,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque, void *opaque,
int op) int op)
{ {
ArchipelagoAIOCB *aio_cb; ArchipelagoAIOCB *aio_cb;
BDRVArchipelagoState *s = bs->opaque; BDRVArchipelagoState *s = bs->opaque;
...@@ -894,7 +894,7 @@ err_exit: ...@@ -894,7 +894,7 @@ err_exit:
return NULL; return NULL;
} }
static BlockDriverAIOCB *qemu_archipelago_aio_readv(BlockDriverState *bs, static BlockAIOCB *qemu_archipelago_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -902,7 +902,7 @@ static BlockDriverAIOCB *qemu_archipelago_aio_readv(BlockDriverState *bs, ...@@ -902,7 +902,7 @@ static BlockDriverAIOCB *qemu_archipelago_aio_readv(BlockDriverState *bs,
opaque, ARCHIP_OP_READ); opaque, ARCHIP_OP_READ);
} }
static BlockDriverAIOCB *qemu_archipelago_aio_writev(BlockDriverState *bs, static BlockAIOCB *qemu_archipelago_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -1052,7 +1052,7 @@ static QemuOptsList qemu_archipelago_create_opts = { ...@@ -1052,7 +1052,7 @@ static QemuOptsList qemu_archipelago_create_opts = {
} }
}; };
static BlockDriverAIOCB *qemu_archipelago_aio_flush(BlockDriverState *bs, static BlockAIOCB *qemu_archipelago_aio_flush(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
return qemu_archipelago_aio_rw(bs, 0, NULL, 0, cb, opaque, return qemu_archipelago_aio_rw(bs, 0, NULL, 0, cb, opaque,
......
...@@ -41,7 +41,7 @@ typedef struct BDRVBlkdebugState { ...@@ -41,7 +41,7 @@ typedef struct BDRVBlkdebugState {
} BDRVBlkdebugState; } BDRVBlkdebugState;
typedef struct BlkdebugAIOCB { typedef struct BlkdebugAIOCB {
BlockDriverAIOCB common; BlockAIOCB common;
QEMUBH *bh; QEMUBH *bh;
int ret; int ret;
} BlkdebugAIOCB; } BlkdebugAIOCB;
...@@ -463,7 +463,7 @@ static void error_callback_bh(void *opaque) ...@@ -463,7 +463,7 @@ static void error_callback_bh(void *opaque)
qemu_aio_unref(acb); qemu_aio_unref(acb);
} }
static BlockDriverAIOCB *inject_error(BlockDriverState *bs, static BlockAIOCB *inject_error(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, void *opaque, BlkdebugRule *rule) BlockDriverCompletionFunc *cb, void *opaque, BlkdebugRule *rule)
{ {
BDRVBlkdebugState *s = bs->opaque; BDRVBlkdebugState *s = bs->opaque;
...@@ -489,7 +489,7 @@ static BlockDriverAIOCB *inject_error(BlockDriverState *bs, ...@@ -489,7 +489,7 @@ static BlockDriverAIOCB *inject_error(BlockDriverState *bs,
return &acb->common; return &acb->common;
} }
static BlockDriverAIOCB *blkdebug_aio_readv(BlockDriverState *bs, static BlockAIOCB *blkdebug_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -511,7 +511,7 @@ static BlockDriverAIOCB *blkdebug_aio_readv(BlockDriverState *bs, ...@@ -511,7 +511,7 @@ static BlockDriverAIOCB *blkdebug_aio_readv(BlockDriverState *bs,
return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque); return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque);
} }
static BlockDriverAIOCB *blkdebug_aio_writev(BlockDriverState *bs, static BlockAIOCB *blkdebug_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -533,7 +533,7 @@ static BlockDriverAIOCB *blkdebug_aio_writev(BlockDriverState *bs, ...@@ -533,7 +533,7 @@ static BlockDriverAIOCB *blkdebug_aio_writev(BlockDriverState *bs,
return bdrv_aio_writev(bs->file, sector_num, qiov, nb_sectors, cb, opaque); return bdrv_aio_writev(bs->file, sector_num, qiov, nb_sectors, cb, opaque);
} }
static BlockDriverAIOCB *blkdebug_aio_flush(BlockDriverState *bs, static BlockAIOCB *blkdebug_aio_flush(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
BDRVBlkdebugState *s = bs->opaque; BDRVBlkdebugState *s = bs->opaque;
......
...@@ -19,7 +19,7 @@ typedef struct { ...@@ -19,7 +19,7 @@ typedef struct {
typedef struct BlkverifyAIOCB BlkverifyAIOCB; typedef struct BlkverifyAIOCB BlkverifyAIOCB;
struct BlkverifyAIOCB { struct BlkverifyAIOCB {
BlockDriverAIOCB common; BlockAIOCB common;
QEMUBH *bh; QEMUBH *bh;
/* Request metadata */ /* Request metadata */
...@@ -229,7 +229,7 @@ static void blkverify_verify_readv(BlkverifyAIOCB *acb) ...@@ -229,7 +229,7 @@ static void blkverify_verify_readv(BlkverifyAIOCB *acb)
} }
} }
static BlockDriverAIOCB *blkverify_aio_readv(BlockDriverState *bs, static BlockAIOCB *blkverify_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -249,7 +249,7 @@ static BlockDriverAIOCB *blkverify_aio_readv(BlockDriverState *bs, ...@@ -249,7 +249,7 @@ static BlockDriverAIOCB *blkverify_aio_readv(BlockDriverState *bs,
return &acb->common; return &acb->common;
} }
static BlockDriverAIOCB *blkverify_aio_writev(BlockDriverState *bs, static BlockAIOCB *blkverify_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -264,9 +264,9 @@ static BlockDriverAIOCB *blkverify_aio_writev(BlockDriverState *bs, ...@@ -264,9 +264,9 @@ static BlockDriverAIOCB *blkverify_aio_writev(BlockDriverState *bs,
return &acb->common; return &acb->common;
} }
static BlockDriverAIOCB *blkverify_aio_flush(BlockDriverState *bs, static BlockAIOCB *blkverify_aio_flush(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
BDRVBlkverifyState *s = bs->opaque; BDRVBlkverifyState *s = bs->opaque;
......
...@@ -78,7 +78,7 @@ static CURLMcode __curl_multi_socket_action(CURLM *multi_handle, ...@@ -78,7 +78,7 @@ static CURLMcode __curl_multi_socket_action(CURLM *multi_handle,
struct BDRVCURLState; struct BDRVCURLState;
typedef struct CURLAIOCB { typedef struct CURLAIOCB {
BlockDriverAIOCB common; BlockAIOCB common;
QEMUBH *bh; QEMUBH *bh;
QEMUIOVector *qiov; QEMUIOVector *qiov;
...@@ -680,7 +680,7 @@ static void curl_readv_bh_cb(void *p) ...@@ -680,7 +680,7 @@ static void curl_readv_bh_cb(void *p)
curl_multi_socket_action(s->multi, CURL_SOCKET_TIMEOUT, 0, &running); curl_multi_socket_action(s->multi, CURL_SOCKET_TIMEOUT, 0, &running);
} }
static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs, static BlockAIOCB *curl_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
......
...@@ -80,7 +80,7 @@ typedef struct IscsiTask { ...@@ -80,7 +80,7 @@ typedef struct IscsiTask {
} IscsiTask; } IscsiTask;
typedef struct IscsiAIOCB { typedef struct IscsiAIOCB {
BlockDriverAIOCB common; BlockAIOCB common;
QEMUIOVector *qiov; QEMUIOVector *qiov;
QEMUBH *bh; QEMUBH *bh;
IscsiLun *iscsilun; IscsiLun *iscsilun;
...@@ -227,7 +227,7 @@ iscsi_abort_task_cb(struct iscsi_context *iscsi, int status, void *command_data, ...@@ -227,7 +227,7 @@ iscsi_abort_task_cb(struct iscsi_context *iscsi, int status, void *command_data,
} }
static void static void
iscsi_aio_cancel(BlockDriverAIOCB *blockacb) iscsi_aio_cancel(BlockAIOCB *blockacb)
{ {
IscsiAIOCB *acb = (IscsiAIOCB *)blockacb; IscsiAIOCB *acb = (IscsiAIOCB *)blockacb;
IscsiLun *iscsilun = acb->iscsilun; IscsiLun *iscsilun = acb->iscsilun;
...@@ -663,7 +663,7 @@ iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int status, ...@@ -663,7 +663,7 @@ iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int status,
iscsi_schedule_bh(acb); iscsi_schedule_bh(acb);
} }
static BlockDriverAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf, unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define MAX_QUEUED_IO 128 #define MAX_QUEUED_IO 128
struct qemu_laiocb { struct qemu_laiocb {
BlockDriverAIOCB common; BlockAIOCB common;
struct qemu_laio_state *ctx; struct qemu_laio_state *ctx;
struct iocb iocb; struct iocb iocb;
ssize_t ret; ssize_t ret;
...@@ -146,7 +146,7 @@ static void qemu_laio_completion_cb(EventNotifier *e) ...@@ -146,7 +146,7 @@ static void qemu_laio_completion_cb(EventNotifier *e)
} }
} }
static void laio_cancel(BlockDriverAIOCB *blockacb) static void laio_cancel(BlockAIOCB *blockacb)
{ {
struct qemu_laiocb *laiocb = (struct qemu_laiocb *)blockacb; struct qemu_laiocb *laiocb = (struct qemu_laiocb *)blockacb;
struct io_event event; struct io_event event;
...@@ -243,7 +243,7 @@ int laio_io_unplug(BlockDriverState *bs, void *aio_ctx, bool unplug) ...@@ -243,7 +243,7 @@ int laio_io_unplug(BlockDriverState *bs, void *aio_ctx, bool unplug)
return ret; return ret;
} }
BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd, BlockAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type) BlockDriverCompletionFunc *cb, void *opaque, int type)
{ {
......
...@@ -78,7 +78,7 @@ static coroutine_fn int null_co_flush(BlockDriverState *bs) ...@@ -78,7 +78,7 @@ static coroutine_fn int null_co_flush(BlockDriverState *bs)
} }
typedef struct { typedef struct {
BlockDriverAIOCB common; BlockAIOCB common;
QEMUBH *bh; QEMUBH *bh;
} NullAIOCB; } NullAIOCB;
...@@ -94,9 +94,9 @@ static void null_bh_cb(void *opaque) ...@@ -94,9 +94,9 @@ static void null_bh_cb(void *opaque)
qemu_aio_unref(acb); qemu_aio_unref(acb);
} }
static inline BlockDriverAIOCB *null_aio_common(BlockDriverState *bs, static inline BlockAIOCB *null_aio_common(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
NullAIOCB *acb; NullAIOCB *acb;
...@@ -106,27 +106,27 @@ static inline BlockDriverAIOCB *null_aio_common(BlockDriverState *bs, ...@@ -106,27 +106,27 @@ static inline BlockDriverAIOCB *null_aio_common(BlockDriverState *bs,
return &acb->common; return &acb->common;
} }
static BlockDriverAIOCB *null_aio_readv(BlockDriverState *bs, static BlockAIOCB *null_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int64_t sector_num, QEMUIOVector *qiov,
int nb_sectors, int nb_sectors,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
return null_aio_common(bs, cb, opaque); return null_aio_common(bs, cb, opaque);
} }
static BlockDriverAIOCB *null_aio_writev(BlockDriverState *bs, static BlockAIOCB *null_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int64_t sector_num, QEMUIOVector *qiov,
int nb_sectors, int nb_sectors,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
return null_aio_common(bs, cb, opaque); return null_aio_common(bs, cb, opaque);
} }
static BlockDriverAIOCB *null_aio_flush(BlockDriverState *bs, static BlockAIOCB *null_aio_flush(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
return null_aio_common(bs, cb, opaque); return null_aio_common(bs, cb, opaque);
} }
......
...@@ -1365,11 +1365,11 @@ static void qed_aio_next_io(void *opaque, int ret) ...@@ -1365,11 +1365,11 @@ static void qed_aio_next_io(void *opaque, int ret)
io_fn, acb); io_fn, acb);
} }
static BlockDriverAIOCB *qed_aio_setup(BlockDriverState *bs, static BlockAIOCB *qed_aio_setup(BlockDriverState *bs,
int64_t sector_num, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque, int flags) void *opaque, int flags)
{ {
QEDAIOCB *acb = qemu_aio_get(&qed_aiocb_info, bs, cb, opaque); QEDAIOCB *acb = qemu_aio_get(&qed_aiocb_info, bs, cb, opaque);
...@@ -1390,20 +1390,20 @@ static BlockDriverAIOCB *qed_aio_setup(BlockDriverState *bs, ...@@ -1390,20 +1390,20 @@ static BlockDriverAIOCB *qed_aio_setup(BlockDriverState *bs,
return &acb->common; return &acb->common;
} }
static BlockDriverAIOCB *bdrv_qed_aio_readv(BlockDriverState *bs, static BlockAIOCB *bdrv_qed_aio_readv(BlockDriverState *bs,
int64_t sector_num, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
return qed_aio_setup(bs, sector_num, qiov, nb_sectors, cb, opaque, 0); return qed_aio_setup(bs, sector_num, qiov, nb_sectors, cb, opaque, 0);
} }
static BlockDriverAIOCB *bdrv_qed_aio_writev(BlockDriverState *bs, static BlockAIOCB *bdrv_qed_aio_writev(BlockDriverState *bs,
int64_t sector_num, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
return qed_aio_setup(bs, sector_num, qiov, nb_sectors, cb, return qed_aio_setup(bs, sector_num, qiov, nb_sectors, cb,
opaque, QED_AIOCB_WRITE); opaque, QED_AIOCB_WRITE);
...@@ -1431,7 +1431,7 @@ static int coroutine_fn bdrv_qed_co_write_zeroes(BlockDriverState *bs, ...@@ -1431,7 +1431,7 @@ static int coroutine_fn bdrv_qed_co_write_zeroes(BlockDriverState *bs,
int nb_sectors, int nb_sectors,
BdrvRequestFlags flags) BdrvRequestFlags flags)
{ {
BlockDriverAIOCB *blockacb; BlockAIOCB *blockacb;
BDRVQEDState *s = bs->opaque; BDRVQEDState *s = bs->opaque;
QEDWriteZeroesCB cb = { .done = false }; QEDWriteZeroesCB cb = { .done = false };
QEMUIOVector qiov; QEMUIOVector qiov;
......
...@@ -128,7 +128,7 @@ enum { ...@@ -128,7 +128,7 @@ enum {
}; };
typedef struct QEDAIOCB { typedef struct QEDAIOCB {
BlockDriverAIOCB common; BlockAIOCB common;
QEMUBH *bh; QEMUBH *bh;
int bh_ret; /* final return status for completion bh */ int bh_ret; /* final return status for completion bh */
QSIMPLEQ_ENTRY(QEDAIOCB) next; /* next request */ QSIMPLEQ_ENTRY(QEDAIOCB) next; /* next request */
......
...@@ -92,7 +92,7 @@ typedef struct QuorumAIOCB QuorumAIOCB; ...@@ -92,7 +92,7 @@ typedef struct QuorumAIOCB QuorumAIOCB;
* $children_count QuorumChildRequest. * $children_count QuorumChildRequest.
*/ */
typedef struct QuorumChildRequest { typedef struct QuorumChildRequest {
BlockDriverAIOCB *aiocb; BlockAIOCB *aiocb;
QEMUIOVector qiov; QEMUIOVector qiov;
uint8_t *buf; uint8_t *buf;
int ret; int ret;
...@@ -105,7 +105,7 @@ typedef struct QuorumChildRequest { ...@@ -105,7 +105,7 @@ typedef struct QuorumChildRequest {
* used to do operations on each children and track overall progress. * used to do operations on each children and track overall progress.
*/ */
struct QuorumAIOCB { struct QuorumAIOCB {
BlockDriverAIOCB common; BlockAIOCB common;
/* Request metadata */ /* Request metadata */
uint64_t sector_num; uint64_t sector_num;
...@@ -130,7 +130,7 @@ struct QuorumAIOCB { ...@@ -130,7 +130,7 @@ struct QuorumAIOCB {
static bool quorum_vote(QuorumAIOCB *acb); static bool quorum_vote(QuorumAIOCB *acb);
static void quorum_aio_cancel(BlockDriverAIOCB *blockacb) static void quorum_aio_cancel(BlockAIOCB *blockacb)
{ {
QuorumAIOCB *acb = container_of(blockacb, QuorumAIOCB, common); QuorumAIOCB *acb = container_of(blockacb, QuorumAIOCB, common);
BDRVQuorumState *s = acb->common.bs->opaque; BDRVQuorumState *s = acb->common.bs->opaque;
...@@ -264,7 +264,7 @@ static void quorum_rewrite_aio_cb(void *opaque, int ret) ...@@ -264,7 +264,7 @@ static void quorum_rewrite_aio_cb(void *opaque, int ret)
quorum_aio_finalize(acb); quorum_aio_finalize(acb);
} }
static BlockDriverAIOCB *read_fifo_child(QuorumAIOCB *acb); static BlockAIOCB *read_fifo_child(QuorumAIOCB *acb);
static void quorum_copy_qiov(QEMUIOVector *dest, QEMUIOVector *source) static void quorum_copy_qiov(QEMUIOVector *dest, QEMUIOVector *source)
{ {
...@@ -640,7 +640,7 @@ free_exit: ...@@ -640,7 +640,7 @@ free_exit:
return rewrite; return rewrite;
} }
static BlockDriverAIOCB *read_quorum_children(QuorumAIOCB *acb) static BlockAIOCB *read_quorum_children(QuorumAIOCB *acb)
{ {
BDRVQuorumState *s = acb->common.bs->opaque; BDRVQuorumState *s = acb->common.bs->opaque;
int i; int i;
...@@ -659,7 +659,7 @@ static BlockDriverAIOCB *read_quorum_children(QuorumAIOCB *acb) ...@@ -659,7 +659,7 @@ static BlockDriverAIOCB *read_quorum_children(QuorumAIOCB *acb)
return &acb->common; return &acb->common;
} }
static BlockDriverAIOCB *read_fifo_child(QuorumAIOCB *acb) static BlockAIOCB *read_fifo_child(QuorumAIOCB *acb)
{ {
BDRVQuorumState *s = acb->common.bs->opaque; BDRVQuorumState *s = acb->common.bs->opaque;
...@@ -675,12 +675,12 @@ static BlockDriverAIOCB *read_fifo_child(QuorumAIOCB *acb) ...@@ -675,12 +675,12 @@ static BlockDriverAIOCB *read_fifo_child(QuorumAIOCB *acb)
return &acb->common; return &acb->common;
} }
static BlockDriverAIOCB *quorum_aio_readv(BlockDriverState *bs, static BlockAIOCB *quorum_aio_readv(BlockDriverState *bs,
int64_t sector_num, int64_t sector_num,
QEMUIOVector *qiov, QEMUIOVector *qiov,
int nb_sectors, int nb_sectors,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
BDRVQuorumState *s = bs->opaque; BDRVQuorumState *s = bs->opaque;
QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num, QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num,
...@@ -696,12 +696,12 @@ static BlockDriverAIOCB *quorum_aio_readv(BlockDriverState *bs, ...@@ -696,12 +696,12 @@ static BlockDriverAIOCB *quorum_aio_readv(BlockDriverState *bs,
return read_fifo_child(acb); return read_fifo_child(acb);
} }
static BlockDriverAIOCB *quorum_aio_writev(BlockDriverState *bs, static BlockAIOCB *quorum_aio_writev(BlockDriverState *bs,
int64_t sector_num, int64_t sector_num,
QEMUIOVector *qiov, QEMUIOVector *qiov,
int nb_sectors, int nb_sectors,
BlockDriverCompletionFunc *cb, BlockDriverCompletionFunc *cb,
void *opaque) void *opaque)
{ {
BDRVQuorumState *s = bs->opaque; BDRVQuorumState *s = bs->opaque;
QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num, nb_sectors, QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num, nb_sectors,
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#ifdef CONFIG_LINUX_AIO #ifdef CONFIG_LINUX_AIO
void *laio_init(void); void *laio_init(void);
void laio_cleanup(void *s); void laio_cleanup(void *s);
BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd, BlockAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type); BlockDriverCompletionFunc *cb, void *opaque, int type);
void laio_detach_aio_context(void *s, AioContext *old_context); void laio_detach_aio_context(void *s, AioContext *old_context);
...@@ -49,7 +49,7 @@ typedef struct QEMUWin32AIOState QEMUWin32AIOState; ...@@ -49,7 +49,7 @@ typedef struct QEMUWin32AIOState QEMUWin32AIOState;
QEMUWin32AIOState *win32_aio_init(void); QEMUWin32AIOState *win32_aio_init(void);
void win32_aio_cleanup(QEMUWin32AIOState *aio); void win32_aio_cleanup(QEMUWin32AIOState *aio);
int win32_aio_attach(QEMUWin32AIOState *aio, HANDLE hfile); int win32_aio_attach(QEMUWin32AIOState *aio, HANDLE hfile);
BlockDriverAIOCB *win32_aio_submit(BlockDriverState *bs, BlockAIOCB *win32_aio_submit(BlockDriverState *bs,
QEMUWin32AIOState *aio, HANDLE hfile, QEMUWin32AIOState *aio, HANDLE hfile,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type); BlockDriverCompletionFunc *cb, void *opaque, int type);
......
...@@ -1041,7 +1041,7 @@ static int paio_submit_co(BlockDriverState *bs, int fd, ...@@ -1041,7 +1041,7 @@ static int paio_submit_co(BlockDriverState *bs, int fd,
return thread_pool_submit_co(pool, aio_worker, acb); return thread_pool_submit_co(pool, aio_worker, acb);
} }
static BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd, static BlockAIOCB *paio_submit(BlockDriverState *bs, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type) BlockDriverCompletionFunc *cb, void *opaque, int type)
{ {
...@@ -1066,7 +1066,7 @@ static BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd, ...@@ -1066,7 +1066,7 @@ static BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd,
return thread_pool_submit_aio(pool, aio_worker, acb, cb, opaque); return thread_pool_submit_aio(pool, aio_worker, acb, cb, opaque);
} }
static BlockDriverAIOCB *raw_aio_submit(BlockDriverState *bs, static BlockAIOCB *raw_aio_submit(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type) BlockDriverCompletionFunc *cb, void *opaque, int type)
{ {
...@@ -1125,7 +1125,7 @@ static void raw_aio_flush_io_queue(BlockDriverState *bs) ...@@ -1125,7 +1125,7 @@ static void raw_aio_flush_io_queue(BlockDriverState *bs)
#endif #endif
} }
static BlockDriverAIOCB *raw_aio_readv(BlockDriverState *bs, static BlockAIOCB *raw_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -1133,7 +1133,7 @@ static BlockDriverAIOCB *raw_aio_readv(BlockDriverState *bs, ...@@ -1133,7 +1133,7 @@ static BlockDriverAIOCB *raw_aio_readv(BlockDriverState *bs,
cb, opaque, QEMU_AIO_READ); cb, opaque, QEMU_AIO_READ);
} }
static BlockDriverAIOCB *raw_aio_writev(BlockDriverState *bs, static BlockAIOCB *raw_aio_writev(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -1141,7 +1141,7 @@ static BlockDriverAIOCB *raw_aio_writev(BlockDriverState *bs, ...@@ -1141,7 +1141,7 @@ static BlockDriverAIOCB *raw_aio_writev(BlockDriverState *bs,
cb, opaque, QEMU_AIO_WRITE); cb, opaque, QEMU_AIO_WRITE);
} }
static BlockDriverAIOCB *raw_aio_flush(BlockDriverState *bs, static BlockAIOCB *raw_aio_flush(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
BDRVRawState *s = bs->opaque; BDRVRawState *s = bs->opaque;
...@@ -1595,7 +1595,7 @@ static int64_t coroutine_fn raw_co_get_block_status(BlockDriverState *bs, ...@@ -1595,7 +1595,7 @@ static int64_t coroutine_fn raw_co_get_block_status(BlockDriverState *bs,
return ret; return ret;
} }
static coroutine_fn BlockDriverAIOCB *raw_aio_discard(BlockDriverState *bs, static coroutine_fn BlockAIOCB *raw_aio_discard(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int64_t sector_num, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -1935,7 +1935,7 @@ static int hdev_ioctl(BlockDriverState *bs, unsigned long int req, void *buf) ...@@ -1935,7 +1935,7 @@ static int hdev_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
return ioctl(s->fd, req, buf); return ioctl(s->fd, req, buf);
} }
static BlockDriverAIOCB *hdev_aio_ioctl(BlockDriverState *bs, static BlockAIOCB *hdev_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf, unsigned long int req, void *buf,
BlockDriverCompletionFunc *cb, void *opaque) BlockDriverCompletionFunc *cb, void *opaque)
{ {
...@@ -1976,7 +1976,7 @@ static int fd_open(BlockDriverState *bs)<