From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfWfH-0001KF-73 for qemu-devel@nongnu.org; Fri, 15 Jun 2012 09:34:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfWfE-0004mh-Qk for qemu-devel@nongnu.org; Fri, 15 Jun 2012 09:34:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfWfE-0004mG-JH for qemu-devel@nongnu.org; Fri, 15 Jun 2012 09:34:12 -0400 From: Kevin Wolf Date: Fri, 15 Jun 2012 15:33:21 +0200 Message-Id: <1339767219-24297-22-git-send-email-kwolf@redhat.com> In-Reply-To: <1339767219-24297-1-git-send-email-kwolf@redhat.com> References: <1339767219-24297-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 21/39] savevm: flush after saving vm state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Paolo Bonzini 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 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