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: Restore uname of blktap for managed

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Restore uname of blktap for managed domains
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Jul 2009 08:51:09 -0700
Delivery-date: Thu, 02 Jul 2009 08:52:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1246530769 -3600
# Node ID 7c04fe03b87fc6e79a6cb41fa10fc8b0c2b0d3b5
# Parent  fc784f1479a6750e9a060d59ac892e6697eb2ff3
xend: Restore uname of blktap for managed domains

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletion(-)

diff -r fc784f1479a6 -r 7c04fe03b87f tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Thu Jul 02 11:31:58 2009 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Thu Jul 02 11:32:49 2009 +0100
@@ -1120,6 +1120,8 @@ class XendConfig(dict):
                                     if sxp.child_value(config, 'bootable', 
None) is None:
                                         is_bootable = dev_cfg.get('bootable', 
0)
                                         config.append(['bootable', 
int(is_bootable)])
+                                    if dev_cfg.has_key('required_uname'):
+                                        config.append(['required_uname', 
dev_cfg['required_uname']])
                                     config.append(['VDI', dev_cfg.get('VDI', 
'')])
 
                                 sxpr.append(['device', config])
@@ -1370,10 +1372,16 @@ class XendConfig(dict):
                     dev_info['driver'] = 'paravirtualised'
 
             if dev_type == 'tap' or dev_type == 'tap2':
+                if dev_info.has_key('required_uname'):
+                    # Restore uname by required_uname because uname might
+                    # be replaced with 'phy:/dev/xen/blktap-2/tapdev*'.
+                    dev_info['uname'] = dev_info['required_uname']
+                else:
+                    # Save uname for next domain start.
+                    dev_info['required_uname'] = dev_info['uname']
                 if dev_info['uname'].split(':')[1] not in blktap_disk_types:
                     raise XendConfigError("tap:%s not a valid disk type" %
                                     dev_info['uname'].split(':')[1])
-                dev_info['required_uname'] = dev_info['uname']
 
             if dev_type == 'vif':
                 if not dev_info.get('mac'):

_______________________________________________
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: Restore uname of blktap for managed domains, Xen patchbot-unstable <=