direct-io.hg

changeset 10950:353404fe850c

[xend] Fix reboot for hvm domains with cdrom devices.
The device-type was not added to the device details which caused
cdrom devices to appear as harddisks after a reboot.

From: Alex Brett <Alex.Brett@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Mon Aug 07 11:59:31 2006 +0100 (2006-08-07)
parents ffa5b2975dff
children 16aa4b417c6b
files tools/python/xen/xend/server/DevController.py tools/python/xen/xend/server/blkif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/DevController.py	Fri Aug 04 20:34:44 2006 +0100
     1.2 +++ b/tools/python/xen/xend/server/DevController.py	Mon Aug 07 11:59:31 2006 +0100
     1.3 @@ -341,6 +341,8 @@ class DevController:
     1.4          else:
     1.5              raise VmError("Device %s not connected" % devid)
     1.6  
     1.7 +    def readFrontend(self, devid, *args):
     1.8 +        return xstransact.Read(self.frontendPath(devid), *args)
     1.9  
    1.10      def deviceIDs(self, transaction = None):
    1.11          """@return The IDs of each of the devices currently configured for
     2.1 --- a/tools/python/xen/xend/server/blkif.py	Fri Aug 04 20:34:44 2006 +0100
     2.2 +++ b/tools/python/xen/xend/server/blkif.py	Mon Aug 07 11:59:31 2006 +0100
     2.3 @@ -86,6 +86,9 @@ class BlkifController(DevController):
     2.4                                                      'mode')
     2.5  
     2.6          if dev:
     2.7 +            (dev_type) = self.readFrontend(devid, 'device-type')
     2.8 +            if dev_type:
     2.9 +                dev += ":" + dev_type
    2.10              result.append(['dev', dev])
    2.11          if typ and params:
    2.12              result.append(['uname', typ + ":" + params])