1. 26 7月, 2013 1 次提交
  2. 24 7月, 2013 1 次提交
    • J
      storage: Add connection for autostart storage pool · a873b496
      John Ferlan 提交于
      Add a privileged field to storageDriverState
      
      Use the privileged value in order to generate a connection which could
      be passed to the various storage backend drivers.
      
      In particular, the iSCSI driver will need a connect in order to perform
      pool authentication using the 'chap' secrets and the RBD driver utilizes
      the connection during pool refresh for pools using 'ceph' secrets.
      
      For now that connection will be to be to qemu driver until a mechanism
      is devised to get a connection to just the secret driver without qemu.
      a873b496
  3. 16 7月, 2013 1 次提交
  4. 11 7月, 2013 1 次提交
  5. 10 7月, 2013 1 次提交
  6. 04 7月, 2013 1 次提交
  7. 03 7月, 2013 1 次提交
  8. 24 6月, 2013 1 次提交
  9. 05 6月, 2013 2 次提交
    • O
      storage: Forbid to shrink the vol's capacity if no --shrink is specified · 38b90e4d
      Osier Yang 提交于
      As the document for "virsh-resize" says:
      <...>
      Attempts to shrink the volume will fail unless I<--shrink> is present;
      </...>
      
      This makes sense as it at least prevent the user shrinking the important
      data of volume without a notice.
      38b90e4d
    • O
      storage: Support preallocate the new capacity for vol-resize · aa2a4cff
      Osier Yang 提交于
      The document for "vol-resize" says the new capacity will be sparse
      unless "--allocate" is specified, however, the "--allocate" flag
      is never implemented. This implements the "--allocate" flag for
      fs backend's raw type volume, based on posix_fallocate and the
      syscall SYS_fallocate.
      aa2a4cff
  10. 21 5月, 2013 1 次提交
  11. 10 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. 24 4月, 2013 3 次提交
  14. 13 4月, 2013 1 次提交
  15. 15 1月, 2013 1 次提交
  16. 21 12月, 2012 4 次提交
  17. 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
  18. 04 12月, 2012 2 次提交
  19. 30 11月, 2012 1 次提交
  20. 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
  21. 02 11月, 2012 1 次提交
  22. 23 10月, 2012 1 次提交
    • 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
  23. 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
  24. 21 9月, 2012 1 次提交
  25. 10 9月, 2012 1 次提交
  26. 06 9月, 2012 1 次提交
  27. 07 8月, 2012 1 次提交
    • D
      Convert public datatypes to inherit from virObject · 46ec5f85
      Daniel P. Berrange 提交于
      This converts the following public API datatypes to use the
      virObject infrastructure:
      
        virConnectPtr
        virDomainPtr
        virDomainSnapshotPtr
        virInterfacePtr
        virNetworkPtr
        virNodeDevicePtr
        virNWFilterPtr
        virSecretPtr
        virStreamPtr
        virStorageVolPtr
        virStoragePoolPtr
      
      The code is significantly simplified, since the mutex in the
      virConnectPtr object now only needs to be held when accessing
      the per-connection virError object instance. All other operations
      are completely lock free.
      
      * src/datatypes.c, src/datatypes.h, src/libvirt.c: Convert
        public datatypes to use virObject
      * src/conf/domain_event.c, src/phyp/phyp_driver.c,
        src/qemu/qemu_command.c, src/qemu/qemu_migration.c,
        src/qemu/qemu_process.c, src/storage/storage_driver.c,
        src/vbox/vbox_tmpl.c, src/xen/xend_internal.c,
        tests/qemuxml2argvtest.c, tests/qemuxmlnstest.c,
        tests/sexpr2xmltest.c, tests/xmconfigtest.c: Convert
        to use virObjectUnref/virObjectRef
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      46ec5f85
  28. 27 7月, 2012 1 次提交
    • E
      maint: don't permit format strings without % · 768007ae
      Eric Blake 提交于
      Any time we have a string with no % passed through gettext, a
      translator can inject a % to cause a stack overread.  When there
      is nothing to format, it's easier to ask for a string that cannot
      be used as a formatter, by using a trivial "%s" format instead.
      
      In the past, we have used --disable-nls to catch some of the
      offenders, but that doesn't get run very often, and many more
      uses have crept in.  Syntax check to the rescue!
      
      The syntax check can catch uses such as
      virReportError(code,
                     _("split "
                       "string"));
      by using a sed script to fold context lines into one pattern
      space before checking for a string without %.
      
      This patch is just mechanical insertion of %s; there are probably
      several messages touched by this patch where we would be better
      off giving the user more information than a fixed string.
      
      * cfg.mk (sc_prohibit_diagnostic_without_format): New rule.
      * src/datatypes.c (virUnrefConnect, virGetDomain)
      (virUnrefDomain, virGetNetwork, virUnrefNetwork, virGetInterface)
      (virUnrefInterface, virGetStoragePool, virUnrefStoragePool)
      (virGetStorageVol, virUnrefStorageVol, virGetNodeDevice)
      (virGetSecret, virUnrefSecret, virGetNWFilter, virUnrefNWFilter)
      (virGetDomainSnapshot, virUnrefDomainSnapshot): Add %s wrapper.
      * src/lxc/lxc_driver.c (lxcDomainSetBlkioParameters)
      (lxcDomainGetBlkioParameters): Likewise.
      * src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML)
      (virDomainDiskDefParseXML, virDomainGraphicsDefParseXML):
      Likewise.
      * src/conf/network_conf.c (virNetworkDNSHostsDefParseXML)
      (virNetworkDefParseXML): Likewise.
      * src/conf/nwfilter_conf.c (virNWFilterIsValidChainName):
      Likewise.
      * src/conf/nwfilter_params.c (virNWFilterVarValueCreateSimple)
      (virNWFilterVarAccessParse): Likewise.
      * src/libvirt.c (virDomainSave, virDomainSaveFlags)
      (virDomainRestore, virDomainRestoreFlags)
      (virDomainSaveImageGetXMLDesc, virDomainSaveImageDefineXML)
      (virDomainCoreDump, virDomainGetXMLDesc)
      (virDomainMigrateVersion1, virDomainMigrateVersion2)
      (virDomainMigrateVersion3, virDomainMigrate, virDomainMigrate2)
      (virStreamSendAll, virStreamRecvAll)
      (virDomainSnapshotGetXMLDesc): Likewise.
      * src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopReqLeaseDel)
      (virNWFilterDHCPSnoopReq): Likewise.
      * src/openvz/openvz_driver.c (openvzUpdateDevice): Likewise.
      * src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
      * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Likewise.
      * src/qemu/qemu_command.c (qemuBuildHubDevStr, qemuBuildChrChardevStr)
      (qemuBuildCommandLine): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/rpc/virnetsaslcontext.c (virNetSASLSessionGetIdentity):
      Likewise.
      * src/rpc/virnetsocket.c (virNetSocketNewConnectUNIX)
      (virNetSocketSendFD, virNetSocketRecvFD): Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskBuildPool): Likewise.
      * src/storage/storage_backend_fs.c
      (virStorageBackendFileSystemProbe)
      (virStorageBackendFileSystemBuild): Likewise.
      * src/storage/storage_backend_rbd.c
      (virStorageBackendRBDOpenRADOSConn): Likewise.
      * src/storage/storage_driver.c (storageVolumeResize): Likewise.
      * src/test/test_driver.c (testInterfaceChangeBegin)
      (testInterfaceChangeCommit, testInterfaceChangeRollback):
      Likewise.
      * src/vbox/vbox_tmpl.c (vboxListAllDomains): Likewise.
      * src/xenxs/xen_sxpr.c (xenFormatSxprDisk, xenFormatSxpr):
      Likewise.
      * src/xenxs/xen_xm.c (xenXMConfigGetUUID, xenFormatXMDisk)
      (xenFormatXM): Likewise.
      768007ae
  29. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  30. 19 7月, 2012 1 次提交
  31. 25 6月, 2012 2 次提交
    • M
      storage: Introduce --inactive for pool-dumpxml · 8d27005b
      Michal Privoznik 提交于
      Storage is one of the last domains in libvirt where we don't fully
      utilize inactive and live XML. Okay, it might be because we don't
      have support for that. So implement such support. However, we need
      to fallback when talking to old daemon which doesn't support this
      new flag called VIR_STORAGE_XML_INACTIVE.
      8d27005b
    • M
      storage: Switch to new def on pool-destroy · 803dc0a5
      Michal Privoznik 提交于
      Currently, we share the idea of old & new def with domains. Users can
      *-edit an object (domain, pool) which spawns a new internal
      representation for them. This is referenced via
      {domainObj,poolObj}->newDef [compared to ->def]. However, for pool we
      were never overwriting def with newDef. This must be done on
      pool-destroy (like we do analogically in domain detroy).
      803dc0a5
  32. 28 5月, 2012 1 次提交