[libvirt] [PATCHv1.5 19/27] qemu: snapshot: Detect internal snapshots also for sheepdog and RBD
Michal Privoznik
mprivozn at redhat.com
Wed Nov 27 11:15:13 UTC 2013
On 26.11.2013 17:49, Peter Krempa wrote:
> When doing an internal snapshot on a VM with sheepdog or RBD disks we
> would not set a flag to mark the domain is using internal snapshots and
> might end up creating a mixed snapshot. Move the setting of the variable
> to avoid this problem.
> ---
> src/qemu/qemu_driver.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 8a1eefd..d2dbaf5 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -11764,6 +11764,8 @@ qemuDomainSnapshotPrepare(virDomainObjPtr vm, virDomainSnapshotDefPtr def,
>
> switch (disk->snapshot) {
> case VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL:
> + found_internal = true;
> +
> if (def->state != VIR_DOMAIN_DISK_SNAPSHOT &&
> dom_disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK &&
> (dom_disk->protocol == VIR_DOMAIN_DISK_PROTOCOL_SHEEPDOG ||
> @@ -11787,7 +11789,6 @@ qemuDomainSnapshotPrepare(virDomainObjPtr vm, virDomainSnapshotDefPtr def,
> disk->name);
> goto cleanup;
> }
> - found_internal = true;
> break;
>
> case VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL:
>
ACK, and again wort backporting.
Michal
More information about the libvir-list
mailing list