From: Paolo Bonzini Date: Tue, 5 Jun 2012 22:04:51 +0000 (+0200) Subject: block: copy enable_write_cache in bdrv_append X-Git-Tag: v1.2.0-rc0~269^2~17 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c4a248a138028bee63a099410c79b428db0c4779;p=qemu-xen-unstable.git 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 Signed-off-by: Kevin Wolf --- diff --git a/block.c b/block.c index 753811288a..9bff401200 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;