summaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-06-06 00:04:50 +0200
committerKevin Wolf <kwolf@redhat.com>2012-06-15 14:03:43 +0200
commitad492c92447ae29d0c3a691f0ae357155cce12fe (patch)
treed52c20990c55ad0433bba4a396067ed59203dda3 /savevm.c
parentf05fa4ad0327579e143b20062e9d45b3ca935e24 (diff)
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>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index 2d18babd6e..2b6833d5f5 100644
--- a/savevm.c
+++ b/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)
{
- return 0;
+ return bdrv_flush(opaque);
}
static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int is_writable)