1. 03 11月, 2017 3 次提交
  2. 27 10月, 2017 7 次提交
  3. 17 10月, 2017 4 次提交
    • P
      Terminate backing chains explicitly · a693fdba
      Peter Krempa 提交于
      Express a properly terminated backing chain by putting a
      virStorageSource of type VIR_STORAGE_TYPE_NONE in the chain. The newly
      used helpers simplify this greatly.
      
      The change fixes a bug as formatting an incomplete backing chain and
      parsing it back would end up in expressing a terminated chain since
      src->backingStoreRaw was not populated. By relying on the terminator
      object this can be now processed appropriately.
      a693fdba
    • 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
    • P
      util: storage: Store backing chain index in virStorageSource · c6231a6a
      Peter Krempa 提交于
      The backing store indexes were not bound to the storage sources in any
      way. To allow us to bind a given alias to a given storage source we need
      to save the index in virStorageSource. The backing store ids are now
      generated when detecting the backing chain.
      
      Since we don't re-detect the backing chain after snapshots, the
      numbering needs to be fixed there.
      c6231a6a
  4. 06 10月, 2017 7 次提交
  5. 05 10月, 2017 1 次提交
  6. 27 9月, 2017 1 次提交
    • J
      virStorageFileResize: fallocate the whole capacity · 3f702f5a
      Ján Tomko 提交于
      We have been trying to implement the ALLOCATE flag to mean
      "the volume should be fully allocated after the resize".
      
      Since commit b0579ed9 we do not allocate from the existing
      capacity, but from the existing allocation value.
      However this value is a total of all the allocated bytes,
      not an offset.
      
      For a sparsely allocated file:
      $ perl -e 'print "x"x8192;' > vol1
      $ fallocate -p -o 0 -l 4096 vol1
      $ virsh vol-info vol1 default
      Capacity:       8.00 KiB
      Allocation:     4.00 KiB
      
      Treating allocation as an offset would result in an incompletely
      allocated file:
      $ virsh vol-resize vol1 --pool default 16384 --allocate
      Capacity:       16.00 KiB
      Allocation:     12.00 KiB
      
      Call fallocate from zero on the whole requested capacity to fully
      allocate the file. After that, the volume is fully allocated
      after the resize:
      $ virsh vol-resize vol1 --pool default 16384 --allocate
      $ virsh vol-info vol1 default
      Capacity:       16.00 KiB
      Allocation:     16.00 KiB
      3f702f5a
  7. 22 9月, 2017 1 次提交
  8. 20 9月, 2017 1 次提交
    • J
      storage: Add new events for *PoolBuild() and *PoolDelete(). · b0652192
      Julio Faracco 提交于
      This commit adds new events for two methods and operations: *PoolBuild() and
      *PoolDelete(). Using the event-test and the commands set below we have the
      following outputs:
      
      $ sudo ./event-test
      Registering event callbacks
      myStoragePoolEventCallback EVENT: Storage pool test Defined 0
      myStoragePoolEventCallback EVENT: Storage pool test Created 0
      myStoragePoolEventCallback EVENT: Storage pool test Started 0
      myStoragePoolEventCallback EVENT: Storage pool test Stopped 0
      myStoragePoolEventCallback EVENT: Storage pool test Deleted 0
      myStoragePoolEventCallback EVENT: Storage pool test Undefined 0
      
      Another terminal:
      $ sudo virsh pool-define test.xml
      Pool test defined from test.xml
      
      $ sudo virsh pool-build test
      Pool test built
      
      $ sudo virsh pool-start test
      Pool test started
      
      $ sudo virsh pool-destroy test
      Pool test destroyed
      
      $ sudo virsh pool-delete test
      Pool test deleted
      
      $ sudo virsh pool-undefine test
      Pool test has been undefined
      
      This commits can be a solution for RHBZ #1475227.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1475227Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b0652192
  9. 19 9月, 2017 9 次提交
  10. 12 9月, 2017 1 次提交
    • J
      storage: Adjust expected format for Disk startup processing · 239781e0
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1464313
      
      If a Disk pool was defined/created using XML that either didn't
      specify a specific format or specified format type='unknown', then
      restarting a pool after an initial disk backend build with overwrite
      would fail after a libvirtd restart for a non-autostarted pool.
      
      This is because the persistent pool data is not updated during pool
      build w/ overwrite processing to have the VIR_STORAGE_POOL_DISK_DOS
      default format.
      
      So in addition to the alteration done during disk build processing,
      alter the default expectation for disk startup to be DOS if nothing
      has been defined yet. That will either succeed if the pool had been
      successfully built previously using the default DOS format or fail
      with a message indicating the format is something else that does not
      match the expect format 'dos'.
      239781e0
  11. 31 8月, 2017 2 次提交
  12. 29 8月, 2017 1 次提交
  13. 27 7月, 2017 2 次提交