# US 2020/0142827 A1 · Cached volumes at storage gateways

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0142827 A1
- Document ID: US20200142827A1
- Status: Published application
- Kind: A1
- Application number: 16/706,536
- Filed: 2019-12-06
- Published: 2020-05-07
- Earliest claimed: 2012-10-31
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: David Carl Salyers; Pradeep Vincent; Ankur Khetrapal; Kestutis Patiejunas
- Web page: https://patentgrep.com/patent/US20200142827A1

## CPC

- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/0647: {Migration mechanisms}
- G06F 3/0685: {Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays}
- G06F 11/1435: {using file system or storage system metadata}
- G06F 11/1438: {Restarting or rejuvenating}
- G06F 11/1441: {Resetting or repowering}
- G06F 11/1464: {for networked environments}
- G06F 12/08: in hierarchically structured memory systems, e.g. virtual memory systems
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0813: with a network or matrix configuration
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 12/0871: Allocation or management of cache space
- G06F 12/0893: Caches characterised by their organisation or structure
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 2212/1016: Performance improvement
- G06F 2212/154: Networked environment
- G06F 2212/284: being distributed
- G06F 2212/452: Instruction code
- G06F 2212/461: Sector or disk block
- G06F 2212/466: Metadata, control data
- G06F 2212/468: The specific object being partially cached
- G06F 2212/60: Details of cache memory
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and apparatus for supporting cached volumes at storage gateways are disclosed. A storage gateway appliance is configured to cache at least a portion of a storage object of a remote storage service at local storage devices. In response to a client's write request, directed to at least a portion of a data chunk of the storage object, the appliance stores a data modification indicated in the write request at a storage device, and asynchronously uploads the modification to the storage service. In response to a client's read request, directed to a different portion of the data chunk, the appliance downloads the requested data from the storage service to the storage device, and provides the requested data to the client.

## Claims

### Claim at position 1

-26. (canceled)

### Claim 27

A system, comprising:
one or more processors and memories storing program instructions that, when executed by the one or more processors:
designate a first storage space of a storage appliance to (a) cache at least a portion of one or more data chunks of a file of a remote storage service and (b) store first metadata for the one or more data chunks;
designate a second storage space of the storage appliance to store second metadata, based on the first metadata, for the one more data chunks of the file;
update a portion of the second metadata based at least in part on a modification of at least a portion of the first metadata, wherein said update of the portion of the second metadata is performed asynchronously with respect to the modification of the at least a portion of the first metadata; and
determine an offset for, or a state of, at least a portion of a particular data chunk of the one or more data chunks using the portion of the second metadata, and enable client access to the at least the portion of the particular data chunk.

### Claim 28 (depends on 27)

The system of claim 27, wherein the one or more memories store program instructions that, when executed by the one or more processors:
determine, using an in-memory version of metadata associated with the particular data chunk, whether an I/O request directed to at least a portion of the particular data chunk results in a cache miss, wherein at least a portion of the in-memory version corresponds to at least a portion of inline metadata stored for the particular data chunk.

### Claim 29 (depends on 27)

The system as recited in claim 27, wherein:
the particular data chunk comprises a plurality of data blocks,
the first storage space comprises an alternating sequence of cached data blocks of the particular data chunk and inline metadata sections corresponding to the cached data blocks,
to modify at least a portion of inline metadata in response to an I/O request directed to at least a particular data block of the plurality of data blocks, the program instructions, when executed by the one or more processors:
identify an offset within the first storage space at which the at least a portion of inline metadata is stored, based at least in part on an offset of the particular data block within the particular data chunk.

### Claim 30 (depends on 27)

The system as recited in claim 27, wherein the particular data chunk comprises a plurality of data blocks, and wherein the program instructions, when executed by the one or more processors:
receive a write request directed to at least a particular data block of the plurality of data blocks,
modify the particular data block within the first storage space in accordance with the write request;
add an entry to an upload buffer configured for asynchronous uploads of modified data to the remote storage service, wherein the entry indicates modifications performed on the particular data block; and
verify that modifications indicated in the entry have been uploaded to the remote storage service prior to replacement of the particular data block in the first storage space.

### Claim 31 (depends on 30)

The system of claim 30, wherein the storage appliance is configured with a plurality of disks, including a first set of one or more disks comprising the first storage space and the second storage space, and a different set of one or more disks comprising the upload buffer.

### Claim 32 (depends on 27)

The system as recited in claim 27, wherein the particular data chunk comprises a plurality of data blocks, and wherein the program instructions, when executed by the one or more processors:
receive a read request directed to at least a particular data block of the plurality of data blocks;
download at least a portion of the particular data chunk, comprising the particular data block, from the remote storage service;
determine whether the at least a portion of the particular data chunk is to be merged with one or more cached data blocks present in the first storage space;
in response to determining that a merge is to be performed, merge the at least a portion of the particular data chunk with the one or more cached data blocks prior to storing the at least a portion of the particular data chunk in the first storage space; and
extract the particular data block from the at least a portion of the particular data chunk and provide the particular data block in response to the request for the read request.

### Claim 33 (depends on 27)

The system of claim 27, wherein the particular data chunk comprises a plurality of data blocks, and wherein the program instructions, when executed by the one or more processors:
receive a write request directed to a particular portion of a particular data block of the plurality of data blocks;
modify the particular portion of the particular data block within the first storage space in accordance with the write request; and
store an invalidity indicator in a remainder portion of the particular data block within the first storage space.

### Claim 34

A method, comprising:
performing, by one or more computing devices:
designating a first storage space of a storage appliance to (a) cache at least a portion of one or more data chunks of a file of a remote storage service and (b) store first metadata for the one or more data chunks;
designating a second storage space of the storage appliance to store second metadata, based on the first metadata, for the one more data chunks of the file;
updating. based at least in part on a modification of at least a portion of the first metadata, a portion of the second metadata, wherein said updating is performed asynchronously with respect to the modification; and
determining an offset for, or a state of, at least a portion of a particular data chunk using the portion of the second metadata, and enabling client access to the at least the portion of the particular data chunk.

### Claim 35 (depends on 34)

The method of claim 34, wherein each chunk of the one or more data chunks comprises one or more data blocks, and the method further comprises:
determining, using an in-memory version of metadata associated with the particular data chunk, whether a particular I/O request directed to at least a portion of a particular data chunk results in a cache miss, wherein at least a portion of the in-memory version corresponds to at least a portion of inline metadata stored for data blocks of the particular data chunk.

### Claim 36 (depends on 34)

The method of claim 34, wherein:
each chunk of the one or more data chunks comprises one or more data blocks, and
the first space comprises an alternating sequence of cached data blocks of the particular data chunk and inline metadata sections corresponding to the cached data blocks,
each inline metadata section comprises one or more metadata elements,
the modification of the at least one element of inline metadata is performed in response to a particular I/O request directed at a particular data block of the particular data chunk, and
the method further comprises:
identifying an offset within the first space at which a particular element of inline metadata corresponding to the particular data block is stored, based at least in part on an offset of the particular data block within the particular data chunk.

### Claim 37 (depends on 34)

The method of claim 34, wherein each chunk of the one or more data chunks comprises one or more data blocks, and the method further comprises:
receiving an I/O request comprising a modification directed to a particular data block of the particular data chunk;
modifying the particular data block within the first space in accordance with the I/O request;
adding an entry to an upload buffer configured for asynchronous uploads of modified data to the remote storage service, wherein the entry indicates modifications performed on the particular data block in response to the I/O request; and
verifying that modifications indicated in the entry have been uploaded to the remote storage service prior to replacing the particular data block in the first storage space.

### Claim 38 (depends on 37)

The method of claim 37, further comprising:
configuring the storage appliance with a plurality of disks, including a first set of one or more disks comprising the first storage space and the second storage space, and a different set of one or more disks comprising the upload buffer.

### Claim 39 (depends on 34)

The method of claim 34, wherein each chunk of the one or more data chunks comprises one or more data blocks, and the method further comprises:
receiving a read request directed to a particular data block of the particular data chunk;
downloading at least a portion of the particular data chunk, comprising the particular data block, from the remote storage service;
determining whether the at least a portion of the particular data chunk is to be merged with one or more cached data blocks present in the first space;
merging, in response to determining that a merge is to be performed, the at least a portion of the particular data chunk with the one or more cached data blocks prior to storing the at least a portion of the particular data chunk in the first space; and
extracting the particular data block from the at least a portion of the particular data chunk and providing the particular data block in response to the read request.

### Claim 40 (depends on 34)

The method of claim 34, wherein each chunk of the one or more data chunks comprises one or more data blocks and the method further comprises:
receiving a write request directed to a particular portion of a particular data block of the data blocks;
modifying the particular portion of the particular data block within the first storage space in accordance with the write request; and
storing an invalidity indicator in a remainder portion of the particular data block within the first storage space.

### Claim 41

One or more non-transitory computer-readable media comprising program instructions that when executed on or across one or more processors perform:
designating a first storage space of a storage appliance to (a) cache at least a portion of one or more data chunks of a file of a remote storage service and (b) store first metadata for the one or more data chunks;
designating a second storage space of the storage appliance to store second metadata, based on the first metadata, for the one or more data chunks of the file;
updating, based at least in part on a modification of at least a portion of the first metadata and asynchronously with respect to the modification, a portion of the second metadata; and
determining an offset for, or a state of, at least a portion of a particular data chunk using the portion of the second metadata, and enabling client access to the at least the portion of the particular data chunk.

### Claim 42 (depends on 41)

The one or more non-transitory computer-readable media of claim 41, wherein the program instructions that when executed on or across one or more processors perform:
determining whether an input/output (I/O) request will result in the cache miss using an in-memory version of metadata associated with the particular data chunk, wherein at least a portion of the in-memory version corresponds to at least a portion of inline metadata stored for the particular data chunk.

### Claim 43 (depends on 41)

The one or more non-transitory computer-readable media of claim 41, wherein the program instructions that when executed on or across one or more processors perform:
modifying, in response to a determination that a cache miss resulting from an input/output (I/O) request directed to at least a portion of a particular data chunk of the file requires a modification of inline metadata, at least a portion of inline metadata corresponding to the particular data chunk, prior to providing a response to the I/O request;
updating a portion of the second metadata based at least in part on the modification of the at least a portion of the first metadata, wherein said update is performed asynchronously with respect to the modification of the at least a portion of the first metadata; and
determining, after a restart of the storage appliance, a state of the at least a portion of the particular data chunk using the portion of the second metadata, and enable client access to the at least a portion of the particular data chunk.

### Claim 44 (depends on 41)

The one or more non-transitory computer-readable media of claim 41, wherein:
each chunk of the one or more data chunks comprises one or more data blocks, and
the first space comprises an alternating sequence of cached data blocks of the particular data chunk and inline metadata sections corresponding to the cached data blocks,
each inline metadata section comprises one or more metadata elements,
the modifying of the at least one element of inline metadata is performed in response to a particular I/O request directed at a particular data block of the particular data chunk, and
the program instructions, when executed on or across one or more processors, perform:
identifying an offset within the first space at which a particular element of inline metadata corresponding to the particular data block is stored, based at least in part on an offset of the particular data block within the particular data chunk.

### Claim 45 (depends on 41)

The one or more non-transitory computer-readable media of claim 41, wherein each chunk of the one or more data chunks comprises one or more data blocks, and the program instructions, when executed on or across one or more processors, perform:
receiving an I/O request comprising a modification directed to a particular data block of the particular data chunk;
modifying the particular data block within the first space in accordance with the I/O request;
adding an entry to an upload buffer configured for asynchronous uploads of modified data to the remote storage service, wherein the entry indicates modifications performed on the particular data block in response to the I/O request; and
verifying that modifications indicated in the entry have been uploaded to the remote storage service prior to replacing the particular data block in the first storage space.

### Claim 46 (depends on 41)

The one or more non-transitory computer-readable media of claim 41, wherein each chunk of the one or more data chunks comprises one or more data blocks and the program instructions, when executed on or across one or more processors, perform:
receiving a write request directed to a particular portion of a particular data block of the one or more data blocks;
modifying the particular portion of the particular data block within the first storage space in accordance with the write request; and
storing an invalidity indicator in a remainder portion of the particular data block within the first storage space.
