On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: > From: Michal Privoznik <mprivozn@xxxxxxxxxx> > > 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. > > This patch has been already sent to mailist and has form > that finally suggested by Michal Privoznik. I just include > it in the set as it is not merged yet. This last paragraph could go below the "---" since you're providing "extra" information that we don't necessarily want in git history... > --- > src/libvirt-domain.c | 13 ++++++++----- > 1 files changed, 8 insertions(+), 5 deletions(-) > > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c > index 6f10c74..15de714 100644 > --- a/src/libvirt-domain.c > +++ b/src/libvirt-domain.c > @@ -3412,16 +3412,15 @@ virDomainMigrateDirect(virDomainPtr domain, > NULLSTR(xmlin), flags, NULLSTR(dname), NULLSTR(uri), > bandwidth); > > - if (!domain->conn->driver->domainMigratePerform) { > - virReportUnsupportedError(); > - return -1; > - } > - > /* Perform the migration. The driver isn't supposed to return > * until the migration is complete. > */ > if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn, > VIR_DRV_FEATURE_MIGRATION_V3)) { > + if (!domain->conn->driver->domainMigratePerform3) { > + virReportUnsupportedError(); > + return -1; > + } Ahhh... now I see where patch 10 is going... Direct has no dconnuri... Hmmm... and I know why Coverity is complaining... John > VIR_DEBUG("Using migration protocol 3"); > /* dconn URI not relevant in direct migration, since no > * target libvirtd is involved */ > @@ -3437,6 +3436,10 @@ virDomainMigrateDirect(virDomainPtr domain, > dname, > bandwidth); > } else { > + if (!domain->conn->driver->domainMigratePerform) { > + virReportUnsupportedError(); > + return -1; > + } > VIR_DEBUG("Using migration protocol 2"); > if (xmlin) { > virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", > -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list