1. 17 10月, 2017 9 次提交
    • 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
      test: set 'type' field of virStorageSource · 8fdeefe1
      Peter Krempa 提交于
      Set the type so that the iterators will work after upcoming
      modification.
      8fdeefe1
    • 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: storagefile: Tolerate NULL path when looking up volume in chain · e3fb414e
      Peter Krempa 提交于
      chain->path may be NULL e.g. for NBD drives, so the check needs to avoid
      dereferencing the path in such case
      e3fb414e
    • P
      util: storage: use stored index to lookup disks · 9cc8d6ee
      Peter Krempa 提交于
      We can now use the backing store ID directly rather than counting the
      number of images seen while looking up images.
      9cc8d6ee
    • 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
    • P
      conf: Make backing store index optional · 7547ed12
      Peter Krempa 提交于
      Index will remain an internal property even if we allow backing store
      parsing from the XML, so we need to allow backing store without it in
      the schema.
      7547ed12
    • P
      conf: domain: Simplify return from backing store parser · 8b13c37f
      Peter Krempa 提交于
      Use VIR_STEAL_PTR to remove conditional cleanup.
      8b13c37f
  2. 16 10月, 2017 30 次提交
  3. 14 10月, 2017 1 次提交