Re: [PATCH v2 04/12] migration: remove direct migration dependency on version1 of driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]