1. 22 7月, 2017 1 次提交
  2. 26 4月, 2017 2 次提交
  3. 28 3月, 2017 2 次提交
  4. 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
  5. 21 2月, 2017 1 次提交
  6. 19 1月, 2017 1 次提交
  7. 13 1月, 2017 1 次提交
  8. 10 1月, 2017 4 次提交
  9. 18 5月, 2016 1 次提交
  10. 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
  11. 21 3月, 2016 2 次提交
  12. 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
  13. 26 2月, 2016 1 次提交
  14. 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
  15. 04 2月, 2016 1 次提交
  16. 03 2月, 2016 3 次提交
  17. 30 1月, 2016 1 次提交
  18. 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
  19. 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
  20. 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
  21. 10 12月, 2015 1 次提交
  22. 21 10月, 2015 1 次提交
  23. 14 10月, 2015 1 次提交
  24. 10 6月, 2015 1 次提交
  25. 26 5月, 2015 1 次提交
    • C
      storage: conf: Don't set any default <mode> in the XML · 7c2d65dd
      Cole Robinson 提交于
      The XML parser sets a default <mode> if none is explicitly passed in.
      This is then used at pool/vol creation time, and unconditionally reported
      in the XML.
      
      The problem with this approach is that it's impossible for other code
      to determine if the user explicitly requested a storage mode. There
      are some cases where we want to make this distinction, but we currently
      can't.
      
      Handle <mode> parsing like we handle <owner>/<group>: if no value is
      passed in, set it to -1, and adjust the internal consumers to handle
      it.
      7c2d65dd
  26. 02 4月, 2015 1 次提交
  27. 02 3月, 2015 1 次提交
  28. 17 12月, 2014 1 次提交
    • J
      logical: Add "--type snapshot" to lvcreate command · cafb934d
      John Ferlan 提交于
      A recent lvm change has resulted in a change for the "default" type of
      logical volume created when the "--virtualsize" or "--V" is supplied on
      the command line (e.g. when the allocation and capacity values of a to
      be created volume differ). It seems that at the very least the following
      change adjusts the default type:
      
      https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=e0164f21
      
      and the following may also have some impact.
      
      https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=87fc3b71
      
      When using the virsh vol-create-as or vol-create xmlfile commands, the
      result is that libvirt will now create a "thin logical volume" and a
      "thin logical volume pool" rather than just a "thin snapshot logical
      volume". For example the following sequence:
      
        # lvcreate --name test -L 2M -V 5M lvm_test
          Rounding up size to full physical extent 4.00 MiB
          Rounding up size to full physical extent 8.00 MiB
          Logical volume "test" created.
        # lvs lvm_test
          LV    VG       Attr       LSize Pool  Origin Data%  Meta%  Move Log Cpy%Sync Convert
          lvol1 lvm_test twi-a-tz-- 4.00m              0.00   0.98
          test  lvm_test Vwi-a-tz-- 8.00m lvol1        0.00
      
      compared to the former code which had the following:
      
          LV   VG       Attr       LSize  Pool Origin         Data%  Move Log Cpy%Sync Convert
          test LVM_Test swi-a-s---  4.00m      [test_vorigin]   0.00
      
      Since libvirt doesn't know how to parse the thin logical volume
      and pool, it will fail to find the newly created volume and pool
      even though it exists in the volume group.
      
      It cannot find since the command used to find/parse returns a thin volume
      'test' with no associated device, for example the output is:
      
        lvol1##UgUwkp-fTFP-C0rc-ufue-xrYh-dkPr-FGPFPx#lvol1_tdata(0)#thin-pool#1#4194304#4194304#4194304#twi-a-tz--
        test##NcaIoH-4YWJ-QKu3-sJc3-EOcS-goff-cThLIL##thin#0#8388608#4194304#8388608#Vwi-a-tz--
      
      as compared to the former which had the following:
      
            test#[test_vorigin]#Dt5Of3-4WE6-buvw-CWJ4-XOiz-ywOU-YULYw6#/dev/sda3(1300)#linear#1#4194304#4194304#4194304#swi-a-s---
      
      While it's possible to generate code to handle the new thin lv and pool, this
      patch will add a "--type snapshot" onto the lvcreate command libvirt uses
      in order to "for now" be able to continue to utilize the thin snapshots
      cafb934d
  29. 22 7月, 2014 1 次提交
    • R
      storage: logical: drop useless if · 53939d58
      Roman Bogorodskiy 提交于
      virStorageBackendLogicalCreateVol contains a piece like:
      
          if (vol->target.path != NULL) {
              /* A target path passed to CreateVol has no meaning */
              VIR_FREE(vol->target.path);
          }
      
      The 'if' is useless here, but 'syntax-check' doesn't catch that
      because of the comment, so drop the 'if'.
      53939d58
  30. 18 7月, 2014 1 次提交
    • J
      storage: Disallow vol_wipe for sparse logical volumes · 8a9f7cbe
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1091866
      
      Add a new boolean 'sparse'.  This will be used by the logical backend
      storage driver to determine whether the target volume is sparse or not
      (also known by a snapshot or thin logical volume). Although setting sparse
      to true at creation could be seen as duplicitous to setting during
      virStorageBackendLogicalMakeVol() in case there are ever other code paths
      between Create and FindLVs that need to know about the volume be sparse.
      
      Use the 'sparse' in a new virStorageBackendLogicalVolWipe() to decide whether
      to attempt to wipe the logical volume or not. For now, I have found no
      means to wipe the volume without writing to it. Writing to the sparse
      volume causes it to be filled. A sparse logical volume is not completely
      writeable as there exists metadata which if overwritten will cause the
      sparse lv to go INACTIVE which means pool-refresh will not find it.
      Access to whatever lvm uses to manage data blocks is not provided by
      any API I could find.
      8a9f7cbe
  31. 17 7月, 2014 1 次提交