locking: Schedule the next possible lock based on per-db limit
authorAmitay Isaacs <amitay@gmail.com>
Thu, 29 May 2014 07:27:32 +0000 (17:27 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 5 Aug 2014 00:53:32 +0000 (10:53 +1000)
commitb430b02b6a1ff815e2379d53727fb02f86c85230
tree464f396f1d72a02c7558c5fd2e1efe45b71c2bae
parentadafb6deee38ee3abe868bc5673748a01990fceb
locking: Schedule the next possible lock based on per-db limit

This prevents searching through active lock requests for every pending
lock request to check if the pending lock request can be scheduled or not.
The locks are scheduled in strict first-in-first-out order.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
(Imported from commit c9664b4b17660c03ed96072a9f5392dbb0800f2c)
server/ctdb_lock.c