
On 04/25/2014 07:13 AM, Jiri Denemark wrote:
When a snapshot operation finishes we have to recheck the backing chain of all disks involved in the snapshot. And we need to do that even if the operation failed because some of the disks might have changed if QEMU did not support transactions.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: - BlockRebase and BlockCommit already recheck the backing chain when we get an event about a completed block job (in qemuProcessHandleBlockJob)
src/qemu/qemu_driver.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
cleanup: + /* recheck backing chains of all disks involved in the snapshot */ + orig_err = virSaveLastError(); + for (i = 0; i < snap->def->ndisks; i++) { + if (snap->def->disks[i].snapshot == VIR_DOMAIN_SNAPSHOT_LOCATION_NONE) + continue;
Do we really need to reprobe internal snapshots? That is, could this be: if (snap->def->disks[i].snapshot != VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) But this makes sense as an improvement to the current code, so: ACK. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org