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>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-08-20 09:36:15 +00:00
1 parent a1b473eb06
commit bd56a31071
2 files changed
+5 -12

No files matched your search

+4 -2
View File
@@ -23,7 +23,7 @@ Author: Mike Wray <mike.wray@hp.com>
"""
import string
import string, re
import os
import time
import threading
@@ -383,7 +383,9 @@ class XendDomainInfo:
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'))
+1 -10
View File
@@ -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 @@ class BlkDev(Dev):
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 @@ class BlkDev(Dev):
# 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 @@ class BlkDev(Dev):
if recreate:
pass
else:
if self.emtype == 'ioemu':
return
node = Blkctl.block('bind', self.type, self.params)
self.setNode(node)
self.attachBackend()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.