1. 03 7月, 2013 1 次提交
  2. 21 6月, 2013 1 次提交
    • J
      conf: add features to volume target XML · 31d42506
      Ján Tomko 提交于
      Add <features> and <compat> elements to volume target XML.
      
      <compat> is a string which for qcow2 represents the QEMU version
      it should be compatible with. Valid values are 0.10 and 1.1.
      1.1 is implicit if the <features> element is present, otherwise
      qemu-img default is used. 0.10 can be specified to explicitly
      create older images after the qemu-img default changes.
      
      <features> contains optional features, so far
      <lazy_refcounts/> is available, which enables caching of reference
      counters, improving performance for snapshots.
      31d42506
  3. 06 6月, 2013 1 次提交
  4. 31 5月, 2013 1 次提交
    • J
      Resolve memory leak found by valgrind · 2f3e7f1e
      John Ferlan 提交于
      Commit '6afdfc8e' adjusted the exit and error paths to go through the error
      and cleanup labels, but neglected to remove the return ret prior to cleanup.
      Also noted the 'type' xml string fetch was never checked for NULL which
      could lead to some interesting results.
      2f3e7f1e
  5. 29 5月, 2013 5 次提交
  6. 24 5月, 2013 6 次提交
  7. 23 5月, 2013 1 次提交
  8. 21 5月, 2013 1 次提交
  9. 20 5月, 2013 2 次提交
    • O
      storage_conf: Fix indentions in storage_conf.c · 76359ee5
      Osier Yang 提交于
      Uses the 4 spaces for indention.
      76359ee5
    • O
      storage_conf: Fix the coding stype in storage_conf.c · c8a3cf89
      Osier Yang 提交于
      Changes:
        * Remove the useless space in "for" statement (e.g.
          for (i = 0 ; i < something ; i++)
      
        * Change the function's style to:
          void
          foo(bar)
          {
              printf("foo is not bar\n");
          }
      
        * Don't lose "{}" for "if...else" branches if one of the branch
          has more than one line block. Example of the old ones:
          if (a) {
              printf("a is not funny");
          } else
              printf("a is funny");
      
        * Remove the 1 space before "goto" label.
      
        * Remove the useless blank line(s)
      
        * Add blank line if it can make the code more clear to eyes.
      c8a3cf89
  10. 16 5月, 2013 1 次提交
  11. 07 5月, 2013 1 次提交
  12. 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
  13. 08 4月, 2013 1 次提交
    • O
      New XML attributes for storage pool source adapter · 9f781da6
      Osier Yang 提交于
      This introduces 4 new attributes for storage pool source adapter.
      E.g.
      
      <adapter type='fc_host' parent='scsi_host5' wwnn='20000000c9831b4b' wwpn='10000000c9831b4b'/>
      
      Attribute 'type' can be either 'scsi_host' or 'fc_host', and defaults
      to 'scsi_host' if attribute 'name' is specified. I.e. It's optional
      for 'scsi_host' adapter, for back-compat reason. However, mandatory
      for 'fc_host' adapter and any new future adapter types. Attribute
      'parent' is to specify the parent for the fc_host adapter.
      
      * docs/formatstorage.html.in:
        - Add documents for the 4 new attrs
      * docs/schemas/storagepool.rng:
        - Add RNG schema
      * src/conf/storage_conf.c:
        - Parse and format the new XMLs
      * src/conf/storage_conf.h:
        - New struct virStoragePoolSourceAdapter, replace "char *adapter" with it;
        - New enum virStoragePoolSourceAdapterType
      * src/libvirt_private.syms:
        - Export TypeToString and TypeFromString
      * src/phyp/phyp_driver.c:
        - Replace "adapter" with "adapter.data.name", which is member of the union
          of the new struct virStoragePoolSourceAdapter now. Later patch will
          add the checking, as "adapter.data.name" is only valid for "scsi_host"
          adapter.
      * src/storage/storage_backend_scsi.c:
        - Like above
      * tests/storagepoolxml2xmlin/pool-scsi-type-scsi-host.xml:
      * tests/storagepoolxml2xmlin/pool-scsi-type-fc-host.xml:
        - New test for 'fc_host' and "scsi_host" adapter
      * tests/storagepoolxml2xmlout/pool-scsi.xml:
        - Change the expected output, as the 'type' defaults to 'scsi_host' if 'name"
          specified now
      * tests/storagepoolxml2xmlout/pool-scsi-type-scsi-host.xml:
      * tests/storagepoolxml2xmlout/pool-scsi-type-fc-host.xml:
        - New test
      * tests/storagepoolxml2xmltest.c:
        - Include the test
      9f781da6
  14. 25 2月, 2013 1 次提交
  15. 21 12月, 2012 7 次提交
  16. 03 12月, 2012 2 次提交
    • P
      maint: Misc whitespace cleanups · 83124357
      Peter Krempa 提交于
      83124357
    • 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
  17. 29 11月, 2012 1 次提交
  18. 26 11月, 2012 1 次提交
    • A
      Add private data pointer to virStoragePool and virStorageVol · 2b121dbc
      Ata E Husain Bohra 提交于
      This will simplify the refactoring of the ESX storage driver to support
      a VMFS and an iSCSI backend.
      
      One of the tasks the storage driver needs to do is to decide which backend
      driver needs to be invoked for a given request. This approach extends
      virStoragePool and virStorageVol to store extra parameters:
      
      1. privateData: stores pointer to respective backend storage driver.
      2. privateDataFreeFunc: stores cleanup function pointer.
      
      virGetStoragePool and virGetStorageVol are modfied to accept these extra
      parameters as user params. virStoragePoolDispose and virStorageVolDispose
      checks for cleanup operation if available.
      
      The private data pointer allows the ESX storage driver to store a pointer
      to the used backend with each storage pool and volume. This avoids the need
      to detect the correct backend in each storage driver function call.
      2b121dbc
  19. 29 10月, 2012 1 次提交
    • J
      xml: print uuids in the warning · 0b121614
      Ján Tomko 提交于
      In the XML warning, we print a virsh command line that can be used to
      edit that XML. This patch prints UUIDs if the entity name contains
      special characters (like shell metacharacters, or "--" that would break
      parsing of the XML comment). If the entity doesn't have a UUID, just
      print the virsh command that can be used to edit it.
      0b121614
  20. 20 10月, 2012 1 次提交
    • E
      storage: list more file types · f772b3d9
      Eric Blake 提交于
      When an image has no backing file, using VIR_STORAGE_FILE_AUTO
      for its type is a bit confusing.  Additionally, a future patch
      would like to reserve a default value for the case of no file
      type specified in the XML, but different from the current use
      of -1 to imply probing, since probing is not always safe.
      
      Also, a couple of file types were missing compared to supported
      code: libxl supports 'vhd', and qemu supports 'fat' for directories
      passed through as a file system.
      
      * src/util/storage_file.h (virStorageFileFormat): Add
      VIR_STORAGE_FILE_NONE, VIR_STORAGE_FILE_FAT, VIR_STORAGE_FILE_VHD.
      * src/util/storage_file.c (virStorageFileMatchesVersion): Match
      documentation when version probing not supported.
      (cowGetBackingStore, qcowXGetBackingStore, qcow1GetBackingStore)
      (qcow2GetBackingStoreFormat, qedGetBackingStore)
      (virStorageFileGetMetadataFromBuf)
      (virStorageFileGetMetadataFromFD): Take NONE into account.
      * src/conf/domain_conf.c (virDomainDiskDefForeachPath): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Likewise.
      * src/conf/storage_conf.c (virStorageVolumeFormatFromString): New
      function.
      (poolTypeInfo): Use it.
      f772b3d9
  21. 21 9月, 2012 1 次提交
  22. 06 9月, 2012 1 次提交
    • O
      list: Add helpers for listing storage pool objects · 84208a4a
      Osier Yang 提交于
      src/conf/storage_conf.c: Add virStoragePoolMatch to filter the
      pools; Add virStoragePoolList to iterate over the pool objects
      with filter.
      
      src/conf/storage_conf.h: Declare virStoragePoolMatch,
      virStoragePoolList, and the macros for filters.
      
      src/libvirt_private.syms: Export helper virStoragePoolList.
      84208a4a
  23. 03 8月, 2012 1 次提交
    • H
      Added timestamps to storage volumes · 7383c1d7
      Hendrik Schwartke 提交于
      The access, birth, modification and change times are added to
      storage volumes and corresponding xml representations.  This
      shows up in the XML in this format:
      
      <timestamps>
        <atime>1341933637.027319099</atime>
        <mtime>1341933637.027319099</mtime>
      </timestamps>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7383c1d7