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

RE: [Xen-devel] migration fails with option "--live"



On Mon, 2010-10-25 at 11:59 +0100, Ian Campbell wrote:
> On Mon, 2010-10-25 at 11:24 +0100, Ian Campbell wrote:
> > On Mon, 2010-10-25 at 08:04 +0100, Zhang, Yang Z wrote:
> > > It was introduced by 22275. 
> > 
> > Simple thinko on my part, thanks for reporting.
> > 
> > 8<--------
> > 
> > # HG changeset patch
> > # User Ian Campbell <ian.campbell@xxxxxxxxxx>
> > # Date 1288002211 -3600
> > # Node ID 3b832cf7c0f4e0c232c8d49be86fd86894f280e3
> > # Parent  3f41a2e6b6598df859df64966b39a0d0f6ccad03
> > libxc: correct xc_save utility's switch_qemu_logdirty callback return value
> > 
> > The callback return convention follows xc_domain_save and therefore
> > should return 1 on success.
> 
> Bah, double confused myself. xc_domain_save returns 0 on success and >0
> on error and the callbacks should do the same. Therefore the bug is in
> xc_domain_save where it checks the result of the callback...
> 
> Will try fixing again after a little testing...

Lets try this one. Works under xend, xl migrate seems broken for HVM
domains both before and after 22275:e95dc0eb152d. I'll investigate that
one separately.

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1288009016 -3600
# Node ID 61188eb58d6de7607e1a497402eacd987162661a
# Parent  3dae6dc75fd268156b27833e79d88b647736dce9
libxc: correct handling of switch_qemu_logdirty callback return value

The callback return convention follows xc_domain_save and therefore
returns 0 on success and >0 on error, correct the check accordingly.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 3dae6dc75fd2 -r 61188eb58d6d tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Mon Oct 25 13:16:56 2010 +0100
+++ b/tools/libxc/xc_domain_save.c      Mon Oct 25 13:16:56 2010 +0100
@@ -1015,7 +1015,7 @@ int xc_domain_save(xc_interface *xch, in
         }
 
         /* Enable qemu-dm logging dirty pages to xen */
-        if ( hvm && !callbacks->switch_qemu_logdirty(dom, 1, callbacks->data) )
+        if ( hvm && callbacks->switch_qemu_logdirty(dom, 1, callbacks->data) )
         {
             PERROR("Couldn't enable qemu log-dirty mode (errno %d)", errno);
             goto out;
@@ -1879,7 +1879,7 @@ int xc_domain_save(xc_interface *xch, in
                                XEN_DOMCTL_SHADOW_OP_OFF,
                                NULL, 0, NULL, 0, NULL) < 0 )
             DPRINTF("Warning - couldn't disable shadow mode");
-        if ( hvm && !callbacks->switch_qemu_logdirty(dom, 0, callbacks->data) )
+        if ( hvm && callbacks->switch_qemu_logdirty(dom, 0, callbacks->data) )
             DPRINTF("Warning - couldn't disable qemu log-dirty mode");
     }
 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.