1. 04 5月, 2018 1 次提交
  2. 01 2月, 2018 2 次提交
  3. 27 10月, 2017 2 次提交
  4. 17 10月, 2017 2 次提交
    • P
      util: storagefile: Add helpers to check presence of backing store · 0a294a8e
      Peter Krempa 提交于
      Add helpers that will simplify checking if a backing file is valid or
      whether it has backing store. The helper virStorageSourceIsBacking
      returns true if the given virStorageSource is a valid backing store
      member. virStorageSourceHasBacking returns true if the virStorageSource
      has a backing store child.
      
      Adding these functions creates a central points for further refactors.
      0a294a8e
    • P
      storage: Fill in 'type' field for virStorageSource in storage driver · ee4d2df8
      Peter Krempa 提交于
      Storage driver uses virStorageSource only partially to store it's
      configuration but fully when parsing backing files of storage volumes.
      This patch sets the 'type' field to a value other than
      VIR_STORAGE_TYPE_NONE so that further patches can add a terminator
      element to backing chains without breaking iteration.
      ee4d2df8
  5. 06 10月, 2017 1 次提交
  6. 19 9月, 2017 1 次提交
    • J
      storage: Introduce storage volume add, delete, count APIs · 40630a8e
      John Ferlan 提交于
      Create/use virStoragePoolObjAddVol in order to add volumes onto list.
      
      Create/use virStoragePoolObjRemoveVol in order to remove volumes from list.
      
      Create/use virStoragePoolObjGetVolumesCount to get count of volumes on list.
      
      For the storage driver, the logic alters when the volumes.obj list grows
      to after we've fetched the volobj. This is an optimization of sorts, but
      also doesn't "needlessly" grow the volumes.objs list and then just decr
      the count if the virGetStorageVol fails.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      40630a8e
  7. 22 7月, 2017 1 次提交
  8. 26 4月, 2017 2 次提交
  9. 28 3月, 2017 2 次提交
  10. 16 3月, 2017 1 次提交
    • J
      util: Rename virFileWaitForDevices · 97e0d3c3
      John Ferlan 提交于
      The function is actually in virutil.c, but prototyped in virfile.h.
      This patch fixes that by renaming the function to virWaitForDevices,
      adding the prototype in virutil.h and libvirt_private.syms, and then
      changing the callers to use the new name.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      97e0d3c3
  11. 21 2月, 2017 1 次提交
  12. 19 1月, 2017 1 次提交
  13. 13 1月, 2017 1 次提交
  14. 10 1月, 2017 4 次提交
  15. 18 5月, 2016 1 次提交
  16. 27 3月, 2016 1 次提交
    • R
      Revert "logical: Only raw volumes are supported" · 139a3197
      Roman Bogorodskiy 提交于
      This reverts commit 6682d621.
      
      The "if (vol->target.format != VIR_STORAGE_FILE_RAW)" check in the
      createVol backend. This check is bogus because virStorageVolDefParseXML()
      in conf/storage_conf.c sets target.format only if volOptions in
      virStoragePoolTypeInfo has formatFromString set, and that's not the
      case the logical backend.
      
      So the check always fails and breaks volume creation.
      139a3197
  17. 21 3月, 2016 2 次提交
  18. 03 3月, 2016 1 次提交
    • M
      Initialize couple of variables. · bde6e002
      Michal Privoznik 提交于
      While trying to build with -Os couple of compile errors showed
      up.
      
      conf/domain_conf.c: In function 'virDomainChrRemove':
      conf/domain_conf.c:13666:24: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virDomainChrDefPtr ret, **arrPtr = NULL;
                              ^
      Compiler fails to see that @ret is used only if set in the loop,
      but whatever, there's no harm in initializing the variable.
      
      In vboxAttachDrivesNew and _vboxAttachDrivesOld compiler thinks
      that @rc may be used uninitialized. Well, not directly, but maybe
      after some optimization. Yet again, no harm in initializing a
      variable.
      
      In file included from ./util/virthread.h:26:0,
                       from ./datatypes.h:28,
                       from vbox/vbox_tmpl.c:43,
                       from vbox/vbox_V3_1.c:37:
      vbox/vbox_tmpl.c: In function '_vboxAttachDrivesOld':
      ./util/virerror.h:181:5: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virReportErrorHelper(VIR_FROM_THIS, code, __FILE__,              \
           ^
      In file included from vbox/vbox_V3_1.c:37:0:
      vbox/vbox_tmpl.c:1041:14: note: 'rc' was declared here
           nsresult rc;
                    ^
      Yet again, one uninitialized variable:
      
      qemu/qemu_driver.c: In function 'qemuDomainBlockCommit':
      qemu/qemu_driver.c:17194:9: error: 'baseSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               qemuDomainPrepareDiskChainElement(driver, vm, baseSource,
               ^
      
      And another one:
      
      storage/storage_backend_logical.c: In function 'virStorageBackendLogicalMatchPoolSource.isra.2':
      storage/storage_backend_logical.c:618:33: error: 'thisSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                             thisSource->devices[j].path))
                                       ^
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bde6e002
  19. 26 2月, 2016 1 次提交
  20. 11 2月, 2016 1 次提交
    • J
      Prohibit verbose strcat · 28e5655d
      Ján Tomko 提交于
      Using strcat directly is more readable than passing strlen
      of the copied string to strncat.
      28e5655d
  21. 04 2月, 2016 1 次提交
  22. 03 2月, 2016 3 次提交
  23. 30 1月, 2016 1 次提交
  24. 29 1月, 2016 1 次提交
    • J
      logical: Fix comment examples for virStorageBackendLogicalFindLVs · 680030c4
      John Ferlan 提交于
      When commit id '82c1740a' made changes to the output format (changing from
      using a ',' separator to '#'), the examples in the lvs output from the
      comments weren't changed.
      
      Additionally, the two new fields added ('segtype' and 'stripes') were
      not included in the output, leaving it well confusing.
      
      This patch fixes the sample output, adds a 'striped' example, and makes
      other comment related adjustments for long line and spacing between followup
      'NB' remarks (while I'm there).
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      680030c4
  25. 17 12月, 2015 1 次提交
    • J
      storage: Fix startup issue for logical pool · 8c865052
      John Ferlan 提交于
      Commit id '71b803ac' assumed that the storage pool source device path
      was required for a 'logical' pool. This resulted in a failure to start
      a pool without any device path defined.
      
      So, adjust the virStorageBackendLogicalMatchPoolSource logic to
      return success if at least the pool name matches the vgs output
      when no pool source device path is/are provided.
      8c865052
  26. 16 12月, 2015 2 次提交
    • J
      storage: Add helper to compare logical pool def against pvs output · 71b803ac
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1025230
      
      Add a new helper virStorageBackendLogicalMatchPoolSource to compare the
      pool's source name against the output from a 'pvs' command to list all
      volume group physical volume data on the host.  In addition, compare the
      pool's source device list against the particular volume group's device
      list to ensure the source device(s) listed for the pool match what the
      was listed for the volume group.
      
      Then for pool startup or check API's we need to call this new API in
      order to ensure that the pool we're about to start or declare active
      during checkPool has a valid definition vs. the running host.
      71b803ac
    • J
      storage: Create helper for virStorageBackendLogicalFindPoolSources · ae5519f7
      John Ferlan 提交于
      Rework virStorageBackendLogicalFindPoolSources a bit to create a
      helper virStorageBackendLogicalGetPoolSources that will make the
      pvs call in order to generate a list of associated pv_name and vg_name's.
      
      A future patch will make use of this for start/check processing to
      ensure the storage pool source definition matches expectations.
      ae5519f7
  27. 10 12月, 2015 1 次提交
  28. 21 10月, 2015 1 次提交