]> git.proxmox.com Git - qemu.git/commitdiff
block: copy enable_write_cache in bdrv_append
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 Jun 2012 22:04:51 +0000 (00:04 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Jun 2012 12:03:43 +0000 (14:03 +0200)
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 <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c

diff --git a/block.c b/block.c
index 753811288ab1898ff6987bb4fb2ea43b684841f9..9bff401200aefce8bdc60f44e53f80f09123a4e5 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1000,6 +1000,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;