qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 21/39] savevm: flush after saving vm state


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 21/39] savevm: flush after saving vm state
Date: Fri, 15 Jun 2012 15:33:21 +0200

From: Paolo Bonzini <address@hidden>

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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 savevm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/savevm.c b/savevm.c
index 2d18bab..2b6833d 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)
-- 
1.7.6.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]