1. 22 8月, 2019 3 次提交
  2. 11 7月, 2019 1 次提交
    • D
      storage: acquire a pidfile in the driver root directory · 44a5ba2a
      Daniel P. Berrangé 提交于
      When we allow multiple instances of the driver for the same user
      account, using a separate root directory, we need to ensure mutual
      exclusion. Use a pidfile to guarantee this.
      
      In privileged libvirtd this ends up locking
      
         /var/run/libvirt/storage/driver.pid
      
      In unprivileged libvirtd this ends up locking
      
        /run/user/$UID/libvirt/storage/run/driver.pid
      
      NB, the latter can vary depending on $XDG_RUNTIME_DIR
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      44a5ba2a
  3. 13 6月, 2019 1 次提交
  4. 07 3月, 2019 1 次提交
  5. 14 12月, 2018 1 次提交
  6. 04 9月, 2018 3 次提交
  7. 04 1月, 2018 1 次提交
  8. 14 12月, 2017 2 次提交
    • J
      storage: Convert virStoragePoolObjList to use virObjectRWLockable · 4b2e0ed6
      John Ferlan 提交于
      Now that we have a private storage pool list, we can take the next
      step and convert to using objects. In this case, we're going to use
      RWLockable objects (just like every other driver) with two hash
      tables for lookup by UUID or Name.
      
      Along the way the ForEach and Search API's will be adjusted to use
      the related Hash API's and the various FindBy functions altered and
      augmented to allow for HashLookup w/ and w/o the pool lock already
      taken.
      
      After virStoragePoolObjRemove we will need to virObjectUnref(obj)
      after to indicate the caller is "done" with it's reference. The
      Unlock occurs during the Remove.
      
      The NumOf, GetNames, and Export functions all have their own callback
      functions to return the required data and the FindDuplicate code
      can use the HashSearch function callbacks.
      4b2e0ed6
    • J
      storage: Privatize virStoragePoolObjListPtr · 90e65353
      John Ferlan 提交于
      Move the structure into virstorageobj.c.
      
      Use the virStoragePoolObjListNew allocator to fill in the @pools for
      the storage driver and test driver.
      90e65353
  9. 24 11月, 2017 4 次提交
    • J
      storage: Convert virStoragePoolObj into virObjectLockable · dcb5d8bb
      John Ferlan 提交于
      Now that we're moved the object into virstorageobj, let's make the
      code use the lockable object.
      dcb5d8bb
    • J
      storage: Introduce virStoragePoolObjListSearch · 5d5c732d
      John Ferlan 提交于
      Create an API to search through the storage pool objects looking for
      a specific truism from a callback API in order to return the specific
      storage pool object that is desired.
      5d5c732d
    • J
      storage: Introduce virStoragePoolObjListForEach · d0258dd9
      John Ferlan 提交于
      Create an API to walk the pools->objs[] list in order to perform a
      callback function for each element of the objs array that doesn't care
      about whether the action succeeds or fails as the desire is to run the
      code over every element in the array rather than fail as soon as or if
      one fails.
      d0258dd9
    • J
      storage: Introduce virStoragePoolObjEndAPI · 770aa08e
      John Ferlan 提交于
      For now it'll just call the virStoragePoolObjUnlock, but a future
      adjustment will do something different. Since the new API will check
      for a NULL object before the Unlock call, callers no longer need to
      check for NULL before calling.
      
      The virStoragePoolObjUnlock is now private/static to virstorageobj.c
      with a short term forward reference.
      770aa08e
  10. 08 11月, 2017 1 次提交
  11. 06 10月, 2017 1 次提交
  12. 19 9月, 2017 5 次提交
    • J
      storage: Internally represent @autostart as bool · ccc8c311
      John Ferlan 提交于
      Since it's been used that way anyway, let's just convert it to a bool
      and only make the external representation be an int.
      ccc8c311
    • J
      storage: Introduce APIs to search/scan storage pool volumes list · 5bf9b655
      John Ferlan 提交于
      Introduce virStoragePoolObjForEachVolume to scan each volume
      calling the passed callback function until all volumes have been
      processed in the storage pool volume list, unless the callback
      function returns an error.
      
      Introduce virStoragePoolObjSearchVolume to search each volume
      calling the passed callback function until it returns true
      indicating that the desired volume was found.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5bf9b655
    • 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
    • J
      storage: Introduce virStoragePoolObjNew · 407e6a36
      John Ferlan 提交于
      Create/use a helper to perform object allocation.
      
      Adjust storagevolxml2argvtest.c in order to use the allocator and
      setting of the obj->def.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      407e6a36
    • J
      storage: Create accessor API's for virStoragePoolObj · b3198286
      John Ferlan 提交于
      In preparation for making a private object, create accessor API's for
      consumer storage functions to use:
      
          virStoragePoolObjGetDef
          virStoragePoolObjSetDef
          virStoragePoolObjGetNewDef
          virStoragePoolObjDefUseNewDef
          virStoragePoolObjGetConfigFile
          virStoragePoolObjSetConfigFile
          virStoragePoolObjGetAutostartLink
          virStoragePoolObjIsActive
          virStoragePoolObjSetActive
          virStoragePoolObjIsAutostart
          virStoragePoolObjSetAutostart
          virStoragePoolObjGetAsyncjobs
          virStoragePoolObjIncrAsyncjobs
          virStoragePoolObjDecrAsyncjobs
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      b3198286
  13. 17 8月, 2017 1 次提交
  14. 22 7月, 2017 2 次提交
  15. 11 4月, 2017 6 次提交
  16. 18 3月, 2017 3 次提交