Using a local cache to store, access and modify files tiered to cloud storage
First Claim
1. A method comprising:
- generating a cache tracking tree based on a stub file, wherein the cache tracking tree tracks file regions of the stub file, cached states associated with regions of the stub file, a set of cache flags, a version, a file size, a region size, a data offset, a last region, and a range map;
associating the cache tracking tree with the stub file;
receiving a read request associated with a set of regions of the stub file;
activating a shared cache tracking tree lock on the cache tracking tree wherein the set of cache flags are set to indicate the shared cache tracking tree lock;
activating a shared region lock for the set of regions, wherein the set of cache flags are set to indicate the shared region lock;
determining a cached state associated with the set of regions of the stub file;
in response to determining the cached state associated with the set of regions of the stub file do not have a state of not cached, upgrading the shared region lock to an exclusive region lock;
reading file data from the set of regions; and
deactivating the shared cache tracking tree lock and the exclusive region lock.
9 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods are provided herein for efficient local caching of data tiered to cloud storage to help reduce the bandwidth cost of repeated reads and writes to the same region of a stubbed file, increase the performance of write operations, and increase performance of read operations to portions of a stubbed file accessed repeatedly. When operations are directed toward data tiered to the cloud, the data can be read from cloud storage and stored within a local cache. A cache tracking tree can be generated and used to track file regions of a stub file, cached states associated with regions of the stub file, a set of cache flags, and other file and mapping data. For example, the cache state of regions of a stub file can be tracked including a cached data state, a non-cached state, a modified state, or a truncated state. Operations directed toward stubbed files can then look to the cache tracking tree to determine the most efficient way to access, retrieve, or operate on the data that maximizes local file system performance while reducing network activity.
-
Citations
9 Claims
-
1. A method comprising:
-
generating a cache tracking tree based on a stub file, wherein the cache tracking tree tracks file regions of the stub file, cached states associated with regions of the stub file, a set of cache flags, a version, a file size, a region size, a data offset, a last region, and a range map; associating the cache tracking tree with the stub file; receiving a read request associated with a set of regions of the stub file; activating a shared cache tracking tree lock on the cache tracking tree wherein the set of cache flags are set to indicate the shared cache tracking tree lock; activating a shared region lock for the set of regions, wherein the set of cache flags are set to indicate the shared region lock; determining a cached state associated with the set of regions of the stub file; in response to determining the cached state associated with the set of regions of the stub file do not have a state of not cached, upgrading the shared region lock to an exclusive region lock; reading file data from the set of regions; and deactivating the shared cache tracking tree lock and the exclusive region lock. - View Dependent Claims (2, 3)
-
-
4. A system comprising at least one storage device and at least one hardware processor configured to:
-
generating a cache tracking tree based on a stub file, wherein the cache tracking tree tracks file regions of the stub file, cached states associated with regions of the stub file, a set of cache flags, a version, a file size, a region size, a data offset, a last region, and a range map; associating the cache tracking tree with the stub file; receiving a read request associated with a set of regions of the stub file; activating a shared cache tracking tree lock on the cache tracking tree wherein the set of cache flags are set to indicate the shared cache tracking tree lock; activating a shared region lock for the set of regions, wherein the set of cache flags are set to indicate the shared region lock; determining a cached state associated with the set of regions of the stub file; in response to determining the cached state associated with the set of regions of the stub file do not have a state of not cached, upgrading the shared region lock to an exclusive region lock; reading file data from the set of regions; and deactivating the shared cache tracking tree lock and the exclusive region lock. - View Dependent Claims (5, 6)
-
-
7. A non-transitory computer readable medium with program instructions stored thereon to perform the following acts:
-
generating a cache tracking tree based on a stub file, wherein the cache tracking tree tracks file regions of the stub file, cached states associated with regions of the stub file, a set of cache flags, a version, a file size, a region size, a data offset, a last region, and a range map; associating the cache tracking tree with the stub file; receiving a read request associated with a set of regions of the stub file; activating a shared cache tracking tree lock on the cache tracking tree wherein the set of cache flags are set to indicate the shared cache tracking tree lock; activating a shared region lock for the set of regions, wherein the set of cache flags are set to indicate the shared region lock; determining a cached state associated with the set of regions of the stub file; in response to determining the cached state associated with the set of regions of the stub file do not have a state of not cached, upgrading the shared region lock to an exclusive region lock; reading file data from the set of regions; and deactivating the shared cache tracking tree lock and the exclusive region lock. - View Dependent Claims (8, 9)
-
Specification