1. 14 12月, 2017 3 次提交
    • J
      storage: Convert virStoragePoolObjList to use virObjectRWLockable · 4b2e0ed6
      John Ferlan 提交于
      Now that we have a private storage pool list, we can take the next
      step and convert to using objects. In this case, we're going to use
      RWLockable objects (just like every other driver) with two hash
      tables for lookup by UUID or Name.
      
      Along the way the ForEach and Search API's will be adjusted to use
      the related Hash API's and the various FindBy functions altered and
      augmented to allow for HashLookup w/ and w/o the pool lock already
      taken.
      
      After virStoragePoolObjRemove we will need to virObjectUnref(obj)
      after to indicate the caller is "done" with it's reference. The
      Unlock occurs during the Remove.
      
      The NumOf, GetNames, and Export functions all have their own callback
      functions to return the required data and the FindDuplicate code
      can use the HashSearch function callbacks.
      4b2e0ed6
    • J
      storage: Privatize virStoragePoolObjListPtr · 90e65353
      John Ferlan 提交于
      Move the structure into virstorageobj.c.
      
      Use the virStoragePoolObjListNew allocator to fill in the @pools for
      the storage driver and test driver.
      90e65353
    • J
      storage: Fix path check in storagePoolLookupByTargetPath · d4f80d43
      John Ferlan 提交于
      Commit id '5ab746b8' introduced the function as perhaps a copy
      of storageVolLookupByPath; however, it did not use the @cleanpath
      variable even though it used the virFileSanitizePath. So in essance
      the only "check" being done for failure is whether it was possible
      to strdup the path.
      
      Looking at the virStoragePoolDefParseXML one will note that the
      target.path is stored using the result of virFileSanitizePath.
      Therefore, this function should sanitize and use the input @path
      for the argument to storagePoolLookupByTargetPathCallback which
      is comparing against stored target.path values.
      
      Additionally, if there was an error we should use the proper error
      of VIR_ERR_NO_STORAGE_POOL (instead of VIR_ERR_NO_STORAGE_VOL).
      d4f80d43
  2. 13 12月, 2017 3 次提交
  3. 12 12月, 2017 4 次提交
    • M
      fillQemuCaps: Don't leak machine string · fb8c0ea8
      Michal Privoznik 提交于
      ==25251== 5 bytes in 1 blocks are definitely lost in loss record 7 of 81
      ==25251==    at 0x4C2BEDF: malloc (vg_replace_malloc.c:299)
      ==25251==    by 0x967E379: strdup (in /lib64/libc-2.25.so)
      ==25251==    by 0x5366F9F: virStrdup (virstring.c:941)
      ==25251==    by 0x538BF1D: virDomainCapsNew (domain_capabilities.c:121)
      ==25251==    by 0x10EACE: test_virDomainCapsFormat (domaincapstest.c:295)
      ==25251==    by 0x10FBD2: virTestRun (testutils.c:180)
      ==25251==    by 0x10F192: mymain (domaincapstest.c:457)
      ==25251==    by 0x111C7F: virTestMain (testutils.c:1119)
      ==25251==    by 0x10FA3C: main (domaincapstest.c:528)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      fb8c0ea8
    • M
      xenMakeIPList: Don't leak @address_array · 34fb67ef
      Michal Privoznik 提交于
      ==32171== 32 bytes in 1 blocks are definitely lost in loss record 44 of 107
      ==32171==    at 0x4C2DEF6: calloc (vg_replace_malloc.c:711)
      ==32171==    by 0x55744A9: virAllocN (viralloc.c:191)
      ==32171==    by 0x12CED2: xenMakeIPList (xen_common.c:1186)
      ==32171==    by 0x12D0BE: xenFormatNet (xen_common.c:1221)
      ==32171==    by 0x12F0D2: xenFormatVif (xen_common.c:1889)
      ==32171==    by 0x12F2B4: xenFormatConfigCommon (xen_common.c:1944)
      ==32171==    by 0x13BA32: xenFormatXL (xen_xl.c:1971)
      ==32171==    by 0x1186CA: testCompareParseXML (xlconfigtest.c:105)
      ==32171==    by 0x118A64: testCompareHelper (xlconfigtest.c:205)
      ==32171==    by 0x119E36: virTestRun (testutils.c:180)
      ==32171==    by 0x11970E: mymain (xlconfigtest.c:301)
      ==32171==    by 0x11BEE3: virTestMain (testutils.c:1119)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      34fb67ef
    • M
      xenParseXLVnuma: Don't leak @tmp and @token · 747faf11
      Michal Privoznik 提交于
      ==30399== 180 (144 direct, 36 indirect) bytes in 3 blocks are definitely lost in loss record 91 of 111
      ==30399==    at 0x4C2E0FF: realloc (vg_replace_malloc.c:785)
      ==30399==    by 0x5574572: virReallocN (viralloc.c:245)
      ==30399==    by 0x5574668: virExpandN (viralloc.c:294)
      ==30399==    by 0x55747AB: virResizeN (viralloc.c:352)
      ==30399==    by 0x560074D: virStringSplitCount (virstring.c:115)
      ==30399==    by 0x137A59: xenParseXLVnuma (xen_xl.c:442)
      ==30399==    by 0x13952B: xenParseXL (xen_xl.c:1064)
      ==30399==    by 0x11884D: testCompareFormatXML (xlconfigtest.c:152)
      ==30399==    by 0x118A87: testCompareHelper (xlconfigtest.c:207)
      ==30399==    by 0x119E36: virTestRun (testutils.c:180)
      ==30399==    by 0x119186: mymain (xlconfigtest.c:274)
      ==30399==    by 0x11BEE3: virTestMain (testutils.c:1119)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      747faf11
    • Y
      Fix minor typos · ca18914e
      Yuri Chornoivan 提交于
      ca18914e
  4. 11 12月, 2017 2 次提交
  5. 10 12月, 2017 4 次提交
    • L
      qemu: Introduce qemuDomainDeviceDefValidateControllerIDE · 07adbd4b
      Lin Ma 提交于
      Move the IDE controller check from command line building to
      controller def validation. Also explicitly include the avoidance
      check for the implicit IDE controller from qemuBuildSkipController.
      
      Cause the IDE case for command line building to generate a
      failure if called to add an IDE since that shouldn't happen
      if the Validate code did the right thing.
      07adbd4b
    • J
      qemu: Move CCW S390 Address check to controller def validate · 29d8c17b
      John Ferlan 提交于
      Move the call to qemuDomainCheckCCWS390AddressSupport from
      qemuBuildControllerDevStr to qemuDomainDeviceDefValidateController.
      
      This means we will get the qemuCaps from the driver opaque
      variable passed to qemuDomainDeviceDefValidate.
      29d8c17b
    • J
      qemu: Introduce qemuDomainDeviceDefValidateController · 3ba92186
      John Ferlan 提交于
      Introduce the bare bones helper to validate whether the controller
      definition is valid.
      3ba92186
    • J
      qemu: Introduce qemuBuildSkipController · ac0fb44a
      John Ferlan 提交于
      Move the non USB implicit controller checks into their own
      helper to reduce the cruft in qemuBuildControllerDevCommandLine.
      ac0fb44a
  6. 09 12月, 2017 3 次提交
  7. 08 12月, 2017 4 次提交
  8. 07 12月, 2017 12 次提交
  9. 06 12月, 2017 5 次提交