aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-05-30 12:06:33 +0200
committerKevin Wolf <kwolf@redhat.com>2016-07-05 16:46:26 +0200
commitebb7af217339a971bbac91e3697ba76226154a8c (patch)
tree561d3f375126e290a008eef26df04f5a9e4f5440 /block
parent25ec177d90de0992f4d4d5be8ab1e02b9fa2bdf1 (diff)
downloadqemu-arm-ebb7af217339a971bbac91e3697ba76226154a8c.tar.gz
block: Convert bdrv_aio_readv() to BdrvChild
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/blkdebug.c2
-rw-r--r--block/blkverify.c4
-rw-r--r--block/io.c6
-rw-r--r--block/qed-table.c2
-rw-r--r--block/qed.c6
-rw-r--r--block/quorum.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c
index b6ecee379d..499de40e42 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -457,7 +457,7 @@ static BlockAIOCB *blkdebug_aio_readv(BlockDriverState *bs,
return inject_error(bs, cb, opaque, rule);
}
- return bdrv_aio_readv(bs->file->bs, sector_num, qiov, nb_sectors,
+ return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors,
cb, opaque);
}
diff --git a/block/blkverify.c b/block/blkverify.c
index 4045396a3d..4672fdadf4 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -247,9 +247,9 @@ static BlockAIOCB *blkverify_aio_readv(BlockDriverState *bs,
qemu_iovec_init(&acb->raw_qiov, acb->qiov->niov);
qemu_iovec_clone(&acb->raw_qiov, qiov, acb->buf);
- bdrv_aio_readv(s->test_file->bs, sector_num, qiov, nb_sectors,
+ bdrv_aio_readv(s->test_file, sector_num, qiov, nb_sectors,
blkverify_aio_cb, acb);
- bdrv_aio_readv(bs->file->bs, sector_num, &acb->raw_qiov, nb_sectors,
+ bdrv_aio_readv(bs->file, sector_num, &acb->raw_qiov, nb_sectors,
blkverify_aio_cb, acb);
return &acb->common;
}
diff --git a/block/io.c b/block/io.c
index 17e4ad47ec..696a79d592 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1962,13 +1962,13 @@ int bdrv_readv_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos)
/**************************************************************/
/* async I/Os */
-BlockAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
+BlockAIOCB *bdrv_aio_readv(BdrvChild *child, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
- trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque);
+ trace_bdrv_aio_readv(child->bs, sector_num, nb_sectors, opaque);
- return bdrv_co_aio_rw_vector(bs, sector_num, qiov, nb_sectors, 0,
+ return bdrv_co_aio_rw_vector(child->bs, sector_num, qiov, nb_sectors, 0,
cb, opaque, false);
}
diff --git a/block/qed-table.c b/block/qed-table.c
index c841ad10fe..2db0a332e9 100644
--- a/block/qed-table.c
+++ b/block/qed-table.c
@@ -65,7 +65,7 @@ static void qed_read_table(BDRVQEDState *s, uint64_t offset, QEDTable *table,
read_table_cb->iov.iov_len = s->header.cluster_size * s->header.table_size,
qemu_iovec_init_external(qiov, &read_table_cb->iov, 1);
- bdrv_aio_readv(s->bs->file->bs, offset / BDRV_SECTOR_SIZE, qiov,
+ bdrv_aio_readv(s->bs->file, offset / BDRV_SECTOR_SIZE, qiov,
qiov->size / BDRV_SECTOR_SIZE,
qed_read_table_cb, read_table_cb);
}
diff --git a/block/qed.c b/block/qed.c
index 12068061ac..7f71007ebb 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -155,7 +155,7 @@ static void qed_write_header(BDRVQEDState *s, BlockCompletionFunc cb,
write_header_cb->iov.iov_len = len;
qemu_iovec_init_external(&write_header_cb->qiov, &write_header_cb->iov, 1);
- bdrv_aio_readv(s->bs->file->bs, 0, &write_header_cb->qiov, nsectors,
+ bdrv_aio_readv(s->bs->file, 0, &write_header_cb->qiov, nsectors,
qed_write_header_read_cb, write_header_cb);
}
@@ -800,7 +800,7 @@ static void qed_read_backing_file(BDRVQEDState *s, uint64_t pos,
qemu_iovec_concat(*backing_qiov, qiov, 0, size);
BLKDBG_EVENT(s->bs->file, BLKDBG_READ_BACKING_AIO);
- bdrv_aio_readv(s->bs->backing->bs, pos / BDRV_SECTOR_SIZE,
+ bdrv_aio_readv(s->bs->backing, pos / BDRV_SECTOR_SIZE,
*backing_qiov, size / BDRV_SECTOR_SIZE, cb, opaque);
}
@@ -1319,7 +1319,7 @@ static void qed_aio_read_data(void *opaque, int ret,
}
BLKDBG_EVENT(bs->file, BLKDBG_READ_AIO);
- bdrv_aio_readv(bs->file->bs, offset / BDRV_SECTOR_SIZE,
+ bdrv_aio_readv(bs->file, offset / BDRV_SECTOR_SIZE,
&acb->cur_qiov, acb->cur_qiov.size / BDRV_SECTOR_SIZE,
qed_aio_next_io, acb);
return;
diff --git a/block/quorum.c b/block/quorum.c
index 331b726f97..c365c78f9b 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -660,7 +660,7 @@ static BlockAIOCB *read_quorum_children(QuorumAIOCB *acb)
}
for (i = 0; i < s->num_children; i++) {
- acb->qcrs[i].aiocb = bdrv_aio_readv(s->children[i]->bs, acb->sector_num,
+ acb->qcrs[i].aiocb = bdrv_aio_readv(s->children[i], acb->sector_num,
&acb->qcrs[i].qiov, acb->nb_sectors,
quorum_aio_cb, &acb->qcrs[i]);
}
@@ -678,7 +678,7 @@ static BlockAIOCB *read_fifo_child(QuorumAIOCB *acb)
qemu_iovec_clone(&acb->qcrs[acb->child_iter].qiov, acb->qiov,
acb->qcrs[acb->child_iter].buf);
acb->qcrs[acb->child_iter].aiocb =
- bdrv_aio_readv(s->children[acb->child_iter]->bs, acb->sector_num,
+ bdrv_aio_readv(s->children[acb->child_iter], acb->sector_num,
&acb->qcrs[acb->child_iter].qiov, acb->nb_sectors,
quorum_aio_cb, &acb->qcrs[acb->child_iter]);