1. 15 12月, 2016 1 次提交
  2. 23 6月, 2015 1 次提交
  3. 04 3月, 2014 1 次提交
  4. 30 1月, 2014 2 次提交
    • O
      util: Add one argument for several scsi utils · 10c9ceff
      Osier Yang 提交于
      To support passing the path of the test data to the utils, one
      more argument is added to virSCSIDeviceGetSgName,
      virSCSIDeviceGetDevName, and virSCSIDeviceNew, and the related
      code is changed accordingly.
      
      Later tests for the scsi utils will be based on this patch.
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      10c9ceff
    • O
      qemu: Don't fail if the SCSI host device is shareable between domains · fd243fc4
      Osier Yang 提交于
      It doesn't make sense to fail if the SCSI host device is specified
      as "shareable" explicitly between domains (NB, it works if and only
      if the device is specified as "shareable" for *all* domains,
      otherwise it fails).
      
      To fix the problem, this patch introduces an array for virSCSIDevice
      struct, which records all the names of domain which are using the
      device (note that the recorded domains must specify the device as
      shareable).  And the change on the data struct brings on many
      subsequent changes in the code.
      
      Prior to this patch, the "shareable" tag didn't work as expected,
      it actually work like "non-shareable".  So this patch also added notes
      in formatdomain.html to declare the fact.
      
      * src/util/virscsi.h:
        - Remove virSCSIDeviceGetUsedBy
        - Change definition of virSCSIDeviceGetUsedBy and virSCSIDeviceListDel
        - Add virSCSIDeviceIsAvailable
      
      * src/util/virscsi.c:
        - struct virSCSIDevice: Change "used_by" to be an array; Add
          "n_used_by" as the array count
        - virSCSIDeviceGetUsedBy: Removed
        - virSCSIDeviceFree: frees the "used_by" array
        - virSCSIDeviceSetUsedBy: Copy the domain name to avoid potential
          memory corruption
        - virSCSIDeviceIsAvailable: New
        - virSCSIDeviceListDel: Change the logic, for device which is already
          in the list, just remove the corresponding entry in "used_by". And
          since it's only used in one place, we can safely removing the code
          to find out the dev in the list first.
        - Copyright updating
      
      * src/libvirt_private.sys:
        - virSCSIDeviceGetUsedBy: Remove
        - virSCSIDeviceIsAvailable: New
      
      * src/qemu/qemu_hostdev.c:
        - qemuUpdateActiveScsiHostdevs: Check if the device existing before
          adding it to the list;
        - qemuPrepareHostdevSCSIDevices: Error out if the not all domains
          use the device as "shareable"; Also don't try to add the device
          to the activeScsiHostdevs list if it already there; And make
          more sensible error w.r.t the current "shareable" value in
          driver->activeScsiHostdevs.
        - qemuDomainReAttachHostScsiDevices: Change the logic according
          to the changes on helpers.
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      fd243fc4
  5. 23 1月, 2014 1 次提交
    • O
      util: Add "shareable" field for virSCSIDevice struct · 2b66504d
      Osier Yang 提交于
      Unlike the host devices of other types, SCSI host device XML supports
      "shareable" tag. This patch introduces it for the virSCSIDevice struct
      for a later patch use (to detect if the SCSI device is shareable when
      preparing the SCSI host device in QEMU driver).
      2b66504d
  6. 08 1月, 2014 1 次提交
    • O
      util: Use new array management macros · 6f989485
      Osier Yang 提交于
      Like commit 94a26c7e from Eric Blake, the old fuzzy code should
      be replaced by the new array management macros now.
      
      And the type of scsi->count should be changed into "size_t", and
      thus virSCSIDeviceListCount should return size_t instead, similar
      for vir{PCI,USB}DeviceListCount.
      6f989485
  7. 16 5月, 2013 1 次提交
  8. 13 5月, 2013 1 次提交