Skip to content
Browse files

block: copy enable_write_cache in bdrv_append

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>
  • Loading branch information...
1 parent 384c5df commit 43b2912a34c58bbdf6014a18cab5f2f9d3685acc @bonzini committed May 22, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 block.c
View
2 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;

0 comments on commit 43b2912

Please sign in to comment.
Something went wrong with that request. Please try again.