Re: [PATCH 3/3] vz: make vz driver more responsive

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

 




On 16.06.2016 14:59, Nikolay Shirokovskiy wrote:
>   Current vz driver implementation is not usable when it comes to
> long runnig operations. Migration or saving a domain blocks all
> other operations even query ones which are expecteted to be available.
> This patch address this problem.
> 

...

> @@ -2436,6 +2504,7 @@ vzDomainMigratePerformStep(virDomainPtr domain,
>      const char *miguri = NULL;
>      const char *dname = NULL;
>      vzMigrationCookiePtr mig = NULL;
> +    bool job = false;
>  
>      virCheckFlags(VZ_MIGRATION_FLAGS, -1);
>  
> @@ -2458,9 +2527,13 @@ vzDomainMigratePerformStep(virDomainPtr domain,
>                              VZ_MIGRATION_COOKIE_SESSION_UUID)))
>          goto cleanup;
>  
> -    if (!(dom = vzDomObjFromDomain(domain)))
> +    if (!(dom = vzDomObjFromDomainRef(domain)))
>          goto cleanup;
>  
> +    if (vzDomainObjBeginJob(dom) < 0)
> +        goto cleanup;
> +    job = true;
> +
>      if (!(vzuri = vzParseVzURI(miguri)))
>          goto cleanup;
>  
> @@ -2473,8 +2546,9 @@ vzDomainMigratePerformStep(virDomainPtr domain,
>      ret = 0;

a mistake here makes migrating disfuntional, here is tiny fix to squash in:

diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index f427555..02ff2e0 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -2543,7 +2543,6 @@ vzDomainMigratePerformStep(virDomainPtr domain,
         goto cleanup;
 
     virDomainObjListRemove(privconn->driver->domains, dom);
-    dom = NULL;
 
     ret = 0;
 
diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c
index 92af4da..82380ca 100644
--- a/src/vz/vz_utils.c
+++ b/src/vz/vz_utils.c
@@ -527,8 +527,12 @@ vzDomainObjBeginJob(virDomainObjPtr dom)
 void
 vzDomainObjEndJob(virDomainObjPtr dom)
 {
-    vzDomObjPtr pdom = dom->privateData;
+    vzDomObjPtr pdom;
 
+    if (!dom)
+        return;
+
+    pdom = dom->privateData;
     pdom->job.active = false;
     virCondSignal(&pdom->job.cond);
 }


--
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]