Managing opportunistic locks in a distributed file system
First Claim
1. A computer-implemented method for managing distributed opportunistic locks in a distributed filesystem, the method comprising:
- collectively managing data in the distributed file system using 2 or more cloud controllers, wherein collectively managing the data comprises storing the data for the distributed filesystem in one or more cloud storage systems, wherein the cloud controllers cache and ensure data consistency for data stored in the cloud storage systems;
receiving at a first cloud controller a request from a first client to access a file in the distributed filesystem, wherein the first client requests an opportunistic lock for the file from the first cloud controller, wherein the requested opportunistic lock requests shared read/write access permissions that are not exclusive to other client accesses, wherein the first cloud controller determines an owning cloud controller among the two or more cloud controllers that has been assigned to manage opportunistic locks for the file, wherein the owning cloud controller is distinct from the first cloud controller, wherein the owning cloud controller tracks multiple clients that have been granted opportunistic locks for the file via other cloud controllers that are distinct from the first cloud controller, wherein every cloud controller with clients presently accessing the file registers with the owning cloud controller to receive notifications of any updates to the file;
initiating via the owning cloud controller a sharing access check that determines that there are outstanding opportunistic locks that are presently being held by one or more other clients of the distributed filesystem that were granted via other distinct cloud controllers for the distributed filesystem and that at least one or more of the outstanding opportunistic locks are write locks, wherein the owning cloud controller sends a distributed oplock break request to the cloud controllers that manage granted outstanding opportunistic locks for the file, wherein cloud controllers receiving the distributed oplock break request send an opportunistic lock break notification to their respective clients that are caching the file to ensure that there are no outstanding unflushed modifications to the file, wherein upon receiving the opportunistic lock break notification said clients flush all buffered modifications for the file to their respective cloud controllers, wherein information describing the flushed modifications for the file is synchronized to the cloud storage systems and to all of the other cloud controllers that have registered to receive notifications of updates for the file; and
upon determining that none of the other outstanding client opportunistic locks for the file that remain granted via the other cloud controllers of the distributed filesystem are exclusive locks that conflict with the requested opportunistic lock and determining that all distributed modifications to the file have been synchronized via the distributed oplock break request to ensure that no client receives obsolete data for the file, granting the first client the requested opportunistic lock for the file, wherein multiple clients simultaneously hold opportunistic locks granting shared write access for the file via distinct cloud controllers.
9 Assignments
0 Petitions
Accused Products
Abstract
The disclosed embodiments disclose techniques for managing opportunistic locks in a distributed filesystem. Two or more cloud controllers collectively manage distributed filesystem data that is stored in the cloud storage systems; the cloud controllers ensure data consistency for the stored data, and each cloud controller caches portions of the distributed filesystem. During operation, a client sending a request to access a file from a cloud controller also requests an opportunistic lock for the file. If there are no other outstanding client accesses on the other cloud controllers that preclude the requested opportunistic lock, the cloud controller grants the client file access and the opportunistic lock.
9 Citations
20 Claims
-
1. A computer-implemented method for managing distributed opportunistic locks in a distributed filesystem, the method comprising:
-
collectively managing data in the distributed file system using 2 or more cloud controllers, wherein collectively managing the data comprises storing the data for the distributed filesystem in one or more cloud storage systems, wherein the cloud controllers cache and ensure data consistency for data stored in the cloud storage systems; receiving at a first cloud controller a request from a first client to access a file in the distributed filesystem, wherein the first client requests an opportunistic lock for the file from the first cloud controller, wherein the requested opportunistic lock requests shared read/write access permissions that are not exclusive to other client accesses, wherein the first cloud controller determines an owning cloud controller among the two or more cloud controllers that has been assigned to manage opportunistic locks for the file, wherein the owning cloud controller is distinct from the first cloud controller, wherein the owning cloud controller tracks multiple clients that have been granted opportunistic locks for the file via other cloud controllers that are distinct from the first cloud controller, wherein every cloud controller with clients presently accessing the file registers with the owning cloud controller to receive notifications of any updates to the file; initiating via the owning cloud controller a sharing access check that determines that there are outstanding opportunistic locks that are presently being held by one or more other clients of the distributed filesystem that were granted via other distinct cloud controllers for the distributed filesystem and that at least one or more of the outstanding opportunistic locks are write locks, wherein the owning cloud controller sends a distributed oplock break request to the cloud controllers that manage granted outstanding opportunistic locks for the file, wherein cloud controllers receiving the distributed oplock break request send an opportunistic lock break notification to their respective clients that are caching the file to ensure that there are no outstanding unflushed modifications to the file, wherein upon receiving the opportunistic lock break notification said clients flush all buffered modifications for the file to their respective cloud controllers, wherein information describing the flushed modifications for the file is synchronized to the cloud storage systems and to all of the other cloud controllers that have registered to receive notifications of updates for the file; and upon determining that none of the other outstanding client opportunistic locks for the file that remain granted via the other cloud controllers of the distributed filesystem are exclusive locks that conflict with the requested opportunistic lock and determining that all distributed modifications to the file have been synchronized via the distributed oplock break request to ensure that no client receives obsolete data for the file, granting the first client the requested opportunistic lock for the file, wherein multiple clients simultaneously hold opportunistic locks granting shared write access for the file via distinct cloud controllers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for managing distributed opportunistic locks in a distributed filesystem, the method comprising:
-
collectively managing data in the distributed file system using two or more cloud controllers, wherein collectively managing the data comprises storing the data for the distributed filesystem in one or more cloud storage systems, wherein the cloud controllers cache and ensure data consistency for data stored in the cloud storage systems; receiving at a first cloud controller a request from a first client to access a file in the distributed filesystem, wherein the first client requests an opportunistic lock for the file from the first cloud controller, wherein the requested opportunistic lock requests shared read/write access permissions that are not exclusive to other client accesses, wherein the first cloud controller determines an owning cloud controller among the two or more cloud controllers that has been assigned to manage opportunistic locks for the file, wherein the owning cloud controller is distinct from the first cloud controller, wherein the owning cloudcontroller tracks multiple clients that have been granted opportunistic locks for the file via other cloud controllers that are distinct from the first cloud controller, wherein every cloud controller with clients presently accessing for the file registers with the owning cloud controller to receive notifications of any updates to the file; initiating via the owning cloud controller a sharing access check that determines that there are outstanding opportunistic locks that are presently being held by one or more other clients of the distributed filesystem that were granted via other distinct cloud controllers for the distributed filesystem and that at least one or more of the outstanding opportunistic locks are write locks, wherein the owning cloud controller sends a distributed oplock break request to the cloud controllers that manage granted outstanding opportunistic locks for the file, wherein cloud controllers receiving the distributed oplock break request send an opportunistic lock break notification to their respective clients that are caching the file to ensure that there are no outstanding unflushed modifications to the file, wherein upon receiving the opportunistic lock break notification said clients flush all buffered modifications for the file to their respective cloud controllers, wherein information describing the flushed modifications for the file is synchronized to the cloud storage systems and to all of the other cloud controllers that have registered to receive notifications of updates for the file; and upon determining that none of the other outstanding client opportunistic locks for the file that remain granted via the other cloud controllers of the distributed filesystem are exclusive locks that conflict with the requested opportunistic lock and determining that all distributed modifications to the file have been synchronized via the distributed oplock break request to ensure that no client receives obsolete data for the file, granting the first client the requested opportunistic lock for the file, wherein multiple clients simultaneously holdopportunistic locks granting shared write access for the file via distinct cloud controllers. - View Dependent Claims (14, 15, 16, 17, 18, 19)
-
-
20. A cloud controller that facilitates managing distributed opportunistic locks in a distributed file system, comprising:
-
a processor; a storage mechanism that stores metadata for the distributed filesystem; and a storage management mechanism; wherein two or more cloud controllers collectively manage data in the distributed file system; wherein the cloud controller is configured to receive a request from a client to access a file in the distributed filesystem, wherein the client requests an opportunistic lock for the file from the cloud controller, wherein the requestedopportunistic lock requests shared read/write access permissions that are not exclusive to other client accesses, wherein the cloud controller determines an owning cloud controller among the two or more cloud controllers that has been assigned to manage opportunistic locks for the file, wherein the owning cloud controller is distinct from the cloud controller, wherein the owning cloud controller tracks, wherein every cloud controller with clients presently accessing the file registers with the owning cloud controller to receive notifications of any updates to the file; wherein the cloud controller is configured to initiate via the owning cloud controller a sharing access check that determines that there are outstanding opportunistic locks that are presently being held by one or more other clients of the distributed filesystem that were granted via other distinct cloud controllers for the distributed filesystem and that at least one or more of the outstanding opportunistic locks are write locks, wherein the owning cloud controller sends a distributed oplock break request to the cloud controllers that manage granted outstanding opportunistic locks for the file, wherein cloud controllers receiving the distributed oplock break request send an opportunistic lock break notification to their respective clients that are caching the file to ensure that there are no outstanding unflushed modifications to the file, wherein upon receiving the opportunistic lock break notification said clients flush all buffered modifications for the file to their respective cloud controllers, wherein information describing the flushed modifications for the file is synchronized to the cloud storage systems and to all of the other cloud controllers that have registered to receive notifications of updates for the file; and wherein, upon determining that none of the other outstanding client opportunistic locks for the file that remain granted via the other cloud controllersof the distributed filesystem are exclusive locks that conflict with the requested opportunistic lock and determining that all distributed modifications to the file have been synchronized via the distributed oplock break request to ensure that no client receives obsolete data for the file, the storage management mechanism is configured to grant the client the requested opportunistic lock for the file, wherein multiple clients simultaneously hold opportunistic locks granting shared write access for the file via distinct cloud controllers.
-
Specification