[libvirt] [PATCH] migration: remove direct migration dependency on version1 of driver

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Thu Aug 27 10:23:24 UTC 2015


From: Nikolay Shirokovskiy <Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com>

Direct migration should work if *perform3 is present but *perform
is not. This is situation when driver migration is implemented
after new version of driver function is introduced. We should not
be forced to support old version too as its parameter space is
subspace of newer one.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy at virtuozzo.com>
---
 src/libvirt-domain.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 6ab50ba..c89775b 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -3427,7 +3427,8 @@ virDomainMigrateDirect(virDomainPtr domain,
                      NULLSTR(xmlin), flags, NULLSTR(dname), NULLSTR(dconnuri),
                      NULLSTR(miguri), bandwidth);
 
-    if (!domain->conn->driver->domainMigratePerform) {
+    if (!domain->conn->driver->domainMigratePerform &&
+        !domain->conn->driver->domainMigratePerform3) {
         virReportUnsupportedError();
         return -1;
     }
-- 
1.7.1




More information about the libvir-list mailing list