From ad492c92447ae29d0c3a691f0ae357155cce12fe Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 6 Jun 2012 00:04:50 +0200 Subject: 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 Signed-off-by: Kevin Wolf --- savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'savevm.c') 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) -- cgit v1.2.3