[libvirt] [PATCH 4/5] qemu: reuse qemuMigrationIsAllowed when doing save and managedsave

Eric Blake eblake at redhat.com
Tue Dec 11 16:18:13 UTC 2012


On 12/07/2012 04:30 AM, Peter Krempa wrote:
> Save and managedsave use both migration to file. This patch reuses

s/use both/both use/

> qemuMigrationIsAllowed to check if the migration could happen before
> trying.
> ---
>  src/qemu/qemu_driver.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

ACK.

> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 4423e69..7e19cdc 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -3010,11 +3010,9 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
>                         "%s", _("domain is marked for auto destroy"));
>          goto cleanup;
>      }
> -    if (virDomainHasDiskMirror(vm)) {
> -        virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s",
> -                       _("domain has active block copy job"));
> +
> +    if (!qemuMigrationIsAllowed(driver, vm, vm->def, false))
>          goto cleanup;
> -    }
> 
>      if (qemuDomainObjBeginAsyncJobWithDriver(driver, vm,
>                                               QEMU_ASYNC_JOB_SAVE) < 0)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121211/32b3bddf/attachment-0001.sig>


More information about the libvir-list mailing list