[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.2-testing] xend: fix block protocol mismatch on save/restore
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1210841261 -3600 # Node ID 11dc8a6ba4a5309de982d1ecc25f15e0412449ea # Parent 8eeeca7444231600dcd2c4af5eea855645f040f7 xend: fix block protocol mismatch on save/restore The protocol field of the blkif interface is correct at startup for a guest of a different mode from dom0 (eg. 32-bit dom0, 64-bit guest). However, this property is not persisted on save, so a later restore (or migrate) will setup the block interface with the wrong mode. Signed-off-by: Herbert van den Bergh <herbert.van.den.bergh@xxxxxxxxxx> Signed-off-by: Kurt Hackel <kurt.hackel@xxxxxxxxxx> xen-unstable changeset: 17635:049459aec2b10628a8b7474d43a89e2a89b29405 xen-unstable date: Wed May 14 09:19:05 2008 +0100 --- tools/python/xen/xend/server/blkif.py | 8 ++++++++ tools/python/xen/xm/create.py | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff -r 8eeeca744423 -r 11dc8a6ba4a5 tools/python/xen/xend/server/blkif.py --- a/tools/python/xen/xend/server/blkif.py Thu May 15 09:47:08 2008 +0100 +++ b/tools/python/xen/xend/server/blkif.py Thu May 15 09:47:41 2008 +0100 @@ -82,6 +82,10 @@ class BlkifController(DevController): front = { 'virtual-device' : "%i" % devid, 'device-type' : dev_type } + + protocol = config.get('protocol') + if protocol: + front['protocol'] = protocol return (devid, back, front) @@ -156,6 +160,10 @@ class BlkifController(DevController): if uuid: config['uuid'] = uuid + proto = self.readFrontend(devid, 'protocol') + if proto: + config['protocol'] = proto + return config def destroyDevice(self, devid, force): diff -r 8eeeca744423 -r 11dc8a6ba4a5 tools/python/xen/xm/create.py --- a/tools/python/xen/xm/create.py Thu May 15 09:47:08 2008 +0100 +++ b/tools/python/xen/xm/create.py Thu May 15 09:47:41 2008 +0100 @@ -572,7 +572,7 @@ def configure_disks(config_devs, vals): def configure_disks(config_devs, vals): """Create the config for disks (virtual block devices). """ - for (uname, dev, mode, backend) in vals.disk: + for (uname, dev, mode, backend, protocol) in vals.disk: if uname.startswith('tap:'): cls = 'tap' else: @@ -584,6 +584,8 @@ def configure_disks(config_devs, vals): ['mode', mode ] ] if backend: config_vbd.append(['backend', backend]) + if protocol: + config_vbd.append(['protocol', protocol]) config_devs.append(['device', config_vbd]) def configure_pci(config_devs, vals): @@ -805,7 +807,10 @@ def preprocess_disk(vals): n = len(d) if n == 3: d.append(None) + d.append(None) elif n == 4: + d.append(None) + elif n == 5: pass else: err('Invalid disk specifier: ' + v) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |