1. 17 5月, 2013 2 次提交
    • O
      qemu: Manage shared device entry for scsi host device · 1d94b3e7
      Osier Yang 提交于
      This adds the shared device entry when starting domain (more
      exactly, when preparing host devices), and remove the entry
      when destroying domain (when reattaching host devices).
      1d94b3e7
    • O
      qemu: Refactor the helpers to track shared scsi host device · aeda1ff1
      Osier Yang 提交于
      This changes the helpers qemu{Add,Remove}SharedDisk into
      qemu{Add,Remove}SharedDevice, as most of the code in the helpers
      can be reused for scsi host device.
      
      To track the shared scsi host device, first it finds out the
      device path (e.g. /dev/s[dr]*) which is mapped to the sg device,
      and use device ID of the found device path (/dev/s[dr]*) as the
      hash key. This is because of the device ID is not unique between
      between /dev/s[dr]* and /dev/sg*, e.g.
      
      % sg_map
      /dev/sg0  /dev/sda
      /dev/sg1  /dev/sr0
      
      % ls -l /dev/sda
      brw-rw----. 1 root disk 8, 0 May  2 19:26 /dev/sda
      
      %ls -l /dev/sg0
      crw-rw----. 1 root disk 21, 0 May  2 19:26 /dev/sg0
      aeda1ff1
  2. 16 5月, 2013 21 次提交
  3. 15 5月, 2013 17 次提交