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-unstable] xend: fix block protocol mismatch on save

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: fix block protocol mismatch on save/restore
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 May 2008 04:40:15 -0700
Delivery-date: Thu, 15 May 2008 04:40:25 -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 1210753145 -3600
# Node ID 049459aec2b10628a8b7474d43a89e2a89b29405
# Parent  feec00994a0b06ec093a4a4779484810a138eef2
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>
---
 tools/python/xen/xend/server/blkif.py |    8 ++++++++
 tools/python/xen/xm/create.py         |    7 ++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff -r feec00994a0b -r 049459aec2b1 tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Wed May 14 09:16:40 2008 +0100
+++ b/tools/python/xen/xend/server/blkif.py     Wed May 14 09:19:05 2008 +0100
@@ -88,6 +88,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)
 
@@ -162,6 +166,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 feec00994a0b -r 049459aec2b1 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Wed May 14 09:16:40 2008 +0100
+++ b/tools/python/xen/xm/create.py     Wed May 14 09:19:05 2008 +0100
@@ -610,7 +610,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:
@@ -622,6 +622,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):
@@ -845,7 +847,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-unstable] xend: fix block protocol mismatch on save/restore, Xen patchbot-unstable <=