Distributed file locking for a network file share
AssigneeCitrix Systems, Inc.
InventorsDeepak R., Shailendra Shrivastav, Sangamesh Vishweshwar Kalagond
Life of this patent
Estimating the term…
Abstract
Methods and systems for file locking are described herein. An on-premise file share may store files that are accessible to both a local on-premise client and a remote off-premise client. The off-premise file share may request to check-out one of the files. In response, one of multiple nodes may obtain for the file a file handle with exclusive write access. File locking information may be stored at the file share that indicates the node that holds the file handle and that indicates the file is in a locked state whereby other remote off-premise clients or local on-premise clients are prevented from editing the file.
Claims18
A method comprising:
- receiving, from a first client within a first network having a first network domain, a request for write access to a file stored at a file share within a second network having a second network domain, wherein the file is locally accessible to a second client within the second network;
- preventing the second client from writing to the file at least by:
- obtaining, for the file at an addressable node of a plurality of addressable nodes within the second network and separate from the file share, a file handle with exclusive write access to the file;
- and
- holding, at the addressable node and separate from the file share, the file handle obtained;
- indicating that the file is in a locked state at least by storing, at the file share, file locking information that indicates the addressable node that holds the file handle for the file;
- receiving, from the first client, a request to save, to the file share, edits to the file;
- releasing the file handle held at the addressable node;
- saving, at the file share, the edits to the file;
- maintaining the locked state of the file at least by:
- obtaining, at a second addressable node of the plurality of addressable nodes, a new file handle for the file;
- and
- holding, at the second addressable node, the new file handle obtained.
A system comprising:
- a file share within a first network having a first network domain, wherein the file share stores one or more files, and wherein in the file share is accessible to a first client within the first network and is remotely accessible to a second client within a second network having a second network domain;
- a plurality of addressable nodes within the first network and separate from the file share, wherein each addressable node of the plurality of addressable nodes is configured to hold at least one file handle respectively corresponding to at least one file of the one or more files;
- memory storing instructions that, when executed by one or more processors of the system, cause the system to:
- receive, from the second client, a request for write access to a file of the one or more files stored at the file share;
- prevent the first client from writing to the file at least by:
- causing an addressable node of the plurality of addressable nodes to obtain, for the file and separate from the file share, a file handle with exclusive write access to the file;
- and
- causing the addressable node to hold, at the addressable node and separate from the file share, the file handle obtained;
- indicate the file is in a locked state at least by storing, at the file share, file locking information that indicates the addressable node that holds the file handle for the file receive, from the second client, a request to save, to the file share, edits to the file;
- cause the addressable node that holds the file handle to release the file handle;
- cause the file share to save the edits to the file;
- and
- maintain the locked state of the file at least by:
- causing a second addressable node of the plurality of addressable nodes to obtain a new file handle for the file;
- and
- causing the second addressable node to hold, at the second addressable node, the new file handle obtained.
A method comprising:
- based on receiving, from a first client within a first network having a first network domain, a first request for write access to a file stored at a file share within a second network having a second network domain:
- selecting, from among a plurality of addressable nodes within the second network and separate from the file share and based on one or more load balancing criteria, a first addressable node to process the first request;
- preventing the a second client with the second network from writing to the file at least by:
- obtaining, for the file and at the first addressable node and separate from the file share, a file handle with exclusive write access to the file;
- and
- holding, at the first addressable node and separate from the file share, the file handle obtained;
- indicating that the file is in a locked state by storing, in a first lock file that is associated with the first addressable node and that is stored at the file share in a file share directory that contains the file, first file locking information that indicates the first addressable node that holds the file handle for the file;
- and
- based on receiving, from the first client, a second request to save, to the file share, one or more edits to the file:
- selecting, from among the plurality of addressable nodes and based on the one or more load balancing criteria, a second addressable node to process the second request;
- determining, by the second addressable node and based on the first file locking information of the first lock file, that the first addressable node holds the file handle for the file;
- sending, to the first addressable node from the second addressable node, a request to release the file handle;
- based on the first addressable node releasing the file handle for the file, updating the first lock file to indicate that the first addressable node no longer holds the file handle;
- based on the one or more edits to the file being saved to the file share:
- obtaining, for the file and at the second addressable node, a new file handle for the file;
- and
- holding, at the second addressable node, the new file handle obtained;
- and
- maintaining the locked state of the file by storing, in a second lock file associated with the second addressable node and stored at the file share in the file share directory, second file locking information that indicates the second addressable node that holds the new file handle for the file.
Dependencies are inferred from the claim text.