aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-06-09 16:50:16 +0200
committerKevin Wolf <kwolf@redhat.com>2016-06-16 15:19:55 +0200
commit5ddda0b8f0c07c8082c87d248c8eb23f43fd44a1 (patch)
tree33b4b848efc8ff105528baa6bd19cce6df446b93 /block/qcow2.c
parentf1e8474115d6be7eda14092050ffa2b031afb729 (diff)
downloadqemu-5ddda0b8f0c07c8082c87d248c8eb23f43fd44a1.zip
qemu-5ddda0b8f0c07c8082c87d248c8eb23f43fd44a1.tar.gz
qemu-5ddda0b8f0c07c8082c87d248c8eb23f43fd44a1.tar.bz2
block: Make .bdrv_load_vmstate() vectored
This brings it in line with .bdrv_save_vmstate(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r--block/qcow2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 9de716a..362ada2 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -2926,8 +2926,8 @@ static int qcow2_save_vmstate(BlockDriverState *bs, QEMUIOVector *qiov,
return ret;
}
-static int qcow2_load_vmstate(BlockDriverState *bs, uint8_t *buf,
- int64_t pos, int size)
+static int qcow2_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov,
+ int64_t pos)
{
BDRVQcow2State *s = bs->opaque;
bool zero_beyond_eof = bs->zero_beyond_eof;
@@ -2935,7 +2935,7 @@ static int qcow2_load_vmstate(BlockDriverState *bs, uint8_t *buf,
BLKDBG_EVENT(bs->file, BLKDBG_VMSTATE_LOAD);
bs->zero_beyond_eof = false;
- ret = bdrv_pread(bs, qcow2_vm_state_offset(s) + pos, buf, size);
+ ret = bdrv_preadv(bs, qcow2_vm_state_offset(s) + pos, qiov);
bs->zero_beyond_eof = zero_beyond_eof;
return ret;