1. 06 8月, 2018 1 次提交
  2. 11 7月, 2018 1 次提交
  3. 12 6月, 2018 1 次提交
  4. 04 5月, 2018 1 次提交
  5. 12 4月, 2018 3 次提交
  6. 06 4月, 2018 2 次提交
  7. 09 2月, 2018 2 次提交
  8. 01 2月, 2018 3 次提交
  9. 10 1月, 2018 1 次提交
  10. 04 1月, 2018 1 次提交
  11. 14 12月, 2017 4 次提交
    • J
      storage: Reduce need for using storageDriverLock · 052ecaee
      John Ferlan 提交于
      Now that the storage pools are self locking, we can reduce the number
      of places that need to take the big hammer storage driver lock
      052ecaee
    • 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
    • J
      storage: Fix path check in storagePoolLookupByTargetPath · d4f80d43
      John Ferlan 提交于
      Commit id '5ab746b8' introduced the function as perhaps a copy
      of storageVolLookupByPath; however, it did not use the @cleanpath
      variable even though it used the virFileSanitizePath. So in essance
      the only "check" being done for failure is whether it was possible
      to strdup the path.
      
      Looking at the virStoragePoolDefParseXML one will note that the
      target.path is stored using the result of virFileSanitizePath.
      Therefore, this function should sanitize and use the input @path
      for the argument to storagePoolLookupByTargetPathCallback which
      is comparing against stored target.path values.
      
      Additionally, if there was an error we should use the proper error
      of VIR_ERR_NO_STORAGE_POOL (instead of VIR_ERR_NO_STORAGE_VOL).
      d4f80d43
  12. 24 11月, 2017 5 次提交
    • J
      storage: Fix broken storage_driver build · 6caf67f8
      John Ferlan 提交于
      Commit id '5d5c732d' had an incorrect assignment and was found
      by travis build:
      
      storage/storage_driver.c:1668:14: error: equality comparison with extraneous
            parentheses [-Werror,-Wparentheses-equality]
          if ((obj == virStoragePoolObjListSearch(&driver->pools,
      
               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      6caf67f8
    • 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
  13. 17 11月, 2017 1 次提交
    • J
      storage: Resolve storage driver crash · 2dd70901
      John Ferlan 提交于
      Resolve a storage driver crash as a result of a long running
      storageVolCreateXML when the virStorageVolPoolRefreshThread is
      run as a result of when a storageVolUpload completed and ran the
      virStoragePoolObjClearVols without checking if the creation
      code was currently processing a buildVol after incrementing
      the driver->asyncjob count.
      
      The refreshThread will now check the pool asyncjob count before
      attempting to pursue the pool refresh. Adjust the documentation
      to describe the condition.
      
      Crash from valgrind is as follows (with a bit of editing):
      
      ==21309== Invalid read of size 8
      ==21309==    at 0x153E47AF: storageBackendUpdateVolTargetInfo
      ==21309==    by 0x153E4C30: virStorageBackendUpdateVolInfo
      ==21309==    by 0x153E52DE: virStorageBackendVolRefreshLocal
      ==21309==    by 0x153DE29E: storageVolCreateXML
      ==21309==    by 0x562035B: virStorageVolCreateXML
      ==21309==    by 0x147366: remoteDispatchStorageVolCreateXML
      ...
      ==21309==  Address 0x2590a720 is 64 bytes inside a block of size 336 free'd
      ==21309==    at 0x4C2F2BB: free
      ==21309==    by 0x54CB9FA: virFree
      ==21309==    by 0x55BC800: virStorageVolDefFree
      ==21309==    by 0x55BF1D8: virStoragePoolObjClearVols
      ==21309==    by 0x153D967E: virStorageVolPoolRefreshThread
      ...
      ==21309==  Block was alloc'd at
      ==21309==    at 0x4C300A5: calloc
      ==21309==    by 0x54CB483: virAlloc
      ==21309==    by 0x55BDC1F: virStorageVolDefParseXML
      ==21309==    by 0x55BDC1F: virStorageVolDefParseNode
      ==21309==    by 0x55BE5A4: virStorageVolDefParse
      ==21309==    by 0x153DDFF1: storageVolCreateXML
      ==21309==    by 0x562035B: virStorageVolCreateXML
      ==21309==    by 0x147366: remoteDispatchStorageVolCreateXML
      ...
      2dd70901
  14. 08 11月, 2017 1 次提交
  15. 06 10月, 2017 1 次提交
  16. 22 9月, 2017 1 次提交
  17. 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
  18. 19 9月, 2017 8 次提交
  19. 31 8月, 2017 1 次提交
  20. 24 7月, 2017 1 次提交