From: Paolo Bonzini Date: Tue, 8 May 2012 14:51:42 +0000 (+0200) Subject: block: another bdrv_append fix X-Git-Tag: v1.1-rc2~24^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a389e7926750cba5c83f662b1941888b2bebc04;p=thirdparty%2Fqemu.git block: another bdrv_append fix bdrv_append must also copy open_flags to the top, because the snapshot has BDRV_O_NO_BACKING set. This causes interesting results if you later use drive-reopen (not upstream) to reopen the image, and lose the backing file in the process. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- diff --git a/block.c b/block.c index 87600a54dd9..6dc0d4486ef 100644 --- a/block.c +++ b/block.c @@ -977,6 +977,7 @@ void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top) tmp = *bs_new; /* there are some fields that need to stay on the top layer: */ + tmp.open_flags = bs_top->open_flags; /* dev info */ tmp.dev_ops = bs_top->dev_ops;