diff options
| author | Kevin Wolf | 2017-03-02 15:26:18 +0100 |
|---|---|---|
| committer | Kevin Wolf | 2017-03-07 14:53:28 +0100 |
| commit | 067acf28d1d726059f994356f25e054ce2926acf (patch) | |
| tree | 751726429485f8a66b96915dad5114c3ec5df27d /scripts | |
| parent | mirror: Fix error path for dirty bitmap creation (diff) | |
| download | qemu-067acf28d1d726059f994356f25e054ce2926acf.tar.gz qemu-067acf28d1d726059f994356f25e054ce2926acf.tar.xz qemu-067acf28d1d726059f994356f25e054ce2926acf.zip | |
block: Fix blockdev-snapshot error handling
For blockdev-snapshot, external_snapshot_prepare() accepts an arbitrary
node reference at first and only checks later whether it already has a
backing file. Between those places, other errors can occur.
Therefore checking in external_snapshot_abort() whether state->new_bs
has a backing file is not sufficient to tell whether bdrv_append() was
already completed or not. Trying to undo the bdrv_append() when it
wasn't even executed is wrong.
Introduce a new boolean flag in the state to fix this.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
