1. 24 6月, 2016 1 次提交
    • J
      secret: Move virStorageSecretType and rename · 1eca5f65
      John Ferlan 提交于
      Move the enum into a new src/util/virsecret.h, rename it to be
      virSecretLookupType. Add a src/util/virsecret.h in order to perform
      a couple of simple operations on the secret XML and virSecretLookupTypeDef
      for clearing and copying.
      
      This includes quite a bit of collateral damage, but the goal is to remove
      the "virStorage*" and replace with the virSecretLookupType so that it's
      easier to to add new lookups that aren't necessarily storage pool related.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      1eca5f65
  2. 23 6月, 2016 1 次提交
  3. 22 6月, 2016 4 次提交
  4. 17 6月, 2016 1 次提交
  5. 07 6月, 2016 1 次提交
  6. 06 6月, 2016 2 次提交
  7. 24 5月, 2016 1 次提交
  8. 23 5月, 2016 1 次提交
    • J
      storage: do not clear vols before volume upload · 21fdb4fe
      Ján Tomko 提交于
      Commit 5e54361c added virStoragePoolObjClearVols before refreshPool
      to prevent duplicate volume entries.
      
      However it is not needed here because we're not refreshing the pool yet,
      just checking for the existence of the refresh callback.
      
      The actual refresh is done via virStorageVolFDStreamCloseCb
      in virStorageVolPoolRefreshThread, which already calls
      virStoragePoolObjClearVols.
      21fdb4fe
  9. 20 5月, 2016 1 次提交
  10. 18 5月, 2016 2 次提交
  11. 16 5月, 2016 1 次提交
  12. 11 5月, 2016 4 次提交
    • J
      storage: Fix virStorageBackendDiskDeleteVol for device mapper · 8cdff0b9
      John Ferlan 提交于
      Commit id 'df1011ca' modified virStorageBackendDiskDeleteVol to use
      "dmsetup remove --force" to remove the volume, but left things in an
      inconsistent state since the partition still existed on the disk and
      only the device mapper device (/dev/dm-#) was removed.
      
      Prior to commit '1895b421' (or '1ffd82bb' and '471e1c4e'), this could
      go unnoticed since virStorageBackendDiskRefreshPool wasn't called.
      However, the pool would be unusable since the /dev/dm-# device would
      be removed even though the partition was not removed unless a multipathd
      restart reset the link. That would of course make the volume appear again
      in the pool after a refresh or pool start after libvirt reload.
      
      This patch removes the 'dmsetup' logic and re-implements the partition
      deletion logic for device mapper devices. The removal of the partition
      via 'parted rm --script #' will cause udev device change logic to allow
      multipathd to handle removing the dm-* device associated with the partition.
      8cdff0b9
    • J
      storage: Fix algorithm generating path names for devmapper · e7bde8d3
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1265694
      
      Commit id '020135dc' didn't quite get the algorithm correct when a
      device mapper source ended with a non numeric value (e.g. ends with
      an alphabet value).
      
      This patch modifies the 'part_separator' logic to add the "p" separator
      to the attempted target path name only when specified as part_separator='yes'.
      
      For a source name that already ends with a number, the logic doesn't change
      as the part separator would need to be there.
      
      For a source name that ends with something other than a number, this allows
      the possibility that a "p" separator can be added. The default for one of
      these source devices is to not add the separator.
      
      The key for device mapper and the need for a partition separator "p" is
      the presence of a number in the last character of the device name link
      in /dev/mapper.  A name such as "/dev/mapper/mpatha1" would generate
      a "/dev/mapper/mpatha1p1" partition, while "/dev/mapper/mpatha" would
      generate partition "/dev/mapper/mpatha1". Similarly for a device
      mapper entry not using friendly names or an alias, a device such as
      "/dev/mapper/3600a0b80005b10ca00005ad656fd8d93" would generate a
      paritition "/dev/mapper/3600a0b80005b10ca00005ad656fd8d93p1", while
      a device such as "/dev/mapper/3600a0b80005b10ca00005e115729093f" would
      generate a partition "/dev/mapper/3600a0b80005b10ca00005e115729093f1".
      The long number is the WWID of the device. It's also possible to assign
      an alias for a device mapper entry, that alias follows the same rules
      with respect to ending with a number or not when adding a "p" to create
      the target device path.
      e7bde8d3
    • J
      storage: Need to clear pool prior to calling the refreshPool · 5e54361c
      John Ferlan 提交于
      Prior to calling the 'refreshPool' during CreatePool or UploadPool
      operations, we need to clear the pool; otherwise, the pool will
      have duplicated entries.
      5e54361c
    • J
      storage: Fix regression cloning volume into a logical pool · 2c52ec43
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1318993
      
      Commit id 'dd519a29' caused a regression cloning a volume into a
      logical pool by removing just the 'allocation' adjustment during
      storageVolCreateXMLFrom. Combined with the change to not require the
      new volume input XML to have a capacity listed (commit id 'e3f1d2a8')
      left the possibility that a zero allocation value (e.g., not provided)
      would create a thin/sparse logical volume. When a thin lv becomes fully
      populated, then LVM sets the partition 'inactive' and the subsequent
      fdatasync() fails.
      
      Add a new 'has_allocation' flag to be set at XML parse time to indicate
      that allocation was provided. This is done so that if it's not provided
      the create-from code uses the capacity value since we document that if
      omitted, the volume will be fully allocated at time of creation.
      
      For a logical backend, that creation time is 'createVol', while for a
      file backend, creation doesn't set the size, but the 'createRaw' called
      during buildVolFrom will decide whether the file is sparse or not based
      on the provided capacity and allocation value.
      
      For volume clones that provide different allocation and capacity values
      to allow for sparse files, there is no change.
      2c52ec43
  13. 02 5月, 2016 1 次提交
    • M
      Change virDevicePCIAddress to virPCIDeviceAddress · c36b1f7b
      Martin Kletzander 提交于
      We had both and the only difference was that the latter also included
      information about multifunction setting.  The problem with that was that
      we couldn't use functions made for only one of the structs (e.g.
      parsing).  To consolidate those two structs, use the one in virpci.h,
      include that in domain_conf.h and add the multifunction member in it.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      c36b1f7b
  14. 30 4月, 2016 1 次提交
  15. 26 4月, 2016 1 次提交
  16. 20 4月, 2016 3 次提交
    • C
      storage: drop the plumbing needed for kvm-img/qcow-create · 272c6224
      Cole Robinson 提交于
      Remove all the plumbing needed for the different qcow-create/kvm-img
      non-raw file creation.
      
      We can drop the error messages because CreateQemuImg will thrown an
      error for us but with slightly less fidelity (unable to find qemu-img),
      which I think is acceptable given the unlikeliness of that error in
      practice.
      272c6224
    • C
      storage: remove support for /usr/bin/kvm-img · 487d211d
      Cole Robinson 提交于
      This an ubuntu/debian packaging convention. At one point it may have
      been an actually different binary, but at least as of ubuntu precise
      (the oldest supported ubuntu distro, released april 2012) kvm-img is
      just a symlink to qemu-img for back compat.
      
      I think it's safe to drop support for it
      487d211d
    • C
      storage: remove support for /usr/bin/qcow-create · 1196fed2
      Cole Robinson 提交于
      qcow-create was a crippled qemu-img impl that shipped with xen. I
      think supporting this was only relevant for really old distros
      that didn't have a proper qemu package, like early RHEL5. I think
      it's fair to drop support
      1196fed2
  17. 17 4月, 2016 1 次提交
    • R
      ZFS: Support sparse volumes · c81bba4f
      Richard Laager 提交于
      By default, `zfs create -V ...` reserves space for the entire volsize,
      plus some extra (which attempts to account for overhead).
      
      If `zfs create -s -V ...` is used instead, zvols are (fully) sparse.
      
      A middle ground (partial allocation) can be achieved with
      `zfs create -s -o refreservation=... -V ...`.  Both libvirt and ZFS
      support this approach, so the ZFS storage backend should support it.
      Signed-off-by: NRichard Laager <rlaager@wiktel.com>
      c81bba4f
  18. 16 4月, 2016 1 次提交
  19. 15 4月, 2016 9 次提交
  20. 14 4月, 2016 1 次提交
  21. 29 3月, 2016 2 次提交
    • N
      storage: Initialize pool size parameters for refresh thread · 3e19b5d5
      Nitesh Konkar 提交于
      If the pool creation thread happens to detect the luns in
      the scsi target, the size parameters will be calculated as
      part of the refreshPool called from storagePoolCreate().
      
      This means the virStoragePoolFCRefreshThread (commit id
      '512b8747') waiting to run and "refresh" the pool will
      essentially double the allocation and capacity values.
      A separate refresh would correct the values.
      
      To avoid this, the FCRefreshThread needs to reinitialize
      the pool size values prior to calling virStorageBackendSCSIFindLUs
      which eventually calls virStorageBackendSCSINewLun and
      updates the size values for each volume found.
      3e19b5d5
    • P
      storage: rbd: Fix build · 98033a8b
      Peter Krempa 提交于
      After the recent commits the build didn't work for me. Fix it by
      using size_t as the callback argument is using and the correct
      formatter. The attempted fixup to use %llu as a formatter was wrong.
      98033a8b