Revision 956b83d6
b/src/Ganeti/Locking/Allocation.hs | ||
---|---|---|
236 | 236 |
, (lock, OwnExclusive)] |
237 | 237 |
-> orderViolation lock |
238 | 238 |
_ -> Ok () |
239 |
let sharedsHeld = M.keysSet $ M.filter (== OwnShared) current |
|
240 |
exclusivesRequested = map lockAffected |
|
241 |
. filter ((== Just OwnExclusive) . lockRequestType) |
|
242 |
$ reqs |
|
243 |
runListHead (return ()) fail $ do |
|
244 |
x <- exclusivesRequested |
|
245 |
i <- lockImplications x |
|
246 |
guard $ S.member i sharedsHeld |
|
247 |
return $ "Order violation: requesting exclusively " ++ show x |
|
248 |
++ " while holding a shared lock on the group lock " ++ show i |
|
249 |
++ " it belongs to." |
|
239 | 250 |
let blockedOn (LockRequest _ Nothing) = S.empty |
240 | 251 |
blockedOn (LockRequest lock (Just OwnExclusive)) = |
241 | 252 |
case M.lookup lock (laLocks state) of |
Also available in: Unified diff