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] We need to detect ioemu handled devices earlier and igno

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] We need to detect ioemu handled devices earlier and ignore them.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Aug 2005 09:38:11 +0000
Delivery-date: Sat, 20 Aug 2005 09:38:44 +0000
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/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 68e13a9a9b1cf2013f5b42d25e8272f50472631e
# Parent  0cf2430f520f1316fe750ea7c939b3728fd72761
We need to detect ioemu handled devices earlier and ignore them.

Testing in blkif.py is too late. The check should be in createDevices.

Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

diff -r 0cf2430f520f -r 68e13a9a9b1c tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Sat Aug 20 09:35:38 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Sat Aug 20 09:36:15 2005
@@ -23,7 +23,7 @@
 
 """
 
-import string
+import string, re
 import os
 import time
 import threading
@@ -383,7 +383,9 @@
 
     def createDevice(self, type, devconfig, change=False):
         if type == 'vbd':
-
+            typedev = sxp.child_value(devconfig, 'dev')
+            if re.match('^ioemu:', typedev):
+               return;
             backdom = domain_exists(sxp.child_value(devconfig, 'backend', '0'))
 
             devnum = blkdev_name_to_number(sxp.child_value(devconfig, 'dev'))
diff -r 0cf2430f520f -r 68e13a9a9b1c tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Sat Aug 20 09:35:38 2005
+++ b/tools/python/xen/xend/server/blkif.py     Sat Aug 20 09:36:15 2005
@@ -18,7 +18,6 @@
 """Support for virtual block devices.
 """
 import string
-import re
 
 from xen.util import blkif
 from xen.xend.XendError import XendError, VmError
@@ -200,7 +199,6 @@
         self.vdev = None
         self.mode = None
         self.type = None
-        self.emtype = None
         self.params = None
         self.node = None
         self.device = None
@@ -239,12 +237,7 @@
         # Split into type and type-specific params (which are passed to the
         # type-specific control script).
         (self.type, self.params) = string.split(self.uname, ':', 1)
-        typedev = sxp.child_value(config, 'dev')
-        if re.match( '^ioemu:', typedev):
-            (self.emtype, self.dev) = string.split(typedev, ':', 1)
-        else:
-            self.emtype = 'vbd'
-            self.dev = typedev
+        self.dev = sxp.child_value(config, 'dev')
         if not self.dev:
             raise VmError('vbd: Missing dev')
         self.mode = sxp.child_value(config, 'mode', 'r')
@@ -265,8 +258,6 @@
         if recreate:
             pass
         else:
-            if self.emtype == 'ioemu':
-                return
             node = Blkctl.block('bind', self.type, self.params)
             self.setNode(node)
             self.attachBackend()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>