Revision 26436ab5 src/Ganeti/Locking/Allocation.hs

b/src/Ganeti/Locking/Allocation.hs
27 27
  ( LockAllocation
28 28
  , emptyAllocation
29 29
  , OwnerState(..)
30
  , lockOwners
30 31
  , listLocks
31 32
  , LockRequest(..)
32 33
  , requestExclusive
......
112 113
                 , laOwned = M.empty
113 114
                 }
114 115

  
116
-- | Obtain the list of all owners holding at least a single lock.
117
lockOwners :: Ord b => LockAllocation a b -> [b]
118
lockOwners = M.keys . laOwned
119

  
115 120
-- | Obtain the locks held by a given owner. The locks are reported
116 121
-- as a map from the owned locks to the form of ownership (OwnShared
117 122
-- or OwnExclusive).

Also available in: Unified diff