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

[Xen-changelog] [xen-3.2-testing] xend: fix block protocol mismatch on s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] xend: fix block protocol mismatch on save/restore
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 May 2008 07:30:30 -0700
Delivery-date: Thu, 15 May 2008 07:30:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] xend: fix block protocol mismatch on save/restore, Xen patchbot-3.2-testing <=