1. 15 1月, 2013 2 次提交
  2. 14 1月, 2013 3 次提交
  3. 11 1月, 2013 1 次提交
  4. 08 1月, 2013 1 次提交
  5. 21 12月, 2012 8 次提交
  6. 07 12月, 2012 1 次提交
    • J
      storage: allow metadata preallocation when creating qcow2 images · 1c9a2fb1
      Ján Tomko 提交于
      Add VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA flag to virStorageVolCreateXML
      and virStorageVolCreateXMLFrom. This flag requests metadata
      preallocation when creating/cloning qcow2 images, resulting in creating
      a sparse file with qcow2 metadata. It has only slightly larger disk usage
      compared to new image with no allocation, but offers higher performance.
      1c9a2fb1
  7. 06 12月, 2012 1 次提交
  8. 05 12月, 2012 1 次提交
  9. 04 12月, 2012 2 次提交
  10. 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
  11. 30 11月, 2012 1 次提交
  12. 26 11月, 2012 2 次提交
    • 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
    • J
      storage: fix logical volume cloning · 70f0bbe8
      Ján Tomko 提交于
      Commit 258e06c8 removed setting of the volume type to
      VIR_STORAGE_VOL_BLOCK, which leads to failures in
      storageVolumeCreateXMLFrom.
      
      The type (and target.format) of the volume was set to zero. In
      virStorageBackendGetBuildVolFromFunction, this gets interpreted as
      VIR_STORAGE_FILE_NONE and the qemu-img tool is called with unknown
      "none" format.
      
      Bug: https://bugzilla.redhat.com/show_bug.cgi?id=879780
      70f0bbe8
  13. 22 11月, 2012 2 次提交
  14. 02 11月, 2012 1 次提交
  15. 23 10月, 2012 2 次提交
    • J
      storage: don't shadow global 'wait' declaration · b326765c
      Ján Tomko 提交于
      Rename the 'wait' parameter to 'loop'.
      This silences the warning:
      storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows
      a global declaration [-Werror=shadow]
      and fixes the build with -Werror.
      --
      Note: loop is pool backwards.
      b326765c
    • C
      storage: Don't do wait loops from VolLookupByPath · 77eff5ee
      Cole Robinson 提交于
      virStorageVolLookupByPath is an API call that virt-manager uses
      quite a bit when dealing with storage. This call use BackendStablePath
      which has several usleep() heuristics that can be tripped up
      and hang virt-manager for a while.
      
      Current example: an empty mpath pool pointing to /dev/mapper makes
      _any_ calls to virStorageVolLookupByPath take 5 seconds.
      
      The sleep heuristics are actually only needed in certain cases
      when we are waiting for new storage to appear, so let's skip the
      timeout steps when calling from LookupByPath.
      77eff5ee
  16. 22 10月, 2012 1 次提交
    • E
      storage: let format probing work on root-squash NFS · d9d77bfa
      Eric Blake 提交于
      Yet another instance of where using plain open() mishandles files
      that live on root-squash NFS, and where improving the API can
      improve the chance of a successful probe.
      
      * src/util/storage_file.h (virStorageFileProbeFormat): Alter
      signature.
      * src/util/storage_file.c (virStorageFileProbeFormat): Use better
      method for opening file.
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Update caller.
      * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
      Likewise.
      d9d77bfa
  17. 20 10月, 2012 2 次提交
    • E
      storage: don't require caller to pre-allocate metadata struct · 1fc95932
      Eric Blake 提交于
      Requiring pre-allocation was an unusual idiom.  It allowed iteration
      over the backing chain to use fewer mallocs, but made one-shot
      clients harder to read.  Also, this makes it easier for a future
      patch to move away from opening fds on every iteration over the chain.
      
      * src/util/storage_file.h (virStorageFileGetMetadataFromFD): Alter
      signature.
      * src/util/storage_file.c (virStorageFileGetMetadataFromFD): Allocate
      return value.
       (virStorageFileGetMetadata): Update clients.
      * src/conf/domain_conf.c (virDomainDiskDefForeachPath): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Likewise.
      * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
      Likewise.
      1fc95932
    • E
      storage: don't probe non-files · eac74c1f
      Eric Blake 提交于
      Backing chains can end on a network protocol, such as nbd:xxx; we
      should not attempt to probe the file system in this case.
      
      * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
      Only probe files.
      eac74c1f
  18. 17 10月, 2012 2 次提交
    • C
      storage: lvm: lvcreate fails with allocation=0, don't do that · 9f0e9cba
      Cole Robinson 提交于
      On F17 at least, this command fails:
      
      $ sudo /usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt
        Unable to create new logical volume with no extents
      
      Which is unfortunate since allocation=0 is what virt-manager tries to use
      by default.
      
      Rather than telling the user 'don't do that', let's just give them the
      smallest allocation possible if alloc=0 is requested.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=866481
      9f0e9cba
    • C
      storage: lvm: Don't overwrite lvcreate errors · 01df6f2b
      Cole Robinson 提交于
      Before:
      $ sudo virsh vol-create-as --pool vgvirt sparsetest --capacity 16M --allocation 0
      error: Failed to create vol sparsetest
      error: internal error Child process (/usr/sbin/lvchange -aln vgvirt/sparsetest) unexpected exit status 5:   One or more specified logical volume(s) not found.
      
      After:
      $ sudo virsh vol-create-as --pool vgvirt sparsetest --capacity 16M --allocation 0
      error: Failed to create vol sparsetest
      error: internal error Child process (/usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt) unexpected exit status 5:   Unable to create new logical volume with no extents
      01df6f2b
  19. 12 10月, 2012 2 次提交
    • M
      selinux: Use raw contexts · 9674f2c6
      Martin Kletzander 提交于
      We are currently able to work only with non-translated SELinux
      contexts, but we are using functions that work with translated
      contexts throughout the code.  This patch swaps all SELinux context
      translation relative calls with their raw sisters to avoid parsing
      problems.
      
      The problems can be experienced with mcstrans for example.  The
      difference is that if you have translations enabled (yum install
      mcstrans; service mcstrans start), fgetfilecon_raw() will get you
      something like 'system_u:object_r:virt_image_t:s0', whereas
      fgetfilecon() will return 'system_u:object_r:virt_image_t:SystemLow'
      that we cannot parse.
      
      I was trying to confirm that the _raw variants were here since the dawn of
      time, but the only thing I see now is that it was imported together in
      the upstream repo [1] from svn, so before 2008.
      
      Thanks Laurent Bigonville for finding this out.
      
      [1] http://oss.tresys.com/git/selinux.git
      9674f2c6
    • J
      Various typos and misspellings · 149c87b4
      Ján Tomko 提交于
      149c87b4
  20. 11 10月, 2012 1 次提交
    • C
      storage: Report UUID/name consistently in driver errors · 3af8280b
      Cole Robinson 提交于
      Done with:
      
      sed -i -e "s/no pool with matching uuid/no storage pool with matching uuid/g" src/storage/storage_driver.c
      sed -i -e 's/"%s", _("no storage pool with matching uuid")/_("no storage pool with matching uuid %s"), obj->uuid/g' src/storage/storage_driver.c
      sed -i -e 's/"%s", _("storage pool is not active")/_("storage pool '%s' is not active"), pool->def->name/g' src/storage/storage_driver.c
      
      And a couple fixups before, during, and after, and a manual inspection
      pass to make sure nothing was wonky.
      3af8280b
  21. 25 9月, 2012 1 次提交
  22. 21 9月, 2012 1 次提交
  23. 10 9月, 2012 1 次提交