1. 02 6月, 2015 1 次提交
  2. 02 3月, 2015 1 次提交
  3. 03 12月, 2014 1 次提交
    • J
      Replace virSecretFree with virObjectUnref · a0b13d35
      John Ferlan 提交于
      Since virSecretFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      a0b13d35
  4. 15 11月, 2014 1 次提交
  5. 04 7月, 2014 1 次提交
    • J
      Utilize virDomainDiskAuth for storage pools · 97e3397c
      John Ferlan 提交于
      Replace the authType, chap, and cephx unions in virStoragePoolSource
      with a single pointer to a virStorageAuthDefPtr.  Adjust all users of
      the previous chap/cephx and secret unions with the source->auth data.
      97e3397c
  6. 03 7月, 2014 2 次提交
    • J
      Use virBufferCheckError everywhere we report OOM error · 92a8e72f
      Ján Tomko 提交于
      Replace:
      if (virBufferError(&buf)) {
          virBufferFreeAndReset(&buf);
          virReportOOMError();
          ...
      }
      
      with:
      if (virBufferCheckError(&buf) < 0)
          ...
      
      This should not be a functional change (unless some callers
      misused the virBuffer APIs - a different error would be reported
      then)
      92a8e72f
    • J
      More indentation fixes · 275f0224
      Ján Tomko 提交于
      Reindent nwfilter gentech driver and one block in rbd storage backend.
      275f0224
  7. 29 4月, 2014 1 次提交
  8. 02 4月, 2014 1 次提交
    • E
      conf: track sizes directly in source struct · cce2410a
      Eric Blake 提交于
      One of the features of qcow2 is that a wrapper file can have
      more capacity than its backing file from the guest's perspective;
      what's more, sparse files make tracking allocation of both
      the active and backing file worthwhile.  As such, it makes
      more sense to show allocation numbers for each file in a chain,
      and not just the top-level file.  This sets up the fields for
      the tracking, although it does not modify XML to display any
      new information.
      
      * src/util/virstoragefile.h (_virStorageSource): Add fields.
      * src/conf/storage_conf.h (_virStorageVolDef): Drop redundant
      fields.
      * src/storage/storage_backend.c (virStorageBackendCreateBlockFrom)
      (createRawFile, virStorageBackendCreateQemuImgCmd)
      (virStorageBackendCreateQcowCreate): Update clients.
      * src/storage/storage_driver.c (storageVolDelete)
      (storageVolCreateXML, storageVolCreateXMLFrom, storageVolResize)
      (storageVolWipeInternal, storageVolGetInfo): Likewise.
      * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget)
      (virStorageBackendFileSystemRefresh)
      (virStorageBackendFileSystemVolResize)
      (virStorageBackendFileSystemVolRefresh): Likewise.
      * src/storage/storage_backend_logical.c
      (virStorageBackendLogicalMakeVol)
      (virStorageBackendLogicalCreateVol): Likewise.
      * src/storage/storage_backend_scsi.c
      (virStorageBackendSCSINewLun): Likewise.
      * src/storage/storage_backend_mpath.c
      (virStorageBackendMpathNewVol): Likewise.
      * src/storage/storage_backend_rbd.c
      (volStorageBackendRBDRefreshVolInfo)
      (virStorageBackendRBDCreateImage): Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskMakeDataVol)
      (virStorageBackendDiskCreateVol): Likewise.
      * src/storage/storage_backend_sheepdog.c
      (virStorageBackendSheepdogBuildVol)
      (virStorageBackendSheepdogParseVdiList): Likewise.
      * src/storage/storage_backend_gluster.c
      (virStorageBackendGlusterRefreshVol): Likewise.
      * src/conf/storage_conf.c (virStorageVolDefFormat)
      (virStorageVolDefParseXML): Likewise.
      * src/test/test_driver.c (testOpenVolumesForPool)
      (testStorageVolCreateXML, testStorageVolCreateXMLFrom)
      (testStorageVolDelete, testStorageVolGetInfo): Likewise.
      * src/esx/esx_storage_backend_iscsi.c (esxStorageVolGetXMLDesc):
      Likewise.
      * src/esx/esx_storage_backend_vmfs.c (esxStorageVolGetXMLDesc)
      (esxStorageVolCreateXML): Likewise.
      * src/parallels/parallels_driver.c (parallelsAddHddByVolume):
      Likewise.
      * src/parallels/parallels_storage.c (parallelsDiskDescParseNode)
      (parallelsStorageVolDefineXML, parallelsStorageVolCreateXMLFrom)
      (parallelsStorageVolDefRemove, parallelsStorageVolGetInfo):
      Likewise.
      * src/vbox/vbox_tmpl.c (vboxStorageVolCreateXML)
      (vboxStorageVolGetXMLDesc): Likewise.
      * tests/storagebackendsheepdogtest.c (test_vdi_list_parser):
      Likewise.
      * src/phyp/phyp_driver.c (phypStorageVolCreateXML): Likewise.
      cce2410a
  9. 25 3月, 2014 1 次提交
  10. 18 3月, 2014 1 次提交
  11. 12 3月, 2014 1 次提交
    • J
      storage: Fix bugs in VIR_APPEND_ELEMENT series · ea10cd76
      John Ferlan 提交于
      From commit id 'd53bbfd1'
      
      Found one core and one possible memory leak. Core seen during local
      virt-test/tp_libvirt run for the vol_create_from test. The memory leak
      was seen by inspection during a review of all VIR_APPEND_ELEMENT changes
      
      In storage_backend_disk/virStorageBackendDiskMakeDataVol(), the 'vol'
      needs to be kept around since it's used later, so use the _COPY macro.
      This caused a segv in libvirtd:
      
      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7fffe87c3700 (LWP 6919)]
      virStorageBackendDiskMakeDataVol (vol=0x0, groups=0x7fffc8000d70, pool=0x7fffc8002460) at storage/storage_backend_disk.c:66
      66          if (vol->target.path == NULL) {
      
      In storage_backend_rbd/virStorageBackendRBDRefreshPool() there's a failure
      path where the 'vol' needs to go through virStorageVolDefFree() since it
      wouldn't be appended.
      ea10cd76
  12. 10 3月, 2014 1 次提交
  13. 25 2月, 2014 2 次提交
  14. 11 2月, 2014 1 次提交
  15. 16 1月, 2014 1 次提交
  16. 11 12月, 2013 1 次提交
  17. 21 11月, 2013 1 次提交
    • E
      maint: fix comma style issues: remaining code · e44a9a70
      Eric Blake 提交于
      Most of our code base uses space after comma but not before;
      fix the remaining uses before adding a syntax check.
      
      * src/network/bridge_driver.c: Consistently use commas.
      * src/node_device/node_device_hal.c: Likewise.
      * src/node_device/node_device_udev.c: Likewise.
      * src/storage/storage_backend_rbd.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e44a9a70
  18. 31 10月, 2013 1 次提交
    • E
      storage: use correct type for array count · 41183cf7
      Eric Blake 提交于
      Using size_t counts will let us use VIR_APPEND_ELEMENT and friends.
      
      * src/conf/storage_conf.h (_virStoragePoolObjList)
      (_virStorageVolDefList): Track list sizes with size_t.
      * src/storage/storage_backend_rbd.c
      (virStorageBackendRBDRefreshPool): Fix type fallout.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      41183cf7
  19. 30 10月, 2013 1 次提交
    • E
      storage: fix incorrect typedef · 8e7f57a7
      Eric Blake 提交于
      The rbd code had a confusing typedef ending in Ptr that was not
      actually a pointer, which made the rest of the code harder to
      read.  This fixes things to actually pass by pointer rather than
      by copy.
      
      * src/storage/storage_backend_rbd.c (virStorageBackendStatePtr):
      Fix typedef.
      (virStorageBackendRBDOpenRADOSConn)
      (virStorageBackendRBDCloseRADOSConn)
      (volStorageBackendRBDRefreshVolInfo)
      (virStorageBackendRBDRefreshPool, virStorageBackendRBDDeleteVol)
      (virStorageBackendRBDCreateVol, virStorageBackendRBDRefreshVol)
      (virStorageBackendRBDResizeVol): Fix fallout.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8e7f57a7
  20. 15 10月, 2013 1 次提交
  21. 21 8月, 2013 1 次提交
    • J
      Report secret usage error message similarly · 1fa7946f
      John Ferlan 提交于
      Each of the modules handled reporting error messages from the secret fetching
      slightly differently with respect to the error. Provide a similar message
      for each error case and provide as much data as possible.
      1fa7946f
  22. 23 7月, 2013 1 次提交
    • J
      Adjust 'ceph' authentication secret usage for rbd pool. · c2257d2e
      John Ferlan 提交于
      Update virStorageBackendRBDOpenRADOSConn() to use the internal API to the
      secret driver in order to get the secret value instead of the external
      virSecretGetValue() path. Without the flag VIR_SECRET_GET_VALUE_INTERNAL_CALL
      there is no way to get the value of private secret.
      
      This also requires ensuring there is a connection which wasn't true for
      for the refreshPool() path calls from storageDriverAutostart() prior to
      adding support for the connection to a qemu driver. It seems calls to
      virSecretLookupByUUIDString() and virSecretLookupByUsage() from the
      refreshPool() path would have failed with no way to find the secret - that is
      theoretically speaking since the 'conn' was NULL the failure would have been
      "failed to find the secret".
      c2257d2e
  23. 16 7月, 2013 1 次提交
  24. 11 7月, 2013 1 次提交
  25. 10 7月, 2013 1 次提交
  26. 10 5月, 2013 1 次提交
  27. 03 5月, 2013 1 次提交
  28. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  29. 20 3月, 2013 1 次提交
    • L
      storage: fix unlikely memory leak in rbd backend · 57f39e03
      Laine Stump 提交于
      virStorageBackendRBDRefreshPool() first allocates an array big enough
      to hold 1024 names, then calls rbd_list(), which returns ERANGE if the
      array isn't big enough. When that happens, the VIR_ALLOC_N is called
      again with a larger size. Unfortunately, the original array isn't
      freed before allocating a new one.
      57f39e03
  30. 11 1月, 2013 1 次提交
  31. 21 12月, 2012 5 次提交
  32. 03 12月, 2012 1 次提交
    • J
      conf: prevent crash with no uuid in cephx auth secret · bc680e13
      Ján Tomko 提交于
      Fix the null pointer access when UUID is not specified.
      Introduce a bool 'uuidUsable' to virStoragePoolAuthCephx that indicates
      if uuid was specified or not and use it instead of the pointless
      comparison of the static UUID array to NULL.
      Add an error message if both uuid and usage are specified.
      
      Fixes:
      Error: FORWARD_NULL (CWE-476):
      libvirt-0.10.2/src/conf/storage_conf.c:461: var_deref_model: Passing
          null pointer "uuid" to function "virUUIDParse(char const *, unsigned
          char *)", which dereferences it. (The dereference is assumed on the
          basis of the 'nonnull' parameter attribute.)
      Error: NO_EFFECT (CWE-398):
          libvirt-0.10.2/src/conf/storage_conf.c:979: array_null: Comparing an
          array to null is not useful: "src->auth.cephx.secret.uuid != NULL".
      bc680e13
  33. 12 10月, 2012 1 次提交
  34. 21 9月, 2012 1 次提交