Patent attributes
A method, system, application programming interface, computer system and computer program product to provide locks for controlling access to data by nodes in a multi-node system while minimizing the number of messages sent between nodes. Locks can be grouped into blocks of locks, and exclusive access to data protected by locks in a block of locks can be granted together to a block agent for a particular node. The block agent handles requests for access to the data on behalf of clients running on the respective node. The block agent sends a message to a block master running on another node only when a request is made for access to data to which the block agent has not already obtained access. Access can be granted to a block agent for an entire block or for a portion of a block of locks.