From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVO1I-0003xr-PQ for qemu-devel@nongnu.org; Fri, 18 May 2012 10:19:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVO1C-0005xs-Ih for qemu-devel@nongnu.org; Fri, 18 May 2012 10:19:04 -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 1SVO1C-0005wH-A2 for qemu-devel@nongnu.org; Fri, 18 May 2012 10:18:58 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro12so4994600pbb.4 for ; Fri, 18 May 2012 07:18:57 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 18 May 2012 16:18:29 +0200 Message-Id: <1337350712-29183-5-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 4/7] block: copy enable_write_cache in bdrv_append 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 Because the guest will be able to flip enable_write_cache, the actual state may not match what is used to open the new snapshot. Signed-off-by: Paolo Bonzini --- block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block.c b/block.c index b3d0054..e89b35a 100644 --- a/block.c +++ b/block.c @@ -989,6 +989,8 @@ void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top) tmp.buffer_alignment = bs_top->buffer_alignment; tmp.copy_on_read = bs_top->copy_on_read; + tmp.enable_write_cache = bs_top->enable_write_cache; + /* i/o timing parameters */ tmp.slice_time = bs_top->slice_time; tmp.slice_start = bs_top->slice_start; -- 1.7.10.1