ia64/xen-unstable

changeset 6541:483ac5017c9c

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@intel.com>
author adsharma@los-vmm.sc.intel.com
date Fri Aug 19 16:47:24 2005 -0800 (2005-08-19)
parents 81576d3d1ca8
children 3a8f27c6d56c
files tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/server/blkif.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Fri Aug 19 10:19:28 2005 -0800
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Fri Aug 19 16:47:24 2005 -0800
     1.3 @@ -23,7 +23,7 @@ Author: Mike Wray <mike.wray@hp.com>
     1.4  
     1.5  """
     1.6  
     1.7 -import string
     1.8 +import string, re
     1.9  import os
    1.10  import time
    1.11  import threading
    1.12 @@ -383,7 +383,9 @@ class XendDomainInfo:
    1.13  
    1.14      def createDevice(self, type, devconfig, change=False):
    1.15          if type == 'vbd':
    1.16 -
    1.17 +            typedev = sxp.child_value(devconfig, 'dev')
    1.18 +            if re.match('^ioemu:', typedev):
    1.19 +	        return;
    1.20              backdom = domain_exists(sxp.child_value(devconfig, 'backend', '0'))
    1.21  
    1.22              devnum = blkdev_name_to_number(sxp.child_value(devconfig, 'dev'))
     2.1 --- a/tools/python/xen/xend/server/blkif.py	Fri Aug 19 10:19:28 2005 -0800
     2.2 +++ b/tools/python/xen/xend/server/blkif.py	Fri Aug 19 16:47:24 2005 -0800
     2.3 @@ -18,7 +18,6 @@
     2.4  """Support for virtual block devices.
     2.5  """
     2.6  import string
     2.7 -import re
     2.8  
     2.9  from xen.util import blkif
    2.10  from xen.xend.XendError import XendError, VmError
    2.11 @@ -200,7 +199,6 @@ class BlkDev(Dev):
    2.12          self.vdev = None
    2.13          self.mode = None
    2.14          self.type = None
    2.15 -        self.emtype = None
    2.16          self.params = None
    2.17          self.node = None
    2.18          self.device = None
    2.19 @@ -239,12 +237,7 @@ class BlkDev(Dev):
    2.20          # Split into type and type-specific params (which are passed to the
    2.21          # type-specific control script).
    2.22          (self.type, self.params) = string.split(self.uname, ':', 1)
    2.23 -        typedev = sxp.child_value(config, 'dev')
    2.24 -        if re.match( '^ioemu:', typedev):
    2.25 -            (self.emtype, self.dev) = string.split(typedev, ':', 1)
    2.26 -        else:
    2.27 -            self.emtype = 'vbd'
    2.28 -            self.dev = typedev
    2.29 +        self.dev = sxp.child_value(config, 'dev')
    2.30          if not self.dev:
    2.31              raise VmError('vbd: Missing dev')
    2.32          self.mode = sxp.child_value(config, 'mode', 'r')
    2.33 @@ -265,8 +258,6 @@ class BlkDev(Dev):
    2.34          if recreate:
    2.35              pass
    2.36          else:
    2.37 -            if self.emtype == 'ioemu':
    2.38 -                return
    2.39              node = Blkctl.block('bind', self.type, self.params)
    2.40              self.setNode(node)
    2.41              self.attachBackend()