diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-08 16:51:42 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-05-10 10:32:12 +0200 |
commit | 3a389e7926750cba5c83f662b1941888b2bebc04 (patch) | |
tree | ccb80705b331227179348ff7337a26d4473f08bc | |
parent | e023b2e244ddcc25308309d20c6bfd037897b10c (diff) | |
download | qemu-3a389e7926750cba5c83f662b1941888b2bebc04.tar.gz qemu-3a389e7926750cba5c83f662b1941888b2bebc04.tar.bz2 qemu-3a389e7926750cba5c83f662b1941888b2bebc04.zip |
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 <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |