Leendert van Doorn
2006-Mar-02 19:44 UTC
[Xen-devel] [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@watson.ibm.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel
Yu, Ke
2006-Mar-03 00:59 UTC
[Xen-devel] RE: [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@watson.ibm.com [mailto:leendert@watson.ibm.com] Sent: 2006年3月3日 3:44 To: xen-devel@lists.xensource.com Cc: Yu, Ke; Mallick, Asit K; Yu, Wilfred; keir@xensource.com 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@watson.ibm.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel