WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RE: [PATCH] Make xm reboot/shutdown work again (undo 8697)

To: <leendert@xxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] Make xm reboot/shutdown work again (undo 8697)
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Fri, 3 Mar 2006 08:59:04 +0800
Cc: "Mallick, Asit K" <asit.k.mallick@xxxxxxxxx>, "Yu, Wilfred" <wilfred.yu@xxxxxxxxx>, keir@xxxxxxxxxxxxx
Delivery-date: Fri, 03 Mar 2006 00:59:48 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcY+W+FHeUq3BagARcGBiyF2JR69RAAATkXg
Thread-topic: [PATCH] Make xm reboot/shutdown work again (undo 8697)
That's fine. It's nice to see the vmx xm reboot/shutdown work again :)  Thanks 

Best Regards
Ke
-----Original Message-----
From: leendert@xxxxxxxxxxxxxx [mailto:leendert@xxxxxxxxxxxxxx] 
Sent: 2006年3月3日 3:44
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Cc: Yu, Ke; Mallick, Asit K; Yu, Wilfred; keir@xxxxxxxxxxxxx
Subject: [PATCH] Make xm reboot/shutdown work again (undo 8697)


This patch undoes 8697 and makes xm reboot/shutdown work again. This code
does expose a bug in xenstored when it is killed & restarted, but that
is not caused by this code.

My sincere appology to Ke Yu for the long wait and assuming his code
was broken.  His code was perfectly fine. Its just that my test scripts
did something for a historical reason that I should have removed a long
time ago.

        Leendert

Signed-Off-By: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>

diff -r b50d3fca138e tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Thu Mar  2 18:16:21 2006
+++ b/tools/python/xen/xend/server/blkif.py     Thu Mar  2 20:22:13 2006
@@ -42,10 +42,6 @@
         """@see DevController.getDeviceDetails"""
 
         dev = sxp.child_value(config, 'dev')
-        if 'ioemu:' in dev:
-            return (None,{},{})
-
-        devid = blkif.blkdev_name_to_number(dev)
 
         (typ, params) = string.split(sxp.child_value(config, 'uname'), ':', 1)
         back = { 'dev'    : dev,
@@ -54,7 +50,13 @@
                  'mode'   : sxp.child_value(config, 'mode', 'r')
                  }
 
-        front = { 'virtual-device' : "%i" % devid }
+        if 'ioemu:' in dev:
+            (dummy, dev1) = string.split(dev, ':', 1)
+            devid = blkif.blkdev_name_to_number(dev1)
+            front = {}
+        else:
+            devid = blkif.blkdev_name_to_number(dev)
+            front = { 'virtual-device' : "%i" % devid }
 
         return (devid, back, front)
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] RE: [PATCH] Make xm reboot/shutdown work again (undo 8697), Yu, Ke <=