Patchwork [v3,3/7] block: copy enable_write_cache in bdrv_append

login
register
mail settings
Submitter Paolo Bonzini
Date June 5, 2012, 10:04 p.m.
Message ID <1338933895-20677-4-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/163183/
State New
Headers show

Comments

Paolo Bonzini - June 5, 2012, 10:04 p.m.
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 |    2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/block.c b/block.c
index 7538112..9bff401 100644
--- 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;