File fe808d95-qemu-mig-downtime.patch of Package libvirt.11695

commit fe808d95bf353647bb39b3bc468f5a841b5588dd
Author: Chris St. Pierre <chris.a.st.pierre@gmail.com>
Date:   Mon Sep 29 13:45:28 2014 +0000

    Allow setting migration max downtime any time
    
    This removes the artificial and unnecessary restriction that
    virDomainSetMaxDowntime() only be called while a migration is in
    progress.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1146618
    
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>

Index: libvirt-1.2.5/src/qemu/qemu_driver.c
===================================================================
--- libvirt-1.2.5.orig/src/qemu/qemu_driver.c
+++ libvirt-1.2.5/src/qemu/qemu_driver.c
@@ -11785,12 +11785,6 @@ qemuDomainMigrateSetMaxDowntime(virDomai
 
     priv = vm->privateData;
 
-    if (priv->job.asyncJob != QEMU_ASYNC_JOB_MIGRATION_OUT) {
-        virReportError(VIR_ERR_OPERATION_INVALID,
-                       "%s", _("domain is not being migrated"));
-        goto endjob;
-    }
-
     VIR_DEBUG("Setting migration downtime to %llums", downtime);
     qemuDomainObjEnterMonitor(driver, vm);
     ret = qemuMonitorSetMigrationDowntime(priv->mon, downtime);