• Iustin Pop's avatar
    Simplify hypervisor block_devices structure · 069cfbf1
    Iustin Pop authored
    This is a partial forward-port of commit 1136 on the 1.2 branch:
      The hypervisor doesn't need to be passed the whole block device
      structure, so we'll just give it the block device name on the local
      node, and the name as seen by the instance. This will make it easier to
      manipulate it later without messing with the block devices (eg. by
      changing the system name to a symlink to the name itself).
      Since the HVM hypervisor changes the "virtual" name a note is added
      calling for a redesign that doesn't need this change, as different
      hypervisors and emulation types will anyway have different names for
      exported devices.
      Reviewed-by: iustinp
    The changes in this patch compared to the original are:
      - we keep passing the original disk object, not for its iv_name, but
        for it's physical_id which is needed by the file driver (this could
        be fixed maybe)
      - we don't use the iv_name anymore, since in 2.0 we already use the
        index of the device
    Original-Author: ultrotter