mirror of https://github.com/proxmox/mirror_qemu
savevm: flush after saving vm state
Writing vm state uses bdrv_pwrite, so it will automatically get flushes in writethrough mode. But doing a flush at the end in writeback mode is probably a good idea anyway. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>master
parent
f05fa4ad03
commit
ad492c9244
2
savevm.c
2
savevm.c
|
@ -400,7 +400,7 @@ static int block_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
|
||||||
|
|
||||||
static int bdrv_fclose(void *opaque)
|
static int bdrv_fclose(void *opaque)
|
||||||
{
|
{
|
||||||
return 0;
|
return bdrv_flush(opaque);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int is_writable)
|
static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int is_writable)
|
||||||
|
|
Loading…
Reference in New Issue