File operations with multiple level file locking techniques
View Patent ↗File systems which provide several different and improved locking capabilities. An application on a client workstation communicates through a client driver to a server which interfaces with a metadata database, which contains locking information about the files. Applications perform as normal. The client driver provides lock and unlock requests to the server when a write lock or a read with intent to write lock is required. If only a read lock is considered appropriate, the client driver does not provide a lock request. The server transparently performs read operations and read locking using the metadata database without specific requests from the client driver. When a read with intent to write or write lock is required, the lock ownership is placed with a given expiration time. When the time expires the lock is not automatically released but remains with the particular requesting client driver until another client driver requests it.
1. A method of for file locking multi-user accessible files contained on a server, the server receiving write lock requests and read with intent to write lock requests but not read lock requests and read and write operations from a client and cooperating with a locking mechanism which sets and contains file lock status, the lock status including read, write and read with intent to write, the method comprising:
receiving write lock requests and read with intent to write lock requests and read and write file operations from the client, where write lock requests precede write operations;
providing read with intent to write lock requests to the locking mechanism if a read with intent to write request is received;
providing a read with intent to write lock request to the locking mechanism on initial receipt of a write lock request, escalating the lock state to a write lock using an escalate lock request to the locking mechanism when a write operation is received, and reducing to a read with intent to write lock using a request to the locking mechanism when the write operation is completed; and
providing a read lock request to the locking mechanism if a read operation is received without a prior read with intent to write lock request and providing a read lock release request to the locking mechanism at a time where the read operation is committed.
2. The method of claim 1 , wherein said escalation lock request is provided only after the write data for the write operation is received from the client.
3. A computer readable medium or media having computer executable instructions for performing a method for file locking multi-user accessible files contained on a server, the server receiving write lock requests and read with intent to write lock requests but not read lock requests and read and write operations from a client and cooperating with a locking mechanism which sets and contains file lock status, the lock status including read, write and read with intent to write, the method comprising:
receiving write lock requests and read with intent to write lock requests and read and write file operations from the client, where write lock requests precede write operations;
providing read with intent to write lock requests to the locking mechanism if a read with intent to write request is received;
providing a read with intent to write lock request to the locking mechanism on initial receipt of a write lock request, escalating the lock state to a write lock using an escalate lock request to the locking mechanism when a write operation is received, and reducing to a read with intent to write lock with a request to the locking mechanism when the write operation is completed; and
providing a read lock request to the locking mechanism if a read operation is received without a prior read with intent to write lock request and providing a read lock release request to the locking mechanism at a time where the read operation is committed.
4. The medium or media of claim 3 , wherein said escalation lock request is provided only after the write data for the write operation is received from the client.