diff options
author | Max Reitz <mreitz@redhat.com> | 2013-10-20 20:28:20 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-10-24 11:45:06 +0200 |
commit | eedff66f21e542650d895801549ce05ac108278b (patch) | |
tree | 1462ef8058954cd040fe8d16218da99445a66af9 /qemu-options.h | |
parent | cc94712b9ec93d1301eea1fb8f1b08589c7e242e (diff) | |
download | hqemu-eedff66f21e542650d895801549ce05ac108278b.zip hqemu-eedff66f21e542650d895801549ce05ac108278b.tar.gz |
qcow2: Restore total_sectors value in save_vmstate
Since df2a6f29a5, bdrv_co_do_writev increases the total_sectors value of
a growable block devices on writes after the current end. This leads to
the virtual disk apparently growing in qcow2_save_vmstate, which in turn
affects the disk size captured by the internal snapshot taken directly
afterwards through e.g. the HMP savevm command. Such a "grown" snapshot
cannot be loaded after reopening the qcow2 image, since its disk size
differs from the actual virtual disk size (writing a VM state does not
actually increase the virtual disk size).
Fix this by restoring total_sectors at the end of qcow2_save_vmstate.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-options.h')
0 files changed, 0 insertions, 0 deletions