mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
block: Convert bdrv_pread(v) to BdrvChild
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
18d51c4bac
commit
cf2ab8fc34
18 changed files with 108 additions and 101 deletions
|
@ -709,11 +709,11 @@ int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags)
|
|||
}
|
||||
}
|
||||
|
||||
int bdrv_preadv(BlockDriverState *bs, int64_t offset, QEMUIOVector *qiov)
|
||||
int bdrv_preadv(BdrvChild *child, int64_t offset, QEMUIOVector *qiov)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bdrv_prwv_co(bs, offset, qiov, false, 0);
|
||||
ret = bdrv_prwv_co(child->bs, offset, qiov, false, 0);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ int bdrv_preadv(BlockDriverState *bs, int64_t offset, QEMUIOVector *qiov)
|
|||
return qiov->size;
|
||||
}
|
||||
|
||||
int bdrv_pread(BlockDriverState *bs, int64_t offset, void *buf, int bytes)
|
||||
int bdrv_pread(BdrvChild *child, int64_t offset, void *buf, int bytes)
|
||||
{
|
||||
QEMUIOVector qiov;
|
||||
struct iovec iov = {
|
||||
|
@ -734,7 +734,7 @@ int bdrv_pread(BlockDriverState *bs, int64_t offset, void *buf, int bytes)
|
|||
}
|
||||
|
||||
qemu_iovec_init_external(&qiov, &iov, 1);
|
||||
return bdrv_preadv(bs, offset, &qiov);
|
||||
return bdrv_preadv(child, offset, &qiov);
|
||||
}
|
||||
|
||||
int bdrv_pwritev(BlockDriverState *bs, int64_t offset, QEMUIOVector *qiov)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue