mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
f1e8474115
commit
5ddda0b8f0
5 changed files with 36 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue