Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti / Locking @ 71dc39a1

Name Size
Allocation.hs 15.5 kB
Locks.hs 1.3 kB
Types.hs 1.5 kB

Latest revisions

# Date Author Comment
71dc39a1 02/26/2014 06:23 pm Klaus Aehlig

Make LockAllocation an instance of JSON

In this way, we can serialize a lock state to disk, so that
locks can survive a restart of WConfD.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

4b217f68 02/21/2014 02:14 pm Klaus Aehlig

Support opportunistic lock allocation

Add a function to opportunistically allocate as many locks of a given
set as possible. This is equivalent to sequentially try the locks in
increasing lock order after restricting to those locks where the
required owner state is higher than the currently held one....

d8216f2d 02/21/2014 02:14 pm Klaus Aehlig

Add a convenience function to restrict locks to a given set

As it is an operation the locking daemon is supposed to provide,
add a function restricting the locks of a user to a given list
and release all other locks.

Signed-off-by: Klaus Aehlig <>...

956b83d6 02/20/2014 10:12 am Klaus Aehlig

Enforce the order restrictions on group locks

Disallow requests for an exclusive lock, if the owner already
holds a shared (and only shared) lock on a group lock that lock
belongs to.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

1ca6b451 02/19/2014 03:45 pm Klaus Aehlig

Efficiently verify consistent lock requests

Most requests for lock updates are consistent and mention
every lock only once. So verify this property efficiently
by comparing lengths. Only if the length do not coincide
go through the actual (quadratic) comparison to find a...

381889dc 02/19/2014 03:45 pm Klaus Aehlig

Support lock implication in allocation

Make the module abstractly handling lock allocation
honor the additional restrictions caused by lock
implications.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

80004e70 02/19/2014 03:45 pm Klaus Aehlig

Add a convenience function to free all locks of an owner

While freeing all locks of a single owner can easily be defined
out of listLocks and updateLocks, it is worth having this function
in its own right. For example, it will be needed when the death of...

75033afd 02/19/2014 03:45 pm Klaus Aehlig

Make GanetiLocks an instance of Lock

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

91e5d533 02/19/2014 03:45 pm Klaus Aehlig

Add a type class describing types that can serve as locks

Besides the lock order and Show, an additional datum is needed in order
to describe lock inclusion, used, e.g., for group locks. So add a type
class describing this property.

Signed-off-by: Klaus Aehlig <>...

c6d48e16 02/19/2014 03:45 pm Klaus Aehlig

Add missing documentation to exported function listLocks

The module Ganeti.Locking.Allocation exports the function listLocks,
hence a documentation string is required. Add it.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

View revisions

Also available in: Atom