From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVO17-0003ji-Gh for qemu-devel@nongnu.org; Fri, 18 May 2012 10:19:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVO15-0005wi-PR for qemu-devel@nongnu.org; Fri, 18 May 2012 10:18:53 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:52105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVO15-0005wH-Gq for qemu-devel@nongnu.org; Fri, 18 May 2012 10:18:51 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro12so4994600pbb.4 for ; Fri, 18 May 2012 07:18:50 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 18 May 2012 16:18:27 +0200 Message-Id: <1337350712-29183-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1337350712-29183-1-git-send-email-pbonzini@redhat.com> References: <1337350712-29183-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [RFC PATCH 2/7] savevm: flush after saving vm state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@linux.vnet.ibm.com, anthony@codemonkey.ws 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 --- Kind of unrelated, found by inspection. savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.10.1