Re: [PATCH] Recheck disk backing chains after snapshot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
> 
> 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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]